[PATCH] drm/amd/display: Use pixel encoding 444 for dongle usb-c to hdmi

Julien Isorce julien.isorce at gmail.com
Wed Nov 6 05:07:51 UTC 2019


Hi, gentle ping ? Thx in advance.

On Tue, Oct 8, 2019 at 11:15 AM Julien Isorce <julien.isorce at gmail.com>
wrote:

> Hi Harry,
>
> I can reproduce on LG, Samsung and NEC monitors.
>
> "Have you checked whether the driver picks RGB or YCBCR420 without your
> patch?" -> it was selecting RGB .
>
> For example on https://commons.wikimedia.org/wiki/File:Gray_scale.jpg ,
> the second band from the left, will be entirely pinkish.
> 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.
>
> 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.
> After this patch, both will use YCbCr 444 (both are hdmi).
> 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
> 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.
>
> -
> Julien
>
>
>
> On Tue, Oct 8, 2019 at 10:44 AM Harry Wentland <hwentlan at amd.com> wrote:
>
>> Hi Julien,
>>
>> curious which monitor you're using.
>>
>> Have you checked whether the driver picks RGB or YCBCR420 without your
>> patch?
>>
>> I'm not sure I understand how the pinkish color issue looks. Do you see
>> a pinkish color at the transition from grey to another color? Or is the
>> entire grey area pinkish?
>>
>> Thanks,
>> Harry
>>
>> On 2019-10-08 12:06 p.m., Julien Isorce wrote:
>> > Hi,
>> >
>> > Gentle ping ?
>> >
>> > Thx
>> > Julien
>> >
>> > On Tue, Oct 1, 2019 at 3:21 PM Julien Isorce <julien.isorce at gmail.com
>> > <mailto:julien.isorce at gmail.com>> wrote:
>> >
>> >     Fix pinkish color issue around grey areas. This also happens
>> >     when not using any dongle so directly with a usb-c to Display
>> >     Port cable. Meaning there is something wrong when using pixel
>> >     encoding RGB with amd driver in the general case. In the meantime
>> >     just use the same pixel encoding as when using HDMI without dongle.
>> >     This way users will see the same thing on 2 identical screens when
>> >     one is connected with hdmi-to-hdmi and the other is connected with
>> >     usb-c-to-hdmi.
>> >
>> >     Signed-off-by: Julien Isorce <jisorce at oblong.com
>> >     <mailto:jisorce at oblong.com>>
>> >     ---
>> >      drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++
>> >      1 file changed, 5 insertions(+)
>> >
>> >     diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> >     b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> >     index d3f404f097eb..8139dcc0bfba 100644
>> >     --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> >     +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> >     @@ -3313,6 +3313,7 @@ static void
>> >     fill_stream_properties_from_drm_display_mode(
>> >      {
>> >             struct dc_crtc_timing *timing_out = &stream->timing;
>> >             const struct drm_display_info *info =
>> &connector->display_info;
>> >     +       const struct dc_link *link = stream->sink->link;
>> >
>> >             memset(timing_out, 0, sizeof(struct dc_crtc_timing));
>> >
>> >     @@ -3327,6 +3328,10 @@ static void
>> >     fill_stream_properties_from_drm_display_mode(
>> >             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 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;
>> >             else
>> >                     timing_out->pixel_encoding = PIXEL_ENCODING_RGB;
>> >
>> >     --
>> >     2.17.1
>> >
>> >
>> > _______________________________________________
>> > amd-gfx mailing list
>> > amd-gfx at lists.freedesktop.org
>> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>> >
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20191105/34bb12b4/attachment.html>


More information about the amd-gfx mailing list