Skip to contentSkip to conversation

Fixed GC MAX register programming for gamma luts

PATCH Superseded Uma Shankar 3 participants 9 messages Mar 29, 2019

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Fixed GC MAX register programming for gamma luts

Register offsets used to program GC max were not correct. This series fixes the same, also limits the values to accurately clamp at 1.0. Also added support to program EXT2 GC Max needed for values from 3.0 to 7.0. Limiting it again to 1.0 due to ABI limitations.

Uma Shankar (2):
drm/i915: Fix GCMAX color register programming
drm/i915: Program EXT2 GC MAX registers

 drivers/gpu/drm/i915/i915_reg.h    |  1 +
 drivers/gpu/drm/i915/intel_color.c | 50 +++++++++++++++++++++++++++++---------
 2 files changed, 40 insertions(+), 11 deletions(-)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 1/2 drm/i915: Fix GCMAX color register programming

GC MAX register is used to program values from 1.0 to less than 3.0. A different register was used instead of the intended one. Fixed the same.

Currently limiting it to 1.0 due to ABI limitations.

---
 drivers/gpu/drm/i915/intel_color.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_color.c +11 -11
index ff910ed..dd179a8 100644
@@ -518,14 +518,14 @@ static void bdw_load_gamma_lut(const struct intel_crtc_state *crtc_state, u32 of
 			I915_WRITE(PREC_PAL_DATA(pipe), word);
 		}
 
-		/* Program the max register to clamp values > 1.0. */
-		i = lut_size - 1;
-		I915_WRITE(PREC_PAL_GC_MAX(pipe, 0),
-			   drm_color_lut_extract(lut[i].red, 16));
-		I915_WRITE(PREC_PAL_GC_MAX(pipe, 1),
-			   drm_color_lut_extract(lut[i].green, 16));
-		I915_WRITE(PREC_PAL_GC_MAX(pipe, 2),
-			   drm_color_lut_extract(lut[i].blue, 16));
+		/*
+		 * Program the max register to clamp values > 1.0.
+		 * ToDo: Extend the ABI to be able to program values
+		 * from 1.0 to 3.0
+		 */
+		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 0), (1 << 16) - 1);
+		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 1), (1 << 16) - 1);
+		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 2), (1 << 16) - 1);
 	} else {
 		for (i = 0; i < lut_size; i++) {
 			u32 v = (i * ((1 << 10) - 1)) / (lut_size - 1);
@@ -534,9 +534,9 @@ static void bdw_load_gamma_lut(const struct intel_crtc_state *crtc_state, u32 of
 				   (v << 20) | (v << 10) | v);
 		}
 
-		I915_WRITE(PREC_PAL_GC_MAX(pipe, 0), (1 << 16) - 1);
-		I915_WRITE(PREC_PAL_GC_MAX(pipe, 1), (1 << 16) - 1);
-		I915_WRITE(PREC_PAL_GC_MAX(pipe, 2), (1 << 16) - 1);
+		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 0), (1 << 16) - 1);
+		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 1), (1 << 16) - 1);
+		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 2), (1 << 16) - 1);
 	}
 
 	/*
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

Re: [PATCH 1/2] drm/i915: Fix GCMAX color register programming

Quoted 26 lines · Uma Shankar

GC MAX register is used to program values from 1.0 to less than 3.0. A different register was used instead of the intended one. Fixed the same.

Currently limiting it to 1.0 due to ABI limitations.

---
 drivers/gpu/drm/i915/intel_color.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_color.c +0 -6
index ff910ed..dd179a8 100644
@@ -518,14 +518,14 @@ static void bdw_load_gamma_lut(const struct intel_crtc_state *crtc_state, u32 of
 			I915_WRITE(PREC_PAL_DATA(pipe), word);
 		}
 
-		/* Program the max register to clamp values > 1.0. */
-		i = lut_size - 1;
-		I915_WRITE(PREC_PAL_GC_MAX(pipe, 0),
-			   drm_color_lut_extract(lut[i].red, 16));
-		I915_WRITE(PREC_PAL_GC_MAX(pipe, 1),
-			   drm_color_lut_extract(lut[i].green, 16));

