Re: [PATCH] drm/arm/malidp: Consider rotation memory requirement in case of AFBC framebuffer

2018-11-12 Thread Alexandru-Cosmin Gheorghe
Hi Ayan,

On Fri, Nov 09, 2018 at 10:37:19AM +, Ayan Halder wrote:
> 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")

Reviewed-by: Alexandru Gheorghe 

> Signed-off-by: Ayan Kumar halder 
> ---
>  drivers/gpu/drm/arm/malidp_planes.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/arm/malidp_planes.c 
> b/drivers/gpu/drm/arm/malidp_planes.c
> index c9a6d3e..3f4dc64 100644
> --- a/drivers/gpu/drm/arm/malidp_planes.c
> +++ b/drivers/gpu/drm/arm/malidp_planes.c
> @@ -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,
> -- 
> 2.7.4
> 
> ___
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Cheers,
Alex G
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] drm/arm/malidp: Consider rotation memory requirement in case of AFBC framebuffer

2018-11-09 Thread Liviu Dudau
On Fri, Nov 09, 2018 at 10:37:19AM +, Ayan Halder wrote:
> 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")
> Signed-off-by: Ayan Kumar halder 

Acked-by: Liviu Dudau 

> ---
>  drivers/gpu/drm/arm/malidp_planes.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/arm/malidp_planes.c 
> b/drivers/gpu/drm/arm/malidp_planes.c
> index c9a6d3e..3f4dc64 100644
> --- a/drivers/gpu/drm/arm/malidp_planes.c
> +++ b/drivers/gpu/drm/arm/malidp_planes.c
> @@ -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,
> -- 
> 2.7.4
> 

-- 

| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---
¯\_(ツ)_/¯
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


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

2018-11-09 Thread 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")
Signed-off-by: Ayan Kumar halder 
---
 drivers/gpu/drm/arm/malidp_planes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/arm/malidp_planes.c 
b/drivers/gpu/drm/arm/malidp_planes.c
index c9a6d3e..3f4dc64 100644
--- a/drivers/gpu/drm/arm/malidp_planes.c
+++ b/drivers/gpu/drm/arm/malidp_planes.c
@@ -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,
-- 
2.7.4

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel