* [PATCH] amd/display: allow non-linear multi-planar formats
@ 2021-03-26 16:59 Simon Ser
2021-04-09 13:19 ` Simon Ser
0 siblings, 1 reply; 4+ messages in thread
From: Simon Ser @ 2021-03-26 16:59 UTC (permalink / raw)
To: amd-gfx
Cc: Alex Deucher, Harry Wentland, Nicholas Kazlauskas, Bas Nieuwenhuizen
Accept non-linear buffers which use a multi-planar format, as long
as they don't use DCC.
Tested on GFX9 with NV12.
Signed-off-by: Simon Ser <contact@emersion.fr>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Harry Wentland <hwentlan@amd.com>
Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 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 36ee52104007..66e3ecf123d1 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -4216,13 +4216,6 @@ static bool dm_plane_format_mod_supported(struct drm_plane *plane,
if (modifier == DRM_FORMAT_MOD_LINEAR)
return true;
- /*
- * The arbitrary tiling support for multiplane formats has not been hooked
- * up.
- */
- if (info->num_planes > 1)
- return false;
-
/*
* For D swizzle the canonical modifier depends on the bpp, so check
* it here.
@@ -4241,6 +4234,10 @@ static bool dm_plane_format_mod_supported(struct drm_plane *plane,
/* Per radeonsi comments 16/64 bpp are more complicated. */
if (info->cpp[0] != 4)
return false;
+ /* We support multi-planar formats, but not when combined with
+ * additional DCC metadata planes. */
+ if (info->num_planes > 1)
+ return false;
}
return true;
--
2.31.0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: amd/display: allow non-linear multi-planar formats
2021-03-26 16:59 [PATCH] amd/display: allow non-linear multi-planar formats Simon Ser
@ 2021-04-09 13:19 ` Simon Ser
2021-04-11 22:20 ` Bas Nieuwenhuizen
0 siblings, 1 reply; 4+ messages in thread
From: Simon Ser @ 2021-04-09 13:19 UTC (permalink / raw)
To: Simon Ser
Cc: Alex Deucher, Harry Wentland, Nicholas Kazlauskas, amd-gfx,
Bas Nieuwenhuizen
Hi,
Can you have a look at this patch?
Thanks,
Simon
On Friday, March 26th, 2021 at 5:59 PM, Simon Ser <contact@emersion.fr> wrote:
> Accept non-linear buffers which use a multi-planar format, as long
> as they don't use DCC.
>
> Tested on GFX9 with NV12.
>
> Signed-off-by: Simon Ser <contact@emersion.fr>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Harry Wentland <hwentlan@amd.com>
> Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
> Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 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 36ee52104007..66e3ecf123d1 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -4216,13 +4216,6 @@ static bool dm_plane_format_mod_supported(struct drm_plane *plane,
> if (modifier == DRM_FORMAT_MOD_LINEAR)
> return true;
>
> - /*
> - * The arbitrary tiling support for multiplane formats has not been hooked
> - * up.
> - */
> - if (info->num_planes > 1)
> - return false;
> -
> /*
> * For D swizzle the canonical modifier depends on the bpp, so check
> * it here.
> @@ -4241,6 +4234,10 @@ static bool dm_plane_format_mod_supported(struct drm_plane *plane,
> /* Per radeonsi comments 16/64 bpp are more complicated. */
> if (info->cpp[0] != 4)
> return false;
> + /* We support multi-planar formats, but not when combined with
> + * additional DCC metadata planes. */
> + if (info->num_planes > 1)
> + return false;
> }
>
> return true;
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: amd/display: allow non-linear multi-planar formats
2021-04-09 13:19 ` Simon Ser
@ 2021-04-11 22:20 ` Bas Nieuwenhuizen
2021-04-15 15:37 ` Alex Deucher
0 siblings, 1 reply; 4+ messages in thread
From: Bas Nieuwenhuizen @ 2021-04-11 22:20 UTC (permalink / raw)
To: Simon Ser
Cc: Alex Deucher, Harry Wentland, Nicholas Kazlauskas, amd-gfx mailing list
[-- Attachment #1.1: Type: text/plain, Size: 2113 bytes --]
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
On Fri, Apr 9, 2021 at 3:19 PM Simon Ser <contact@emersion.fr> wrote:
> Hi,
>
> Can you have a look at this patch?
>
> Thanks,
>
> Simon
>
> On Friday, March 26th, 2021 at 5:59 PM, Simon Ser <contact@emersion.fr>
> wrote:
>
> > Accept non-linear buffers which use a multi-planar format, as long
> > as they don't use DCC.
> >
> > Tested on GFX9 with NV12.
> >
> > Signed-off-by: Simon Ser <contact@emersion.fr>
> > Cc: Alex Deucher <alexander.deucher@amd.com>
> > Cc: Harry Wentland <hwentlan@amd.com>
> > Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
> > Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
> > ---
> > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 ++++-------
> > 1 file changed, 4 insertions(+), 7 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 36ee52104007..66e3ecf123d1 100644
> > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > @@ -4216,13 +4216,6 @@ static bool dm_plane_format_mod_supported(struct
> drm_plane *plane,
> > if (modifier == DRM_FORMAT_MOD_LINEAR)
> > return true;
> >
> > - /*
> > - * The arbitrary tiling support for multiplane formats has not
> been hooked
> > - * up.
> > - */
> > - if (info->num_planes > 1)
> > - return false;
> > -
> > /*
> > * For D swizzle the canonical modifier depends on the bpp, so
> check
> > * it here.
> > @@ -4241,6 +4234,10 @@ static bool dm_plane_format_mod_supported(struct
> drm_plane *plane,
> > /* Per radeonsi comments 16/64 bpp are more complicated. */
> > if (info->cpp[0] != 4)
> > return false;
> > + /* We support multi-planar formats, but not when combined
> with
> > + * additional DCC metadata planes. */
> > + if (info->num_planes > 1)
> > + return false;
> > }
> >
> > return true;
>
[-- Attachment #1.2: Type: text/html, Size: 3252 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: amd/display: allow non-linear multi-planar formats
2021-04-11 22:20 ` Bas Nieuwenhuizen
@ 2021-04-15 15:37 ` Alex Deucher
0 siblings, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2021-04-15 15:37 UTC (permalink / raw)
To: Bas Nieuwenhuizen
Cc: Alex Deucher, Simon Ser, Harry Wentland, Nicholas Kazlauskas,
amd-gfx mailing list
Applied. Thanks!
Alex
On Sun, Apr 11, 2021 at 6:21 PM Bas Nieuwenhuizen
<bas@basnieuwenhuizen.nl> wrote:
>
> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
>
> On Fri, Apr 9, 2021 at 3:19 PM Simon Ser <contact@emersion.fr> wrote:
>>
>> Hi,
>>
>> Can you have a look at this patch?
>>
>> Thanks,
>>
>> Simon
>>
>> On Friday, March 26th, 2021 at 5:59 PM, Simon Ser <contact@emersion.fr> wrote:
>>
>> > Accept non-linear buffers which use a multi-planar format, as long
>> > as they don't use DCC.
>> >
>> > Tested on GFX9 with NV12.
>> >
>> > Signed-off-by: Simon Ser <contact@emersion.fr>
>> > Cc: Alex Deucher <alexander.deucher@amd.com>
>> > Cc: Harry Wentland <hwentlan@amd.com>
>> > Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
>> > Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
>> > ---
>> > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 ++++-------
>> > 1 file changed, 4 insertions(+), 7 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 36ee52104007..66e3ecf123d1 100644
>> > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> > @@ -4216,13 +4216,6 @@ static bool dm_plane_format_mod_supported(struct drm_plane *plane,
>> > if (modifier == DRM_FORMAT_MOD_LINEAR)
>> > return true;
>> >
>> > - /*
>> > - * The arbitrary tiling support for multiplane formats has not been hooked
>> > - * up.
>> > - */
>> > - if (info->num_planes > 1)
>> > - return false;
>> > -
>> > /*
>> > * For D swizzle the canonical modifier depends on the bpp, so check
>> > * it here.
>> > @@ -4241,6 +4234,10 @@ static bool dm_plane_format_mod_supported(struct drm_plane *plane,
>> > /* Per radeonsi comments 16/64 bpp are more complicated. */
>> > if (info->cpp[0] != 4)
>> > return false;
>> > + /* We support multi-planar formats, but not when combined with
>> > + * additional DCC metadata planes. */
>> > + if (info->num_planes > 1)
>> > + return false;
>> > }
>> >
>> > return true;
>
> _______________________________________________
> 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] 4+ messages in thread
end of thread, other threads:[~2021-04-15 15:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-26 16:59 [PATCH] amd/display: allow non-linear multi-planar formats Simon Ser
2021-04-09 13:19 ` Simon Ser
2021-04-11 22:20 ` Bas Nieuwenhuizen
2021-04-15 15:37 ` Alex Deucher
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).