Pinkish color issue around grey areas when using display port
I have 2 monitors, from the gpu to the monitors, one monitor is connected with hdmi-to-hdmi and the second is connected with usb-c dongle to hdmi. I noticed that the issue is more visible if the monitor is configured with AV mode (usually settings allows to select PC vs AV mode). I have tried on Acer, LG and Samsung monitors and it is reproducible on all these screens.
pixel_encoding is selected by:
if (drm_mode_is_420_only(info, mode_in) && stream->signal == SIGNAL_TYPE_HDMI_TYPE_A) timing_out->pixel_encoding = PIXEL_ENCODING_YCBCR420; else if (drm_mode_is_420_also(info, mode_in) && aconnector->force_yuv420_output) timing_out->pixel_encoding = PIXEL_ENCODING_YCBCR420; else if ((connector->display_info.color_formats & DRM_COLOR_FORMAT_YCRCB444) && stream->signal == SIGNAL_TYPE_HDMI_TYPE_A) timing_out->pixel_encoding = PIXEL_ENCODING_YCBCR444; else timing_out->pixel_encoding = PIXEL_ENCODING_RGB;
Currently with the dongle the RGB encoder is selected whereas with hdmi only, the YCBCR444 encoder is selected. So there would be always some differences. That is why I am suggesting that in the case of hdmi->dongle that the driver should use the same encoder as for the pure hdmi case. This way the user see the same thing on both screens.
So the idea is to add another condition:
+ else if ((connector->display_info.color_formats & DRM_COLOR_FORMAT_YCRCB444) + && stream->sink->sink_signal == SIGNAL_TYPE_DISPLAY_PORT + && link->dpcd_caps.dongle_type == DISPLAY_DONGLE_DP_HDMI_CONVERTER) + timing_out->pixel_encoding = PIXEL_ENCODING_YCBCR444;