summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorLiu Ying <Ying.Liu@freescale.com>2015-06-05 15:54:21 +0800
committerNitin Garg <nitin.garg@freescale.com>2015-09-17 09:23:32 -0500
commit27f66d5ad64b163b2d801531a127540156fe78b1 (patch)
treedacdd6a861008ff2625c79d5c2387e2888ca97f0 /drivers/video
parent7f817f00515820d30dce521b0cc57b3c4dcff36e (diff)
MLK-11055 video: mxc ipuv3 fb: Fix wrong pixel component map when PRE is enabled
In the on-the-fly cases to enable PRE, to make sure the pixel may be correctly deciphered by IPU after the framebuffer configuration is done, we probably need to use PRE pixel component mapping feature since the original framebuffer pixel format is likely not the same as the one we use in the last run. However, in the non on-the-fly cases to enable PRE, we should have PRE generate an appropriate pixel format for IPU to consume which doesn't include PRE pxiel component mapping feature. Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/mxc/mxc_ipuv3_fb.c32
1 files changed, 6 insertions, 26 deletions
diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c
index a4a6556254bd..7afe9ed1e785 100644
--- a/drivers/video/mxc/mxc_ipuv3_fb.c
+++ b/drivers/video/mxc/mxc_ipuv3_fb.c
@@ -295,28 +295,19 @@ static int check_var_pixfmt(struct fb_var_screeninfo *var)
static uint32_t fb_to_store_pixfmt(uint32_t fb_pixfmt)
{
switch (fb_pixfmt) {
- case IPU_PIX_FMT_GPU32_SB_ST:
- case IPU_PIX_FMT_GPU32_SB_SRT:
- case IPU_PIX_FMT_GPU32_ST:
- case IPU_PIX_FMT_GPU32_SRT:
case IPU_PIX_FMT_RGB32:
case IPU_PIX_FMT_BGR32:
case IPU_PIX_FMT_ABGR32:
- return IPU_PIX_FMT_BGR32;
case IPU_PIX_FMT_RGB24:
- return IPU_PIX_FMT_RGB24;
case IPU_PIX_FMT_BGR24:
- return IPU_PIX_FMT_BGR24;
- case IPU_PIX_FMT_GPU16_SB_ST:
- case IPU_PIX_FMT_GPU16_SB_SRT:
- case IPU_PIX_FMT_GPU16_ST:
- case IPU_PIX_FMT_GPU16_SRT:
case IPU_PIX_FMT_RGB565:
- return IPU_PIX_FMT_RGB565;
case IPU_PIX_FMT_BGRA4444:
- return IPU_PIX_FMT_BGRA4444;
case IPU_PIX_FMT_BGRA5551:
- return IPU_PIX_FMT_BGRA5551;
+ case IPU_PIX_FMT_UYVY:
+ case IPU_PIX_FMT_YUYV:
+ case IPU_PIX_FMT_YUV444:
+ case IPU_PIX_FMT_AYUV:
+ return fb_pixfmt;
case IPU_PIX_FMT_YUV422P:
case IPU_PIX_FMT_YVU422P:
case IPU_PIX_FMT_YUV420P2:
@@ -326,14 +317,8 @@ static uint32_t fb_to_store_pixfmt(uint32_t fb_pixfmt)
case IPU_PIX_FMT_NV16:
case PRE_PIX_FMT_NV61:
case IPU_PIX_FMT_YUV420P:
- case IPU_PIX_FMT_UYVY:
return IPU_PIX_FMT_UYVY;
- case IPU_PIX_FMT_YUYV:
- return IPU_PIX_FMT_YUYV;
- case IPU_PIX_FMT_YUV444:
- return IPU_PIX_FMT_YUV444;
case IPU_PIX_FMT_YUV444P:
- case IPU_PIX_FMT_AYUV:
return IPU_PIX_FMT_AYUV;
default:
return 0;
@@ -348,8 +333,7 @@ static uint32_t fbi_to_pixfmt(struct fb_info *fbi, bool original_fb)
if (fbi->var.nonstd) {
if (mxc_fbi->prefetch && !original_fb) {
- if (ipu_pixel_format_is_gpu_tile(fbi->var.nonstd) &&
- bytes_per_pixel(fbi->var.nonstd) == 2)
+ if (ipu_pixel_format_is_gpu_tile(fbi->var.nonstd))
goto next;
return fb_to_store_pixfmt(fbi->var.nonstd);
@@ -369,9 +353,6 @@ next:
}
}
- if (mxc_fbi->prefetch && !original_fb)
- pixfmt = fb_to_store_pixfmt(pixfmt);
-
if (pixfmt == 0)
dev_err(fbi->device, "cannot get pixel format\n");
@@ -763,7 +744,6 @@ static int _setup_disp_channel2(struct fb_info *fbi)
if (!mxc_fbi->on_the_fly) {
retval = ipu_init_channel_buffer(mxc_fbi->ipu,
mxc_fbi->ipu_ch, IPU_INPUT_BUFFER,
- mxc_fbi->on_the_fly ? mxc_fbi->final_pfmt :
fbi_to_pixfmt(fbi, false),
fbi->var.xres, fbi->var.yres,
ipu_stride,