drivers/gpu/drm/i915/intel_color.c static void bdw_load_gamma_lut(const struct intel_crtc_state *crtc_state, u32 of · line 528

Quoted 10 lines
drivers/gpu/drm/i915/intel_color.c +8 -2
-		I915_WRITE(PREC_PAL_GC_MAX(pipe, 2),
-			   drm_color_lut_extract(lut[i].blue, 16));
+		/*
+		 * Program the max register to clamp values > 1.0.
+		 * ToDo: Extend the ABI to be able to program values
+		 * from 1.0 to 3.0
+		 */
+		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 0), (1 << 16) - 1);
+		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 1), (1 << 16) - 1);
+		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 2), (1 << 16) - 1);

Maybe we want these to be just 1<<16 to match how we set up the glk+ degamma?

Quoted 23 lines
drivers/gpu/drm/i915/intel_color.c +3 -3
 	} else {
 		for (i = 0; i < lut_size; i++) {
 			u32 v = (i * ((1 << 10) - 1)) / (lut_size - 1);
@@ -534,9 +534,9 @@ static void bdw_load_gamma_lut(const struct intel_crtc_state *crtc_state, u32 of
 				   (v << 20) | (v << 10) | v);
 		}
 
-		I915_WRITE(PREC_PAL_GC_MAX(pipe, 0), (1 << 16) - 1);
-		I915_WRITE(PREC_PAL_GC_MAX(pipe, 1), (1 << 16) - 1);
-		I915_WRITE(PREC_PAL_GC_MAX(pipe, 2), (1 << 16) - 1);
+		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 0), (1 << 16) - 1);
+		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 1), (1 << 16) - 1);
+		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 2), (1 << 16) - 1);
 	}
 
 	/*
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

Re: [PATCH 1/2] drm/i915: Fix GCMAX color register programming

Quoted 43 lines

-----Original Message-----
From: Ville Syrjälä [mailto:[email protected]]
Sent: Friday, March 29, 2019 6:40 PM
To: Shankar, Uma <[email protected]>
Cc: [email protected]; Syrjala, Ville <[email protected]>; Lankhorst, Maarten <[email protected]>
Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915: Fix GCMAX color register programming

drivers/gpu/drm/i915/intel_color.c static void bdw_load_gamma_lut(const struct

Quoted 18 lines · Uma Shankar

GC MAX register is used to program values from 1.0 to less than 3.0. A different register was used instead of the intended one. Fixed the same.

Currently limiting it to 1.0 due to ABI limitations.

---
 drivers/gpu/drm/i915/intel_color.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_color.c +0 -0
index ff910ed..dd179a8 100644
@@ -518,14 +518,14 @@ static void bdw_load_gamma_lut(const struct

intel_crtc_state *crtc_state, u32 of

Quoted 13 lines
drivers/gpu/drm/i915/intel_color.c +2 -8
 			I915_WRITE(PREC_PAL_DATA(pipe), word);
 		}
 
-		/* Program the max register to clamp values > 1.0. */
-		i = lut_size - 1;
-		I915_WRITE(PREC_PAL_GC_MAX(pipe, 0),
-			   drm_color_lut_extract(lut[i].red, 16));
-		I915_WRITE(PREC_PAL_GC_MAX(pipe, 1),
-			   drm_color_lut_extract(lut[i].green, 16));
-		I915_WRITE(PREC_PAL_GC_MAX(pipe, 2),
-			   drm_color_lut_extract(lut[i].blue, 16));
+		/*
+		 * Program the max register to clamp values > 1.0.
Quoted 8 lines

drivers/gpu/drm/i915/intel_color.c static void bdw_load_gamma_lut(const struct intel_crtc_state *crtc_state, u32 of · line 528

Quoted 6 lines
drivers/gpu/drm/i915/intel_color.c +6 -0
+		 * ToDo: Extend the ABI to be able to program values
+		 * from 1.0 to 3.0
+		 */
+		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 0), (1 << 16) - 1);
+		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 1), (1 << 16) - 1);
+		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 2), (1 << 16) - 1);

