<div dir="ltr">Hi Harry,<div><br></div><div>As suggested I created the issue here <a href="https://gitlab.freedesktop.org/drm/amd/issues/2">https://gitlab.freedesktop.org/drm/amd/issues/2</a> with a picture of the problem attached.</div><div><br></div><div>Please take a look, thx!</div><div>Julien</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 11, 2019 at 1:11 PM Harry Wentland <<a href="mailto:hwentlan@amd.com">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">On 2019-10-08 2:15 p.m., Julien Isorce wrote:<br>
> Hi Harry,<br>
> <br>
> I can reproduce on LG, Samsung and NEC monitors.<br>
> <br>
> "Have you checked whether the driver picks RGB or YCBCR420 without your<br>
> patch?" -> it was selecting RGB .<br>
> <br>
> For example on <a href="https://commons.wikimedia.org/wiki/File:Gray_scale.jpg" rel="noreferrer" target="_blank">https://commons.wikimedia.org/wiki/File:Gray_scale.jpg</a> ,<br>
> the second band from the left, will be entirely pinkish.<br>
> Since the issue also happens without dongle, so with a direct cable from<br>
> the miniDP from the graphic card to DisplayPort on the screen I think<br>
> there is more serious issue with RGB output in amdgpu. But it is not<br>
> easy to reproduce, you should try on above image.<br>
> <br>
<br>
I haven't had time to repro this issue. Can you post a picture of this<br>
problem somewhere? Ideally with a bug description at<br>
<a href="https://gitlab.freedesktop.org/drm/amd/issues" rel="noreferrer" target="_blank">https://gitlab.freedesktop.org/drm/amd/issues</a><br>
<br>
> In any case, the goal with the patch is just to get the same output when<br>
> using 2 screens at the same time, one connected to hdmi output of the<br>
> graphic card and one connected to usb-c to graphic card (hdmi cable<br>
> with dongle). So prior this patch, the first one would use YCbCr 444 and<br>
> the second would use RGB.<br>
> After this patch, both will use YCbCr 444 (both are hdmi).<br>
<br>
I've been hesitant about this patch since it changes driver policy which<br>
is not something I like to do without very good reason and understanding<br>
all the implications.<br>
<br>
That said, treating an DP-HDMI adapter like a native HDMI connection<br>
rather than DP is not unreasonable. I'm still curious, though, why this<br>
is required at all. As mentioned above a picture of the problem (ideally<br>
showing the monitors side-by-side) would help.<br>
<br>
Harry<br>
<br>
<br>
> The patch does not change the case for miniDP to DisplayPort, the driver<br>
> will still use RGB. Because maybe the RGB issue is also specific to that<br>
> graphic card which<br>
> is VEGA"M". So that is why the patch only tries to match hdmi cases<br>
> together, whether it is direct connection or through usb-c.<br>
> <br>
> -<br>
> Julien<br>
> <br>
> <br>
> <br>
> On Tue, Oct 8, 2019 at 10:44 AM Harry Wentland <<a href="mailto:hwentlan@amd.com" target="_blank">hwentlan@amd.com</a><br>
> <mailto:<a href="mailto:hwentlan@amd.com" target="_blank">hwentlan@amd.com</a>>> wrote:<br>
> <br>
> 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<br>
> <<a href="mailto:julien.isorce@gmail.com" target="_blank">julien.isorce@gmail.com</a> <mailto:<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> <mailto:<a href="mailto:julien.isorce@gmail.com" target="_blank">julien.isorce@gmail.com</a>>>><br>
> 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<br>
> 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>
> > <mailto:<a href="mailto:jisorce@oblong.com" target="_blank">jisorce@oblong.com</a> <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 =<br>
> &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 ==<br>
> SIGNAL_TYPE_HDMI_TYPE_A)<br>
> > timing_out->pixel_encoding =<br>
> 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 =<br>
> 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> <mailto:<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>
> <br>
</blockquote></div>