From: yxj Date: Thu, 24 Jan 2013 10:10:59 +0000 (+0800) Subject: rk fb:distinguish ARGB888 and XRGB888 X-Git-Tag: firefly_0821_release~7791 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=82a57c6ea14135401624d98eed1865f0c31deb0f;p=firefly-linux-kernel-4.4.55.git rk fb:distinguish ARGB888 and XRGB888 --- diff --git a/drivers/video/rockchip/rk_fb.c b/drivers/video/rockchip/rk_fb.c index d2427e9702b6..d6de49d7c23a 100644 --- a/drivers/video/rockchip/rk_fb.c +++ b/drivers/video/rockchip/rk_fb.c @@ -214,6 +214,7 @@ static int rk_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) } switch (par->format) { + case XRGB888: case ARGB888: par->y_offset = (yoffset*xvir + xoffset)*4; break; @@ -468,8 +469,14 @@ static int rk_fb_set_par(struct fb_info *info) #if 1 switch (data_format) { - case HAL_PIXEL_FORMAT_RGBA_8888 : // rgb case HAL_PIXEL_FORMAT_RGBX_8888: + #if defined(CONFIG_ARCH_RK3188) + par->format = XRGB888; + fix->line_length = 4 * xvir; + par->y_offset = (yoffset*xvir + xoffset)*4; + break; + #endif + case HAL_PIXEL_FORMAT_RGBA_8888 : // rgb par->format = ARGB888; fix->line_length = 4 * xvir; par->y_offset = (yoffset*xvir + xoffset)*4; diff --git a/include/linux/rk_fb.h b/include/linux/rk_fb.h index 6f19857ca97f..e18c0e39bc51 100644 --- a/include/linux/rk_fb.h +++ b/include/linux/rk_fb.h @@ -143,6 +143,7 @@ enum data_format{ YUV420 = 4, YUV422, YUV444, + XRGB888, }; enum fb_win_map_order{