aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2018-10-08 02:38:48 -0400
committerDave Airlie <airlied@redhat.com>2018-10-08 02:45:40 -0400
commit6952e3a1dffcb931cf8625aa01642b9afac2af61 (patch)
treef832e76cba93ba41a132cf5fa5ebddb234c3f6c1 /drivers/gpu/drm
parentc530174b90fa3bcaa83d168b001b574bcb2da021 (diff)
parentfd99bd8b805c7c01af7dd66e22bb31c8cfe64310 (diff)
Merge branch 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld into drm-next
I've realised that the commit 3dae1c0919d8 ("drm/arm/malidp: Implemented the size validation for AFBC framebuffers") got bungled up in the upstreaming process and it was missing an important line from the function that calculates the size of the AFBC framebuffer Signed-off-by: Dave Airlie <airlied@redhat.com> From: Liviu Dudau <Liviu.Dudau@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181005152423.GF1156@e110455-lin.cambridge.arm.com
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/arm/malidp_drv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c
index 90214851637f..505f316a192e 100644
--- a/drivers/gpu/drm/arm/malidp_drv.c
+++ b/drivers/gpu/drm/arm/malidp_drv.c
@@ -38,6 +38,7 @@
38 38
39#define MALIDP_CONF_VALID_TIMEOUT 250 39#define MALIDP_CONF_VALID_TIMEOUT 250
40#define AFBC_HEADER_SIZE 16 40#define AFBC_HEADER_SIZE 16
41#define AFBC_SUPERBLK_ALIGNMENT 128
41 42
42static void malidp_write_gamma_table(struct malidp_hw_device *hwdev, 43static void malidp_write_gamma_table(struct malidp_hw_device *hwdev,
43 u32 data[MALIDP_COEFFTAB_NUM_COEFFS]) 44 u32 data[MALIDP_COEFFTAB_NUM_COEFFS])
@@ -336,7 +337,8 @@ malidp_verify_afbc_framebuffer_size(struct drm_device *dev,
336 afbc_superblock_size = info->cpp[0] * afbc_superblock_width * 337 afbc_superblock_size = info->cpp[0] * afbc_superblock_width *
337 afbc_superblock_height; 338 afbc_superblock_height;
338 339
339 afbc_size = ALIGN(n_superblocks * AFBC_HEADER_SIZE, 128); 340 afbc_size = ALIGN(n_superblocks * AFBC_HEADER_SIZE, AFBC_SUPERBLK_ALIGNMENT);
341 afbc_size += n_superblocks * ALIGN(afbc_superblock_size, AFBC_SUPERBLK_ALIGNMENT);
340 342
341 if (mode_cmd->width * info->cpp[0] != mode_cmd->pitches[0]) { 343 if (mode_cmd->width * info->cpp[0] != mode_cmd->pitches[0]) {
342 DRM_DEBUG_KMS("Invalid value of pitch (=%u) should be same as width (=%u) * cpp (=%u)\n", 344 DRM_DEBUG_KMS("Invalid value of pitch (=%u) should be same as width (=%u) * cpp (=%u)\n",