Skip to content

Commit 05df715

Browse files
uma-inteljnikula
authored andcommitted
drm/i915: Add register definitions for Plane Post CSC
Add macros to define Plane Post CSC registers v2: - Add Plane Post CSC Gamma Multi Segment Enable bit - Add BSpec entries (Suraj) v3: - Fix checkpatch issues (Suraj) BSpec: 50403, 50404, 50405, 50406, 50409, 50410, Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Signed-off-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Link: https://patch.msgid.link/20251203085211.3663374-10-uma.shankar@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
1 parent ed0ebbc commit 05df715

1 file changed

Lines changed: 67 additions & 0 deletions

File tree

drivers/gpu/drm/i915/display/skl_universal_plane_regs.h

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@
254254
#define PLANE_COLOR_PIPE_CSC_ENABLE REG_BIT(23) /* Pre-ICL */
255255
#define PLANE_COLOR_PLANE_CSC_ENABLE REG_BIT(21) /* ICL+ */
256256
#define PLANE_COLOR_INPUT_CSC_ENABLE REG_BIT(20) /* ICL+ */
257+
#define PLANE_COLOR_POST_CSC_GAMMA_MULTSEG_ENABLE REG_BIT(15) /* TGL+ */
257258
#define PLANE_COLOR_PRE_CSC_GAMMA_ENABLE REG_BIT(14)
258259
#define PLANE_COLOR_CSC_MODE_MASK REG_GENMASK(19, 17)
259260
#define PLANE_COLOR_CSC_MODE_BYPASS REG_FIELD_PREP(PLANE_COLOR_CSC_MODE_MASK, 0)
@@ -293,6 +294,72 @@
293294

294295
#define _MMIO_PLANE_GAMC(plane, i, a, b) _MMIO(_PIPE(plane, a, b) + (i) * 4)
295296

