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>
This commit is contained in:

committed by
Liviu Dudau

parent
66da13a519
commit
3dae1c0919
@@ -388,4 +388,9 @@ static inline void malidp_se_set_enh_coeffs(struct malidp_hw_device *hwdev)
|
||||
|
||||
#define MALIDP_GAMMA_LUT_SIZE 4096
|
||||
|
||||
#define AFBC_MOD_VALID_BITS (AFBC_FORMAT_MOD_BLOCK_SIZE_MASK | \
|
||||
AFBC_FORMAT_MOD_YTR | AFBC_FORMAT_MOD_SPLIT | \
|
||||
AFBC_FORMAT_MOD_SPARSE | AFBC_FORMAT_MOD_CBR | \
|
||||
AFBC_FORMAT_MOD_TILED | AFBC_FORMAT_MOD_SC)
|
||||
|
||||
#endif /* __MALIDP_HW_H__ */
|
||||
|
Reference in New Issue
Block a user