Skip to content

Commit 55b0f3c

Browse files
ckborahjnikula
authored andcommitted
drm/i915/color: Add registers for 3D LUT
Add registers needed to program 3D LUT v2: - Follow convention documented in i915_reg.h (Jani) - Removing space in trailer (Suraj) - Move registers to intel_color_regs.h BSpec: 69378, 69379, 69380 Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Signed-off-by: Uma Shankar <uma.shankar@intel.com> Link: https://patch.msgid.link/20251203085211.3663374-14-uma.shankar@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
1 parent bf0fd73 commit 55b0f3c

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,4 +316,33 @@
316316
#define SKL_BOTTOM_COLOR_CSC_ENABLE REG_BIT(30)
317317
#define SKL_BOTTOM_COLOR(pipe) _MMIO_PIPE(pipe, _SKL_BOTTOM_COLOR_A, _SKL_BOTTOM_COLOR_B)
318318

319+
/* 3D LUT */
320+
#define _LUT_3D_CTL_A 0x490A4
321+
#define _LUT_3D_CTL_B 0x491A4
322+
#define LUT_3D_CTL(pipe) _MMIO_PIPE(pipe, _LUT_3D_CTL_A, _LUT_3D_CTL_B)
323+
#define LUT_3D_ENABLE REG_BIT(31)
324+
#define LUT_3D_READY REG_BIT(30)
325+
#define LUT_3D_BINDING_MASK REG_GENMASK(23, 22)
326+
#define LUT_3D_BIND_PIPE REG_FIELD_PREP(LUT_3D_BINDING_MASK, 0)
327+
#define LUT_3D_BIND_PLANE_1 REG_FIELD_PREP(LUT_3D_BINDING_MASK, 1)
328+
#define LUT_3D_BIND_PLANE_2 REG_FIELD_PREP(LUT_3D_BINDING_MASK, 2)
329+
#define LUT_3D_BIND_PLANE_3 REG_FIELD_PREP(LUT_3D_BINDING_MASK, 3)
330+
331+
#define _LUT_3D_INDEX_A 0x490A8
332+
#define _LUT_3D_INDEX_B 0x491A8
333+
#define LUT_3D_INDEX(pipe) _MMIO_PIPE(pipe, _LUT_3D_INDEX_A, _LUT_3D_INDEX_B)
334+
#define LUT_3D_AUTO_INCREMENT REG_BIT(13)
335+
#define LUT_3D_INDEX_VALUE_MASK REG_GENMASK(12, 0)
336+
#define LUT_3D_INDEX_VALUE(x) REG_FIELD_PREP(LUT_3D_INDEX_VALUE_MASK, (x))
337+
338+
#define _LUT_3D_DATA_A 0x490AC
339+
#define _LUT_3D_DATA_B 0x491AC
340+
#define LUT_3D_DATA(pipe) _MMIO_PIPE(pipe, _LUT_3D_DATA_A, _LUT_3D_DATA_B)
341+
#define LUT_3D_DATA_RED_MASK REG_GENMASK(29, 20)
342+
#define LUT_3D_DATA_GREEN_MASK REG_GENMASK(19, 10)
343+
#define LUT_3D_DATA_BLUE_MASK REG_GENMASK(9, 0)
344+
#define LUT_3D_DATA_RED(x) REG_FIELD_PREP(LUT_3D_DATA_RED_MASK, (x))
345+
#define LUT_3D_DATA_GREEN(x) REG_FIELD_PREP(LUT_3D_DATA_GREEN_MASK, (x))
346+
#define LUT_3D_DATA_BLUE(x) REG_FIELD_PREP(LUT_3D_DATA_BLUE_MASK, (x))
347+
319348
#endif /* __INTEL_COLOR_REGS_H__ */

0 commit comments

Comments
 (0)