aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fbmem.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-12-13 08:02:26 -0500
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-12-19 15:07:13 -0500
commitfb21c2f42879c05c76ea9e249b6905fc729f8529 (patch)
tree93c4581f4f2947dae8ebd36eae0cf86f38ec93d3 /drivers/video/fbmem.c
parentb779505282590289546aab9ffead4490fe195d40 (diff)
fbdev: Add FOURCC-based format configuration API
This API will be used to support YUV frame buffer formats in a standard way. Last but not least, create a much needed fbdev API documentation and document the format setting APIs. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/fbmem.c')
-rw-r--r--drivers/video/fbmem.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index ad936295d8f4..ac9141b85356 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -967,6 +967,20 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var)
967 memcmp(&info->var, var, sizeof(struct fb_var_screeninfo))) { 967 memcmp(&info->var, var, sizeof(struct fb_var_screeninfo))) {
968 u32 activate = var->activate; 968 u32 activate = var->activate;
969 969
970 /* When using FOURCC mode, make sure the red, green, blue and
971 * transp fields are set to 0.
972 */
973 if ((info->fix.capabilities & FB_CAP_FOURCC) &&
974 var->grayscale > 1) {
975 if (var->red.offset || var->green.offset ||
976 var->blue.offset || var->transp.offset ||
977 var->red.length || var->green.length ||
978 var->blue.length || var->transp.length ||
979 var->red.msb_right || var->green.msb_right ||
980 var->blue.msb_right || var->transp.msb_right)
981 return -EINVAL;
982 }
983
970 if (!info->fbops->fb_check_var) { 984 if (!info->fbops->fb_check_var) {
971 *var = info->var; 985 *var = info->var;
972 goto done; 986 goto done;