]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit0a8ac4d3e9d52551034c5a340882541f7e6b1e67
tree86bfea52daa180d71cf1fd197c6471e6eb1a4b7a
parentabe4900ba34fd881cdb13851a9009da7c3eb4355
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