Maybe we want these to be just 1<<16 to match how we set up the glk+ degamma?

Sure, will update it.

Quoted 20 lines
Quoted 4 lines
drivers/gpu/drm/i915/intel_color.c +0 -0
 	} else {
 		for (i = 0; i < lut_size; i++) {
 			u32 v = (i * ((1 << 10) - 1)) / (lut_size - 1); @@ -534,9 +534,9

@@ static void bdw_load_gamma_lut(const struct intel_crtc_state *crtc_state, u32

of

Quoted 15 lines
drivers/gpu/drm/i915/intel_color.c +3 -4
 				   (v << 20) | (v << 10) | v);
 		}
 
-		I915_WRITE(PREC_PAL_GC_MAX(pipe, 0), (1 << 16) - 1);
-		I915_WRITE(PREC_PAL_GC_MAX(pipe, 1), (1 << 16) - 1);
-		I915_WRITE(PREC_PAL_GC_MAX(pipe, 2), (1 << 16) - 1);
+		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 0), (1 << 16) - 1);
+		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 1), (1 << 16) - 1);
+		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 2), (1 << 16) - 1);
 	}
 
 	/*
--

1.9.1

Quoted 8 lines
Quoted 4 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

--
Ville Syrjälä
Intel

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

PATCH 2/2 drm/i915: Program EXT2 GC MAX registers

In reply to Uma Shankar

EXT2 GC MAX registers are introduced from Gen10+ to program values from 3.0 to 7.0. Enabled the same, but currently limiting it to 1.0 as userspace ABI is limited at that currently.

---
 drivers/gpu/drm/i915/i915_reg.h    |  1 +
 drivers/gpu/drm/i915/intel_color.c | 28 ++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +1 -0
index c866379..341f03e 100644
@@ -10144,6 +10144,7 @@ enum skl_power_gate {
 #define PREC_PAL_DATA(pipe)		_MMIO_PIPE(pipe, _PAL_PREC_DATA_A, _PAL_PREC_DATA_B)
 #define PREC_PAL_GC_MAX(pipe, i)	_MMIO(_PIPE(pipe, _PAL_PREC_GC_MAX_A, _PAL_PREC_GC_MAX_B) + (i) * 4)
 #define PREC_PAL_EXT_GC_MAX(pipe, i)	_MMIO(_PIPE(pipe, _PAL_PREC_EXT_GC_MAX_A, _PAL_PREC_EXT_GC_MAX_B) + (i) * 4)
+#define PREC_PAL_EXT2_GC_MAX(pipe, i)	_MMIO(_PIPE(pipe, _PAL_PREC_EXT2_GC_MAX_A, _PAL_PREC_EXT2_GC_MAX_B) + (i) * 4)
 
 #define _PRE_CSC_GAMC_INDEX_A	0x4A484
 #define _PRE_CSC_GAMC_INDEX_B	0x4AC84
drivers/gpu/drm/i915/intel_color.c +28 -0
index dd179a8..84aa5e7 100644
@@ -526,6 +526,20 @@ static void bdw_load_gamma_lut(const struct intel_crtc_state *crtc_state, u32 of
 		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 0), (1 << 16) - 1);
 		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 1), (1 << 16) - 1);
 		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 2), (1 << 16) - 1);
+
+		/*
+		 * Program the gc max 2 register to clamp values > 1.0.
+		 * ToDo: Extend the ABI to be able to program values
+		 * from 3.0 to 7.0
+		 */
+		if (INTEL_GEN(dev_priv) >= 10) {
+			I915_WRITE(PREC_PAL_EXT2_GC_MAX(pipe, 0),
+				   (1 << 16) - 1);
+			I915_WRITE(PREC_PAL_EXT2_GC_MAX(pipe, 1),
+				   (1 << 16) - 1);
+			I915_WRITE(PREC_PAL_EXT2_GC_MAX(pipe, 2),
+				   (1 << 16) - 1);
+		}
 	} else {
 		for (i = 0; i < lut_size; i++) {
 			u32 v = (i * ((1 << 10) - 1)) / (lut_size - 1);
@@ -537,6 +551,20 @@ static void bdw_load_gamma_lut(const struct intel_crtc_state *crtc_state, u32 of
 		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 0), (1 << 16) - 1);
 		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 1), (1 << 16) - 1);
 		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 2), (1 << 16) - 1);
