dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ayan Halder <ayan.halder@arm.com>
To: Liviu Dudau <Liviu.Dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>,
	nd@arm.com, YueHaibing <yuehaibing@huawei.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: malidp: Add the size of the superblocks when calculating total size for AFBC buffers
Date: Fri, 5 Oct 2018 15:19:31 +0100	[thread overview]
Message-ID: <20181005141931.GA502@arm.com> (raw)
In-Reply-To: <20181005123819.8843-1-Liviu.Dudau@arm.com>

Hi Liviu,

On Fri, Oct 05, 2018 at 01:38:19PM +0100, Liviu Dudau wrote:
> The size of the superblocks being added to the total AFBC buffer size
> got lost in the upstreaming process. Add it back.
> 
> Cc: Ayan Kumar Halder <ayan.halder@arm.com>
> Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
> ---
>  drivers/gpu/drm/arm/malidp_drv.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c
> index 90214851637f4..505f316a192ec 100644
> --- a/drivers/gpu/drm/arm/malidp_drv.c
> +++ b/drivers/gpu/drm/arm/malidp_drv.c
> @@ -38,6 +38,7 @@
>  
>  #define MALIDP_CONF_VALID_TIMEOUT	250
>  #define AFBC_HEADER_SIZE		16
> +#define AFBC_SUPERBLK_ALIGNMENT		128
>  
>  static void malidp_write_gamma_table(struct malidp_hw_device *hwdev,
>  				     u32 data[MALIDP_COEFFTAB_NUM_COEFFS])
> @@ -336,7 +337,8 @@ malidp_verify_afbc_framebuffer_size(struct drm_device *dev,
>  	afbc_superblock_size = info->cpp[0] * afbc_superblock_width *
>  		afbc_superblock_height;
>  
> -	afbc_size = ALIGN(n_superblocks * AFBC_HEADER_SIZE, 128);
> +	afbc_size = ALIGN(n_superblocks * AFBC_HEADER_SIZE, AFBC_SUPERBLK_ALIGNMENT);
> +	afbc_size += n_superblocks * ALIGN(afbc_superblock_size, AFBC_SUPERBLK_ALIGNMENT);
>  
>  	if (mode_cmd->width * info->cpp[0] != mode_cmd->pitches[0]) {
>  		DRM_DEBUG_KMS("Invalid value of pitch (=%u) should be same as width (=%u) * cpp (=%u)\n",
> --
 
Looks correct to me.
Reviewed-by: Ayan Kumar Halder <ayan.halder@arm.com>
> 2.18.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2018-10-05 14:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-05 11:03 [PATCH -next] drm/arm/malidp: remove set but not used variable 'afbc_superblock_size' YueHaibing
2018-10-05 12:38 ` Liviu Dudau
2018-10-05 12:38 ` [PATCH] drm: malidp: Add the size of the superblocks when calculating total size for AFBC buffers Liviu Dudau
2018-10-05 14:19   ` Ayan Halder [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181005141931.GA502@arm.com \
    --to=ayan.halder@arm.com \
    --cc=Liviu.Dudau@arm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=malidp@foss.arm.com \
    --cc=nd@arm.com \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox