diff options
Diffstat (limited to 'drivers/media/video/s5p-tv/mixer_reg.c')
-rw-r--r-- | drivers/media/video/s5p-tv/mixer_reg.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/media/video/s5p-tv/mixer_reg.c b/drivers/media/video/s5p-tv/mixer_reg.c index 38dac672aa1c..4800a3cbb297 100644 --- a/drivers/media/video/s5p-tv/mixer_reg.c +++ b/drivers/media/video/s5p-tv/mixer_reg.c @@ -90,7 +90,7 @@ void mxr_reg_reset(struct mxr_device *mdev) mxr_vsync_set_update(mdev, MXR_DISABLE); /* set output in RGB888 mode */ - mxr_write(mdev, MXR_CFG, MXR_CFG_OUT_YUV444); + mxr_write(mdev, MXR_CFG, MXR_CFG_OUT_RGB888); /* 16 beat burst in DMA */ mxr_write_mask(mdev, MXR_STATUS, MXR_STATUS_16_BURST, @@ -376,6 +376,12 @@ void mxr_reg_set_mbus_fmt(struct mxr_device *mdev, spin_lock_irqsave(&mdev->reg_slock, flags); mxr_vsync_set_update(mdev, MXR_DISABLE); + /* selecting colorspace accepted by output */ + if (fmt->colorspace == V4L2_COLORSPACE_JPEG) + val |= MXR_CFG_OUT_YUV444; + else + val |= MXR_CFG_OUT_RGB888; + /* choosing between interlace and progressive mode */ if (fmt->field == V4L2_FIELD_INTERLACED) val |= MXR_CFG_SCAN_INTERLACE; @@ -394,7 +400,8 @@ void mxr_reg_set_mbus_fmt(struct mxr_device *mdev, else WARN(1, "unrecognized mbus height %u!\n", fmt->height); - mxr_write_mask(mdev, MXR_CFG, val, MXR_CFG_SCAN_MASK); + mxr_write_mask(mdev, MXR_CFG, val, MXR_CFG_SCAN_MASK | + MXR_CFG_OUT_MASK); val = (fmt->field == V4L2_FIELD_INTERLACED) ? ~0 : 0; vp_write_mask(mdev, VP_MODE, val, |