How to change SAT_MODE in BT656 display output for i.MX6

Document created by Isaac Nickaein on Apr 19, 2015
Version 1Show Document
  • View in full screen mode

Hi all,


I'm using this patch to get BT656 output on my i.MX6Q: Patch to Support BT656 and BT1120 Output For i.MX6 BSP


Now I am looking for a way to clamp the pixel values between 16 to 240. Based on the i.MX6Q Reference Manual ( IC Task Parameter Memory), this can be done by setting a IC task parameter called SAT_MODE from 0 to 1, but I'm not sure how it should be done.


I've inspected the ipu_disp.c code and I guess the right way to do this is calling ipu_dp_write inside __ipu_dp_csc_setup function to set SAT_MODE to 1, but know I don't know which address to give toipu_dp_write since SAT_MODE is not defined in the ipu_regs.h. Looking at other parameters addresses (e.g. DP_CSC_0) and comparing their counterpart in the Reference Manual doesn't get my anywhere either.






Hi Isaac, the default BSP code doesn't support DP_CSC_YUV_SAT_MODE modification, just used the default value 0.

You can reference to the ioctl "MXCFB_SET_GAMMA" to add it into mxcfb_ioctl() of file mxc_ipuv3_fb.c.



So you can add it in ipu_regs.h:

DP_COM_CONF_CSC_DEF_BOTH = 0x00000100,

+ DP_COM_CONF_CSC_YUV_SAT_MODE = 0x00000800,

DP_COM_CONF_GAMMA_EN = 0x00001000,



For BT656 display, IC CSC was not used, it used DP CSC.


This document was generated from the following discussion: How to change SAT_MODE in BT656 display output for i.MX6