Skip to contentSkip to conversation

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

PATCH In review Julien Isorce 3 participants 11 messages Oct 1, 2019 – Nov 14, 2019 7 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

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.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5 -0
index d3f404f097eb..8139dcc0bfba 100644
@@ -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;
 
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20191001222123.2392-1-jisorce-bXq66PvbRDbQT0dZR+AlfA@public.gmane.org

#2 lore raw

Hi,

Gentle ping ?

Thx
Julien

Quoted 40 lines · Julien Isorce

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.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
index d3f404f097eb..8139dcc0bfba 100644
@@ -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;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -0
+       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)

Quoted 8 lines
+               timing_out->pixel_encoding = PIXEL_ENCODING_YCBCR444;
        else
                timing_out->pixel_encoding = PIXEL_ENCODING_RGB;

--
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): CAHWPjbWcdhnewEN8OEUgDu5aBpYBW5tUggA_KJ_BUR8JLvCsQw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#4 lore raw

+ some display folks.
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Julien Isorce <[email protected]>
Sent: Tuesday, October 8, 2019 12:06 PM
To: amd-gfx list <[email protected]>
Subject: Re: [PATCH] drm/amd/display: Use pixel encoding 444 for dongle usb-c to hdmi

Hi,

Gentle ping ?

Thx
Julien

On Tue, Oct 1, 2019 at 3:21 PM Julien Isorce <[email protected]<mailto:[email protected]>> 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.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5 -0
index d3f404f097eb..8139dcc0bfba 100644
@@ -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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): DM5PR12MB1820556F9855FDC376F4B6DDF79A0-2J9CzHegvk8qWyLXlBb1HgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#6 lore raw

Thanks for bumping.

I replied on the mailing list.

On 2019-10-08 1:28 p.m., Deucher, Alexander wrote:
+ some display folks.
________________________________
From: amd-gfx <[email protected]><mailto:[email protected]> on behalf of Julien Isorce <[email protected]><mailto:[email protected]>
Sent: Tuesday, October 8, 2019 12:06 PM
To: amd-gfx list <[email protected]><mailto:[email protected]>
Subject: Re: [PATCH] drm/amd/display: Use pixel encoding 444 for dongle usb-c to hdmi

Hi,

Gentle ping ?

Thx
Julien

On Tue, Oct 1, 2019 at 3:21 PM Julien Isorce <[email protected]<mailto:[email protected]>> 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.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5 -0
index d3f404f097eb..8139dcc0bfba 100644
@@ -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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#7 lore raw
In reply to a message not in the archive

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

Quoted 59 lines · Julien Isorce

Hi,

Gentle ping ?

Thx
Julien

On Tue, Oct 1, 2019 at 3:21 PM Julien Isorce <[email protected] <mailto:[email protected]>> 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 <[email protected]
    <mailto:[email protected]>>
    ---
     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
Quoted 5 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 4610d814-6c54-982e-ecc6-716cc42b5e68-5C7GfCeVMHo@public.gmane.org

#9 lore raw

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

Quoted 50 lines · Harry Wentland

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

Quoted 25 lines · Julien Isorce

Hi,

Gentle ping ?

Thx
Julien

On Tue, Oct 1, 2019 at 3:21 PM Julien Isorce <[email protected] <mailto:[email protected]>> 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.

<mailto:[email protected]>>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++ 1 file changed, 5 insertions(+)

Quoted 10 lines

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 =

Quoted 31 lines

&connector->display_info;

Quoted 29 lines
    +       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 [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): CAHWPjbXPL9NsT0yXb8_wkodT18TEBcgf81tY49GP+U=SGZ26YQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#11 lore raw

Hi Harry,

Do you need more information ?

Thx
Julien

Quoted 26 lines · Julien Isorce

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.

Quoted 92 lines

-
Julien

Quoted 84 lines · Harry Wentland

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

Quoted 25 lines · Julien Isorce

Hi,

Gentle ping ?

Thx
Julien

On Tue, Oct 1, 2019 at 3:21 PM Julien Isorce <[email protected] <mailto:[email protected]>> 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.

<mailto:[email protected]>>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++ 1 file changed, 5 insertions(+)

Quoted 10 lines

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;

Quoted 9 lines
    +       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)

Quoted 1 line
                    timing_out->pixel_encoding =

PIXEL_ENCODING_YCBCR444;

Quoted 7 lines

+ 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;

Quoted 12 lines
            else
                    timing_out->pixel_encoding = PIXEL_ENCODING_RGB;

    --
    2.17.1

_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): CAHWPjbXH=GYR55+3i1FXF6XcvgGP5ngiSZGOkNuoCt4JPVVp0Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#13 lore raw

Hi,

Gentle ping ?

Thx
Julien

Quoted 128 lines · Julien Isorce

Hi Harry,

Do you need more information ?

Thx
Julien

Quoted 118 lines · Julien Isorce

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

Quoted 84 lines · Harry Wentland

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

Quoted 25 lines · Julien Isorce

Hi,

Gentle ping ?

Thx
Julien

