[Intel-gfx] [PATCH v4 07/16] drm/dp_helper: Add helpers to configure PCONs RGB-YCbCr Conversion

Dan Carpenter dan.carpenter at oracle.com
Wed Dec 9 17:50:34 UTC 2020


Hi Ankit,

url:    https://github.com/0day-ci/linux/commits/Ankit-Nautiyal/Add-support-for-DP-HDMI2-1-PCON/20201208-160027
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-randconfig-m021-20201209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
Reported-by: Dan Carpenter <dan.carpenter at oracle.com>

smatch warnings:
drivers/gpu/drm/drm_dp_helper.c:3185 drm_dp_pcon_convert_rgb_to_ycbcr() warn: was && intended here instead of ||?

vim +3185 drivers/gpu/drm/drm_dp_helper.c

+int drm_dp_pcon_convert_rgb_to_ycbcr(struct drm_dp_aux *aux, u8 color_spc)
+{
+	int ret;
+	u8 buf;
+
+	if (color_spc != DP_CONVERSION_BT601_RGB_YCBCR_ENABLE ||
+	    color_spc != DP_CONVERSION_BT709_RGB_YCBCR_ENABLE ||
+	    color_spc != DP_CONVERSION_BT2020_RGB_YCBCR_ENABLE)
+		return -EINVAL;

"color_spc" cannot possibly be equal to three different values so this
function will always return -EINVAL.

+
+	ret = drm_dp_dpcd_readb(aux, DP_PROTOCOL_CONVERTER_CONTROL_2, &buf);
+	if (ret < 0)
+		return ret;
+
+	buf |= color_spc;
+	ret = drm_dp_dpcd_writeb(aux, DP_PROTOCOL_CONVERTER_CONTROL_2, buf);
+	if (ret < 0)
+		return ret;
+
+	return 0;
+}


---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 36289 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20201209/ac46dc76/attachment-0001.gz>


More information about the Intel-gfx mailing list