aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd/glamo/glamo-fb.c
diff options
context:
space:
mode:
authorJorge Zapata <turran@openmoko.com>2009-02-19 16:42:54 +0100
committerThomas White <taw@bitwiz.org.uk>2009-03-26 21:34:10 +0000
commit22a1cc6ef8c82c485136be49eeca90777e8ac85c (patch)
tree0342597686a6bad6bf6ef9fcfa3c54fc4622abe5 /drivers/mfd/glamo/glamo-fb.c
parente1179bc8e2bfa379e178e1f206b4687df71755f1 (diff)
Import part of Thomas White DRM tree:
Handle new memory layout. The "not-needed" memory should not be taken by the framebuffer driver. Use that for the DRM driver. Add the cmdq platform device Set aside 4k for hardware cursor, reject cursors that don't fit.
Diffstat (limited to 'drivers/mfd/glamo/glamo-fb.c')
-rw-r--r--drivers/mfd/glamo/glamo-fb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mfd/glamo/glamo-fb.c b/drivers/mfd/glamo/glamo-fb.c
index 4eb81a508e5..77725a370e9 100644
--- a/drivers/mfd/glamo/glamo-fb.c
+++ b/drivers/mfd/glamo/glamo-fb.c
@@ -595,6 +595,12 @@ static int glamofb_cursor(struct fb_info *info, struct fb_cursor *cursor)
struct glamofb_handle *glamo = info->par;
unsigned long flags;
+ /* Reject if the cursor is too big to fit in the memory allocated in
+ * glamo-core.h */
+
+ if ((cursor->image.width * cursor->image.height) > GLAMO_CURSOR_SIZE )
+ return -EINVAL;
+
spin_lock_irqsave(&glamo->lock_cmd, flags);
reg_write(glamo, GLAMO_REG_LCD_CURSOR_X_SIZE,
@@ -847,6 +853,8 @@ static int __init glamofb_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "failed to request mmio region\n");
goto out_free;
}
+ if (mach_info->fb_mem_size != RESSIZE(glamofb->fb_res))
+ dev_warn(&pdev->dev, "different vram sizes\n");
glamofb->fb_res = request_mem_region(glamofb->fb_res->start,
mach_info->fb_mem_size,