summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAyan Kumar Halder <ayan.halder@arm.com>2018-11-19 14:41:03 +0000
committerAyan kumar halder <ayan.halder@arm.com>2019-03-12 18:25:10 +0000
commit0f6c18deca3564fa5e736d280e8cb81975b99e8e (patch)
tree52a9b225532e70791cb77ecd42fe69155a805814
parent7834c5770284db6b53943c451a0d2efe69cabd7c (diff)
downloadlinux-0f6c18deca3564fa5e736d280e8cb81975b99e8e.tar.bz2
drm/arm/malidp:- Disregard the pitch alignment constraint for AFBC framebuffer.
Considering the fact that some of the AFBC specific pixel formats are expressed in bits per pixel (ie bpp which is not byte aligned), the pitch (ie width * bpp) is not guaranteed to be aligned to burst size (ie 8 or 16 bytes). For example, DRM_FORMAT_VUY101010 is 30 bits per pixel. For a framebuffer of width 32 pixels, the pitch will be 120 bytes which is not aligned to burst size (ie 16 bytes) for DP650. Changes since v3 (series): - Added the ack - Rebased on the latest drm-misc-next Signed-off-by: Ayan Kumar halder <ayan.halder@arm.com> Acked-by: Liviu Dudau <liviu.dudau@arm.com> Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Link: https://patchwork.freedesktop.org/patch/291764/?series=57895&rev=1
-rw-r--r--drivers/gpu/drm/arm/malidp_planes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c
index 3dc8a6f32096..044bf7f3cfca 100644
--- a/drivers/gpu/drm/arm/malidp_planes.c
+++ b/drivers/gpu/drm/arm/malidp_planes.c
@@ -531,8 +531,8 @@ static int malidp_de_plane_check(struct drm_plane *plane,
for (i = 0; i < ms->n_planes; i++) {
u8 alignment = malidp_hw_get_pitch_align(mp->hwdev, rotated);
- if ((fb->pitches[i] * drm_format_info_block_height(fb->format, i))
- & (alignment - 1)) {
+ if (((fb->pitches[i] * drm_format_info_block_height(fb->format, i))
+ & (alignment - 1)) && !(fb->modifier)) {
DRM_DEBUG_KMS("Invalid pitch %u for plane %d\n",
fb->pitches[i], i);
return -EINVAL;