Lines Matching refs:vrfb
170 void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
177 u8 ctx = vrfb->context;
203 DBG("vrfb w %u, h %u bytespp %d\n", vrfb_width, vrfb_height, bytespp);
220 DBG("vrfb offset pixels %d, %d\n",
223 vrfb->xres = width;
224 vrfb->yres = height;
225 vrfb->xoffset = vrfb_width - width;
226 vrfb->yoffset = vrfb_height - height;
227 vrfb->bytespp = bytespp;
228 vrfb->yuv_mode = yuv_mode;
232 int omap_vrfb_map_angle(struct vrfb *vrfb, u16 height, u8 rot)
234 unsigned long size = height * OMAP_VRFB_LINE_LEN * vrfb->bytespp;
236 vrfb->vaddr[rot] = ioremap_wc(vrfb->paddr[rot], size);
238 if (!vrfb->vaddr[rot]) {
239 printk(KERN_ERR "vrfb: ioremap failed\n");
243 DBG("ioremapped vrfb area %d of size %lu into %p\n", rot, size,
244 vrfb->vaddr[rot]);
250 void omap_vrfb_release_ctx(struct vrfb *vrfb)
253 int ctx = vrfb->context;
267 if (vrfb->paddr[rot]) {
268 release_mem_region(vrfb->paddr[rot], OMAP_VRFB_SIZE);
269 vrfb->paddr[rot] = 0;
273 vrfb->context = 0xff;
279 int omap_vrfb_request_ctx(struct vrfb *vrfb)
295 pr_err("vrfb: no free contexts\n");
304 memset(vrfb, 0, sizeof(*vrfb));
306 vrfb->context = ctx;
310 if (!request_mem_region(paddr, OMAP_VRFB_SIZE, "vrfb")) {
311 pr_err("vrfb: failed to reserve VRFB "
314 omap_vrfb_release_ctx(vrfb);
319 vrfb->paddr[rot] = paddr;
321 DBG("VRFB %d/%d: %lx\n", ctx, rot*90, vrfb->paddr[rot]);
342 /* first resource is the register res, the rest are vrfb contexts */
359 dev_err(&pdev->dev, "can't get vrfb ctx %d address\n",