0001
0002
0003
0004 #ifndef _DPU_HW_DSC_H
0005 #define _DPU_HW_DSC_H
0006
0007 #include <drm/display/drm_dsc.h>
0008
0009 #define DSC_MODE_SPLIT_PANEL BIT(0)
0010 #define DSC_MODE_MULTIPLEX BIT(1)
0011 #define DSC_MODE_VIDEO BIT(2)
0012
0013 struct dpu_hw_dsc;
0014
0015
0016
0017
0018
0019 struct dpu_hw_dsc_ops {
0020
0021
0022
0023
0024 void (*dsc_disable)(struct dpu_hw_dsc *hw_dsc);
0025
0026
0027
0028
0029
0030
0031
0032
0033 void (*dsc_config)(struct dpu_hw_dsc *hw_dsc,
0034 struct msm_display_dsc_config *dsc,
0035 u32 mode,
0036 u32 initial_lines);
0037
0038
0039
0040
0041
0042
0043 void (*dsc_config_thresh)(struct dpu_hw_dsc *hw_dsc,
0044 struct msm_display_dsc_config *dsc);
0045 };
0046
0047 struct dpu_hw_dsc {
0048 struct dpu_hw_blk base;
0049 struct dpu_hw_blk_reg_map hw;
0050
0051
0052 enum dpu_dsc idx;
0053 const struct dpu_dsc_cfg *caps;
0054
0055
0056 struct dpu_hw_dsc_ops ops;
0057 };
0058
0059
0060
0061
0062
0063
0064
0065
0066 struct dpu_hw_dsc *dpu_hw_dsc_init(enum dpu_dsc idx, void __iomem *addr,
0067 const struct dpu_mdss_cfg *m);
0068
0069
0070
0071
0072
0073 void dpu_hw_dsc_destroy(struct dpu_hw_dsc *dsc);
0074
0075 static inline struct dpu_hw_dsc *to_dpu_hw_dsc(struct dpu_hw_blk *hw)
0076 {
0077 return container_of(hw, struct dpu_hw_dsc, base);
0078 }
0079
0080 #endif