<div dir="ltr"><div>Hi, gentle ping ? Thx in advance.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 8, 2019 at 11:15 AM Julien Isorce <<a href="mailto:julien.isorce@gmail.com">julien.isorce@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Harry,<div><br></div><div>I can reproduce on LG, Samsung and NEC monitors.</div><div><br></div><div>"Have you checked whether the driver picks RGB or YCBCR420 without your<br>patch?" -> it was selecting RGB .<br></div><div><br></div><div>For example on <a href="https://commons.wikimedia.org/wiki/File:Gray_scale.jpg" target="_blank">https://commons.wikimedia.org/wiki/File:Gray_scale.jpg</a> , the second band from the left, will be entirely pinkish.<br></div><div>Since the issue also happens without dongle, so with a direct cable from the miniDP from the graphic card to DisplayPort on the screen I think there is more serious issue with RGB output in amdgpu. But it is not easy to reproduce, you should try on above image.</div><div><br></div><div>In any case, the goal with the patch is just to get the same output when using 2 screens at the same time, one connected to hdmi output of the graphic card and one connected  to usb-c to graphic card (hdmi cable with dongle). So prior this patch, the first one would use YCbCr 444 and the second would use RGB.</div><div>After this patch, both will use YCbCr 444 (both are hdmi).</div><div>The patch does not change the case for miniDP to DisplayPort, the driver will still use RGB. Because maybe the RGB issue is also specific to that graphic card which</div><div>is VEGA"M". So that is why the patch only tries to match hdmi cases together, whether it is direct connection or through usb-c.</div><div><br></div><div>-</div><div>Julien</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 8, 2019 at 10:44 AM Harry Wentland <<a href="mailto:hwentlan@amd.com" target="_blank">hwentlan@amd.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Julien,<br>
<br>
curious which monitor you're using.<br>
<br>
Have you checked whether the driver picks RGB or YCBCR420 without your<br>
patch?<br>
<br>
I'm not sure I understand how the pinkish color issue looks. Do you see<br>
a pinkish color at the transition from grey to another color? Or is the<br>
entire grey area pinkish?<br>
<br>
Thanks,<br>
Harry<br>
<br>
On 2019-10-08 12:06 p.m., Julien Isorce wrote:<br>
> Hi,<br>
> <br>
> Gentle ping ?<br>
> <br>
> Thx<br>
> Julien<br>
> <br>
> On Tue, Oct 1, 2019 at 3:21 PM Julien Isorce <<a href="mailto:julien.isorce@gmail.com" target="_blank">julien.isorce@gmail.com</a><br>
> <mailto:<a href="mailto:julien.isorce@gmail.com" target="_blank">julien.isorce@gmail.com</a>>> wrote:<br>
> <br>
>     Fix pinkish color issue around grey areas. This also happens<br>
>     when not using any dongle so directly with a usb-c to Display<br>
>     Port cable. Meaning there is something wrong when using pixel<br>
>     encoding RGB with amd driver in the general case. In the meantime<br>
>     just use the same pixel encoding as when using HDMI without dongle.<br>
>     This way users will see the same thing on 2 identical screens when<br>
>     one is connected with hdmi-to-hdmi and the other is connected with<br>
>     usb-c-to-hdmi.<br>
> <br>
>     Signed-off-by: Julien Isorce <<a href="mailto:jisorce@oblong.com" target="_blank">jisorce@oblong.com</a><br>
>     <mailto:<a href="mailto:jisorce@oblong.com" target="_blank">jisorce@oblong.com</a>>><br>
>     ---<br>
>      drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++<br>
>      1 file changed, 5 insertions(+)<br>
> <br>
>     diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
>     b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
>     index d3f404f097eb..8139dcc0bfba 100644<br>
>     --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
>     +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
>     @@ -3313,6 +3313,7 @@ static void<br>
>     fill_stream_properties_from_drm_display_mode(<br>
>      {<br>
>             struct dc_crtc_timing *timing_out = &stream->timing;<br>
>             const struct drm_display_info *info = &connector->display_info;<br>
>     +       const struct dc_link *link = stream->sink->link;<br>
> <br>
>             memset(timing_out, 0, sizeof(struct dc_crtc_timing));<br>
> <br>
>     @@ -3327,6 +3328,10 @@ static void<br>
>     fill_stream_properties_from_drm_display_mode(<br>
>             else if ((connector->display_info.color_formats &<br>
>     DRM_COLOR_FORMAT_YCRCB444)<br>
>                             && stream->signal == SIGNAL_TYPE_HDMI_TYPE_A)<br>
>                     timing_out->pixel_encoding = PIXEL_ENCODING_YCBCR444;<br>
>     +       else if ((connector->display_info.color_formats &<br>
>     DRM_COLOR_FORMAT_YCRCB444)<br>
>     +                       && stream->sink->sink_signal ==<br>
>     SIGNAL_TYPE_DISPLAY_PORT<br>
>     +                       && link->dpcd_caps.dongle_type ==<br>
>     DISPLAY_DONGLE_DP_HDMI_CONVERTER)<br>
>     +               timing_out->pixel_encoding = PIXEL_ENCODING_YCBCR444;<br>
>             else<br>
>                     timing_out->pixel_encoding = PIXEL_ENCODING_RGB;<br>
> <br>
>     -- <br>
>     2.17.1<br>
> <br>
> <br>
> _______________________________________________<br>
> amd-gfx mailing list<br>
> <a href="mailto:amd-gfx@lists.freedesktop.org" target="_blank">amd-gfx@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
> <br>
</blockquote></div>
</blockquote></div></div>