diff mbox series

[2/2] drm/amd/display: Enable fp16 also on DCE-8/10/11.

Message ID 20201228185059.3949-3-mario.kleiner.de@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/amd/display: Check plane scaling against format specific hw plane caps. | expand

Commit Message

Mario Kleiner Dec. 28, 2020, 6:50 p.m. UTC
The hw supports fp16, this is not only useful for HDR,
but also for standard dynamic range displays, because
it allows to get more precise color reproduction with
about 11 - 12 bpc linear precision in the unorm range
0.0 - 1.0.

Working fp16 scanout+display (and HDR over HDMI) was
verified on a DCE-8 asic, so i assume that the more
recent DCE-10/11 will work equally well, now that
format-specific plane scaling constraints are properly
enforced, e.g., the inability of fp16 to scale on older
hw like DCE-8 to DCE-11.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
---
 drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 2 +-
 drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 2 +-
 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Kazlauskas, Nicholas Jan. 4, 2021, 9:17 p.m. UTC | #1
On 2020-12-28 1:50 p.m., Mario Kleiner wrote:
> The hw supports fp16, this is not only useful for HDR,
> but also for standard dynamic range displays, because
> it allows to get more precise color reproduction with
> about 11 - 12 bpc linear precision in the unorm range
> 0.0 - 1.0.
> 
> Working fp16 scanout+display (and HDR over HDMI) was
> verified on a DCE-8 asic, so i assume that the more
> recent DCE-10/11 will work equally well, now that
> format-specific plane scaling constraints are properly
> enforced, e.g., the inability of fp16 to scale on older
> hw like DCE-8 to DCE-11.
> 
> Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

Regards,
Nicholas Kazlauskas

> ---
>   drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 2 +-
>   drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 2 +-
>   drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c   | 2 +-
>   3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
> index 8ab9d6c79808..f20ed05a5050 100644
> --- a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
> @@ -385,7 +385,7 @@ static const struct dc_plane_cap plane_cap = {
>   	.pixel_format_support = {
>   			.argb8888 = true,
>   			.nv12 = false,
> -			.fp16 = false
> +			.fp16 = true
>   	},
>   
>   	.max_upscale_factor = {
> diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
> index 3f63822b8e28..af208f9bd03b 100644
> --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
> @@ -410,7 +410,7 @@ static const struct dc_plane_cap plane_cap = {
>   		.pixel_format_support = {
>   				.argb8888 = true,
>   				.nv12 = false,
> -				.fp16 = false
> +				.fp16 = true
>   		},
>   
>   		.max_upscale_factor = {
> diff --git a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
> index 390a0fa37239..26fe25caa281 100644
> --- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
> @@ -402,7 +402,7 @@ static const struct dc_plane_cap plane_cap = {
>   	.pixel_format_support = {
>   			.argb8888 = true,
>   			.nv12 = false,
> -			.fp16 = false
> +			.fp16 = true
>   	},
>   
>   	.max_upscale_factor = {
>
Alex Deucher Jan. 4, 2021, 9:31 p.m. UTC | #2
Applied the series.  Thanks!

Alex

On Mon, Jan 4, 2021 at 4:17 PM Kazlauskas, Nicholas
<nicholas.kazlauskas@amd.com> wrote:
>
> On 2020-12-28 1:50 p.m., Mario Kleiner wrote:
> > The hw supports fp16, this is not only useful for HDR,
> > but also for standard dynamic range displays, because
> > it allows to get more precise color reproduction with
> > about 11 - 12 bpc linear precision in the unorm range
> > 0.0 - 1.0.
> >
> > Working fp16 scanout+display (and HDR over HDMI) was
> > verified on a DCE-8 asic, so i assume that the more
> > recent DCE-10/11 will work equally well, now that
> > format-specific plane scaling constraints are properly
> > enforced, e.g., the inability of fp16 to scale on older
> > hw like DCE-8 to DCE-11.
> >
> > Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
>
> Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
>
> Regards,
> Nicholas Kazlauskas
>
> > ---
> >   drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 2 +-
> >   drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 2 +-
> >   drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c   | 2 +-
> >   3 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
> > index 8ab9d6c79808..f20ed05a5050 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
> > @@ -385,7 +385,7 @@ static const struct dc_plane_cap plane_cap = {
> >       .pixel_format_support = {
> >                       .argb8888 = true,
> >                       .nv12 = false,
> > -                     .fp16 = false
> > +                     .fp16 = true
> >       },
> >
> >       .max_upscale_factor = {
> > diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
> > index 3f63822b8e28..af208f9bd03b 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
> > @@ -410,7 +410,7 @@ static const struct dc_plane_cap plane_cap = {
> >               .pixel_format_support = {
> >                               .argb8888 = true,
> >                               .nv12 = false,
> > -                             .fp16 = false
> > +                             .fp16 = true
> >               },
> >
> >               .max_upscale_factor = {
> > diff --git a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
> > index 390a0fa37239..26fe25caa281 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
> > @@ -402,7 +402,7 @@ static const struct dc_plane_cap plane_cap = {
> >       .pixel_format_support = {
> >                       .argb8888 = true,
> >                       .nv12 = false,
> > -                     .fp16 = false
> > +                     .fp16 = true
> >       },
> >
> >       .max_upscale_factor = {
> >
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
index 8ab9d6c79808..f20ed05a5050 100644
--- a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
@@ -385,7 +385,7 @@  static const struct dc_plane_cap plane_cap = {
 	.pixel_format_support = {
 			.argb8888 = true,
 			.nv12 = false,
-			.fp16 = false
+			.fp16 = true
 	},
 
 	.max_upscale_factor = {
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
index 3f63822b8e28..af208f9bd03b 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
@@ -410,7 +410,7 @@  static const struct dc_plane_cap plane_cap = {
 		.pixel_format_support = {
 				.argb8888 = true,
 				.nv12 = false,
-				.fp16 = false
+				.fp16 = true
 		},
 
 		.max_upscale_factor = {
diff --git a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
index 390a0fa37239..26fe25caa281 100644
--- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
@@ -402,7 +402,7 @@  static const struct dc_plane_cap plane_cap = {
 	.pixel_format_support = {
 			.argb8888 = true,
 			.nv12 = false,
-			.fp16 = false
+			.fp16 = true
 	},
 
 	.max_upscale_factor = {