* [PATCH] drm/amd/display: Calculate output_color_space after pixel encoding adjustment
@ 2023-01-10 19:43 Joshua Ashton
2023-01-10 20:12 ` [PATCH v2] " Joshua Ashton
0 siblings, 1 reply; 5+ messages in thread
From: Joshua Ashton @ 2023-01-10 19:43 UTC (permalink / raw)
To: amd-gfx; +Cc: Joshua Ashton
Code in get_output_color_space depends on knowing the pixel encoding to make determinations about whether to pick between eg. COLOR_SPACE_SRGB or COLOR_SPACE_YCBCR709 for transparent RGB -> YCbCr 4:4:4 in the driver.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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 599adaab6c30..eb440b1bf1ac 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -5342,8 +5342,6 @@ static void fill_stream_properties_from_drm_display_mode(
timing_out->aspect_ratio = get_aspect_ratio(mode_in);
- stream->output_color_space = get_output_color_space(timing_out, connector_state);
-
stream->out_transfer_func->type = TF_TYPE_PREDEFINED;
stream->out_transfer_func->tf = TRANSFER_FUNCTION_SRGB;
if (stream->signal == SIGNAL_TYPE_HDMI_TYPE_A) {
@@ -5354,6 +5352,8 @@ static void fill_stream_properties_from_drm_display_mode(
adjust_colour_depth_from_display_info(timing_out, info);
}
}
+
+ stream->output_color_space = get_output_color_space(timing_out, connector_state);
}
static void fill_audio_info(struct audio_info *audio_info,
--
2.39.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2] drm/amd/display: Calculate output_color_space after pixel encoding adjustment
2023-01-10 19:43 [PATCH] drm/amd/display: Calculate output_color_space after pixel encoding adjustment Joshua Ashton
@ 2023-01-10 20:12 ` Joshua Ashton
2023-01-16 14:35 ` Melissa Wen
0 siblings, 1 reply; 5+ messages in thread
From: Joshua Ashton @ 2023-01-10 20:12 UTC (permalink / raw)
To: amd-gfx; +Cc: Joshua Ashton
Code in get_output_color_space depends on knowing the pixel encoding to
determine whether to pick between eg. COLOR_SPACE_SRGB or
COLOR_SPACE_YCBCR709 for transparent RGB -> YCbCr 4:4:4 in the driver.
v2: Fixed patch being accidentally based on a personal feature branch, oops!
Signed-off-by: Joshua Ashton <joshua@froggi.es>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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 b4d60eedbcbf..9da71ee8fcc4 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -5341,8 +5341,6 @@ static void fill_stream_properties_from_drm_display_mode(
timing_out->aspect_ratio = get_aspect_ratio(mode_in);
- stream->output_color_space = get_output_color_space(timing_out);
-
stream->out_transfer_func->type = TF_TYPE_PREDEFINED;
stream->out_transfer_func->tf = TRANSFER_FUNCTION_SRGB;
if (stream->signal == SIGNAL_TYPE_HDMI_TYPE_A) {
@@ -5353,6 +5351,8 @@ static void fill_stream_properties_from_drm_display_mode(
adjust_colour_depth_from_display_info(timing_out, info);
}
}
+
+ stream->output_color_space = get_output_color_space(timing_out);
}
static void fill_audio_info(struct audio_info *audio_info,
--
2.39.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] drm/amd/display: Calculate output_color_space after pixel encoding adjustment
2023-01-10 20:12 ` [PATCH v2] " Joshua Ashton
@ 2023-01-16 14:35 ` Melissa Wen
2023-01-16 14:41 ` Melissa Wen
0 siblings, 1 reply; 5+ messages in thread
From: Melissa Wen @ 2023-01-16 14:35 UTC (permalink / raw)
To: Joshua Ashton; +Cc: amd-gfx
[-- Attachment #1: Type: text/plain, Size: 1679 bytes --]
On 01/10, Joshua Ashton wrote:
> Code in get_output_color_space depends on knowing the pixel encoding to
> determine whether to pick between eg. COLOR_SPACE_SRGB or
> COLOR_SPACE_YCBCR709 for transparent RGB -> YCbCr 4:4:4 in the driver.
>
> v2: Fixed patch being accidentally based on a personal feature branch, oops!
>
> Signed-off-by: Joshua Ashton <joshua@froggi.es>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> 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 b4d60eedbcbf..9da71ee8fcc4 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -5341,8 +5341,6 @@ static void fill_stream_properties_from_drm_display_mode(
>
> timing_out->aspect_ratio = get_aspect_ratio(mode_in);
>
> - stream->output_color_space = get_output_color_space(timing_out);
> -
> stream->out_transfer_func->type = TF_TYPE_PREDEFINED;
> stream->out_transfer_func->tf = TRANSFER_FUNCTION_SRGB;
> if (stream->signal == SIGNAL_TYPE_HDMI_TYPE_A) {
> @@ -5353,6 +5351,8 @@ static void fill_stream_properties_from_drm_display_mode(
> adjust_colour_depth_from_display_info(timing_out, info);
> }
> }
> +
> + stream->output_color_space = get_output_color_space(timing_out);
LGTM.
I see that we were ignoring the updated value of pixel_encoding in the
previous point. Nice catch!
Reviewed-by: Melissa Wen <mwen@igalia.com>
> }
>
> static void fill_audio_info(struct audio_info *audio_info,
> --
> 2.39.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] drm/amd/display: Calculate output_color_space after pixel encoding adjustment
2023-01-16 14:35 ` Melissa Wen
@ 2023-01-16 14:41 ` Melissa Wen
2023-01-16 18:02 ` Alex Deucher
0 siblings, 1 reply; 5+ messages in thread
From: Melissa Wen @ 2023-01-16 14:41 UTC (permalink / raw)
To: Joshua Ashton; +Cc: amd-gfx
[-- Attachment #1: Type: text/plain, Size: 1945 bytes --]
On 01/16, Melissa Wen wrote:
> On 01/10, Joshua Ashton wrote:
> > Code in get_output_color_space depends on knowing the pixel encoding to
> > determine whether to pick between eg. COLOR_SPACE_SRGB or
> > COLOR_SPACE_YCBCR709 for transparent RGB -> YCbCr 4:4:4 in the driver.
> >
> > v2: Fixed patch being accidentally based on a personal feature branch, oops!
> >
> > Signed-off-by: Joshua Ashton <joshua@froggi.es>
> > ---
> > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > 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 b4d60eedbcbf..9da71ee8fcc4 100644
> > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > @@ -5341,8 +5341,6 @@ static void fill_stream_properties_from_drm_display_mode(
> >
> > timing_out->aspect_ratio = get_aspect_ratio(mode_in);
> >
> > - stream->output_color_space = get_output_color_space(timing_out);
> > -
> > stream->out_transfer_func->type = TF_TYPE_PREDEFINED;
> > stream->out_transfer_func->tf = TRANSFER_FUNCTION_SRGB;
> > if (stream->signal == SIGNAL_TYPE_HDMI_TYPE_A) {
> > @@ -5353,6 +5351,8 @@ static void fill_stream_properties_from_drm_display_mode(
> > adjust_colour_depth_from_display_info(timing_out, info);
> > }
> > }
> > +
> > + stream->output_color_space = get_output_color_space(timing_out);
>
> LGTM.
>
> I see that we were ignoring the updated value of pixel_encoding in the
> previous point. Nice catch!
>
> Reviewed-by: Melissa Wen <mwen@igalia.com>
BTW, I think it deserves a fixes tag to:
Fixes: ea117312ea9f ("drm/amd/display: Reduce HDMI pixel encoding if max clock is exceeded")
>
> > }
> >
> > static void fill_audio_info(struct audio_info *audio_info,
> > --
> > 2.39.0
> >
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] drm/amd/display: Calculate output_color_space after pixel encoding adjustment
2023-01-16 14:41 ` Melissa Wen
@ 2023-01-16 18:02 ` Alex Deucher
0 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2023-01-16 18:02 UTC (permalink / raw)
To: Melissa Wen; +Cc: amd-gfx, Joshua Ashton
Applied with the fixes tag. Thanks!
Alex
On Mon, Jan 16, 2023 at 9:41 AM Melissa Wen <mwen@igalia.com> wrote:
>
> On 01/16, Melissa Wen wrote:
> > On 01/10, Joshua Ashton wrote:
> > > Code in get_output_color_space depends on knowing the pixel encoding to
> > > determine whether to pick between eg. COLOR_SPACE_SRGB or
> > > COLOR_SPACE_YCBCR709 for transparent RGB -> YCbCr 4:4:4 in the driver.
> > >
> > > v2: Fixed patch being accidentally based on a personal feature branch, oops!
> > >
> > > Signed-off-by: Joshua Ashton <joshua@froggi.es>
> > > ---
> > > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > 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 b4d60eedbcbf..9da71ee8fcc4 100644
> > > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > > @@ -5341,8 +5341,6 @@ static void fill_stream_properties_from_drm_display_mode(
> > >
> > > timing_out->aspect_ratio = get_aspect_ratio(mode_in);
> > >
> > > - stream->output_color_space = get_output_color_space(timing_out);
> > > -
> > > stream->out_transfer_func->type = TF_TYPE_PREDEFINED;
> > > stream->out_transfer_func->tf = TRANSFER_FUNCTION_SRGB;
> > > if (stream->signal == SIGNAL_TYPE_HDMI_TYPE_A) {
> > > @@ -5353,6 +5351,8 @@ static void fill_stream_properties_from_drm_display_mode(
> > > adjust_colour_depth_from_display_info(timing_out, info);
> > > }
> > > }
> > > +
> > > + stream->output_color_space = get_output_color_space(timing_out);
> >
> > LGTM.
> >
> > I see that we were ignoring the updated value of pixel_encoding in the
> > previous point. Nice catch!
> >
> > Reviewed-by: Melissa Wen <mwen@igalia.com>
>
> BTW, I think it deserves a fixes tag to:
>
> Fixes: ea117312ea9f ("drm/amd/display: Reduce HDMI pixel encoding if max clock is exceeded")
>
> >
> > > }
> > >
> > > static void fill_audio_info(struct audio_info *audio_info,
> > > --
> > > 2.39.0
> > >
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-01-16 18:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10 19:43 [PATCH] drm/amd/display: Calculate output_color_space after pixel encoding adjustment Joshua Ashton
2023-01-10 20:12 ` [PATCH v2] " Joshua Ashton
2023-01-16 14:35 ` Melissa Wen
2023-01-16 14:41 ` Melissa Wen
2023-01-16 18:02 ` Alex Deucher
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.