aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Redpath <chris.redpath@arm.com>2012-07-12 12:33:13 +0100
committerJon Medhurst <tixy@linaro.org>2014-03-31 13:58:09 +0100
commitf2f662336fed53bb7a34d422bcd0cdd3a896f837 (patch)
tree21e81762b9819917a34c222ea079bcb466d40c8d
parentd81ef6e2c92174b65e1c6af80d05cddfc0c4e7a1 (diff)
ARM HDLCD: Add developer option to remove double-height framebuffers
This option can be used with Android to push the graphics subsystem into a different composition strategy which is more effective when used on hardware where the framebuffer memory is not cacheable. Signed-off-by: Chris Redpath <chris.redpath@arm.com>
-rw-r--r--drivers/video/arm-hdlcd.c8
-rw-r--r--include/linux/arm-hdlcd.h4
2 files changed, 12 insertions, 0 deletions
diff --git a/drivers/video/arm-hdlcd.c b/drivers/video/arm-hdlcd.c
index f16bb882e0c..9600c70209b 100644
--- a/drivers/video/arm-hdlcd.c
+++ b/drivers/video/arm-hdlcd.c
@@ -205,7 +205,11 @@ static int hdlcd_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
struct hdlcd_device *hdlcd = to_hdlcd_device(info);
int bytes_per_pixel = var->bits_per_pixel / 8;
+#ifdef HDLCD_NO_VIRTUAL_SCREEN
+ var->yres_virtual = var->yres;
+#else
var->yres_virtual = 2 * var->yres;
+#endif
if ((var->xres_virtual * bytes_per_pixel * var->yres_virtual) > hdlcd->fb.fix.smem_len)
return -ENOMEM;
@@ -570,7 +574,11 @@ static int hdlcd_setup(struct hdlcd_device *hdlcd)
hdlcd->fb.var.yres, hdlcd->fb.var.bits_per_pixel,
hdlcd->fb.mode ? hdlcd->fb.mode->refresh : 60);
hdlcd->fb.var.xres_virtual = hdlcd->fb.var.xres;
+#ifdef HDLCD_NO_VIRTUAL_SCREEN
+ hdlcd->fb.var.yres_virtual = hdlcd->fb.var.yres;
+#else
hdlcd->fb.var.yres_virtual = hdlcd->fb.var.yres * 2;
+#endif
/* initialise and set the palette */
if (fb_alloc_cmap(&hdlcd->fb.cmap, NR_PALETTE, 0)) {
diff --git a/include/linux/arm-hdlcd.h b/include/linux/arm-hdlcd.h
index f3f4887ac4f..124995aa34f 100644
--- a/include/linux/arm-hdlcd.h
+++ b/include/linux/arm-hdlcd.h
@@ -102,6 +102,10 @@
* and /proc/hdlcd_underrun to read the counter
*/
//#define HDLCD_COUNT_BUFFERUNDERRUNS
+/* Restrict height to 1x screen size
+ *
+ */
+//#define HDLCD_NO_VIRTUAL_SCREEN
struct hdlcd_device {
struct fb_info fb;