+
+		/*
+		 * Program the gc max 2 register to clamp values > 1.0.
+		 * ToDo: Extend the ABI to be able to program values
+		 * from 3.0 to 7.0
+		 */
+		if (INTEL_GEN(dev_priv) >= 10) {
+			I915_WRITE(PREC_PAL_EXT2_GC_MAX(pipe, 0),
+				   (1 << 16) - 1);
+			I915_WRITE(PREC_PAL_EXT2_GC_MAX(pipe, 1),
+				   (1 << 16) - 1);
+			I915_WRITE(PREC_PAL_EXT2_GC_MAX(pipe, 2),
+				   (1 << 16) - 1);
+		}
 	}
 
 	/*
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw

Re: [PATCH 2/2] drm/i915: Program EXT2 GC MAX registers

Quoted 28 lines · Uma Shankar

EXT2 GC MAX registers are introduced from Gen10+ to program values from 3.0 to 7.0. Enabled the same, but currently limiting it to 1.0 as userspace ABI is limited at that currently.

---
 drivers/gpu/drm/i915/i915_reg.h    |  1 +
 drivers/gpu/drm/i915/intel_color.c | 28 ++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +1 -0
index c866379..341f03e 100644
@@ -10144,6 +10144,7 @@ enum skl_power_gate {
 #define PREC_PAL_DATA(pipe)		_MMIO_PIPE(pipe, _PAL_PREC_DATA_A, _PAL_PREC_DATA_B)
 #define PREC_PAL_GC_MAX(pipe, i)	_MMIO(_PIPE(pipe, _PAL_PREC_GC_MAX_A, _PAL_PREC_GC_MAX_B) + (i) * 4)
 #define PREC_PAL_EXT_GC_MAX(pipe, i)	_MMIO(_PIPE(pipe, _PAL_PREC_EXT_GC_MAX_A, _PAL_PREC_EXT_GC_MAX_B) + (i) * 4)
+#define PREC_PAL_EXT2_GC_MAX(pipe, i)	_MMIO(_PIPE(pipe, _PAL_PREC_EXT2_GC_MAX_A, _PAL_PREC_EXT2_GC_MAX_B) + (i) * 4)
 
 #define _PRE_CSC_GAMC_INDEX_A	0x4A484
 #define _PRE_CSC_GAMC_INDEX_B	0x4AC84
drivers/gpu/drm/i915/intel_color.c +0 -0
index dd179a8..84aa5e7 100644

drivers/gpu/drm/i915/intel_color.c static void bdw_load_gamma_lut(const struct intel_crtc_state *crtc_state, u32 of · line 535

Quoted 10 lines
drivers/gpu/drm/i915/intel_color.c +7 -0
@@ -526,6 +526,20 @@ static void bdw_load_gamma_lut(const struct intel_crtc_state *crtc_state, u32 of
 		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 0), (1 << 16) - 1);
 		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 1), (1 << 16) - 1);
 		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 2), (1 << 16) - 1);
+
+		/*
+		 * Program the gc max 2 register to clamp values > 1.0.
+		 * ToDo: Extend the ABI to be able to program values
+		 * from 3.0 to 7.0
+		 */
+		if (INTEL_GEN(dev_priv) >= 10) {

|| IS_GEMINILAKE

Quoted 11 lines
drivers/gpu/drm/i915/intel_color.c +7 -0
+			I915_WRITE(PREC_PAL_EXT2_GC_MAX(pipe, 0),
+				   (1 << 16) - 1);
+			I915_WRITE(PREC_PAL_EXT2_GC_MAX(pipe, 1),
+				   (1 << 16) - 1);
+			I915_WRITE(PREC_PAL_EXT2_GC_MAX(pipe, 2),
+				   (1 << 16) - 1);
+		}
 	} else {
 		for (i = 0; i < lut_size; i++) {
 			u32 v = (i * ((1 << 10) - 1)) / (lut_size - 1);

drivers/gpu/drm/i915/intel_color.c static void bdw_load_gamma_lut(const struct intel_crtc_state *crtc_state, u32 of · line 560

Quoted 10 lines
drivers/gpu/drm/i915/intel_color.c +7 -0
@@ -537,6 +551,20 @@ static void bdw_load_gamma_lut(const struct intel_crtc_state *crtc_state, u32 of
 		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 0), (1 << 16) - 1);
 		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 1), (1 << 16) - 1);
 		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 2), (1 << 16) - 1);