297+
#define _PLANE_POST_CSC_GAMC_SEG0_INDEX_ENH_1_A 0x70160
298+
#define _PLANE_POST_CSC_GAMC_SEG0_INDEX_ENH_1_B 0x71160
299+
#define _PLANE_POST_CSC_GAMC_SEG0_INDEX_ENH_2_A 0x70260
300+
#define _PLANE_POST_CSC_GAMC_SEG0_INDEX_ENH_2_B 0x71260
301+
#define _PLANE_POST_CSC_GAMC_SEG0_INDEX_ENH_1(pipe) _PIPE(pipe, _PLANE_POST_CSC_GAMC_SEG0_INDEX_ENH_1_A, \
302+
_PLANE_POST_CSC_GAMC_SEG0_INDEX_ENH_1_B)
303+
#define _PLANE_POST_CSC_GAMC_SEG0_INDEX_ENH_2(pipe) _PIPE(pipe, _PLANE_POST_CSC_GAMC_SEG0_INDEX_ENH_2_A, \
304+
_PLANE_POST_CSC_GAMC_SEG0_INDEX_ENH_2_B)
305+
#define PLANE_POST_CSC_GAMC_SEG0_INDEX_ENH(pipe, plane, i) _MMIO_PLANE_GAMC(plane, i, _PLANE_POST_CSC_GAMC_SEG0_INDEX_ENH_1(pipe), \
306+
_PLANE_POST_CSC_GAMC_SEG0_INDEX_ENH_2(pipe))
307+
308+
#define _PLANE_POST_CSC_GAMC_SEG0_DATA_ENH_1_A 0x70164
309+
#define _PLANE_POST_CSC_GAMC_SEG0_DATA_ENH_1_B 0x71164
310+
#define _PLANE_POST_CSC_GAMC_SEG0_DATA_ENH_2_A 0x70264
311+
#define _PLANE_POST_CSC_GAMC_SEG0_DATA_ENH_2_B 0x71264
312+
#define _PLANE_POST_CSC_GAMC_SEG0_DATA_ENH_1(pipe) _PIPE(pipe, _PLANE_POST_CSC_GAMC_SEG0_DATA_ENH_1_A, \
313+
_PLANE_POST_CSC_GAMC_SEG0_DATA_ENH_1_B)
314+
#define _PLANE_POST_CSC_GAMC_SEG0_DATA_ENH_2(pipe) _PIPE(pipe, _PLANE_POST_CSC_GAMC_SEG0_DATA_ENH_2_A, \
315+
_PLANE_POST_CSC_GAMC_SEG0_DATA_ENH_2_B)
316+
#define PLANE_POST_CSC_GAMC_SEG0_DATA_ENH(pipe, plane, i) _MMIO_PLANE_GAMC(plane, i, _PLANE_POST_CSC_GAMC_SEG0_DATA_ENH_1(pipe), \
317+
_PLANE_POST_CSC_GAMC_SEG0_DATA_ENH_2(pipe))
318+
319+
#define _PLANE_POST_CSC_GAMC_INDEX_ENH_1_A 0x701d8
320+
#define _PLANE_POST_CSC_GAMC_INDEX_ENH_1_B 0x711d8
321+
#define _PLANE_POST_CSC_GAMC_INDEX_ENH_2_A 0x702d8
322+
#define _PLANE_POST_CSC_GAMC_INDEX_ENH_2_B 0x712d8
323+
#define _PLANE_POST_CSC_GAMC_INDEX_ENH_1(pipe) _PIPE(pipe, _PLANE_POST_CSC_GAMC_INDEX_ENH_1_A, \
324+
_PLANE_POST_CSC_GAMC_INDEX_ENH_1_B)
325+
#define _PLANE_POST_CSC_GAMC_INDEX_ENH_2(pipe) _PIPE(pipe, _PLANE_POST_CSC_GAMC_INDEX_ENH_2_A, \
326+
_PLANE_POST_CSC_GAMC_INDEX_ENH_2_B)
327+
#define PLANE_POST_CSC_GAMC_INDEX_ENH(pipe, plane, i) _MMIO_PLANE_GAMC(plane, i, _PLANE_POST_CSC_GAMC_INDEX_ENH_1(pipe), \
328+
_PLANE_POST_CSC_GAMC_INDEX_ENH_2(pipe))
329+
330+
#define _PLANE_POST_CSC_GAMC_DATA_ENH_1_A 0x701dc
331+
#define _PLANE_POST_CSC_GAMC_DATA_ENH_1_B 0x711dc
332+
#define _PLANE_POST_CSC_GAMC_DATA_ENH_2_A 0x702dc
333+
#define _PLANE_POST_CSC_GAMC_DATA_ENH_2_B 0x712dc
334+
#define _PLANE_POST_CSC_GAMC_DATA_ENH_1(pipe) _PIPE(pipe, _PLANE_POST_CSC_GAMC_DATA_ENH_1_A, \
335+
_PLANE_POST_CSC_GAMC_DATA_ENH_1_B)
336+
#define _PLANE_POST_CSC_GAMC_DATA_ENH_2(pipe) _PIPE(pipe, _PLANE_POST_CSC_GAMC_DATA_ENH_2_A, \
337+
_PLANE_POST_CSC_GAMC_DATA_ENH_2_B)
338+
#define PLANE_POST_CSC_GAMC_DATA_ENH(pipe, plane, i) _MMIO_PLANE_GAMC(plane, i, _PLANE_POST_CSC_GAMC_DATA_ENH_1(pipe), \
339+
_PLANE_POST_CSC_GAMC_DATA_ENH_2(pipe))
340+
341+
#define _PLANE_POST_CSC_GAMC_INDEX_1_A 0x704d8
342+
#define _PLANE_POST_CSC_GAMC_INDEX_1_B 0x714d8
343+
#define _PLANE_POST_CSC_GAMC_INDEX_2_A 0x705d8
344+
#define _PLANE_POST_CSC_GAMC_INDEX_2_B 0x715d8
345+
#define _PLANE_POST_CSC_GAMC_INDEX_1(pipe) _PIPE(pipe, _PLANE_POST_CSC_GAMC_INDEX_1_A, \
346+
_PLANE_POST_CSC_GAMC_INDEX_1_B)
347+
#define _PLANE_POST_CSC_GAMC_INDEX_2(pipe) _PIPE(pipe, _PLANE_POST_CSC_GAMC_INDEX_2_A, \
348+
_PLANE_POST_CSC_GAMC_INDEX_2_B)
349+
#define PLANE_POST_CSC_GAMC_INDEX(pipe, plane, i) _MMIO_PLANE_GAMC(plane, i, _PLANE_POST_CSC_GAMC_INDEX_1(pipe), \
350+
_PLANE_POST_CSC_GAMC_INDEX_2(pipe))
351+
352+
#define _PLANE_POST_CSC_GAMC_DATA_1_A 0x704dc
353+
#define _PLANE_POST_CSC_GAMC_DATA_1_B 0x714dc
354+
#define _PLANE_POST_CSC_GAMC_DATA_2_A 0x705dc
355+
#define _PLANE_POST_CSC_GAMC_DATA_2_B 0x715dc
356+
#define _PLANE_POST_CSC_GAMC_DATA_1(pipe) _PIPE(pipe, _PLANE_POST_CSC_GAMC_DATA_1_A, \
357+
_PLANE_POST_CSC_GAMC_DATA_1_B)
358+
#define _PLANE_POST_CSC_GAMC_DATA_2(pipe) _PIPE(pipe, _PLANE_POST_CSC_GAMC_DATA_2_A, \
359+
_PLANE_POST_CSC_GAMC_DATA_2_B)
360+
#define PLANE_POST_CSC_GAMC_DATA(pipe, plane, i) _MMIO_PLANE_GAMC(plane, i, _PLANE_POST_CSC_GAMC_DATA_1(pipe), \
361+
_PLANE_POST_CSC_GAMC_DATA_2(pipe))
362+
296363
#define _PLANE_PRE_CSC_GAMC_INDEX_ENH_1_A 0x701d0
297364
#define _PLANE_PRE_CSC_GAMC_INDEX_ENH_1_B 0x711d0
298365
#define _PLANE_PRE_CSC_GAMC_INDEX_ENH_2_A 0x702d0

0 commit comments

Comments
 (0)