Searched refs:rgrp (Results 1 - 27 of 27) sorted by relevance

/linux-4.4.14/drivers/gpu/drm/rcar-du/
H A Drcar_du_group.c37 u32 rcar_du_group_read(struct rcar_du_group *rgrp, u32 reg) rcar_du_group_read() argument
39 return rcar_du_read(rgrp->dev, rgrp->mmio_offset + reg); rcar_du_group_read()
42 void rcar_du_group_write(struct rcar_du_group *rgrp, u32 reg, u32 data) rcar_du_group_write() argument
44 rcar_du_write(rgrp->dev, rgrp->mmio_offset + reg, data); rcar_du_group_write()
47 static void rcar_du_group_setup_defr8(struct rcar_du_group *rgrp) rcar_du_group_setup_defr8() argument
54 if (rgrp->dev->info->routes[RCAR_DU_OUTPUT_DPAD0].possible_crtcs > 1 && rcar_du_group_setup_defr8()
55 rgrp->index == 0) rcar_du_group_setup_defr8()
56 defr8 |= DEFR8_DRGBS_DU(rgrp->dev->dpad0_source); rcar_du_group_setup_defr8()
58 rcar_du_group_write(rgrp, DEFR8, defr8); rcar_du_group_setup_defr8()
61 static void rcar_du_group_setup(struct rcar_du_group *rgrp) rcar_du_group_setup() argument
64 rcar_du_group_write(rgrp, DEFR, DEFR_CODE | DEFR_DEFE); rcar_du_group_setup()
65 rcar_du_group_write(rgrp, DEFR2, DEFR2_CODE | DEFR2_DEFE2G); rcar_du_group_setup()
66 rcar_du_group_write(rgrp, DEFR3, DEFR3_CODE | DEFR3_DEFE3); rcar_du_group_setup()
67 rcar_du_group_write(rgrp, DEFR4, DEFR4_CODE); rcar_du_group_setup()
68 rcar_du_group_write(rgrp, DEFR5, DEFR5_CODE | DEFR5_DEFE5); rcar_du_group_setup()
70 if (rcar_du_has(rgrp->dev, RCAR_DU_FEATURE_EXT_CTRL_REGS)) { rcar_du_group_setup()
71 rcar_du_group_setup_defr8(rgrp); rcar_du_group_setup()
76 rcar_du_group_write(rgrp, DIDSR, DIDSR_CODE | rcar_du_group_setup()
88 rcar_du_group_write(rgrp, DORCR, DORCR_PG1D_DS1 | DORCR_DPRS); rcar_du_group_setup()
91 mutex_lock(&rgrp->lock); rcar_du_group_setup()
92 rcar_du_group_write(rgrp, DPTSR, (rgrp->dptsr_planes << 16) | rcar_du_group_setup()
93 rgrp->dptsr_planes); rcar_du_group_setup()
94 mutex_unlock(&rgrp->lock); rcar_du_group_setup()
107 int rcar_du_group_get(struct rcar_du_group *rgrp) rcar_du_group_get() argument
109 if (rgrp->use_count) rcar_du_group_get()
112 rcar_du_group_setup(rgrp); rcar_du_group_get()
115 rgrp->use_count++; rcar_du_group_get()
124 void rcar_du_group_put(struct rcar_du_group *rgrp) rcar_du_group_put() argument
126 --rgrp->use_count; rcar_du_group_put()
129 static void __rcar_du_group_start_stop(struct rcar_du_group *rgrp, bool start) __rcar_du_group_start_stop() argument
131 rcar_du_group_write(rgrp, DSYSR, __rcar_du_group_start_stop()
132 (rcar_du_group_read(rgrp, DSYSR) & ~(DSYSR_DRES | DSYSR_DEN)) | __rcar_du_group_start_stop()
136 void rcar_du_group_start_stop(struct rcar_du_group *rgrp, bool start) rcar_du_group_start_stop() argument
150 if (rgrp->used_crtcs++ != 0) rcar_du_group_start_stop()
151 __rcar_du_group_start_stop(rgrp, false); rcar_du_group_start_stop()
152 __rcar_du_group_start_stop(rgrp, true); rcar_du_group_start_stop()
154 if (--rgrp->used_crtcs == 0) rcar_du_group_start_stop()
155 __rcar_du_group_start_stop(rgrp, false); rcar_du_group_start_stop()
159 void rcar_du_group_restart(struct rcar_du_group *rgrp) rcar_du_group_restart() argument
161 __rcar_du_group_start_stop(rgrp, false); rcar_du_group_restart()
162 __rcar_du_group_start_stop(rgrp, true); rcar_du_group_restart()
188 int rcar_du_group_set_routing(struct rcar_du_group *rgrp) rcar_du_group_set_routing() argument
190 struct rcar_du_crtc *crtc0 = &rgrp->dev->crtcs[rgrp->index * 2]; rcar_du_group_set_routing()
191 u32 dorcr = rcar_du_group_read(rgrp, DORCR); rcar_du_group_set_routing()
204 rcar_du_group_write(rgrp, DORCR, dorcr); rcar_du_group_set_routing()
206 return rcar_du_set_dpad0_routing(rgrp->dev); rcar_du_group_set_routing()
H A Drcar_du_plane.c31 static u32 rcar_du_plane_read(struct rcar_du_group *rgrp, rcar_du_plane_read() argument
34 return rcar_du_read(rgrp->dev, rcar_du_plane_read()
35 rgrp->mmio_offset + index * PLANE_OFF + reg); rcar_du_plane_read()
38 static void rcar_du_plane_write(struct rcar_du_group *rgrp, rcar_du_plane_write() argument
41 rcar_du_write(rgrp->dev, rgrp->mmio_offset + index * PLANE_OFF + reg, rcar_du_plane_write()
50 struct rcar_du_group *rgrp = plane->group; rcar_du_plane_setup_fb() local
72 rcar_du_plane_write(rgrp, index, PnMWR, mwr); rcar_du_plane_setup_fb()
86 rcar_du_plane_write(rgrp, index, PnSPXR, src_x); rcar_du_plane_setup_fb()
87 rcar_du_plane_write(rgrp, index, PnSPYR, src_y * rcar_du_plane_setup_fb()
91 rcar_du_plane_write(rgrp, index, PnDSA0R, gem->paddr + fb->offsets[0]); rcar_du_plane_setup_fb()
96 rcar_du_plane_write(rgrp, index, PnMWR, fb->pitches[0]); rcar_du_plane_setup_fb()
98 rcar_du_plane_write(rgrp, index, PnSPXR, src_x); rcar_du_plane_setup_fb()
99 rcar_du_plane_write(rgrp, index, PnSPYR, src_y * rcar_du_plane_setup_fb()
103 rcar_du_plane_write(rgrp, index, PnDSA0R, rcar_du_plane_setup_fb()
113 struct rcar_du_group *rgrp = plane->group; rcar_du_plane_setup_mode() local
127 rcar_du_plane_write(rgrp, index, PnALPHAR, PnALPHAR_ABIT_0); rcar_du_plane_setup_mode()
129 rcar_du_plane_write(rgrp, index, PnALPHAR, rcar_du_plane_setup_mode()
145 rcar_du_plane_write(rgrp, index, PnMR, pnmr); rcar_du_plane_setup_mode()
152 rcar_du_plane_write(rgrp, index, PnTC2R, colorkey); rcar_du_plane_setup_mode()
160 rcar_du_plane_write(rgrp, index, PnTC2R, colorkey); rcar_du_plane_setup_mode()
165 rcar_du_plane_write(rgrp, index, PnTC3R, rcar_du_plane_setup_mode()
176 struct rcar_du_group *rgrp = plane->group; __rcar_du_plane_setup() local
185 ddcr4 = rcar_du_plane_read(rgrp, index, PnDDCR4); __rcar_du_plane_setup()
206 rcar_du_plane_write(rgrp, index, PnDDCR2, ddcr2); __rcar_du_plane_setup()
207 rcar_du_plane_write(rgrp, index, PnDDCR4, ddcr4); __rcar_du_plane_setup()
210 rcar_du_plane_write(rgrp, index, PnDSXR, plane->plane.state->crtc_w); __rcar_du_plane_setup()
211 rcar_du_plane_write(rgrp, index, PnDSYR, plane->plane.state->crtc_h); __rcar_du_plane_setup()
212 rcar_du_plane_write(rgrp, index, PnDPXR, plane->plane.state->crtc_x); __rcar_du_plane_setup()
213 rcar_du_plane_write(rgrp, index, PnDPYR, plane->plane.state->crtc_y); __rcar_du_plane_setup()
216 rcar_du_plane_write(rgrp, index, PnWASPR, 0); __rcar_du_plane_setup()
217 rcar_du_plane_write(rgrp, index, PnWAMWR, 4095); __rcar_du_plane_setup()
218 rcar_du_plane_write(rgrp, index, PnBTR, 0); __rcar_du_plane_setup()
219 rcar_du_plane_write(rgrp, index, PnMLR, 0); __rcar_du_plane_setup()
389 int rcar_du_planes_init(struct rcar_du_group *rgrp) rcar_du_planes_init() argument
391 struct rcar_du_device *rcdu = rgrp->dev; rcar_du_planes_init()
399 rgrp->num_planes = rgrp->num_crtcs + 7; rcar_du_planes_init()
401 crtcs = ((1 << rcdu->num_crtcs) - 1) & (3 << (2 * rgrp->index)); rcar_du_planes_init()
403 for (i = 0; i < rgrp->num_planes; ++i) { rcar_du_planes_init()
404 enum drm_plane_type type = i < rgrp->num_crtcs rcar_du_planes_init()
407 struct rcar_du_plane *plane = &rgrp->planes[i]; rcar_du_planes_init()
409 plane->group = rgrp; rcar_du_planes_init()
H A Drcar_du_group.h52 u32 rcar_du_group_read(struct rcar_du_group *rgrp, u32 reg);
53 void rcar_du_group_write(struct rcar_du_group *rgrp, u32 reg, u32 data);
55 int rcar_du_group_get(struct rcar_du_group *rgrp);
56 void rcar_du_group_put(struct rcar_du_group *rgrp);
57 void rcar_du_group_start_stop(struct rcar_du_group *rgrp, bool start);
58 void rcar_du_group_restart(struct rcar_du_group *rgrp);
59 int rcar_du_group_set_routing(struct rcar_du_group *rgrp);
H A Drcar_du_kms.c768 struct rcar_du_group *rgrp = &rcdu->groups[i]; rcar_du_modeset_init() local
770 mutex_init(&rgrp->lock); rcar_du_modeset_init()
772 rgrp->dev = rcdu; rcar_du_modeset_init()
773 rgrp->mmio_offset = mmio_offsets[i]; rcar_du_modeset_init()
774 rgrp->index = i; rcar_du_modeset_init()
775 rgrp->num_crtcs = min(rcdu->num_crtcs - 2 * i, 2U); rcar_du_modeset_init()
781 rgrp->dptsr_planes = rgrp->num_crtcs > 1 ? 0xf0 : 0; rcar_du_modeset_init()
783 ret = rcar_du_planes_init(rgrp); rcar_du_modeset_init()
790 struct rcar_du_group *rgrp = &rcdu->groups[i / 2]; rcar_du_modeset_init() local
792 ret = rcar_du_crtc_create(rgrp, i); rcar_du_modeset_init()
H A Drcar_du_plane.h67 int rcar_du_planes_init(struct rcar_du_group *rgrp);
H A Drcar_du_crtc.h68 int rcar_du_crtc_create(struct rcar_du_group *rgrp, unsigned int index);
H A Drcar_du_crtc.c567 int rcar_du_crtc_create(struct rcar_du_group *rgrp, unsigned int index) rcar_du_crtc_create() argument
573 struct rcar_du_device *rcdu = rgrp->dev; rcar_du_crtc_create()
609 rcrtc->group = rgrp; rcar_du_crtc_create()
615 &rgrp->planes[index % 2].plane, rcar_du_crtc_create()
/linux-4.4.14/fs/gfs2/
H A DMakefile7 recovery.o rgrp.o super.o sys.o trans.o util.o
H A Drgrp.c30 #include "rgrp.h"
52 * These routines are used by the resource group routines (rgrp.c)
106 pr_warn("rgrp=0x%llx bi_start=0x%x\n", gfs2_setbit()
198 * gfs2_bitfit - Search an rgrp's bitmap buffer to find a bit-pair representing
206 * not entire rgrp or filesystem. @buffer will be offset from the actual
292 * end of the rgrp, true is returned, otherwise false.
440 * @rgd: the rgrp
538 * Returns: The first rgrp in the filesystem
558 * Returns: The next rgrp
650 /* return reserved blocks to the rgrp */ __rs_deltree()
653 /* The rgrp extent failure point is likely not to increase; __rs_deltree()
699 * return_all_reservations - return all reserved blocks back to the rgrp.
700 * @rgd: the rgrp that needs its space back
785 /* small rgrp; bitmap stored completely in header block */ compute_bitstructs()
949 error = 0; /* someone else read in the rgrp; free it and ignore it */ read_rindex_entry()
1184 /* max out the rgrp allocation failure point */ gfs2_rgrp_bh_get()
1268 * gfs2_rgrp_go_unlock - Unlock a rgrp glock
1410 /* Trim each bitmap in the rgrp */ gfs2_fitrim()
1423 /* Mark rgrp as having been trimmed */ gfs2_fitrim()
1451 * rs_insert - insert a new multi-block reservation into the rgrp's rb_tree
1487 /* Do our rgrp accounting for the reservation */ rs_insert()
1597 * This checks the current position in the rgrp to see whether there is
1655 * @nowrap: Stop looking at the end of the rgrp, rather than wrapping
1662 * - If looking for free blocks, we set rd_extfail_pt on each rgrp which
1733 next_bitmap: /* Find next bitmap in the rgrp */ gfs2_rbm_find()
1752 useless to search this rgrp again for this amount or more. */ gfs2_rbm_find()
1770 * @rgd: The rgrp
1835 * gfs2_rgrp_congested - Use stats to figure out whether an rgrp is congested
1836 * @rgd: The rgrp in question
1850 * the lock for this rgrp's glock is significantly greater than the
1909 * @rs: The block reservation with the rgrp to test
1912 * Returns: True if the rgrp glock has been used within the time limit
1972 * We try our best to find an rgrp that has at least ap->target blocks
1974 * such an rgrp diminish. At this stage, we return the first rgrp that has
1976 * the number of blocks available in the chosen rgrp.
1979 * -ENOMEM if a suitable rgrp can't be found
2060 /* If rgrp has enough free space, use it */ gfs2_inplace_reserve()
2074 /* Drop reservation, if we couldn't use reserved rgrp */ gfs2_inplace_reserve()
2078 /* Unlock rgrp if required */ gfs2_inplace_reserve()
2082 /* Find the next rgrp, and continue looking */ gfs2_inplace_reserve()
2220 * gfs2_rgrp_dump - print out an rgrp
2249 fs_warn(sdp, "rgrp %llu has an error, marking it readonly until umount\n", gfs2_rgrp_error()
2305 * inode's goal block or the last allocation point in the rgrp.
2577 fs_err(sdp, "rlist_add: no rgrp for block %llu\n", (unsigned long long)block); gfs2_rlist_add()
H A Dincore.h81 struct gfs2_glock *rd_gl; /* Glock for this rgrp */
84 u32 rd_length; /* length of rgrp header in fs blocks */
85 u32 rd_data; /* num of data blocks in rgrp */
101 #define GFS2_RDF_PREFERRED 0x80000000 /* This rgrp is preferred */
276 Step 2. User calls inplace_reserve to target an rgrp, sets the rgrp info
277 Step 3. Function get_local_rgrp locks the rgrp, determines which bits to use
278 Step 4. Bits are assigned from the rgrp based on either the reservation
364 /* For rgrp glocks only */
394 struct gfs2_blkreserv *i_res; /* rgrp multi-block reservation */
560 unsigned int ar_rgrplvb:1; /* use lvbs for rgrp info */
H A Drgrp.h80 /* This is how to tell if a reservation is in the rgrp tree: */ gfs2_rs_active()
H A Dexport.c24 #include "rgrp.h"
H A Dmeta_io.c31 #include "rgrp.h"
H A Dglops.c26 #include "rgrp.h"
H A Dtrace_gfs2.h17 #include "rgrp.h"
H A Dfile.c40 #include "rgrp.h"
866 /* check if the selected rgrp limits our max_blks further */ __gfs2_fallocate()
H A Dops_fstype.c34 #include "rgrp.h"
300 * GFS2_NBBY; /* not the rgrp bitmap, subsequent bitmaps only */ gfs2_read_sb()
H A Dlops.c29 #include "rgrp.h"
H A Dbmap.c24 #include "rgrp.h"
790 if (gfs2_rs_active(ip->i_res)) /* needs to be done with the rgrp glock held */ do_strip()
H A Dquota.c71 #include "rgrp.h"
881 * rgrp since it won't be allocated during the transaction do_sync()
H A Dglock.c1640 * G = glock, I = Inode, R = rgrp, H = holder. Glocks are not indented,
1702 "rgrp",
H A Dinode.c34 #include "rgrp.h"
1134 error = gfs2_glock_nq(ghs + 2); /* rgrp */ gfs2_unlink()
H A Daops.c35 #include "rgrp.h"
H A Dxattr.c27 #include "rgrp.h"
H A Dsuper.c42 #include "rgrp.h"
H A Ddir.c73 #include "rgrp.h"
/linux-4.4.14/include/uapi/linux/
H A Dgfs2_ondisk.h142 __be32 ri_length; /* length of rgrp header in fs blocks */
146 __be32 ri_data; /* num of data blocks in rgrp */
157 /* Number of blocks per byte in rgrp */
269 __be64 di_goal_meta; /* rgrp to alloc from next */

Completed in 1597 milliseconds