summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/disp/mdp_format.h
diff options
context:
space:
mode:
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>2024-04-20 07:01:02 +0300
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>2024-04-23 12:56:29 +0300
commit0e67f514486f0aec823415c379fc274dfa096c18 (patch)
treef4300d36f884625e163b98d34fe1495170b2a14c /drivers/gpu/drm/msm/disp/mdp_format.h
parent7120d8a0d35b02113595982aa683f93845acdc95 (diff)
downloadlinux-0e67f514486f0aec823415c379fc274dfa096c18.tar.xz
drm/msm: merge dpu_format and mdp_format in struct msm_format
Structures dpu_format and mdp_format are largely the same structures. In order to remove duplication between format databases, merge these two stucture definitions into the global struct msm_format. Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/590434/ Link: https://lore.kernel.org/r/20240420-dpu-format-v2-5-9e93226cbffd@linaro.org
Diffstat (limited to 'drivers/gpu/drm/msm/disp/mdp_format.h')
-rw-r--r--drivers/gpu/drm/msm/disp/mdp_format.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/disp/mdp_format.h b/drivers/gpu/drm/msm/disp/mdp_format.h
index b1f199d4a079..6443d53954ee 100644
--- a/drivers/gpu/drm/msm/disp/mdp_format.h
+++ b/drivers/gpu/drm/msm/disp/mdp_format.h
@@ -20,10 +20,38 @@ enum msm_format_flags {
#define MSM_FORMAT_FLAG_DX BIT(MSM_FORMAT_FLAG_DX_BIT)
#define MSM_FORMAT_FLAG_COMPRESSED BIT(MSM_FORMAT_FLAG_COMPRESSED_BIT)
+/**
+ * struct msm_format: defines the format configuration
+ * @pixel_format: format fourcc
+ * @element: element color ordering
+ * @fetch_type: how the color components are packed in pixel format
+ * @chroma_sample: chroma sub-samplng type
+ * @alpha_enable: whether the format has an alpha channel
+ * @unpack_tight: whether to use tight or loose unpack
+ * @unpack_align_msb: unpack aligned to LSB or MSB
+ * @unpack_count: number of the components to unpack
+ * @bpp: bytes per pixel
+ * @flags: usage bit flags
+ * @num_planes: number of planes (including meta data planes)
+ * @fetch_mode: linear, tiled, or ubwc hw fetch behavior
+ * @tile_height: format tile height
+ */
struct msm_format {
uint32_t pixel_format;
+ enum mdp_bpc bpc_g_y, bpc_b_cb, bpc_r_cr;
+ enum mdp_bpc_alpha bpc_a;
+ u8 element[4];
+ enum mdp_fetch_type fetch_type;
+ enum mdp_chroma_samp_type chroma_sample;
+ bool alpha_enable;
+ u8 unpack_tight;
+ u8 unpack_align_msb;
+ u8 unpack_count;
+ u8 bpp;
unsigned long flags;
+ u8 num_planes;
enum mdp_fetch_mode fetch_mode;
+ u16 tile_height;
};
#define MSM_FORMAT_IS_YUV(X) ((X)->flags & MSM_FORMAT_FLAG_YUV)