hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h
....@@ -1,13 +1,5 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
2
- *
3
- * This program is free software; you can redistribute it and/or modify
4
- * it under the terms of the GNU General Public License version 2 and
5
- * only version 2 as published by the Free Software Foundation.
6
- *
7
- * This program is distributed in the hope that it will be useful,
8
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
- * GNU General Public License for more details.
113 */
124
135 #ifndef _DPU_HW_PINGPONG_H
....@@ -17,6 +9,8 @@
179 #include "dpu_hw_mdss.h"
1810 #include "dpu_hw_util.h"
1911 #include "dpu_hw_blk.h"
12
+
13
+#define DITHER_MATRIX_SZ 16
2014
2115 struct dpu_hw_pingpong;
2216
....@@ -40,6 +34,26 @@
4034 u32 rd_ptr_frame_count; /* num frames sent since enabling interface */
4135 u32 rd_ptr_line_count; /* current line on panel (rd ptr) */
4236 u32 wr_ptr_line_count; /* current line within pp fifo (wr ptr) */
37
+};
38
+
39
+/**
40
+ * struct dpu_hw_dither_cfg - dither feature structure
41
+ * @flags: for customizing operations
42
+ * @temporal_en: temperal dither enable
43
+ * @c0_bitdepth: c0 component bit depth
44
+ * @c1_bitdepth: c1 component bit depth
45
+ * @c2_bitdepth: c2 component bit depth
46
+ * @c3_bitdepth: c2 component bit depth
47
+ * @matrix: dither strength matrix
48
+ */
49
+struct dpu_hw_dither_cfg {
50
+ u64 flags;
51
+ u32 temporal_en;
52
+ u32 c0_bitdepth;
53
+ u32 c1_bitdepth;
54
+ u32 c2_bitdepth;
55
+ u32 c3_bitdepth;
56
+ u32 matrix[DITHER_MATRIX_SZ];
4357 };
4458
4559 /**
....@@ -90,6 +104,12 @@
90104 * Obtain current vertical line counter
91105 */
92106 u32 (*get_line_count)(struct dpu_hw_pingpong *pp);
107
+
108
+ /**
109
+ * Setup dither matix for pingpong block
110
+ */
111
+ void (*setup_dither)(struct dpu_hw_pingpong *pp,
112
+ struct dpu_hw_dither_cfg *cfg);
93113 };
94114
95115 struct dpu_hw_pingpong {
....@@ -105,7 +125,7 @@
105125 };
106126
107127 /**
108
- * dpu_hw_pingpong - convert base object dpu_hw_base to container
128
+ * to_dpu_hw_pingpong - convert base object dpu_hw_base to container
109129 * @hw: Pointer to base hardware block
110130 * return: Pointer to hardware block container
111131 */
....@@ -124,7 +144,7 @@
124144 */
125145 struct dpu_hw_pingpong *dpu_hw_pingpong_init(enum dpu_pingpong idx,
126146 void __iomem *addr,
127
- struct dpu_mdss_cfg *m);
147
+ const struct dpu_mdss_cfg *m);
128148
129149 /**
130150 * dpu_hw_pingpong_destroy - destroys pingpong driver context