diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2015-04-01 10:53:45 +0200 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2015-04-01 10:54:42 +0200 |
commit | 2b9f722396afa8b6328196cf4b9f2d8e3aed0aa8 (patch) | |
tree | 2bd97e07fbbc33dde79e45a1784efc0b2f60c535 | |
parent | 594cf92d2dc20e81cf617aaf181b46ca5b657889 (diff) |
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.
-rw-r--r-- | drivers/video/fbdev/fsl-dcu-fb.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) |