Skip to contentSkip to conversation

amd/display: allow non-linear multi-planar formats

PATCH Applied Simon Ser 3 participants 4 messages Mar 26, 2021 – Apr 15, 2021

Subsystems (3)
lore
Share & tools
lore

Simon Ser

author
#0 lore raw

PATCH 1/1 amd/display: allow non-linear multi-planar formats

Accept non-linear buffers which use a multi-planar format, as long as they don't use DCC.

Tested on GFX9 with NV12.

Cc Alex Deucher <[email protected]>
Cc Harry Wentland <[email protected]>
Cc Nicholas Kazlauskas <[email protected]>
Cc Bas Nieuwenhuizen <[email protected]>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -7
index 36ee52104007..66e3ecf123d1 100644
@@ -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;
Signature · 6 lines
2.31.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#1 lore raw

Hi,

Can you have a look at this patch?

Thanks,

Simon

Quoted 33 lines · Simon Ser

Accept non-linear buffers which use a multi-planar format, as long as they don't use DCC.

Tested on GFX9 with NV12.

Cc Alex Deucher <[email protected]>
Cc Harry Wentland <[email protected]>
Cc Nicholas Kazlauskas <[email protected]>
Cc Bas Nieuwenhuizen <[email protected]>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -7
index 36ee52104007..66e3ecf123d1 100644
@@ -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.

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static bool dm_plane_format_mod_supported(struct drm_plane *plane, · line 4243

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -0
@@ -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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by
#2 lore raw
Quoted 46 lines · Simon Ser

Hi,

Can you have a look at this patch?

Thanks,

Simon

Quoted 10 lines · Simon Ser

Accept non-linear buffers which use a multi-planar format, as long as they don't use DCC.

Tested on GFX9 with NV12.

Cc Alex Deucher <[email protected]>
Cc Harry Wentland <[email protected]>
Cc Nicholas Kazlauskas <[email protected]>
Cc Bas Nieuwenhuizen <[email protected]>

Review

Quoted 5 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static bool dm_plane_format_mod_supported(struct

Quoted 4 lines

index 36ee52104007..66e3ecf123d1 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
@@ -4216,13 +4216,6 @@ static bool dm_plane_format_mod_supported(struct

drm_plane *plane,

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static bool dm_plane_format_mod_supported(struct drm_plane *plane,

Quoted 5 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -2
      if (modifier == DRM_FORMAT_MOD_LINEAR)
              return true;
 
-     /*
-      * The arbitrary tiling support for multiplane formats has not

been hooked

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static bool dm_plane_format_mod_supported(struct drm_plane *plane,

Quoted 7 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -5
-      * up.
-      */
-     if (info->num_planes > 1)
-             return false;
-
      /*
       * For D swizzle the canonical modifier depends on the bpp, so

check

Quoted 15 lines

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static bool dm_plane_format_mod_supported(struct

Quoted 2 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
       * it here.
@@ -4241,6 +4234,10 @@ static bool dm_plane_format_mod_supported(struct

drm_plane *plane,

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static bool dm_plane_format_mod_supported(struct drm_plane *plane,

Quoted 4 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -0
              /* 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

Quoted 6 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -0
+              * additional DCC metadata planes. */
+             if (info->num_planes > 1)
+                     return false;
      }
 
      return true;

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

Applied
#3 lore raw

Applied. Thanks!

Alex

Quoted 57 lines · Bas Nieuwenhuizen
Quoted 53 lines · Simon Ser

Hi,

Can you have a look at this patch?

Thanks,

Simon

Quoted 42 lines · Simon Ser

Accept non-linear buffers which use a multi-planar format, as long as they don't use DCC.

Tested on GFX9 with NV12.

Cc Alex Deucher <[email protected]>
Cc Harry Wentland <[email protected]>
Cc Nicholas Kazlauskas <[email protected]>
Cc Bas Nieuwenhuizen <[email protected]>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -7
index 36ee52104007..66e3ecf123d1 100644
@@ -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;
      }
 
Quoted 6 lines
Quoted 1 line

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static bool dm_plane_format_mod_supported(struct drm_plane *plane, · line 4243

Quoted 1 line
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
      return true;

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

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