From 2b9f722396afa8b6328196cf4b9f2d8e3aed0aa8 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Wed, 1 Apr 2015 10:53:45 +0200 Subject: video: fsl-dcu-fb: disable unsupported features Some features (such as rotation) are exported by the framework through sysfs but not supported by hardware. Notify the framework if they are not supported by the driver by returning EINVAL. --- drivers/video/fbdev/fsl-dcu-fb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/video/fbdev/fsl-dcu-fb.c b/drivers/video/fbdev/fsl-dcu-fb.c index 4bcab0f136a2..ddcb2a3d76b0 100644 --- a/drivers/video/fbdev/fsl-dcu-fb.c +++ b/drivers/video/fbdev/fsl-dcu-fb.c @@ -352,6 +352,9 @@ static int fsl_dcu_check_var(struct fb_var_screeninfo *var, struct mfb_info *mfbi = info->par; struct dcu_fb_data *dcufb = mfbi->parent; + if (var->grayscale || var->rotate || var->nonstd) + return -EINVAL; + if (var->xres_virtual < var->xres) var->xres_virtual = var->xres; if (var->yres_virtual < var->yres) -- cgit v1.2.3