amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: Use pixel encoding 444 for dongle usb-c to hdmi
@ 2019-10-01 22:21 Julien Isorce
       [not found] ` <20191001222123.2392-1-jisorce-bXq66PvbRDbQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Julien Isorce @ 2019-10-01 22:21 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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@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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/amd/display: Use pixel encoding 444 for dongle usb-c to hdmi
       [not found] ` <20191001222123.2392-1-jisorce-bXq66PvbRDbQT0dZR+AlfA@public.gmane.org>
@ 2019-10-08 16:06   ` Julien Isorce
       [not found]     ` <CAHWPjbWcdhnewEN8OEUgDu5aBpYBW5tUggA_KJ_BUR8JLvCsQw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Julien Isorce @ 2019-10-08 16:06 UTC (permalink / raw)
  To: amd-gfx list


[-- Attachment #1.1: Type: text/plain, Size: 2206 bytes --]

Hi,

Gentle ping ?

Thx
Julien

On Tue, Oct 1, 2019 at 3:21 PM Julien Isorce <julien.isorce-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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-bXq66PvbRDbQT0dZR+AlfA@public.gmane.org>
> ---
>  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
>
>

[-- Attachment #1.2: Type: text/html, Size: 2960 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/amd/display: Use pixel encoding 444 for dongle usb-c to hdmi
       [not found]     ` <CAHWPjbWcdhnewEN8OEUgDu5aBpYBW5tUggA_KJ_BUR8JLvCsQw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2019-10-08 17:28       ` Deucher, Alexander
       [not found]         ` <DM5PR12MB1820556F9855FDC376F4B6DDF79A0-2J9CzHegvk8qWyLXlBb1HgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
  2019-10-08 17:44       ` Harry Wentland
  1 sibling, 1 reply; 14+ messages in thread
From: Deucher, Alexander @ 2019-10-08 17:28 UTC (permalink / raw)
  To: Julien Isorce, amd-gfx list, Wentland, Harry, Kazlauskas,
	Nicholas, Li, Sun peng (Leo)


[-- Attachment #1.1: Type: text/plain, Size: 2712 bytes --]

+ some display folks.
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Julien Isorce <julien.isorce-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Sent: Tuesday, October 8, 2019 12:06 PM
To: amd-gfx list <amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
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 <julien.isorce-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org<mailto:julien.isorce-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> 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-bXq66PvbRDbQT0dZR+AlfA@public.gmane.org<mailto:jisorce-bXq66PvbRDbQT0dZR+AlfA@public.gmane.org>>
---
 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


[-- Attachment #1.2: Type: text/html, Size: 4440 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/amd/display: Use pixel encoding 444 for dongle usb-c to hdmi
       [not found]     ` <CAHWPjbWcdhnewEN8OEUgDu5aBpYBW5tUggA_KJ_BUR8JLvCsQw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2019-10-08 17:28       ` Deucher, Alexander
@ 2019-10-08 17:44       ` Harry Wentland
       [not found]         ` <4610d814-6c54-982e-ecc6-716cc42b5e68-5C7GfCeVMHo@public.gmane.org>
  1 sibling, 1 reply; 14+ messages in thread
From: Harry Wentland @ 2019-10-08 17:44 UTC (permalink / raw)
  To: Julien Isorce, amd-gfx list

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@gmail.com
> <mailto:julien.isorce@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@oblong.com
>     <mailto:jisorce@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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/amd/display: Use pixel encoding 444 for dongle usb-c to hdmi
       [not found]         ` <DM5PR12MB1820556F9855FDC376F4B6DDF79A0-2J9CzHegvk8qWyLXlBb1HgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2019-10-08 17:44           ` Harry Wentland
  0 siblings, 0 replies; 14+ messages in thread
From: Harry Wentland @ 2019-10-08 17:44 UTC (permalink / raw)
  To: Deucher, Alexander, Julien Isorce, amd-gfx list, Wentland, Harry,
	Kazlauskas, Nicholas, Li, Sun peng (Leo)


[-- Attachment #1.1: Type: text/plain, Size: 2735 bytes --]

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 <amd-gfx-bounces@lists.freedesktop.org><mailto:amd-gfx-bounces@lists.freedesktop.org> on behalf of Julien Isorce <julien.isorce@gmail.com><mailto:julien.isorce@gmail.com>
Sent: Tuesday, October 8, 2019 12:06 PM
To: amd-gfx list <amd-gfx@lists.freedesktop.org><mailto:amd-gfx@lists.freedesktop.org>
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 <julien.isorce@gmail.com<mailto:julien.isorce@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@oblong.com<mailto:jisorce@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



[-- Attachment #1.2: Type: text/html, Size: 4862 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/amd/display: Use pixel encoding 444 for dongle usb-c to hdmi
       [not found]         ` <4610d814-6c54-982e-ecc6-716cc42b5e68-5C7GfCeVMHo@public.gmane.org>
@ 2019-10-08 18:15           ` Julien Isorce
       [not found]             ` <CAHWPjbXPL9NsT0yXb8_wkodT18TEBcgf81tY49GP+U=SGZ26YQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Julien Isorce @ 2019-10-08 18:15 UTC (permalink / raw)
  To: Harry Wentland; +Cc: amd-gfx list


[-- Attachment #1.1: Type: text/plain, Size: 4553 bytes --]

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-5C7GfCeVMHo@public.gmane.org> 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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> > <mailto:julien.isorce-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> 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-bXq66PvbRDbQT0dZR+AlfA@public.gmane.org
> >     <mailto:jisorce-bXq66PvbRDbQT0dZR+AlfA@public.gmane.org>>
> >     ---
> >      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-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> >
>

[-- Attachment #1.2: Type: text/html, Size: 6453 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/amd/display: Use pixel encoding 444 for dongle usb-c to hdmi
       [not found]             ` <CAHWPjbXPL9NsT0yXb8_wkodT18TEBcgf81tY49GP+U=SGZ26YQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2019-10-11 19:31               ` Julien Isorce
       [not found]                 ` <CAHWPjbXH=GYR55+3i1FXF6XcvgGP5ngiSZGOkNuoCt4JPVVp0Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2019-11-06  5:07               ` Julien Isorce
  2019-11-11 21:11               ` Harry Wentland
  2 siblings, 1 reply; 14+ messages in thread
From: Julien Isorce @ 2019-10-11 19:31 UTC (permalink / raw)
  To: Harry Wentland; +Cc: amd-gfx list


[-- Attachment #1.1: Type: text/plain, Size: 4867 bytes --]

Hi Harry,

Do you need more information ?

Thx
Julien

On Tue, Oct 8, 2019 at 11:15 AM Julien Isorce <julien.isorce-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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-5C7GfCeVMHo@public.gmane.org> 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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>> > <mailto:julien.isorce-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> 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-bXq66PvbRDbQT0dZR+AlfA@public.gmane.org
>> >     <mailto:jisorce-bXq66PvbRDbQT0dZR+AlfA@public.gmane.org>>
>> >     ---
>> >      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-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
>> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>> >
>>
>

[-- Attachment #1.2: Type: text/html, Size: 7021 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/amd/display: Use pixel encoding 444 for dongle usb-c to hdmi
       [not found]                 ` <CAHWPjbXH=GYR55+3i1FXF6XcvgGP5ngiSZGOkNuoCt4JPVVp0Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2019-10-15 22:01                   ` Julien Isorce
  0 siblings, 0 replies; 14+ messages in thread
From: Julien Isorce @ 2019-10-15 22:01 UTC (permalink / raw)
  To: amd-gfx list; +Cc: Harry Wentland


[-- Attachment #1.1: Type: text/plain, Size: 5144 bytes --]

Hi,

Gentle ping ?

Thx
Julien

On Fri, Oct 11, 2019 at 12:31 PM Julien Isorce <julien.isorce-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:

> Hi Harry,
>
> Do you need more information ?
>
> Thx
> Julien
>
> On Tue, Oct 8, 2019 at 11:15 AM Julien Isorce <julien.isorce-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> 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-5C7GfCeVMHo@public.gmane.org> 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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>>> > <mailto:julien.isorce-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> 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-bXq66PvbRDbQT0dZR+AlfA@public.gmane.org
>>> >     <mailto:jisorce-bXq66PvbRDbQT0dZR+AlfA@public.gmane.org>>
>>> >     ---
>>> >      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-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
>>> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>>> >
>>>
>>

[-- Attachment #1.2: Type: text/html, Size: 7572 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/amd/display: Use pixel encoding 444 for dongle usb-c to hdmi
       [not found]             ` <CAHWPjbXPL9NsT0yXb8_wkodT18TEBcgf81tY49GP+U=SGZ26YQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2019-10-11 19:31               ` Julien Isorce
@ 2019-11-06  5:07               ` Julien Isorce
  2019-11-06  5:07                 ` Julien Isorce
  2019-11-11 21:11               ` Harry Wentland
  2 siblings, 1 reply; 14+ messages in thread
From: Julien Isorce @ 2019-11-06  5:07 UTC (permalink / raw)
  To: Harry Wentland, amd-gfx list; +Cc: Alex Deucher, Christian König


[-- Attachment #1.1: Type: text/plain, Size: 4847 bytes --]

Hi, gentle ping ? Thx in advance.

On Tue, Oct 8, 2019 at 11:15 AM Julien Isorce <julien.isorce-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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-5C7GfCeVMHo@public.gmane.org> 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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>> > <mailto:julien.isorce-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> 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-bXq66PvbRDbQT0dZR+AlfA@public.gmane.org
>> >     <mailto:jisorce-bXq66PvbRDbQT0dZR+AlfA@public.gmane.org>>
>> >     ---
>> >      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-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
>> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>> >
>>
>

[-- Attachment #1.2: Type: text/html, Size: 6954 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/amd/display: Use pixel encoding 444 for dongle usb-c to hdmi
  2019-11-06  5:07               ` Julien Isorce
@ 2019-11-06  5:07                 ` Julien Isorce
  0 siblings, 0 replies; 14+ messages in thread
From: Julien Isorce @ 2019-11-06  5:07 UTC (permalink / raw)
  To: Harry Wentland, amd-gfx list; +Cc: Alex Deucher, Christian König


[-- Attachment #1.1: Type: text/plain, Size: 4650 bytes --]

Hi, gentle ping ? Thx in advance.

On Tue, Oct 8, 2019 at 11:15 AM Julien Isorce <julien.isorce@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@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@gmail.com
>> > <mailto:julien.isorce@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@oblong.com
>> >     <mailto:jisorce@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@lists.freedesktop.org
>> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>> >
>>
>

[-- Attachment #1.2: Type: text/html, Size: 6581 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/amd/display: Use pixel encoding 444 for dongle usb-c to hdmi
       [not found]             ` <CAHWPjbXPL9NsT0yXb8_wkodT18TEBcgf81tY49GP+U=SGZ26YQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2019-10-11 19:31               ` Julien Isorce
  2019-11-06  5:07               ` Julien Isorce
@ 2019-11-11 21:11               ` Harry Wentland
  2019-11-11 21:11                 ` Harry Wentland
       [not found]                 ` <c501ea8d-21d9-61ce-dafb-ef45c1701a1f-5C7GfCeVMHo@public.gmane.org>
  2 siblings, 2 replies; 14+ messages in thread
From: Harry Wentland @ 2019-11-11 21:11 UTC (permalink / raw)
  To: Julien Isorce; +Cc: amd-gfx list

On 2019-10-08 2:15 p.m., Julien Isorce 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.
> 

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

> 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


> 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@amd.com
> <mailto:hwentlan@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@gmail.com <mailto:julien.isorce@gmail.com>
>     > <mailto:julien.isorce@gmail.com <mailto:julien.isorce@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@oblong.com
>     <mailto:jisorce@oblong.com>
>     >     <mailto:jisorce@oblong.com <mailto:jisorce@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@lists.freedesktop.org <mailto:amd-gfx@lists.freedesktop.org>
>     > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>     >
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/amd/display: Use pixel encoding 444 for dongle usb-c to hdmi
  2019-11-11 21:11               ` Harry Wentland
@ 2019-11-11 21:11                 ` Harry Wentland
       [not found]                 ` <c501ea8d-21d9-61ce-dafb-ef45c1701a1f-5C7GfCeVMHo@public.gmane.org>
  1 sibling, 0 replies; 14+ messages in thread
From: Harry Wentland @ 2019-11-11 21:11 UTC (permalink / raw)
  To: Julien Isorce; +Cc: amd-gfx list

On 2019-10-08 2:15 p.m., Julien Isorce 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.
> 

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

> 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


> 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@amd.com
> <mailto:hwentlan@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@gmail.com <mailto:julien.isorce@gmail.com>
>     > <mailto:julien.isorce@gmail.com <mailto:julien.isorce@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@oblong.com
>     <mailto:jisorce@oblong.com>
>     >     <mailto:jisorce@oblong.com <mailto:jisorce@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@lists.freedesktop.org <mailto:amd-gfx@lists.freedesktop.org>
>     > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>     >
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/amd/display: Use pixel encoding 444 for dongle usb-c to hdmi
       [not found]                 ` <c501ea8d-21d9-61ce-dafb-ef45c1701a1f-5C7GfCeVMHo@public.gmane.org>
@ 2019-11-14 23:57                   ` Julien Isorce
  2019-11-14 23:57                     ` Julien Isorce
  0 siblings, 1 reply; 14+ messages in thread
From: Julien Isorce @ 2019-11-14 23:57 UTC (permalink / raw)
  To: Harry Wentland; +Cc: amd-gfx list


[-- Attachment #1.1: Type: text/plain, Size: 6527 bytes --]

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


On Mon, Nov 11, 2019 at 1:11 PM Harry Wentland <hwentlan-5C7GfCeVMHo@public.gmane.org> wrote:

> On 2019-10-08 2:15 p.m., Julien Isorce 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.
> >
>
> 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
>
> > 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
>
>
> > 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-5C7GfCeVMHo@public.gmane.org
> > <mailto:hwentlan-5C7GfCeVMHo@public.gmane.org>> 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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <mailto:julien.isorce-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >     > <mailto:julien.isorce-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <mailto:julien.isorce-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>>>
> >     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-bXq66PvbRDbQT0dZR+AlfA@public.gmane.org
> >     <mailto:jisorce-bXq66PvbRDbQT0dZR+AlfA@public.gmane.org>
> >     >     <mailto:jisorce-bXq66PvbRDbQT0dZR+AlfA@public.gmane.org <mailto:jisorce-bXq66PvbRDbQT0dZR+AlfA@public.gmane.org>>>
> >     >     ---
> >     >      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-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org <mailto:
> amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
> >     > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> >     >
> >
>

[-- Attachment #1.2: Type: text/html, Size: 9852 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] drm/amd/display: Use pixel encoding 444 for dongle usb-c to hdmi
  2019-11-14 23:57                   ` Julien Isorce
@ 2019-11-14 23:57                     ` Julien Isorce
  0 siblings, 0 replies; 14+ messages in thread
From: Julien Isorce @ 2019-11-14 23:57 UTC (permalink / raw)
  To: Harry Wentland; +Cc: amd-gfx list


[-- Attachment #1.1: Type: text/plain, Size: 6172 bytes --]

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


On Mon, Nov 11, 2019 at 1:11 PM Harry Wentland <hwentlan@amd.com> wrote:

> On 2019-10-08 2:15 p.m., Julien Isorce 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.
> >
>
> 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
>
> > 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
>
>
> > 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@amd.com
> > <mailto:hwentlan@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@gmail.com <mailto:julien.isorce@gmail.com>
> >     > <mailto:julien.isorce@gmail.com <mailto:julien.isorce@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@oblong.com
> >     <mailto:jisorce@oblong.com>
> >     >     <mailto:jisorce@oblong.com <mailto:jisorce@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@lists.freedesktop.org <mailto:
> amd-gfx@lists.freedesktop.org>
> >     > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> >     >
> >
>

[-- Attachment #1.2: Type: text/html, Size: 9228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-11-14 23:57 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-01 22:21 [PATCH] drm/amd/display: Use pixel encoding 444 for dongle usb-c to hdmi Julien Isorce
     [not found] ` <20191001222123.2392-1-jisorce-bXq66PvbRDbQT0dZR+AlfA@public.gmane.org>
2019-10-08 16:06   ` Julien Isorce
     [not found]     ` <CAHWPjbWcdhnewEN8OEUgDu5aBpYBW5tUggA_KJ_BUR8JLvCsQw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-10-08 17:28       ` Deucher, Alexander
     [not found]         ` <DM5PR12MB1820556F9855FDC376F4B6DDF79A0-2J9CzHegvk8qWyLXlBb1HgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-10-08 17:44           ` Harry Wentland
2019-10-08 17:44       ` Harry Wentland
     [not found]         ` <4610d814-6c54-982e-ecc6-716cc42b5e68-5C7GfCeVMHo@public.gmane.org>
2019-10-08 18:15           ` Julien Isorce
     [not found]             ` <CAHWPjbXPL9NsT0yXb8_wkodT18TEBcgf81tY49GP+U=SGZ26YQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-10-11 19:31               ` Julien Isorce
     [not found]                 ` <CAHWPjbXH=GYR55+3i1FXF6XcvgGP5ngiSZGOkNuoCt4JPVVp0Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-10-15 22:01                   ` Julien Isorce
2019-11-06  5:07               ` Julien Isorce
2019-11-06  5:07                 ` Julien Isorce
2019-11-11 21:11               ` Harry Wentland
2019-11-11 21:11                 ` Harry Wentland
     [not found]                 ` <c501ea8d-21d9-61ce-dafb-ef45c1701a1f-5C7GfCeVMHo@public.gmane.org>
2019-11-14 23:57                   ` Julien Isorce
2019-11-14 23:57                     ` Julien Isorce

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).