+
+		/*
+		 * Program the gc max 2 register to clamp values > 1.0.
+		 * ToDo: Extend the ABI to be able to program values
+		 * from 3.0 to 7.0
+		 */
+		if (INTEL_GEN(dev_priv) >= 10) {

same

Quoted 17 lines
drivers/gpu/drm/i915/intel_color.c +7 -0
+			I915_WRITE(PREC_PAL_EXT2_GC_MAX(pipe, 0),
+				   (1 << 16) - 1);
+			I915_WRITE(PREC_PAL_EXT2_GC_MAX(pipe, 1),
+				   (1 << 16) - 1);
+			I915_WRITE(PREC_PAL_EXT2_GC_MAX(pipe, 2),
+				   (1 << 16) - 1);
+		}
 	}
 
 	/*
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#6 lore raw

Re: [PATCH 2/2] drm/i915: Program EXT2 GC MAX registers

Quoted 44 lines

-----Original Message-----
From: Ville Syrjälä [mailto:[email protected]]
Sent: Friday, March 29, 2019 6:41 PM
To: Shankar, Uma <[email protected]>
Cc: [email protected]; Syrjala, Ville <[email protected]>; Lankhorst, Maarten <[email protected]>
Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915: Program EXT2 GC MAX registers

Quoted 15 lines · Uma Shankar

EXT2 GC MAX registers are introduced from Gen10+ to program values from 3.0 to 7.0. Enabled the same, but currently limiting it to 1.0 as userspace ABI is limited at that currently.

---
 drivers/gpu/drm/i915/i915_reg.h    |  1 +
 drivers/gpu/drm/i915/intel_color.c | 28 ++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/i915_reg.h index c866379..341f03e 100644

drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 10144

Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +0 -0
@@ -10144,6 +10144,7 @@ enum skl_power_gate {
 #define PREC_PAL_DATA(pipe)		_MMIO_PIPE(pipe,

_PAL_PREC_DATA_A, _PAL_PREC_DATA_B)

drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 10145

Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +0 -0
 #define PREC_PAL_GC_MAX(pipe, i)	_MMIO(_PIPE(pipe, _PAL_PREC_GC_MAX_A,

_PAL_PREC_GC_MAX_B) + (i) * 4)

drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 10146

Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +0 -0
 #define PREC_PAL_EXT_GC_MAX(pipe, i)	_MMIO(_PIPE(pipe,

_PAL_PREC_EXT_GC_MAX_A, _PAL_PREC_EXT_GC_MAX_B) + (i) * 4)

drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 10147

Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1 -0
+#define PREC_PAL_EXT2_GC_MAX(pipe, i)	_MMIO(_PIPE(pipe,

_PAL_PREC_EXT2_GC_MAX_A, _PAL_PREC_EXT2_GC_MAX_B) + (i) * 4)

drivers/gpu/drm/i915/intel_color.c static void bdw_load_gamma_lut(const struct

Quoted 9 lines
drivers/gpu/drm/i915/i915_reg.h +0 -0
 #define _PRE_CSC_GAMC_INDEX_A	0x4A484
 #define _PRE_CSC_GAMC_INDEX_B	0x4AC84
drivers/gpu/drm/i915/intel_color.c +0 -0
index dd179a8..84aa5e7 100644
@@ -526,6 +526,20 @@ static void bdw_load_gamma_lut(const struct

intel_crtc_state *crtc_state, u32 of

Quoted 12 lines

drivers/gpu/drm/i915/intel_color.c static void bdw_load_gamma_lut(const struct intel_crtc_state *crtc_state, u32 of · line 535

Quoted 10 lines
drivers/gpu/drm/i915/intel_color.c +7 -0
 		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 0), (1 << 16) - 1);
 		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 1), (1 << 16) - 1);
 		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 2), (1 << 16) - 1);
+
+		/*
+		 * Program the gc max 2 register to clamp values > 1.0.
+		 * ToDo: Extend the ABI to be able to program values
+		 * from 3.0 to 7.0
+		 */
+		if (INTEL_GEN(dev_priv) >= 10) {

|| IS_GEMINILAKE

Yeah, GLK needs to be added here. Will update it.

Quoted 38 lines
Quoted 11 lines
drivers/gpu/drm/i915/intel_color.c +7 -0
+			I915_WRITE(PREC_PAL_EXT2_GC_MAX(pipe, 0),
+				   (1 << 16) - 1);
+			I915_WRITE(PREC_PAL_EXT2_GC_MAX(pipe, 1),
+				   (1 << 16) - 1);
+			I915_WRITE(PREC_PAL_EXT2_GC_MAX(pipe, 2),
+				   (1 << 16) - 1);
+		}
 	} else {
 		for (i = 0; i < lut_size; i++) {
 			u32 v = (i * ((1 << 10) - 1)) / (lut_size - 1); @@ -537,6 +551,20

@@ static void bdw_load_gamma_lut(const struct intel_crtc_state *crtc_state, u32

of

drivers/gpu/drm/i915/intel_color.c static void bdw_load_gamma_lut(const struct intel_crtc_state *crtc_state, u32 of · line 535

Quoted 10 lines
drivers/gpu/drm/i915/intel_color.c +7 -0
 		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 0), (1 << 16) - 1);
 		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 1), (1 << 16) - 1);
 		I915_WRITE(PREC_PAL_EXT_GC_MAX(pipe, 2), (1 << 16) - 1);
