Lines Matching refs:ctx

83 static void omap2_sms_write_rot_control(u32 val, unsigned ctx)  in omap2_sms_write_rot_control()  argument
85 __raw_writel(val, vrfb_base + SMS_ROT_CONTROL(ctx)); in omap2_sms_write_rot_control()
88 static void omap2_sms_write_rot_size(u32 val, unsigned ctx) in omap2_sms_write_rot_size() argument
90 __raw_writel(val, vrfb_base + SMS_ROT_SIZE(ctx)); in omap2_sms_write_rot_size()
93 static void omap2_sms_write_rot_physical_ba(u32 val, unsigned ctx) in omap2_sms_write_rot_physical_ba() argument
95 __raw_writel(val, vrfb_base + SMS_ROT_PHYSICAL_BA(ctx)); in omap2_sms_write_rot_physical_ba()
98 static inline void restore_hw_context(int ctx) in restore_hw_context() argument
100 omap2_sms_write_rot_control(ctxs[ctx].control, ctx); in restore_hw_context()
101 omap2_sms_write_rot_size(ctxs[ctx].size, ctx); in restore_hw_context()
102 omap2_sms_write_rot_physical_ba(ctxs[ctx].physical_ba, ctx); in restore_hw_context()
188 u8 ctx = vrfb->context; in omap_vrfb_setup() local
192 DBG("omapfb_set_vrfb(%d, %lx, %dx%d, %d, %d)\n", ctx, paddr, in omap_vrfb_setup()
223 ctxs[ctx].physical_ba = paddr; in omap_vrfb_setup()
224 ctxs[ctx].size = size; in omap_vrfb_setup()
225 ctxs[ctx].control = control; in omap_vrfb_setup()
227 omap2_sms_write_rot_physical_ba(paddr, ctx); in omap_vrfb_setup()
228 omap2_sms_write_rot_size(size, ctx); in omap_vrfb_setup()
229 omap2_sms_write_rot_control(control, ctx); in omap_vrfb_setup()
264 int ctx = vrfb->context; in omap_vrfb_release_ctx() local
266 if (ctx == 0xff) in omap_vrfb_release_ctx()
269 DBG("release ctx %d\n", ctx); in omap_vrfb_release_ctx()
273 BUG_ON(!(ctx_map & (1 << ctx))); in omap_vrfb_release_ctx()
275 clear_bit(ctx, &ctx_map); in omap_vrfb_release_ctx()
294 u8 ctx; in omap_vrfb_request_ctx() local
301 for (ctx = 0; ctx < num_ctxs; ++ctx) in omap_vrfb_request_ctx()
302 if ((ctx_map & (1 << ctx)) == 0) in omap_vrfb_request_ctx()
305 if (ctx == num_ctxs) { in omap_vrfb_request_ctx()
311 DBG("found free ctx %d\n", ctx); in omap_vrfb_request_ctx()
313 set_bit(ctx, &ctx_map); in omap_vrfb_request_ctx()
317 vrfb->context = ctx; in omap_vrfb_request_ctx()
320 paddr = ctxs[ctx].base + SMS_ROT_VIRT_BASE(rot); in omap_vrfb_request_ctx()
324 ctx, rot * 90); in omap_vrfb_request_ctx()
332 DBG("VRFB %d/%d: %lx\n", ctx, rot*90, vrfb->paddr[rot]); in omap_vrfb_request_ctx()