AnsweredAssumed Answered

How do I enable CSC in Imx 6 board

Question asked by jerald TG on Apr 10, 2019
Latest reply on Apr 10, 2019 by igorpadykov

I am using imx6q sabre chipset. I tried with i.MX6 CSC setting sample source code . I send commands MXCFB_SET_GAMMA,MXCFB_SET_GBL_ALPHA, I can feel the change in display,seems its working. As per the above code I sent IOCTL command MXCFB_CSC_UPDATE and no effect in display, seems code not working. then I send  IOCTL command MXCFB_SET_CLR_KEY it is also not working it went inside the file ipu_disp.c with value ipu->fg_csc_type =4. so it didnt entered the code commented with

/* Transform color key from rgb to yuv if CSC is enabled */ in file ipu_disp.c line no 728. I found this post enabling CSC.

I found the below code in line no 623 in file drivers/mxc/ipu3/ipu_disp.c.

 

/*

* Row is for BG: RGB2YUV YUV2RGB RGB2RGB YUV2YUV CSC_NONE
* Column is for FG: RGB2YUV YUV2RGB RGB2RGB YUV2YUV CSC_NONE
*/
static struct dp_csc_param_t dp_csc_array[CSC_NUM][CSC_NUM] = {
{{DP_COM_CONF_CSC_DEF_BOTH, &rgb2ycbcr_coeff}, {0, 0}, {0, 0}, {DP_COM_CONF_CSC_DEF_BG, &rgb2ycbcr_coeff}, {DP_COM_CONF_CSC_DEF_BG, &rgb2ycbcr_coeff} },
{{0, 0}, {DP_COM_CONF_CSC_DEF_BOTH, &ycbcr2rgb_coeff}, {DP_COM_CONF_CSC_DEF_BG, &ycbcr2rgb_coeff}, {0, 0}, {DP_COM_CONF_CSC_DEF_BG, &ycbcr2rgb_coeff} },
{{0, 0}, {DP_COM_CONF_CSC_DEF_FG, &ycbcr2rgb_coeff}, {0, 0}, {0, 0}, {0, 0} },
{{DP_COM_CONF_CSC_DEF_FG, &rgb2ycbcr_coeff}, {0, 0}, {0, 0}, {0, 0}, {0, 0} },
{{DP_COM_CONF_CSC_DEF_FG, &rgb2ycbcr_coeff}, {DP_COM_CONF_CSC_DEF_FG, &ycbcr2rgb_coeff}, {0, 0}, {0, 0}, {0, 0} }

};

 

please help me to  enable CSC and apply contrast for display similar to  iMX6Q display adjustment.


 

Outcomes