+
+		/*
+		 * Program the gc max 2 register to clamp values > 1.0.
+		 * ToDo: Extend the ABI to be able to program values
+		 * from 3.0 to 7.0
+		 */
+		if (INTEL_GEN(dev_priv) >= 10) {

same

Quoted 13 lines
drivers/gpu/drm/i915/intel_color.c +7 -1
+			I915_WRITE(PREC_PAL_EXT2_GC_MAX(pipe, 0),
+				   (1 << 16) - 1);
+			I915_WRITE(PREC_PAL_EXT2_GC_MAX(pipe, 1),
+				   (1 << 16) - 1);
+			I915_WRITE(PREC_PAL_EXT2_GC_MAX(pipe, 2),
+				   (1 << 16) - 1);
+		}
 	}
 
 	/*
--

1.9.1

Quoted 8 lines
Quoted 4 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

--
Ville Syrjälä
Intel

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#7 lore raw

✗ Fi.CI.CHECKPATCH: warning for Fixed GC MAX register programming for gamma luts

In reply to Uma Shankar
== Series Details ==

== Series Details ==

Series: Fixed GC MAX register programming for gamma luts
URL : https://patchwork.freedesktop.org/series/58734/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
ecab4c425422 drm/i915: Fix GCMAX color register programming
ca881c02da68 drm/i915: Program EXT2 GC MAX registers
-:21: WARNING:LONG_LINE: line over 100 characters
#21: FILE: drivers/gpu/drm/i915/i915_reg.h:10147:
+#define PREC_PAL_EXT2_GC_MAX(pipe, i)	_MMIO(_PIPE(pipe, _PAL_PREC_EXT2_GC_MAX_A, _PAL_PREC_EXT2_GC_MAX_B) + (i) * 4)

total: 0 errors, 1 warnings, 0 checks, 47 lines checked

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#8 lore raw

✓ Fi.CI.BAT: success for Fixed GC MAX register programming for gamma luts

In reply to Uma Shankar
== Series Details ==

== Series Details ==

Series: Fixed GC MAX register programming for gamma luts
URL : https://patchwork.freedesktop.org/series/58734/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5837 -> Patchwork_12628
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/58734/revisions/1/mbox/

Known issues
------------

Here are the changes found in Patchwork_12628 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@amdgpu/amd_basic@cs-compute:
- fi-kbl-8809g: NOTRUN -> FAIL [fdo#108094]

* igt@amdgpu/amd_basic@semaphore:
- fi-kbl-7500u: NOTRUN -> SKIP [fdo#109271] +28

* igt@gem_exec_store@basic-bsd1:
- fi-kbl-r: NOTRUN -> SKIP [fdo#109271] +41

* igt@gem_exec_suspend@basic-s4-devices:
- fi-kbl-7500u: PASS -> DMESG-WARN [fdo#105128] / [fdo#107139]

* igt@i915_selftest@live_hangcheck:
- fi-icl-u3: PASS -> INCOMPLETE [fdo#108569]

* igt@kms_busy@basic-flip-a:
- fi-gdg-551: PASS -> FAIL [fdo#103182]

* igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-7500u: NOTRUN -> DMESG-WARN [fdo#102505] / [fdo#103558] / [fdo#105079] / [fdo#105602]

* igt@kms_chamelium@vga-edid-read:
- fi-hsw-4770r: NOTRUN -> SKIP [fdo#109271] +45

* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
- fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362]

#### Possible fixes ####

* igt@amdgpu/amd_basic@userptr:
- fi-kbl-8809g: DMESG-WARN [fdo#108965] -> PASS

* igt@i915_selftest@live_uncore:
- fi-ivb-3770: DMESG-FAIL [fdo#110210] -> PASS

* igt@kms_chamelium@dp-crc-fast:
- fi-kbl-7500u: DMESG-WARN [fdo#103841] -> PASS

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
- fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS +2

* igt@prime_vgem@basic-fence-flip:
- fi-gdg-551: FAIL [fdo#103182] -> PASS

[fdo#102505]: https://bugs.freedesktop.org/show_bug.cgi?id=102505
[fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
[fdo#103841]: https://bugs.freedesktop.org/show_bug.cgi?id=103841
[fdo#105079]: https://bugs.freedesktop.org/show_bug.cgi?id=105079
[fdo#105128]: https://bugs.freedesktop.org/show_bug.cgi?id=105128
[fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
[fdo#107139]: https://bugs.freedesktop.org/show_bug.cgi?id=107139
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#108094]: https://bugs.freedesktop.org/show_bug.cgi?id=108094
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210

Participating hosts (46 -> 42)
------------------------------

Additional (2): fi-hsw-4770r fi-kbl-r
Missing (6): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-bdw-samus

Build changes
-------------

* Linux: CI_DRM_5837 -> Patchwork_12628

CI_DRM_5837: 1a35af6fa0d612425e325024cbac10e6fa9a9cd5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4912: 66deae8b6fa69540f069d6551cd22013f5343948 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12628: ca881c02da6850d30d460ac48aa7ffe065bf0237 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

ca881c02da68 drm/i915: Program EXT2 GC MAX registers ecab4c425422 drm/i915: Fix GCMAX color register programming

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12628/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx