Skip to content

Commit 2944de8

Browse files
committed
drm/i915/color: move palette registers to intel_color_regs.h
For some reason the paletter registers were missed when adding intel_color_regs.h. Finish the job. Adjust some comments while at it. v2: Fix comments (Ville) Reviewed-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/1322f577b113b8fc1a6c2ef35340fc3c599b4bcb.1714128645.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <[email protected]>
1 parent 317f283 commit 2944de8

File tree

2 files changed

+29
-31
lines changed

2 files changed

+29
-31
lines changed

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

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,35 @@
88

99
#include "intel_display_reg_defs.h"
1010

11-
/* legacy palette */
11+
/* GMCH palette */
12+
#define _PALETTE_A 0xa000
13+
#define _PALETTE_B 0xa800
14+
#define _CHV_PALETTE_C 0xc000
15+
/* 8bit mode / i965+ 10.6 interpolated mode ldw/udw */
16+
#define PALETTE_RED_MASK REG_GENMASK(23, 16)
17+
#define PALETTE_GREEN_MASK REG_GENMASK(15, 8)
18+
#define PALETTE_BLUE_MASK REG_GENMASK(7, 0)
19+
/* pre-i965 10bit interpolated mode ldw */
20+
#define PALETTE_10BIT_RED_LDW_MASK REG_GENMASK(23, 16)
21+
#define PALETTE_10BIT_GREEN_LDW_MASK REG_GENMASK(15, 8)
22+
#define PALETTE_10BIT_BLUE_LDW_MASK REG_GENMASK(7, 0)
23+
/* pre-i965 10bit interpolated mode udw */
24+
#define PALETTE_10BIT_RED_EXP_MASK REG_GENMASK(23, 22)
25+
#define PALETTE_10BIT_RED_MANT_MASK REG_GENMASK(21, 18)
26+
#define PALETTE_10BIT_RED_UDW_MASK REG_GENMASK(17, 16)
27+
#define PALETTE_10BIT_GREEN_EXP_MASK REG_GENMASK(15, 14)
28+
#define PALETTE_10BIT_GREEN_MANT_MASK REG_GENMASK(13, 10)
29+
#define PALETTE_10BIT_GREEN_UDW_MASK REG_GENMASK(9, 8)
30+
#define PALETTE_10BIT_BLUE_EXP_MASK REG_GENMASK(7, 6)
31+
#define PALETTE_10BIT_BLUE_MANT_MASK REG_GENMASK(5, 2)
32+
#define PALETTE_10BIT_BLUE_UDW_MASK REG_GENMASK(1, 0)
33+
#define PALETTE(pipe, i) _MMIO(DISPLAY_MMIO_BASE(dev_priv) + \
34+
_PICK_EVEN_2RANGES(pipe, 2, \
35+
_PALETTE_A, _PALETTE_B, \
36+
_CHV_PALETTE_C, _CHV_PALETTE_C) + \
37+
(i) * 4)
38+
39+
/* ilk+ palette */
1240
#define _LGC_PALETTE_A 0x4a000
1341
#define _LGC_PALETTE_B 0x4a800
1442
/* see PALETTE_* for the bits */

drivers/gpu/drm/i915/i915_reg.h

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,36 +1440,6 @@
14401440

14411441
#define GMBUSFREQ_VLV _MMIO(VLV_DISPLAY_BASE + 0x6510)
14421442

1443-
/*
1444-
* Palette regs
1445-
*/
1446-
#define _PALETTE_A 0xa000
1447-
#define _PALETTE_B 0xa800
1448-
#define _CHV_PALETTE_C 0xc000
1449-
/* 8bit mode / i965+ 10.6 interpolated mode ldw/udw */
1450-
#define PALETTE_RED_MASK REG_GENMASK(23, 16)
1451-
#define PALETTE_GREEN_MASK REG_GENMASK(15, 8)
1452-
#define PALETTE_BLUE_MASK REG_GENMASK(7, 0)
1453-
/* pre-i965 10bit interpolated mode ldw */
1454-
#define PALETTE_10BIT_RED_LDW_MASK REG_GENMASK(23, 16)
1455-
#define PALETTE_10BIT_GREEN_LDW_MASK REG_GENMASK(15, 8)
1456-
#define PALETTE_10BIT_BLUE_LDW_MASK REG_GENMASK(7, 0)
1457-
/* pre-i965 10bit interpolated mode udw */
1458-
#define PALETTE_10BIT_RED_EXP_MASK REG_GENMASK(23, 22)
1459-
#define PALETTE_10BIT_RED_MANT_MASK REG_GENMASK(21, 18)
1460-
#define PALETTE_10BIT_RED_UDW_MASK REG_GENMASK(17, 16)
1461-
#define PALETTE_10BIT_GREEN_EXP_MASK REG_GENMASK(15, 14)
1462-
#define PALETTE_10BIT_GREEN_MANT_MASK REG_GENMASK(13, 10)
1463-
#define PALETTE_10BIT_GREEN_UDW_MASK REG_GENMASK(9, 8)
1464-
#define PALETTE_10BIT_BLUE_EXP_MASK REG_GENMASK(7, 6)
1465-
#define PALETTE_10BIT_BLUE_MANT_MASK REG_GENMASK(5, 2)
1466-
#define PALETTE_10BIT_BLUE_UDW_MASK REG_GENMASK(1, 0)
1467-
#define PALETTE(pipe, i) _MMIO(DISPLAY_MMIO_BASE(dev_priv) + \
1468-
_PICK_EVEN_2RANGES(pipe, 2, \
1469-
_PALETTE_A, _PALETTE_B, \
1470-
_CHV_PALETTE_C, _CHV_PALETTE_C) + \
1471-
(i) * 4)
1472-
14731443
#define PEG_BAND_GAP_DATA _MMIO(0x14d68)
14741444

14751445
#define BXT_RP_STATE_CAP _MMIO(0x138170)

0 commit comments

Comments
 (0)