On Tue, Oct 1, 2019 at 3:21 PM Julien Isorce <[email protected] <mailto:[email protected]>> 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.

<mailto:[email protected]>>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++ 1 file changed, 5 insertions(+)

Quoted 10 lines

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;

Quoted 9 lines
    +       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)

Quoted 1 line
                    timing_out->pixel_encoding =

PIXEL_ENCODING_YCBCR444;

Quoted 7 lines

+ 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;

Quoted 12 lines
            else
                    timing_out->pixel_encoding = PIXEL_ENCODING_RGB;

    --
    2.17.1

_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#14 lore raw
In reply to a message not in the archive

Hi, gentle ping ? Thx in advance.

Quoted 26 lines · Julien Isorce

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.

Quoted 92 lines

-
Julien

Quoted 84 lines · Harry Wentland

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

Quoted 25 lines · Julien Isorce

Hi,

Gentle ping ?

Thx
Julien

On Tue, Oct 1, 2019 at 3:21 PM Julien Isorce <[email protected] <mailto:[email protected]>> 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.

<mailto:[email protected]>>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++ 1 file changed, 5 insertions(+)

Quoted 10 lines

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;

Quoted 9 lines
    +       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)

Quoted 1 line
                    timing_out->pixel_encoding =

PIXEL_ENCODING_YCBCR444;

Quoted 7 lines

+ 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;

Quoted 12 lines
            else
                    timing_out->pixel_encoding = PIXEL_ENCODING_RGB;

    --
    2.17.1

_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#15 lore raw
In reply to a message not in the archive
Quoted 7 lines · Julien Isorce

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 .

Quoted 7 lines

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.

I haven't had time to repro this issue. Can you post a picture of this problem somewhere? Ideally with a bug description at
https://gitlab.freedesktop.org/drm/amd/issues

Quoted 6 lines

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).

I've been hesitant about this patch since it changes driver policy which is not something I like to do without very good reason and understanding all the implications.

That said, treating an DP-HDMI adapter like a native HDMI connection rather than DP is not unreasonable. I'm still curious, though, why this is required at all. As mentioned above a picture of the problem (ideally showing the monitors side-by-side) would help.

Harry

Quoted 93 lines

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 <[email protected] <mailto:[email protected]>> 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
    <[email protected] <mailto:[email protected]>
    > <mailto:[email protected] <mailto:[email protected]>>>
    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 <[email protected]
    <mailto:[email protected]>
    >     <mailto:[email protected] <mailto:[email protected]>>>
    >     ---
    >      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;
    >
    >     --
Quoted 9 lines
    >     2.17.1
    >
    >
    > _______________________________________________
    > amd-gfx mailing list
    > [email protected] <mailto:[email protected]>
    > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
    >

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): c501ea8d-21d9-61ce-dafb-ef45c1701a1f-5C7GfCeVMHo@public.gmane.org

#17 lore raw

Hi Harry,

As suggested I created the issue here
https://gitlab.freedesktop.org/drm/amd/issues/2 with a picture of the problem attached.

Please take a look, thx!
Julien

Quoted 138 lines · Harry Wentland
Quoted 7 lines · Julien Isorce

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 .

Quoted 7 lines

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.

I haven't had time to repro this issue. Can you post a picture of this problem somewhere? Ideally with a bug description at
https://gitlab.freedesktop.org/drm/amd/issues

Quoted 6 lines

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).

I've been hesitant about this patch since it changes driver policy which is not something I like to do without very good reason and understanding all the implications.

That said, treating an DP-HDMI adapter like a native HDMI connection rather than DP is not unreasonable. I'm still curious, though, why this is required at all. As mentioned above a picture of the problem (ideally showing the monitors side-by-side) would help.

Harry

Quoted 11 lines

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

Quoted 8 lines

On Tue, Oct 8, 2019 at 10:44 AM Harry Wentland <[email protected] <mailto:[email protected]>> wrote:

Hi Julien,

curious which monitor you're using.

Have you checked whether the driver picks RGB or YCBCR420 without

your

Quoted 3 lines

patch?

I'm not sure I understand how the pinkish color issue looks. Do you

see

Quoted 1 line

a pinkish color at the transition from grey to another color? Or is

the

Quoted 18 lines

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
<[email protected] <mailto:[email protected]> > <mailto:[email protected] <mailto:[email protected]>>> wrote:
>

Quoted 4 lines

> 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

Quoted 3 lines
Quoted 1 line

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

Quoted 1 line
Quoted 1 line

one is connected with hdmi-to-hdmi and the other is connected

with

Quoted 34 lines
Quoted 3 lines

usb-c-to-hdmi.

    <mailto:[email protected]>
    >     <mailto:[email protected] <mailto:[email protected]>>>
    >     ---
    >      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)
Quoted 8 lines
    >     +                       && 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;

Quoted 1 line
Quoted 1 line
Quoted 12 lines
Quoted 7 lines
Quoted 7 lines
    --
    2.17.1

_______________________________________________
amd-gfx mailing list [email protected] <mailto:

[email protected]>

Quoted 3 lines
Quoted 2 lines

https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx