summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/arm/malidp_hw.h
diff options
context:
space:
mode:
authorLiviu Dudau <Liviu.Dudau@arm.com>2018-10-02 12:11:00 +0100
committerLiviu Dudau <Liviu.Dudau@arm.com>2018-10-02 12:11:00 +0100
commit66da13a519b33143932df5dc89973781c027c827 (patch)
tree10a59d19a43846cf8bf058fc2aab82c037b052dc /drivers/gpu/drm/arm/malidp_hw.h
parent1f23a56a46b81de50eb8b898f06296ca06720a99 (diff)
drm/arm/malidp: Validate rotations for compressed/uncompressed framebuffers for each layer
Add support for compressed framebuffers that are described using the framebuffer's modifier field. Mali DP uses the rotation memory for the decompressor of the format, so we need to check for space when the modifiers are present. Signed-off-by: Ayan Kumar Halder <ayan.halder@arm.com> Reviewed-by: Brian Starkey <brian.starkey@arm.com> [re-worded commit, rebased, cleaned up duplicated checks for RGB888 and BGR888 and removed additional parameter for rotmem_required function hook] Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Diffstat (limited to 'drivers/gpu/drm/arm/malidp_hw.h')
-rw-r--r--drivers/gpu/drm/arm/malidp_hw.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/arm/malidp_hw.h b/drivers/gpu/drm/arm/malidp_hw.h
index 0d7f9ea0ade8..3ab133d49bba 100644
--- a/drivers/gpu/drm/arm/malidp_hw.h
+++ b/drivers/gpu/drm/arm/malidp_hw.h
@@ -36,6 +36,12 @@ enum {
SE_MEMWRITE = BIT(5),
};
+enum rotation_features {
+ ROTATE_NONE, /* does not support rotation at all */
+ ROTATE_ANY, /* supports rotation on any buffers */
+ ROTATE_COMPRESSED, /* supports rotation only on compressed buffers */
+};
+
struct malidp_format_id {
u32 format; /* DRM fourcc */
u8 layer; /* bitmask of layers supporting it */
@@ -63,6 +69,7 @@ struct malidp_layer {
u16 stride_offset; /* offset to the first stride register. */
s16 yuv2rgb_offset; /* offset to the YUV->RGB matrix entries */
u16 mmu_ctrl_offset; /* offset to the MMU control register */
+ enum rotation_features rot; /* type of rotation supported */
};
enum malidp_scaling_coeff_set {