drm/arm/malidp: Implemented the size validation for AFBC framebuffers
authorAyan Kumar Halder <ayan.halder@arm.com>
Tue, 10 Jul 2018 13:18:55 +0000 (14:18 +0100)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Tue, 2 Oct 2018 11:12:19 +0000 (12:12 +0100)
commit3dae1c0919d8c46710187df4fa1a43622289a1f5
tree86bfea52daa180d71cf1fd197c6471e6eb1a4b7a
parent66da13a519b33143932df5dc89973781c027c827
drm/arm/malidp: Implemented the size validation for AFBC framebuffers

AFBC buffers include additional metadata which increases the required
allocation size. Implement the appropriate size validation and sanity
checking for AFBC buffers.
Added malidp specific function for framebuffer creation. This checks
if the framebuffer has AFBC modifiers and if so, it verifies the
necessary constraints on the size, alignment, offsets and pitch.

Changes from v2:
- Replaced DRM_ERROR() with DRM_DEBUG_KMS() in
malidp_verify_afbc_framebuffer_caps() and malidp_verify_afbc_framebuffer_size()

Signed-off-by: Ayan Kumar halder <ayan.halder@arm.com>
Reviewed-by: Brian Starkey <brian.starkey@arm.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
drivers/gpu/drm/arm/malidp_drv.c
drivers/gpu/drm/arm/malidp_hw.h