Skip to contentSkip to conversation

drm/arm/malidp: Consider rotation memory requirement in case of AFBC framebuffer

PATCH In review Ayan Halder 3 participants 3 messages Nov 9, 2018 – Nov 12, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/arm/malidp: Consider rotation memory requirement in case of AFBC framebuffer

Rotation memory for layers is shared with AFBC decoder block. Thus one needs to calculate rotation memory requirement in case of AFBC framebuffer. This is used later to verify if it can be sufficed by the hardware rotation memory availibility.

Fixes 66da13a ("drm/arm/malidp: Validate rotations for compressed/uncompressed framebuffers for each layer")
---
 drivers/gpu/drm/arm/malidp_planes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/arm/malidp_planes.c +1 -1
index c9a6d3e..3f4dc64 100644
@@ -470,7 +470,7 @@ static int malidp_de_plane_check(struct drm_plane *plane,
 	}
 
 	ms->rotmem_size = 0;
-	if (state->rotation & MALIDP_ROTATED_MASK) {
+	if ((state->rotation & MALIDP_ROTATED_MASK) || fb->modifier) {
 		int val;
 
 		val = mp->hwdev->hw->rotmem_required(mp->hwdev, state->crtc_w,
Signature · 1 line
2.7.4
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Ayan Halder

Rotation memory for layers is shared with AFBC decoder block. Thus one needs to calculate rotation memory requirement in case of AFBC framebuffer. This is used later to verify if it can be sufficed by the hardware rotation memory availibility.

Fixes 66da13a ("drm/arm/malidp: Validate rotations for compressed/uncompressed framebuffers for each layer")
Quoted 20 lines
---
 drivers/gpu/drm/arm/malidp_planes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/arm/malidp_planes.c +1 -1
index c9a6d3e..3f4dc64 100644
@@ -470,7 +470,7 @@ static int malidp_de_plane_check(struct drm_plane *plane,
 	}
 
 	ms->rotmem_size = 0;
-	if (state->rotation & MALIDP_ROTATED_MASK) {
+	if ((state->rotation & MALIDP_ROTATED_MASK) || fb->modifier) {
 		int val;
 
 		val = mp->hwdev->hw->rotmem_required(mp->hwdev, state->crtc_w,
Signature · 1 line
2.7.4
Signature · 8 lines
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
Reviewed-by on v1 1/1
#2 lore raw
In reply to Ayan Halder

Hi Ayan,

Quoted 6 lines · Ayan Halder

Rotation memory for layers is shared with AFBC decoder block. Thus one needs to calculate rotation memory requirement in case of AFBC framebuffer. This is used later to verify if it can be sufficed by the hardware rotation memory availibility.

Fixes 66da13a ("drm/arm/malidp: Validate rotations for compressed/uncompressed framebuffers for each layer")
Quoted 25 lines
---
 drivers/gpu/drm/arm/malidp_planes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/arm/malidp_planes.c +1 -1
index c9a6d3e..3f4dc64 100644
@@ -470,7 +470,7 @@ static int malidp_de_plane_check(struct drm_plane *plane,
 	}
 
 	ms->rotmem_size = 0;
-	if (state->rotation & MALIDP_ROTATED_MASK) {
+	if ((state->rotation & MALIDP_ROTATED_MASK) || fb->modifier) {
 		int val;
 
 		val = mp->hwdev->hw->rotmem_required(mp->hwdev, state->crtc_w,
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 6 lines
Cheers,
Alex G
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel