All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB
@ 2023-06-06 19:14 Ville Syrjala
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 01/19] drm/i915: Constify LUT entries in checker Ville Syrjala
                   ` (23 more replies)
  0 siblings, 24 replies; 52+ messages in thread
From: Ville Syrjala @ 2023-06-06 19:14 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Another attempt at re-enabling DSB based LUT loads.

The main change from the last attempt is that we now
use the DSB's DEwake mechanism to combat PkgC latency
which was causing the LUT to not always load correctly
(due to the anti-collision logic not working correctly
for DSB LUT accesses).

I also got the non-posted writes working correctly 
which lets us load the legacy LUT without the 
"write each entry twice" trick I used previously.

Ville Syrjälä (19):
  drm/i915: Constify LUT entries in checker
  drm/i915/dsb: Use non-locked register access
  drm/i915/dsb: Dump the DSB command buffer when DSB fails
  drm/i915/dsb: Define more DSB bits
  drm/i915/dsb: Define the contents of some intstructions bit better
  drm/i915/dsb: Avoid corrupting the first register write
  drm/i915/dsb: Don't use indexed writes when byte enables are not all
    set
  drm/i915/dsb: Introduce intel_dsb_noop()
  drm/i915/dsb: Introduce intel_dsb_reg_write_masked()
  drm/i915/dsb: Add support for non-posted DSB registers writes
  drm/i915/dsb: Don't use DSB to load the LUTs during full modeset
  drm/i915/dsb: Load LUTs using the DSB during vblank
  drm/i915/dsb: Use non-posted register writes for legacy LUT
  drm/i915/dsb: Evade transcoder undelayed vblank when using DSB
  drm/i915: Introduce skl_watermark_max_latency()
  drm/i915: Introudce intel_crtc_scanline_to_hw()
  drm/i915/dsb: Use DEwake to combat PkgC latency
  drm/i915/dsb: Re-instate DSB for LUT updates
  drm/i915: Do state check for color management changes

 drivers/gpu/drm/i915/display/intel_color.c    |  58 +++--
 drivers/gpu/drm/i915/display/intel_color.h    |   2 +
 drivers/gpu/drm/i915/display/intel_crtc.c     |  10 +-
 drivers/gpu/drm/i915/display/intel_display.c  |   3 +
 drivers/gpu/drm/i915/display/intel_dsb.c      | 217 +++++++++++++++---
 drivers/gpu/drm/i915/display/intel_dsb.h      |   9 +-
 drivers/gpu/drm/i915/display/intel_dsb_regs.h |  31 +++
 .../drm/i915/display/intel_modeset_verify.c   |   2 +
 drivers/gpu/drm/i915/display/intel_vblank.c   |  14 ++
 drivers/gpu/drm/i915/display/intel_vblank.h   |   1 +
 drivers/gpu/drm/i915/display/skl_watermark.c  |  14 ++
 drivers/gpu/drm/i915/display/skl_watermark.h  |   2 +
 12 files changed, 317 insertions(+), 46 deletions(-)

-- 
2.39.3


^ permalink raw reply	[flat|nested] 52+ messages in thread

* [Intel-gfx] [PATCH v2 01/19] drm/i915: Constify LUT entries in checker
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
@ 2023-06-06 19:14 ` Ville Syrjala
  2023-07-05  9:43   ` Manna, Animesh
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 02/19] drm/i915/dsb: Use non-locked register access Ville Syrjala
                   ` (22 subsequent siblings)
  23 siblings, 1 reply; 52+ messages in thread
From: Ville Syrjala @ 2023-06-06 19:14 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The LUT checker doesn't modify the LUT entries so make them const.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_color.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
index 8966e6560516..2d5640aab4d8 100644
--- a/drivers/gpu/drm/i915/display/intel_color.c
+++ b/drivers/gpu/drm/i915/display/intel_color.c
@@ -2848,16 +2848,16 @@ static int icl_pre_csc_lut_precision(const struct intel_crtc_state *crtc_state)
 	return 16;
 }
 
-static bool err_check(struct drm_color_lut *lut1,
-		      struct drm_color_lut *lut2, u32 err)
+static bool err_check(const struct drm_color_lut *lut1,
+		      const struct drm_color_lut *lut2, u32 err)
 {
 	return ((abs((long)lut2->red - lut1->red)) <= err) &&
 		((abs((long)lut2->blue - lut1->blue)) <= err) &&
 		((abs((long)lut2->green - lut1->green)) <= err);
 }
 
-static bool intel_lut_entries_equal(struct drm_color_lut *lut1,
-				    struct drm_color_lut *lut2,
+static bool intel_lut_entries_equal(const struct drm_color_lut *lut1,
+				    const struct drm_color_lut *lut2,
 				    int lut_size, u32 err)
 {
 	int i;
@@ -2874,7 +2874,7 @@ static bool intel_lut_equal(const struct drm_property_blob *blob1,
 			    const struct drm_property_blob *blob2,
 			    int check_size, int precision)
 {
-	struct drm_color_lut *lut1, *lut2;
+	const struct drm_color_lut *lut1, *lut2;
 	int lut_size1, lut_size2;
 	u32 err;
 
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [Intel-gfx] [PATCH v2 02/19] drm/i915/dsb: Use non-locked register access
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 01/19] drm/i915: Constify LUT entries in checker Ville Syrjala
@ 2023-06-06 19:14 ` Ville Syrjala
  2023-06-08 11:46   ` Jani Nikula
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 03/19] drm/i915/dsb: Dump the DSB command buffer when DSB fails Ville Syrjala
                   ` (21 subsequent siblings)
  23 siblings, 1 reply; 52+ messages in thread
From: Ville Syrjala @ 2023-06-06 19:14 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Avoid the locking overhead for DSB registers. We don't need the locks
and intel_dsb_commit() in particular needs to be called from the
vblank evade critical section and thus needs to be fast.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_dsb.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
index bed058d2c3ac..97e593d9f100 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb.c
+++ b/drivers/gpu/drm/i915/display/intel_dsb.c
@@ -96,7 +96,7 @@ static bool assert_dsb_has_room(struct intel_dsb *dsb)
 static bool is_dsb_busy(struct drm_i915_private *i915, enum pipe pipe,
 			enum dsb_id id)
 {
-	return intel_de_read(i915, DSB_CTRL(pipe, id)) & DSB_STATUS_BUSY;
+	return intel_de_read_fw(i915, DSB_CTRL(pipe, id)) & DSB_STATUS_BUSY;
 }
 
 static void intel_dsb_emit(struct intel_dsb *dsb, u32 ldw, u32 udw)
@@ -243,13 +243,13 @@ void intel_dsb_commit(struct intel_dsb *dsb, bool wait_for_vblank)
 		return;
 	}
 
-	intel_de_write(dev_priv, DSB_CTRL(pipe, dsb->id),
-		       (wait_for_vblank ? DSB_WAIT_FOR_VBLANK : 0) |
-		       DSB_ENABLE);
-	intel_de_write(dev_priv, DSB_HEAD(pipe, dsb->id),
-		       i915_ggtt_offset(dsb->vma));
-	intel_de_write(dev_priv, DSB_TAIL(pipe, dsb->id),
-		       i915_ggtt_offset(dsb->vma) + tail);
+	intel_de_write_fw(dev_priv, DSB_CTRL(pipe, dsb->id),
+			  (wait_for_vblank ? DSB_WAIT_FOR_VBLANK : 0) |
+			  DSB_ENABLE);
+	intel_de_write_fw(dev_priv, DSB_HEAD(pipe, dsb->id),
+			  i915_ggtt_offset(dsb->vma));
+	intel_de_write_fw(dev_priv, DSB_TAIL(pipe, dsb->id),
+			  i915_ggtt_offset(dsb->vma) + tail);
 }
 
 void intel_dsb_wait(struct intel_dsb *dsb)
@@ -266,7 +266,7 @@ void intel_dsb_wait(struct intel_dsb *dsb)
 	/* Attempt to reset it */
 	dsb->free_pos = 0;
 	dsb->ins_start_offset = 0;
-	intel_de_write(dev_priv, DSB_CTRL(pipe, dsb->id), 0);
+	intel_de_write_fw(dev_priv, DSB_CTRL(pipe, dsb->id), 0);
 }
 
 /**
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [Intel-gfx] [PATCH v2 03/19] drm/i915/dsb: Dump the DSB command buffer when DSB fails
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 01/19] drm/i915: Constify LUT entries in checker Ville Syrjala
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 02/19] drm/i915/dsb: Use non-locked register access Ville Syrjala
@ 2023-06-06 19:14 ` Ville Syrjala
  2023-07-11  4:55   ` Manna, Animesh
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 04/19] drm/i915/dsb: Define more DSB bits Ville Syrjala
                   ` (20 subsequent siblings)
  23 siblings, 1 reply; 52+ messages in thread
From: Ville Syrjala @ 2023-06-06 19:14 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Dump the full DSB command buffers and head/tail pointers if the
the DSB hasn't completed its job in time.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_dsb.c | 33 +++++++++++++++++++++---
 1 file changed, 30 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
index 97e593d9f100..42911abcd3ab 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb.c
+++ b/drivers/gpu/drm/i915/display/intel_dsb.c
@@ -93,6 +93,22 @@ static bool assert_dsb_has_room(struct intel_dsb *dsb)
 			 crtc->base.base.id, crtc->base.name, dsb->id);
 }
 
+static void intel_dsb_dump(struct intel_dsb *dsb)
+{
+	struct intel_crtc *crtc = dsb->crtc;
+	struct drm_i915_private *i915 = to_i915(crtc->base.dev);
+	const u32 *buf = dsb->cmd_buf;
+	int i;
+
+	drm_dbg_kms(&i915->drm, "[CRTC:%d:%s] DSB %d commands {\n",
+		    crtc->base.base.id, crtc->base.name, dsb->id);
+	for (i = 0; i < ALIGN(dsb->free_pos, 64 / 4); i += 4)
+		drm_dbg_kms(&i915->drm,
+			    " 0x%08x: 0x%08x 0x%08x 0x%08x 0x%08x\n",
+			    i * 4, buf[i], buf[i+1], buf[i+2], buf[i+3]);
+	drm_dbg_kms(&i915->drm, "}\n");
+}
+
 static bool is_dsb_busy(struct drm_i915_private *i915, enum pipe pipe,
 			enum dsb_id id)
 {
@@ -258,10 +274,21 @@ void intel_dsb_wait(struct intel_dsb *dsb)
 	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
 	enum pipe pipe = crtc->pipe;
 
-	if (wait_for(!is_dsb_busy(dev_priv, pipe, dsb->id), 1))
+	if (wait_for(!is_dsb_busy(dev_priv, pipe, dsb->id), 1)) {
+		u32 offset = i915_ggtt_offset(dsb->vma);
+
+		intel_de_write_fw(dev_priv, DSB_CTRL(pipe, dsb->id),
+				  DSB_ENABLE | DSB_HALT);
+
 		drm_err(&dev_priv->drm,
-			"[CRTC:%d:%s] DSB %d timed out waiting for idle\n",
-			crtc->base.base.id, crtc->base.name, dsb->id);
+			"[CRTC:%d:%s] DSB %d timed out waiting for idle (current head=0x%x, head=0x%x, tail=0x%x)\n",
+			crtc->base.base.id, crtc->base.name, dsb->id,
+			intel_de_read_fw(dev_priv, DSB_CURRENT_HEAD(pipe, dsb->id)) - offset,
+			intel_de_read_fw(dev_priv, DSB_HEAD(pipe, dsb->id)) - offset,
+			intel_de_read_fw(dev_priv, DSB_TAIL(pipe, dsb->id)) - offset);
+
+		intel_dsb_dump(dsb);
+	}
 
 	/* Attempt to reset it */
 	dsb->free_pos = 0;
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [Intel-gfx] [PATCH v2 04/19] drm/i915/dsb: Define more DSB bits
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
                   ` (2 preceding siblings ...)
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 03/19] drm/i915/dsb: Dump the DSB command buffer when DSB fails Ville Syrjala
@ 2023-06-06 19:14 ` Ville Syrjala
  2023-09-11 20:32   ` Shankar, Uma
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 05/19] drm/i915/dsb: Define the contents of some intstructions bit better Ville Syrjala
                   ` (19 subsequent siblings)
  23 siblings, 1 reply; 52+ messages in thread
From: Ville Syrjala @ 2023-06-06 19:14 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Define all the DSB register bits so I don't have to look through
bspec to find them.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_dsb_regs.h | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_dsb_regs.h b/drivers/gpu/drm/i915/display/intel_dsb_regs.h
index 12535d478775..210e2665441d 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb_regs.h
+++ b/drivers/gpu/drm/i915/display/intel_dsb_regs.h
@@ -37,6 +37,19 @@
 #define DSB_DEBUG(pipe, id)		_MMIO(DSBSL_INSTANCE(pipe, id) + 0x14)
 #define DSB_POLLMASK(pipe, id)		_MMIO(DSBSL_INSTANCE(pipe, id) + 0x1c)
 #define DSB_STATUS(pipe, id)		_MMIO(DSBSL_INSTANCE(pipe, id) + 0x24)
+#define   DSB_HP_IDLE_STATUS		REG_BIT(31)
+#define   DSB_DEWAKE_STATUS		REG_BIT(30)
+#define   DSB_REQARB_SM_STATE_MASK	REG_GENMASK(29, 27)
+#define   DSB_SAFE_WINDOW_LIVE		REG_BIT(26)
+#define   DSB_VTDFAULT_ARB_SM_STATE_MASK	REG_GENMASK(25, 23)
+#define   DSB_TLBTRANS_SM_STATE_MASK	REG_GENMASK(21, 20)
+#define   DSB_SAFE_WINDOW		REG_BIT(19)
+#define   DSB_POINTERS_SM_STATE_MASK	REG_GENMASK(18, 17)
+#define   DSB_BUSY_ON_DELAYED_VBLANK	REG_BIT(16)
+#define   DSB_MMIO_ARB_SM_STATE_MASK	REG_GENMASK(15, 13)
+#define   DSB_MMIO_INST_SM_STATE_MASK	REG_GENMASK(11, 7)
+#define   DSB_RESET_SM_STATE_MASK	REG_GENMASK(5, 4)
+#define   DSB_RUN_SM_STATE_MASK		REG_GENMASK(2, 0)
 #define DSB_INTERRUPT(pipe, id)		_MMIO(DSBSL_INSTANCE(pipe, id) + 0x28)
 #define   DSB_ATS_FAULT_INT_EN		REG_BIT(20)
 #define   DSB_GTT_FAULT_INT_EN		REG_BIT(19)
@@ -58,10 +71,28 @@
 #define   DSB_RM_READY_TIMEOUT_VALUE(x)	REG_FIELD_PREP(DSB_RM_READY_TIMEOUT_VALUE, (x)) /* usec */
 #define DSB_RMTIMEOUTREG_CAPTURE(pipe, id)	_MMIO(DSBSL_INSTANCE(pipe, id) + 0x34)
 #define DSB_PMCTRL(pipe, id)		_MMIO(DSBSL_INSTANCE(pipe, id) + 0x38)
+#define   DSB_ENABLE_DEWAKE		REG_BIT(31)
+#define   DSB_SCANLINE_FOR_DEWAKE_MASK	REG_GENMASK(30, 0)
+#define   DSB_SCANLINE_FOR_DEWAKE(x)	REG_FIELD_PREP(DSB_SCANLINE_FOR_DEWAKE_MASK, (x))
 #define DSB_PMCTRL_2(pipe, id)		_MMIO(DSBSL_INSTANCE(pipe, id) + 0x3c)
+#define   DSB_MMIOGEN_DEWAKE_DIS	REG_BIT(31)
+#define   DSB_FORCE_DEWAKE		REG_BIT(23)
+#define   DSB_BLOCK_DEWAKE_EXTENSION	REG_BIT(15)
+#define   DSB_OVERRIDE_DC5_DC6_OK	REG_BIT(7)
 #define DSB_PF_LN_LOWER(pipe, id)	_MMIO(DSBSL_INSTANCE(pipe, id) + 0x40)
 #define DSB_PF_LN_UPPER(pipe, id)	_MMIO(DSBSL_INSTANCE(pipe, id) + 0x44)
 #define DSB_BUFRPT_CNT(pipe, id)	_MMIO(DSBSL_INSTANCE(pipe, id) + 0x48)
 #define DSB_CHICKEN(pipe, id)		_MMIO(DSBSL_INSTANCE(pipe, id) + 0xf0)
+#define   DSB_FORCE_DMA_SYNC_RESET	REG_BIT(31)
+#define   DSB_FORCE_VTD_ENGIE_RESET	REG_BIT(30)
+#define   DSB_DISABLE_IPC_DEMOTE	REG_BIT(29)
+#define   DSB_SKIP_WAITS_EN		REG_BIT(23)
+#define   DSB_EXTEND_HP_IDLE		REG_BIT(16)
+#define   DSB_CTRL_WAIT_SAFE_WINDOW	REG_BIT(15)
+#define   DSB_CTRL_NO_WAIT_VBLANK	REG_BIT(14)
+#define   DSB_INST_WAIT_SAFE_WINDOW	REG_BIT(7)
+#define   DSB_INST_NO_WAIT_VBLANK	REG_BIT(6)
+#define   DSB_MMIOGEN_DEWAKE_DIS_CHICKEN	REG_BIT(2)
+#define   DSB_DISABLE_MMIO_COUNT_FOR_INDEXED	REG_BIT(0)
 
 #endif /* __INTEL_DSB_REGS_H__ */
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [Intel-gfx] [PATCH v2 05/19] drm/i915/dsb: Define the contents of some intstructions bit better
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
                   ` (3 preceding siblings ...)
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 04/19] drm/i915/dsb: Define more DSB bits Ville Syrjala
@ 2023-06-06 19:14 ` Ville Syrjala
  2023-09-11 20:50   ` Shankar, Uma
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 06/19] drm/i915/dsb: Avoid corrupting the first register write Ville Syrjala
                   ` (18 subsequent siblings)
  23 siblings, 1 reply; 52+ messages in thread
From: Ville Syrjala @ 2023-06-06 19:14 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Add some defines to specify what goes inside certain DSB
instructions.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_dsb.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
index 42911abcd3ab..093b2567883d 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb.c
+++ b/drivers/gpu/drm/i915/display/intel_dsb.c
@@ -70,17 +70,21 @@ struct intel_dsb {
 #define DSB_OPCODE_SHIFT		24
 #define DSB_OPCODE_NOOP			0x0
 #define DSB_OPCODE_MMIO_WRITE		0x1
+#define   DSB_BYTE_EN			0xf
+#define   DSB_BYTE_EN_SHIFT		20
+#define   DSB_REG_VALUE_MASK		0xfffff
 #define DSB_OPCODE_WAIT_USEC		0x2
-#define DSB_OPCODE_WAIT_LINES		0x3
+#define DSB_OPCODE_WAIT_SCANLINE	0x3
 #define DSB_OPCODE_WAIT_VBLANKS		0x4
 #define DSB_OPCODE_WAIT_DSL_IN		0x5
 #define DSB_OPCODE_WAIT_DSL_OUT		0x6
+#define   DSB_SCANLINE_UPPER_SHIFT	20
+#define   DSB_SCANLINE_LOWER_SHIFT	0
 #define DSB_OPCODE_INTERRUPT		0x7
 #define DSB_OPCODE_INDEXED_WRITE	0x9
+/* see DSB_REG_VALUE_MASK */
 #define DSB_OPCODE_POLL			0xA
-#define DSB_BYTE_EN			0xF
-#define DSB_BYTE_EN_SHIFT		20
-#define DSB_REG_VALUE_MASK		0xfffff
+/* see DSB_REG_VALUE_MASK */
 
 static bool assert_dsb_has_room(struct intel_dsb *dsb)
 {
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [Intel-gfx] [PATCH v2 06/19] drm/i915/dsb: Avoid corrupting the first register write
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
                   ` (4 preceding siblings ...)
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 05/19] drm/i915/dsb: Define the contents of some intstructions bit better Ville Syrjala
@ 2023-06-06 19:14 ` Ville Syrjala
  2023-07-05  9:39   ` Manna, Animesh
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 07/19] drm/i915/dsb: Don't use indexed writes when byte enables are not all set Ville Syrjala
                   ` (17 subsequent siblings)
  23 siblings, 1 reply; 52+ messages in thread
From: Ville Syrjala @ 2023-06-06 19:14 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

i915_gem_object_create_internal() does not hand out zeroed
memory. Thus we may confuse whatever stale garbage is in
there as a previous register write and mistakenly handle the
first actual register write as an indexed write. This can
end up corrupting the instruction sufficiently well to lose
the entire register write.

Make sure we've actually emitted a previous instruction before
attemting indexed register write merging.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_dsb.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
index 093b2567883d..a20ae5313d23 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb.c
+++ b/drivers/gpu/drm/i915/display/intel_dsb.c
@@ -141,6 +141,14 @@ static bool intel_dsb_prev_ins_is_write(struct intel_dsb *dsb,
 	const u32 *buf = dsb->cmd_buf;
 	u32 prev_opcode, prev_reg;
 
+	/*
+	 * Nothing emitted yet? Must check before looking
+	 * at the actual data since i915_gem_object_create_internal()
+	 * does *not* give you zeroed memory!
+	 */
+	if (dsb->free_pos == 0)
+		return false;
+
 	prev_opcode = buf[dsb->ins_start_offset + 1] >> DSB_OPCODE_SHIFT;
 	prev_reg = buf[dsb->ins_start_offset + 1] & DSB_REG_VALUE_MASK;
 
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [Intel-gfx] [PATCH v2 07/19] drm/i915/dsb: Don't use indexed writes when byte enables are not all set
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
                   ` (5 preceding siblings ...)
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 06/19] drm/i915/dsb: Avoid corrupting the first register write Ville Syrjala
@ 2023-06-06 19:14 ` Ville Syrjala
  2023-07-11  5:00   ` Manna, Animesh
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 08/19] drm/i915/dsb: Introduce intel_dsb_noop() Ville Syrjala
                   ` (16 subsequent siblings)
  23 siblings, 1 reply; 52+ messages in thread
From: Ville Syrjala @ 2023-06-06 19:14 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The indexed write instruction doesn't support byte-enables, so
if the non-indexed write used those we must not convert it to
an indexed write.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_dsb.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
index a20ae5313d23..22c716ee75e2 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb.c
+++ b/drivers/gpu/drm/i915/display/intel_dsb.c
@@ -149,7 +149,7 @@ static bool intel_dsb_prev_ins_is_write(struct intel_dsb *dsb,
 	if (dsb->free_pos == 0)
 		return false;
 
-	prev_opcode = buf[dsb->ins_start_offset + 1] >> DSB_OPCODE_SHIFT;
+	prev_opcode = buf[dsb->ins_start_offset + 1] & ~DSB_REG_VALUE_MASK;
 	prev_reg = buf[dsb->ins_start_offset + 1] & DSB_REG_VALUE_MASK;
 
 	return prev_opcode == opcode && prev_reg == i915_mmio_reg_offset(reg);
@@ -157,12 +157,18 @@ static bool intel_dsb_prev_ins_is_write(struct intel_dsb *dsb,
 
 static bool intel_dsb_prev_ins_is_mmio_write(struct intel_dsb *dsb, i915_reg_t reg)
 {
-	return intel_dsb_prev_ins_is_write(dsb, DSB_OPCODE_MMIO_WRITE, reg);
+	/* only full byte-enables can be converted to indexed writes */
+	return intel_dsb_prev_ins_is_write(dsb,
+					   DSB_OPCODE_MMIO_WRITE << DSB_OPCODE_SHIFT |
+					   DSB_BYTE_EN << DSB_BYTE_EN_SHIFT,
+					   reg);
 }
 
 static bool intel_dsb_prev_ins_is_indexed_write(struct intel_dsb *dsb, i915_reg_t reg)
 {
-	return intel_dsb_prev_ins_is_write(dsb, DSB_OPCODE_INDEXED_WRITE, reg);
+	return intel_dsb_prev_ins_is_write(dsb,
+					   DSB_OPCODE_INDEXED_WRITE << DSB_OPCODE_SHIFT,
+					   reg);
 }
 
 /**
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [Intel-gfx] [PATCH v2 08/19] drm/i915/dsb: Introduce intel_dsb_noop()
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
                   ` (6 preceding siblings ...)
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 07/19] drm/i915/dsb: Don't use indexed writes when byte enables are not all set Ville Syrjala
@ 2023-06-06 19:14 ` Ville Syrjala
  2023-09-11 20:52   ` Shankar, Uma
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 09/19] drm/i915/dsb: Introduce intel_dsb_reg_write_masked() Ville Syrjala
                   ` (15 subsequent siblings)
  23 siblings, 1 reply; 52+ messages in thread
From: Ville Syrjala @ 2023-06-06 19:14 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Add a helper for emitting a number of DSB NOOPs commands.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_dsb.c | 9 +++++++++
 drivers/gpu/drm/i915/display/intel_dsb.h | 1 +
 2 files changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
index 22c716ee75e2..4ef799c087b4 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb.c
+++ b/drivers/gpu/drm/i915/display/intel_dsb.c
@@ -234,6 +234,15 @@ void intel_dsb_reg_write(struct intel_dsb *dsb,
 	}
 }
 
+void intel_dsb_noop(struct intel_dsb *dsb, int count)
+{
+	int i;
+
+	for (i = 0; i < count; i++)
+		intel_dsb_emit(dsb, 0,
+			       DSB_OPCODE_NOOP << DSB_OPCODE_SHIFT);
+}
+
 static void intel_dsb_align_tail(struct intel_dsb *dsb)
 {
 	u32 aligned_tail, tail;
diff --git a/drivers/gpu/drm/i915/display/intel_dsb.h b/drivers/gpu/drm/i915/display/intel_dsb.h
index b8148b47022d..5a08bc21beda 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb.h
+++ b/drivers/gpu/drm/i915/display/intel_dsb.h
@@ -19,6 +19,7 @@ void intel_dsb_finish(struct intel_dsb *dsb);
 void intel_dsb_cleanup(struct intel_dsb *dsb);
 void intel_dsb_reg_write(struct intel_dsb *dsb,
 			 i915_reg_t reg, u32 val);
+void intel_dsb_noop(struct intel_dsb *dsb, int count);
 void intel_dsb_commit(struct intel_dsb *dsb,
 		      bool wait_for_vblank);
 void intel_dsb_wait(struct intel_dsb *dsb);
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [Intel-gfx] [PATCH v2 09/19] drm/i915/dsb: Introduce intel_dsb_reg_write_masked()
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
                   ` (7 preceding siblings ...)
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 08/19] drm/i915/dsb: Introduce intel_dsb_noop() Ville Syrjala
@ 2023-06-06 19:14 ` Ville Syrjala
  2023-09-11 20:55   ` Shankar, Uma
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 10/19] drm/i915/dsb: Add support for non-posted DSB registers writes Ville Syrjala
                   ` (14 subsequent siblings)
  23 siblings, 1 reply; 52+ messages in thread
From: Ville Syrjala @ 2023-06-06 19:14 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Add a function for emitting masked register writes.

Note that the mask is implemented through bvyte enables,
so can only mask off aligned 8bit sets of bits.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_dsb.c | 18 ++++++++++++++++++
 drivers/gpu/drm/i915/display/intel_dsb.h |  2 ++
 2 files changed, 20 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
index 4ef799c087b4..6be353fdc7fc 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb.c
+++ b/drivers/gpu/drm/i915/display/intel_dsb.c
@@ -234,6 +234,24 @@ void intel_dsb_reg_write(struct intel_dsb *dsb,
 	}
 }
 
+static u32 intel_dsb_mask_to_byte_en(u32 mask)
+{
+	return (!!(mask & 0xff000000) << 3 |
+		!!(mask & 0x00ff0000) << 2 |
+		!!(mask & 0x0000ff00) << 1 |
+		!!(mask & 0x000000ff) << 0);
+}
+
+/* Note: mask implemented via byte enables! */
+void intel_dsb_reg_write_masked(struct intel_dsb *dsb,
+				i915_reg_t reg, u32 mask, u32 val)
+{
+	intel_dsb_emit(dsb, val,
+		       (DSB_OPCODE_MMIO_WRITE << DSB_OPCODE_SHIFT) |
+		       (intel_dsb_mask_to_byte_en(mask) << DSB_BYTE_EN_SHIFT) |
+		       i915_mmio_reg_offset(reg));
+}
+
 void intel_dsb_noop(struct intel_dsb *dsb, int count)
 {
 	int i;
diff --git a/drivers/gpu/drm/i915/display/intel_dsb.h b/drivers/gpu/drm/i915/display/intel_dsb.h
index 5a08bc21beda..983b0d58ad44 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb.h
+++ b/drivers/gpu/drm/i915/display/intel_dsb.h
@@ -19,6 +19,8 @@ void intel_dsb_finish(struct intel_dsb *dsb);
 void intel_dsb_cleanup(struct intel_dsb *dsb);
 void intel_dsb_reg_write(struct intel_dsb *dsb,
 			 i915_reg_t reg, u32 val);
+void intel_dsb_reg_write_masked(struct intel_dsb *dsb,
+				i915_reg_t reg, u32 mask, u32 val);
 void intel_dsb_noop(struct intel_dsb *dsb, int count);
 void intel_dsb_commit(struct intel_dsb *dsb,
 		      bool wait_for_vblank);
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [Intel-gfx] [PATCH v2 10/19] drm/i915/dsb: Add support for non-posted DSB registers writes
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
                   ` (8 preceding siblings ...)
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 09/19] drm/i915/dsb: Introduce intel_dsb_reg_write_masked() Ville Syrjala
@ 2023-06-06 19:14 ` Ville Syrjala
  2023-07-11  5:43   ` Manna, Animesh
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 11/19] drm/i915/dsb: Don't use DSB to load the LUTs during full modeset Ville Syrjala
                   ` (13 subsequent siblings)
  23 siblings, 1 reply; 52+ messages in thread
From: Ville Syrjala @ 2023-06-06 19:14 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Writing specific transcoder registers (and as it turns out, the
legacy LUT as well) via DSB needs a magic sequence to emit
non-posted register writes. Add a helper for this.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_dsb.c | 20 ++++++++++++++++++++
 drivers/gpu/drm/i915/display/intel_dsb.h |  3 +++
 2 files changed, 23 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
index 6be353fdc7fc..73d609507f24 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb.c
+++ b/drivers/gpu/drm/i915/display/intel_dsb.c
@@ -261,6 +261,26 @@ void intel_dsb_noop(struct intel_dsb *dsb, int count)
 			       DSB_OPCODE_NOOP << DSB_OPCODE_SHIFT);
 }
 
+void intel_dsb_nonpost_start(struct intel_dsb *dsb)
+{
+	struct intel_crtc *crtc = dsb->crtc;
+	enum pipe pipe = crtc->pipe;
+
+	intel_dsb_reg_write_masked(dsb, DSB_CTRL(pipe, dsb->id),
+				   DSB_NON_POSTED, DSB_NON_POSTED);
+	intel_dsb_noop(dsb, 4);
+}
+
+void intel_dsb_nonpost_end(struct intel_dsb *dsb)
+{
+	struct intel_crtc *crtc = dsb->crtc;
+	enum pipe pipe = crtc->pipe;
+
+	intel_dsb_reg_write_masked(dsb, DSB_CTRL(pipe, dsb->id),
+				   DSB_NON_POSTED, 0);
+	intel_dsb_noop(dsb, 4);
+}
+
 static void intel_dsb_align_tail(struct intel_dsb *dsb)
 {
 	u32 aligned_tail, tail;
diff --git a/drivers/gpu/drm/i915/display/intel_dsb.h b/drivers/gpu/drm/i915/display/intel_dsb.h
index 983b0d58ad44..54e9e1dc31ee 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb.h
+++ b/drivers/gpu/drm/i915/display/intel_dsb.h
@@ -22,6 +22,9 @@ void intel_dsb_reg_write(struct intel_dsb *dsb,
 void intel_dsb_reg_write_masked(struct intel_dsb *dsb,
 				i915_reg_t reg, u32 mask, u32 val);
 void intel_dsb_noop(struct intel_dsb *dsb, int count);
+void intel_dsb_nonpost_start(struct intel_dsb *dsb);
+void intel_dsb_nonpost_end(struct intel_dsb *dsb);
+
 void intel_dsb_commit(struct intel_dsb *dsb,
 		      bool wait_for_vblank);
 void intel_dsb_wait(struct intel_dsb *dsb);
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [Intel-gfx] [PATCH v2 11/19] drm/i915/dsb: Don't use DSB to load the LUTs during full modeset
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
                   ` (9 preceding siblings ...)
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 10/19] drm/i915/dsb: Add support for non-posted DSB registers writes Ville Syrjala
@ 2023-06-06 19:14 ` Ville Syrjala
  2023-09-11 21:09   ` Shankar, Uma
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 12/19] drm/i915/dsb: Load LUTs using the DSB during vblank Ville Syrjala
                   ` (12 subsequent siblings)
  23 siblings, 1 reply; 52+ messages in thread
From: Ville Syrjala @ 2023-06-06 19:14 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Using the DSB for LUT loading during full modesets would require
some actual though. Let's just use mmio for the time being.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_color.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
index 2d5640aab4d8..2db9d1d6dadd 100644
--- a/drivers/gpu/drm/i915/display/intel_color.c
+++ b/drivers/gpu/drm/i915/display/intel_color.c
@@ -1805,6 +1805,10 @@ void intel_color_prepare_commit(struct intel_crtc_state *crtc_state)
 	/* FIXME DSB has issues loading LUTs, disable it for now */
 	return;
 
+	if (!crtc_state->hw.active ||
+	    intel_crtc_needs_modeset(crtc_state))
+		return;
+
 	if (!crtc_state->pre_csc_lut && !crtc_state->post_csc_lut)
 		return;
 
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [Intel-gfx] [PATCH v2 12/19] drm/i915/dsb: Load LUTs using the DSB during vblank
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
                   ` (10 preceding siblings ...)
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 11/19] drm/i915/dsb: Don't use DSB to load the LUTs during full modeset Ville Syrjala
@ 2023-06-06 19:14 ` Ville Syrjala
  2023-09-13 16:24   ` Shankar, Uma
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 13/19] drm/i915/dsb: Use non-posted register writes for legacy LUT Ville Syrjala
                   ` (11 subsequent siblings)
  23 siblings, 1 reply; 52+ messages in thread
From: Ville Syrjala @ 2023-06-06 19:14 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Loading LUTs with the DSB outside of vblank doesn't really
work due to the palette anti-collision logic. Apparently the
DSB register writes don't get stalled like CPU mmio writes
do and instead we end up corrupting the LUT entries. Disabling
the anti-collision logic would allow us to successfully load
the LUT outside of vblank, but presumably that risks the LUT
reads from the scanout (temportarily) getting corrupted data
from the LUT instead.

The anti-collision logic isn't active during vblank so that
is when we can successfully load the LUT with the DSB. That is
what we want to do anyway to avoid tearing.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_color.c   | 30 ++++++++++++++++----
 drivers/gpu/drm/i915/display/intel_color.h   |  2 ++
 drivers/gpu/drm/i915/display/intel_crtc.c    |  4 ++-
 drivers/gpu/drm/i915/display/intel_display.c |  3 ++
 4 files changed, 32 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
index 2db9d1d6dadd..077e45372dab 100644
--- a/drivers/gpu/drm/i915/display/intel_color.c
+++ b/drivers/gpu/drm/i915/display/intel_color.c
@@ -1660,12 +1660,6 @@ static void icl_load_luts(const struct intel_crtc_state *crtc_state)
 		MISSING_CASE(crtc_state->gamma_mode);
 		break;
 	}
-
-	if (crtc_state->dsb) {
-		intel_dsb_finish(crtc_state->dsb);
-		intel_dsb_commit(crtc_state->dsb, false);
-		intel_dsb_wait(crtc_state->dsb);
-	}
 }
 
 static void vlv_load_luts(const struct intel_crtc_state *crtc_state)
@@ -1772,6 +1766,9 @@ void intel_color_load_luts(const struct intel_crtc_state *crtc_state)
 {
 	struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
 
+	if (crtc_state->dsb)
+		return;
+
 	i915->display.funcs.color->load_luts(crtc_state);
 }
 
@@ -1788,6 +1785,9 @@ void intel_color_commit_arm(const struct intel_crtc_state *crtc_state)
 	struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
 
 	i915->display.funcs.color->color_commit_arm(crtc_state);
+
+	if (crtc_state->dsb)
+		intel_dsb_commit(crtc_state->dsb, true);
 }
 
 void intel_color_post_update(const struct intel_crtc_state *crtc_state)
@@ -1801,6 +1801,7 @@ void intel_color_post_update(const struct intel_crtc_state *crtc_state)
 void intel_color_prepare_commit(struct intel_crtc_state *crtc_state)
 {
 	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+	struct drm_i915_private *i915 = to_i915(crtc->base.dev);
 
 	/* FIXME DSB has issues loading LUTs, disable it for now */
 	return;
@@ -1813,6 +1814,12 @@ void intel_color_prepare_commit(struct intel_crtc_state *crtc_state)
 		return;
 
 	crtc_state->dsb = intel_dsb_prepare(crtc, 1024);
+	if (!crtc_state->dsb)
+		return;
+
+	i915->display.funcs.color->load_luts(crtc_state);
+
+	intel_dsb_finish(crtc_state->dsb);
 }
 
 void intel_color_cleanup_commit(struct intel_crtc_state *crtc_state)
@@ -1824,6 +1831,17 @@ void intel_color_cleanup_commit(struct intel_crtc_state *crtc_state)
 	crtc_state->dsb = NULL;
 }
 
+void intel_color_wait_commit(const struct intel_crtc_state *crtc_state)
+{
+	if (crtc_state->dsb)
+		intel_dsb_wait(crtc_state->dsb);
+}
+
+bool intel_color_uses_dsb(const struct intel_crtc_state *crtc_state)
+{
+	return crtc_state->dsb;
+}
+
 static bool intel_can_preload_luts(const struct intel_crtc_state *new_crtc_state)
 {
 	struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->uapi.crtc);
diff --git a/drivers/gpu/drm/i915/display/intel_color.h b/drivers/gpu/drm/i915/display/intel_color.h
index 8002492be709..8ecd36149def 100644
--- a/drivers/gpu/drm/i915/display/intel_color.h
+++ b/drivers/gpu/drm/i915/display/intel_color.h
@@ -19,6 +19,8 @@ void intel_color_crtc_init(struct intel_crtc *crtc);
 int intel_color_check(struct intel_crtc_state *crtc_state);
 void intel_color_prepare_commit(struct intel_crtc_state *crtc_state);
 void intel_color_cleanup_commit(struct intel_crtc_state *crtc_state);
+bool intel_color_uses_dsb(const struct intel_crtc_state *crtc_state);
+void intel_color_wait_commit(const struct intel_crtc_state *crtc_state);
 void intel_color_commit_noarm(const struct intel_crtc_state *crtc_state);
 void intel_color_commit_arm(const struct intel_crtc_state *crtc_state);
 void intel_color_post_update(const struct intel_crtc_state *crtc_state);
diff --git a/drivers/gpu/drm/i915/display/intel_crtc.c b/drivers/gpu/drm/i915/display/intel_crtc.c
index 182c6dd64f47..36c9b590a058 100644
--- a/drivers/gpu/drm/i915/display/intel_crtc.c
+++ b/drivers/gpu/drm/i915/display/intel_crtc.c
@@ -24,6 +24,7 @@
 #include "intel_display_trace.h"
 #include "intel_display_types.h"
 #include "intel_drrs.h"
+#include "intel_dsb.h"
 #include "intel_dsi.h"
 #include "intel_fifo_underrun.h"
 #include "intel_pipe_crc.h"
@@ -394,7 +395,8 @@ static bool intel_crtc_needs_vblank_work(const struct intel_crtc_state *crtc_sta
 	return crtc_state->hw.active &&
 		!intel_crtc_needs_modeset(crtc_state) &&
 		!crtc_state->preload_luts &&
-		intel_crtc_needs_color_update(crtc_state);
+		intel_crtc_needs_color_update(crtc_state) &&
+		!intel_color_uses_dsb(crtc_state);
 }
 
 static void intel_crtc_vblank_work(struct kthread_work *base)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index f23dd937c27c..25d6b19e6944 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -78,6 +78,7 @@
 #include "intel_dpll_mgr.h"
 #include "intel_dpt.h"
 #include "intel_drrs.h"
+#include "intel_dsb.h"
 #include "intel_dsi.h"
 #include "intel_dvo.h"
 #include "intel_fb.h"
@@ -7056,6 +7057,8 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)
 	for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) {
 		if (new_crtc_state->do_async_flip)
 			intel_crtc_disable_flip_done(state, crtc);
+
+		intel_color_wait_commit(new_crtc_state);
 	}
 
 	/*
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [Intel-gfx] [PATCH v2 13/19] drm/i915/dsb: Use non-posted register writes for legacy LUT
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
                   ` (11 preceding siblings ...)
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 12/19] drm/i915/dsb: Load LUTs using the DSB during vblank Ville Syrjala
@ 2023-06-06 19:14 ` Ville Syrjala
  2023-09-13 17:02   ` Shankar, Uma
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 14/19] drm/i915/dsb: Evade transcoder undelayed vblank when using DSB Ville Syrjala
                   ` (10 subsequent siblings)
  23 siblings, 1 reply; 52+ messages in thread
From: Ville Syrjala @ 2023-06-06 19:14 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The DSB has problems writing the legacy LUT. The two workarounds
I've discoverted are:
- write each entry twice back to back
- use non-posted writes

Let's use non-posted writes as that seems a bit more standard.

TODO: measure which is faster

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_color.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
index 077e45372dab..b3dd4013d058 100644
--- a/drivers/gpu/drm/i915/display/intel_color.c
+++ b/drivers/gpu/drm/i915/display/intel_color.c
@@ -1265,9 +1265,20 @@ static void ilk_load_lut_8(const struct intel_crtc_state *crtc_state,
 
 	lut = blob->data;
 
+	/*
+	 * DSB fails to correctly load the legacy LUT
+	 * unless we either write each entry twice,
+	 * or use non-posted writes
+	 */
+	if (crtc_state->dsb)
+		intel_dsb_nonpost_start(crtc_state->dsb);
+
 	for (i = 0; i < 256; i++)
 		ilk_lut_write(crtc_state, LGC_PALETTE(pipe, i),
 			      i9xx_lut_8(&lut[i]));
+
+	if (crtc_state->dsb)
+		intel_dsb_nonpost_end(crtc_state->dsb);
 }
 
 static void ilk_load_lut_10(const struct intel_crtc_state *crtc_state,
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [Intel-gfx] [PATCH v2 14/19] drm/i915/dsb: Evade transcoder undelayed vblank when using DSB
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
                   ` (12 preceding siblings ...)
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 13/19] drm/i915/dsb: Use non-posted register writes for legacy LUT Ville Syrjala
@ 2023-06-06 19:14 ` Ville Syrjala
  2023-09-13 17:13   ` Shankar, Uma
  2023-06-06 19:15 ` [Intel-gfx] [PATCH v2 15/19] drm/i915: Introduce skl_watermark_max_latency() Ville Syrjala
                   ` (9 subsequent siblings)
  23 siblings, 1 reply; 52+ messages in thread
From: Ville Syrjala @ 2023-06-06 19:14 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

We want to start the DSB execution from the transcoder's undelayed
vblank, so in order to guarantee atomicity with the all the other
mmio register writes we need to evade both vblanks.

Note that currently we don't add any vblank delay, so this is
effectively a nop. But in the future when we start to program
double buffered registers from the DSB we'll need to delay the
pipe's vblank to provide the register programming "window2"
for the DSB.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_crtc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_crtc.c b/drivers/gpu/drm/i915/display/intel_crtc.c
index 36c9b590a058..ff0ebdf7cde3 100644
--- a/drivers/gpu/drm/i915/display/intel_crtc.c
+++ b/drivers/gpu/drm/i915/display/intel_crtc.c
@@ -519,8 +519,12 @@ void intel_pipe_update_start(struct intel_crtc_state *new_crtc_state)
 	/*
 	 * M/N is double buffered on the transcoder's undelayed vblank,
 	 * so with seamless M/N we must evade both vblanks.
+	 *
+	 * DSB execution waits for the transcoder's undelayed vblank,
+	 * hence we must kick off the commit before that.
 	 */
-	if (new_crtc_state->seamless_m_n && intel_crtc_needs_fastset(new_crtc_state))
+	if (new_crtc_state->dsb ||
+	    (new_crtc_state->seamless_m_n && intel_crtc_needs_fastset(new_crtc_state)))
 		min -= adjusted_mode->crtc_vblank_start - adjusted_mode->crtc_vdisplay;
 
 	if (min <= 0 || max <= 0)
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [Intel-gfx] [PATCH v2 15/19] drm/i915: Introduce skl_watermark_max_latency()
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
                   ` (13 preceding siblings ...)
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 14/19] drm/i915/dsb: Evade transcoder undelayed vblank when using DSB Ville Syrjala
@ 2023-06-06 19:15 ` Ville Syrjala
  2023-09-13 17:25   ` Shankar, Uma
  2023-06-06 19:15 ` [Intel-gfx] [PATCH v2 16/19] drm/i915: Introudce intel_crtc_scanline_to_hw() Ville Syrjala
                   ` (8 subsequent siblings)
  23 siblings, 1 reply; 52+ messages in thread
From: Ville Syrjala @ 2023-06-06 19:15 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The DSB code will want to know the maximum PkgC latency
it has to contend with. Add a helper to expose that
information.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/skl_watermark.c | 14 ++++++++++++++
 drivers/gpu/drm/i915/display/skl_watermark.h |  2 ++
 2 files changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
index d1245c847f1c..a31adbca9dbc 100644
--- a/drivers/gpu/drm/i915/display/skl_watermark.c
+++ b/drivers/gpu/drm/i915/display/skl_watermark.c
@@ -3719,3 +3719,17 @@ void skl_watermark_debugfs_register(struct drm_i915_private *i915)
 		debugfs_create_file("i915_sagv_status", 0444, minor->debugfs_root, i915,
 				    &intel_sagv_status_fops);
 }
+
+unsigned int skl_watermark_max_latency(struct drm_i915_private *i915)
+{
+	int level;
+
+	for (level = i915->display.wm.num_levels - 1; level >= 0; level--) {
+		unsigned int latency = skl_wm_latency(i915, level, NULL);
+
+		if (latency)
+			return latency;
+	}
+
+	return 0;
+}
diff --git a/drivers/gpu/drm/i915/display/skl_watermark.h b/drivers/gpu/drm/i915/display/skl_watermark.h
index f91a3d4ddc07..edb61e33df83 100644
--- a/drivers/gpu/drm/i915/display/skl_watermark.h
+++ b/drivers/gpu/drm/i915/display/skl_watermark.h
@@ -46,6 +46,8 @@ void skl_watermark_ipc_update(struct drm_i915_private *i915);
 bool skl_watermark_ipc_enabled(struct drm_i915_private *i915);
 void skl_watermark_debugfs_register(struct drm_i915_private *i915);
 
+unsigned int skl_watermark_max_latency(struct drm_i915_private *i915);
+
 void skl_wm_init(struct drm_i915_private *i915);
 
 struct intel_dbuf_state {
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [Intel-gfx] [PATCH v2 16/19] drm/i915: Introudce intel_crtc_scanline_to_hw()
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
                   ` (14 preceding siblings ...)
  2023-06-06 19:15 ` [Intel-gfx] [PATCH v2 15/19] drm/i915: Introduce skl_watermark_max_latency() Ville Syrjala
@ 2023-06-06 19:15 ` Ville Syrjala
  2023-09-13 17:37   ` Shankar, Uma
  2023-06-06 19:15 ` [Intel-gfx] [PATCH v2 17/19] drm/i915/dsb: Use DEwake to combat PkgC latency Ville Syrjala
                   ` (7 subsequent siblings)
  23 siblings, 1 reply; 52+ messages in thread
From: Ville Syrjala @ 2023-06-06 19:15 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Add a helper to convert our idea of a scanline to the hw's idea
of the same scanline (ie. apply crtc->scanline_offset in reverse).
We'll need this to tell the DSB do stuff on a specific scanline.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_vblank.c | 14 ++++++++++++++
 drivers/gpu/drm/i915/display/intel_vblank.h |  1 +
 2 files changed, 15 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_vblank.c b/drivers/gpu/drm/i915/display/intel_vblank.c
index f5659ebd08eb..2cec2abf9746 100644
--- a/drivers/gpu/drm/i915/display/intel_vblank.c
+++ b/drivers/gpu/drm/i915/display/intel_vblank.c
@@ -251,6 +251,20 @@ static int __intel_get_crtc_scanline(struct intel_crtc *crtc)
 	return (position + crtc->scanline_offset) % vtotal;
 }
 
+int intel_crtc_scanline_to_hw(struct intel_crtc *crtc, int scanline)
+{
+	const struct drm_vblank_crtc *vblank =
+		&crtc->base.dev->vblank[drm_crtc_index(&crtc->base)];
+	const struct drm_display_mode *mode = &vblank->hwmode;
+	int vtotal;
+
+	vtotal = mode->crtc_vtotal;
+	if (mode->flags & DRM_MODE_FLAG_INTERLACE)
+		vtotal /= 2;
+
+	return (scanline + vtotal - crtc->scanline_offset) % vtotal;
+}
+
 static bool i915_get_crtc_scanoutpos(struct drm_crtc *_crtc,
 				     bool in_vblank_irq,
 				     int *vpos, int *hpos,
diff --git a/drivers/gpu/drm/i915/display/intel_vblank.h b/drivers/gpu/drm/i915/display/intel_vblank.h
index 08e706b29149..17636f140c71 100644
--- a/drivers/gpu/drm/i915/display/intel_vblank.h
+++ b/drivers/gpu/drm/i915/display/intel_vblank.h
@@ -22,5 +22,6 @@ void intel_wait_for_pipe_scanline_stopped(struct intel_crtc *crtc);
 void intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc);
 void intel_crtc_update_active_timings(const struct intel_crtc_state *crtc_state,
 				      bool vrr_enable);
+int intel_crtc_scanline_to_hw(struct intel_crtc *crtc, int scanline);
 
 #endif /* __INTEL_VBLANK_H__ */
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [Intel-gfx] [PATCH v2 17/19] drm/i915/dsb: Use DEwake to combat PkgC latency
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
                   ` (15 preceding siblings ...)
  2023-06-06 19:15 ` [Intel-gfx] [PATCH v2 16/19] drm/i915: Introudce intel_crtc_scanline_to_hw() Ville Syrjala
@ 2023-06-06 19:15 ` Ville Syrjala
  2023-09-13 18:08   ` Shankar, Uma
  2023-06-06 19:15 ` [Intel-gfx] [PATCH v2 18/19] drm/i915/dsb: Re-instate DSB for LUT updates Ville Syrjala
                   ` (6 subsequent siblings)
  23 siblings, 1 reply; 52+ messages in thread
From: Ville Syrjala @ 2023-06-06 19:15 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Normally we could be in a deep PkgC state all the way up to the
point when DSB starts its execution at the transcoders undelayed
vblank. The DSB will then have to wait for the hardware to
wake up before it can execute anything. This will waste a huge
chunk of the vblank time just waiting, and risks the DSB execution
spilling into the vertical active period. That will be very bad,
especially when programming the LUTs as the anti-collision logic
will cause DSB to corrupt LUT writes during vertical active.

To avoid these problems we can instruct the DSB to pre-wake the
display engined on a specific scanline so that everything will
be 100% ready to go when we hit the transcoder's undelayed vblank.

One annoyance is that the scanline is specified as just that,
a single scanline. So if we happen to start the DSB execution
after passing said scanline no DEwake will happen and we may drop
back into some PkgC state before reaching the transcoder's undelayed
vblank. To prevent that we'll use the "force DEwake" bit to manually
force the display engined to stay awake. We'll then have to clear
the force bit again after the DSB is done (the force bit remains
effective even when the DSB is otherwise disabled).

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_color.c |  2 +-
 drivers/gpu/drm/i915/display/intel_dsb.c   | 91 +++++++++++++++++++---
 drivers/gpu/drm/i915/display/intel_dsb.h   |  3 +-
 3 files changed, 82 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
index b3dd4013d058..c5a9ea53a718 100644
--- a/drivers/gpu/drm/i915/display/intel_color.c
+++ b/drivers/gpu/drm/i915/display/intel_color.c
@@ -1824,7 +1824,7 @@ void intel_color_prepare_commit(struct intel_crtc_state *crtc_state)
 	if (!crtc_state->pre_csc_lut && !crtc_state->post_csc_lut)
 		return;
 
-	crtc_state->dsb = intel_dsb_prepare(crtc, 1024);
+	crtc_state->dsb = intel_dsb_prepare(crtc_state, 1024);
 	if (!crtc_state->dsb)
 		return;
 
diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
index 73d609507f24..3e32aa49b8eb 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb.c
+++ b/drivers/gpu/drm/i915/display/intel_dsb.c
@@ -7,11 +7,16 @@
 #include "gem/i915_gem_internal.h"
 
 #include "i915_drv.h"
+#include "i915_irq.h"
 #include "i915_reg.h"
+#include "intel_crtc.h"
 #include "intel_de.h"
 #include "intel_display_types.h"
 #include "intel_dsb.h"
 #include "intel_dsb_regs.h"
+#include "intel_vblank.h"
+#include "intel_vrr.h"
+#include "skl_watermark.h"
 
 struct i915_vma;
 
@@ -47,6 +52,8 @@ struct intel_dsb {
 	 * register.
 	 */
 	unsigned int ins_start_offset;
+
+	int dewake_scanline;
 };
 
 /**
@@ -297,17 +304,40 @@ static void intel_dsb_align_tail(struct intel_dsb *dsb)
 
 void intel_dsb_finish(struct intel_dsb *dsb)
 {
+	struct intel_crtc *crtc = dsb->crtc;
+
+	/*
+	 * DSB_FORCE_DEWAKE remains active even after DSB is
+	 * disabled, so make sure to clear it (if set during
+	 * intel_dsb_commit()).
+	 */
+	intel_dsb_reg_write_masked(dsb, DSB_PMCTRL_2(crtc->pipe, dsb->id),
+				   DSB_FORCE_DEWAKE, 0);
+
 	intel_dsb_align_tail(dsb);
 }
 
-/**
- * intel_dsb_commit() - Trigger workload execution of DSB.
- * @dsb: DSB context
- * @wait_for_vblank: wait for vblank before executing
- *
- * This function is used to do actual write to hardware using DSB.
- */
-void intel_dsb_commit(struct intel_dsb *dsb, bool wait_for_vblank)
+static int intel_dsb_dewake_scanline(const struct intel_crtc_state *crtc_state)
+{
+	struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
+	const struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode;
+	unsigned int latency = skl_watermark_max_latency(i915);
+	int vblank_start;
+
+	if (crtc_state->vrr.enable) {
+		vblank_start = intel_vrr_vmin_vblank_start(crtc_state);
+	} else {
+		vblank_start = adjusted_mode->crtc_vblank_start;
+
+		if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE)
+			vblank_start = DIV_ROUND_UP(vblank_start, 2);
+	}
+
+	return max(0, vblank_start - intel_usecs_to_scanlines(adjusted_mode, latency));
+}
+
+static void _intel_dsb_commit(struct intel_dsb *dsb, u32 ctrl,
+			      unsigned int dewake_scanline)
 {
 	struct intel_crtc *crtc = dsb->crtc;
 	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
@@ -325,14 +355,49 @@ void intel_dsb_commit(struct intel_dsb *dsb, bool wait_for_vblank)
 	}
 
 	intel_de_write_fw(dev_priv, DSB_CTRL(pipe, dsb->id),
-			  (wait_for_vblank ? DSB_WAIT_FOR_VBLANK : 0) |
-			  DSB_ENABLE);
+			  ctrl | DSB_ENABLE);
+
 	intel_de_write_fw(dev_priv, DSB_HEAD(pipe, dsb->id),
 			  i915_ggtt_offset(dsb->vma));
+
+	if (dewake_scanline >= 0) {
+		int diff, hw_dewake_scanline;
+
+		hw_dewake_scanline = intel_crtc_scanline_to_hw(crtc, dewake_scanline);
+
+		intel_de_write_fw(dev_priv, DSB_PMCTRL(pipe, dsb->id),
+				  DSB_ENABLE_DEWAKE |
+				  DSB_SCANLINE_FOR_DEWAKE(hw_dewake_scanline));
+
+		/*
+		 * Force DEwake immediately if we're already past
+		 * or close to racing past the target scanline.
+		 */
+		diff = dewake_scanline - intel_get_crtc_scanline(crtc);
+		intel_de_write_fw(dev_priv, DSB_PMCTRL_2(pipe, dsb->id),
+				  (diff >= 0 && diff < 5 ? DSB_FORCE_DEWAKE : 0) |
+				  DSB_BLOCK_DEWAKE_EXTENSION);
+	}
+
 	intel_de_write_fw(dev_priv, DSB_TAIL(pipe, dsb->id),
 			  i915_ggtt_offset(dsb->vma) + tail);
 }
 
+/**
+ * intel_dsb_commit() - Trigger workload execution of DSB.
+ * @dsb: DSB context
+ * @wait_for_vblank: wait for vblank before executing
+ *
+ * This function is used to do actual write to hardware using DSB.
+ */
+void intel_dsb_commit(struct intel_dsb *dsb,
+		      bool wait_for_vblank)
+{
+	_intel_dsb_commit(dsb,
+			  wait_for_vblank ? DSB_WAIT_FOR_VBLANK : 0,
+			  wait_for_vblank ? dsb->dewake_scanline : -1);
+}
+
 void intel_dsb_wait(struct intel_dsb *dsb)
 {
 	struct intel_crtc *crtc = dsb->crtc;
@@ -363,7 +428,7 @@ void intel_dsb_wait(struct intel_dsb *dsb)
 
 /**
  * intel_dsb_prepare() - Allocate, pin and map the DSB command buffer.
- * @crtc: the CRTC
+ * @crtc_state: the CRTC state
  * @max_cmds: number of commands we need to fit into command buffer
  *
  * This function prepare the command buffer which is used to store dsb
@@ -372,9 +437,10 @@ void intel_dsb_wait(struct intel_dsb *dsb)
  * Returns:
  * DSB context, NULL on failure
  */
-struct intel_dsb *intel_dsb_prepare(struct intel_crtc *crtc,
+struct intel_dsb *intel_dsb_prepare(const struct intel_crtc_state *crtc_state,
 				    unsigned int max_cmds)
 {
+	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
 	struct drm_i915_private *i915 = to_i915(crtc->base.dev);
 	struct drm_i915_gem_object *obj;
 	intel_wakeref_t wakeref;
@@ -420,6 +486,7 @@ struct intel_dsb *intel_dsb_prepare(struct intel_crtc *crtc,
 	dsb->size = size / 4; /* in dwords */
 	dsb->free_pos = 0;
 	dsb->ins_start_offset = 0;
+	dsb->dewake_scanline = intel_dsb_dewake_scanline(crtc_state);
 
 	return dsb;
 
diff --git a/drivers/gpu/drm/i915/display/intel_dsb.h b/drivers/gpu/drm/i915/display/intel_dsb.h
index 54e9e1dc31ee..16d80f434356 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb.h
+++ b/drivers/gpu/drm/i915/display/intel_dsb.h
@@ -11,9 +11,10 @@
 #include "i915_reg_defs.h"
 
 struct intel_crtc;
+struct intel_crtc_state;
 struct intel_dsb;
 
-struct intel_dsb *intel_dsb_prepare(struct intel_crtc *crtc,
+struct intel_dsb *intel_dsb_prepare(const struct intel_crtc_state *crtc_state,
 				    unsigned int max_cmds);
 void intel_dsb_finish(struct intel_dsb *dsb);
 void intel_dsb_cleanup(struct intel_dsb *dsb);
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [Intel-gfx] [PATCH v2 18/19] drm/i915/dsb: Re-instate DSB for LUT updates
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
                   ` (16 preceding siblings ...)
  2023-06-06 19:15 ` [Intel-gfx] [PATCH v2 17/19] drm/i915/dsb: Use DEwake to combat PkgC latency Ville Syrjala
@ 2023-06-06 19:15 ` Ville Syrjala
  2023-09-13 18:09   ` Shankar, Uma
  2023-06-06 19:15 ` [Intel-gfx] [PATCH v2 19/19] drm/i915: Do state check for color management changes Ville Syrjala
                   ` (5 subsequent siblings)
  23 siblings, 1 reply; 52+ messages in thread
From: Ville Syrjala @ 2023-06-06 19:15 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

With all the known issues sorted out we can start to use
DSB to load the LUTs.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_color.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
index c5a9ea53a718..213063872f26 100644
--- a/drivers/gpu/drm/i915/display/intel_color.c
+++ b/drivers/gpu/drm/i915/display/intel_color.c
@@ -1814,9 +1814,6 @@ void intel_color_prepare_commit(struct intel_crtc_state *crtc_state)
 	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
 	struct drm_i915_private *i915 = to_i915(crtc->base.dev);
 
-	/* FIXME DSB has issues loading LUTs, disable it for now */
-	return;
-
 	if (!crtc_state->hw.active ||
 	    intel_crtc_needs_modeset(crtc_state))
 		return;
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [Intel-gfx] [PATCH v2 19/19] drm/i915: Do state check for color management changes
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
                   ` (17 preceding siblings ...)
  2023-06-06 19:15 ` [Intel-gfx] [PATCH v2 18/19] drm/i915/dsb: Re-instate DSB for LUT updates Ville Syrjala
@ 2023-06-06 19:15 ` Ville Syrjala
  2023-06-06 22:34 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Load LUTs with DSB (rev2) Patchwork
                   ` (4 subsequent siblings)
  23 siblings, 0 replies; 52+ messages in thread
From: Ville Syrjala @ 2023-06-06 19:15 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

In order to validate LUT programming more thoroughly let's
do a state check for all color management updates as well.

Not sure we really want this outside CI. It is rather heavy
and color management updates could become rather common
with all the HDR/etc. stuff happening. Maybe we should have
an extra knob for this that we could enable in CI?

v2: Skip for initial_commit to avoid FDI dotclock
    sanity checks/etc. tripping up

Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_modeset_verify.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_modeset_verify.c b/drivers/gpu/drm/i915/display/intel_modeset_verify.c
index 138144a65a45..1ee3636f1b97 100644
--- a/drivers/gpu/drm/i915/display/intel_modeset_verify.c
+++ b/drivers/gpu/drm/i915/display/intel_modeset_verify.c
@@ -231,6 +231,8 @@ void intel_modeset_verify_crtc(struct intel_crtc *crtc,
 			       struct intel_crtc_state *new_crtc_state)
 {
 	if (!intel_crtc_needs_modeset(new_crtc_state) &&
+	    (!intel_crtc_needs_color_update(new_crtc_state) ||
+	     new_crtc_state->inherited) &&
 	    !intel_crtc_needs_fastset(new_crtc_state))
 		return;
 
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Load LUTs with DSB (rev2)
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
                   ` (18 preceding siblings ...)
  2023-06-06 19:15 ` [Intel-gfx] [PATCH v2 19/19] drm/i915: Do state check for color management changes Ville Syrjala
@ 2023-06-06 22:34 ` Patchwork
  2023-06-06 22:34 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
                   ` (3 subsequent siblings)
  23 siblings, 0 replies; 52+ messages in thread
From: Patchwork @ 2023-06-06 22:34 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Load LUTs with DSB (rev2)
URL   : https://patchwork.freedesktop.org/series/113042/
State : warning

== Summary ==

Error: dim checkpatch failed
35a5ec5257a0 drm/i915: Constify LUT entries in checker
018aa36a0ba6 drm/i915/dsb: Use non-locked register access
7f1c6c879158 drm/i915/dsb: Dump the DSB command buffer when DSB fails
-:34: CHECK:SPACING: spaces preferred around that '+' (ctx:VxV)
#34: FILE: drivers/gpu/drm/i915/display/intel_dsb.c:108:
+			    i * 4, buf[i], buf[i+1], buf[i+2], buf[i+3]);
 			                        ^

-:34: CHECK:SPACING: spaces preferred around that '+' (ctx:VxV)
#34: FILE: drivers/gpu/drm/i915/display/intel_dsb.c:108:
+			    i * 4, buf[i], buf[i+1], buf[i+2], buf[i+3]);
 			                                  ^

-:34: CHECK:SPACING: spaces preferred around that '+' (ctx:VxV)
#34: FILE: drivers/gpu/drm/i915/display/intel_dsb.c:108:
+			    i * 4, buf[i], buf[i+1], buf[i+2], buf[i+3]);
 			                                            ^

total: 0 errors, 0 warnings, 3 checks, 46 lines checked
0a4d1ee3a7dc drm/i915/dsb: Define more DSB bits
38081eebc4d0 drm/i915/dsb: Define the contents of some intstructions bit better
9f17b48cfa11 drm/i915/dsb: Avoid corrupting the first register write
c42dd35aefce drm/i915/dsb: Don't use indexed writes when byte enables are not all set
3fbf457bbf91 drm/i915/dsb: Introduce intel_dsb_noop()
dac21505a69f drm/i915/dsb: Introduce intel_dsb_reg_write_masked()
31801d2a8474 drm/i915/dsb: Add support for non-posted DSB registers writes
855a48b16b6a drm/i915/dsb: Don't use DSB to load the LUTs during full modeset
2c4cd85c5f78 drm/i915/dsb: Load LUTs using the DSB during vblank
cfe38d031292 drm/i915/dsb: Use non-posted register writes for legacy LUT
dd012e35d761 drm/i915/dsb: Evade transcoder undelayed vblank when using DSB
941cfcdee747 drm/i915: Introduce skl_watermark_max_latency()
2fb1138ee512 drm/i915: Introudce intel_crtc_scanline_to_hw()
952b6004f60c drm/i915/dsb: Use DEwake to combat PkgC latency
d88af6de0a61 drm/i915/dsb: Re-instate DSB for LUT updates
c745478e5c12 drm/i915: Do state check for color management changes



^ permalink raw reply	[flat|nested] 52+ messages in thread

* [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Load LUTs with DSB (rev2)
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
                   ` (19 preceding siblings ...)
  2023-06-06 22:34 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Load LUTs with DSB (rev2) Patchwork
@ 2023-06-06 22:34 ` Patchwork
  2023-06-06 22:48 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
                   ` (2 subsequent siblings)
  23 siblings, 0 replies; 52+ messages in thread
From: Patchwork @ 2023-06-06 22:34 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Load LUTs with DSB (rev2)
URL   : https://patchwork.freedesktop.org/series/113042/
State : warning

== Summary ==

Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+drivers/gpu/drm/i915/display/intel_display_types.h:1957:24: warning: trying to copy expression type 31
+drivers/gpu/drm/i915/display/intel_display_types.h:1957:24: warning: trying to copy expression type 31
+./drivers/gpu/drm/i915/intel_uncore.h:346:1: warning: trying to copy expression type 31
+./drivers/gpu/drm/i915/intel_uncore.h:346:1: warning: trying to copy expression type 31
+./drivers/gpu/drm/i915/intel_uncore.h:346:1: warning: trying to copy expression type 31
+./drivers/gpu/drm/i915/intel_uncore.h:346:1: warning: trying to copy expression type 31
+./drivers/gpu/drm/i915/intel_uncore.h:346:1: warning: trying to copy expression type 31
+./drivers/gpu/drm/i915/intel_uncore.h:351:1: warning: trying to copy expression type 31
+./drivers/gpu/drm/i915/intel_uncore.h:351:1: warning: trying to copy expression type 31
+./drivers/gpu/drm/i915/intel_uncore.h:351:1: warning: trying to copy expression type 31
+./drivers/gpu/drm/i915/intel_uncore.h:351:1: warning: trying to copy expression type 31
+./drivers/gpu/drm/i915/intel_uncore.h:351:1: warning: trying to copy expression type 31
+./drivers/gpu/drm/i915/intel_uncore.h:351:1: warning: trying to copy expression type 31
+./drivers/gpu/drm/i915/intel_uncore.h:351:1: warning: trying to copy expression type 31
+./drivers/gpu/drm/i915/intel_uncore.h:351:1: warning: trying to copy expression type 31
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:55:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:55:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:55:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:55:1: warning: unreplaced symbol 're



^ permalink raw reply	[flat|nested] 52+ messages in thread

* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Load LUTs with DSB (rev2)
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
                   ` (20 preceding siblings ...)
  2023-06-06 22:34 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
@ 2023-06-06 22:48 ` Patchwork
  2023-06-07 14:02 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
  2023-09-27 16:05 ` [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjälä
  23 siblings, 0 replies; 52+ messages in thread
From: Patchwork @ 2023-06-06 22:48 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 5665 bytes --]

== Series Details ==

Series: drm/i915: Load LUTs with DSB (rev2)
URL   : https://patchwork.freedesktop.org/series/113042/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_13238 -> Patchwork_113042v2
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/index.html

Participating hosts (41 -> 39)
------------------------------

  Missing    (2): bat-rpls-2 fi-snb-2520m 

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

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

### IGT changes ###

#### Issues hit ####

  * igt@kms_chamelium_hpd@common-hpd-after-suspend:
    - bat-dg2-11:         NOTRUN -> [SKIP][1] ([i915#7828])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/bat-dg2-11/igt@kms_chamelium_hpd@common-hpd-after-suspend.html
    - bat-adlm-1:         NOTRUN -> [SKIP][2] ([i915#7828])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/bat-adlm-1/igt@kms_chamelium_hpd@common-hpd-after-suspend.html

  * igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-c-dp-1:
    - bat-dg2-8:          [PASS][3] -> [FAIL][4] ([i915#7932])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/bat-dg2-8/igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-c-dp-1.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/bat-dg2-8/igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-c-dp-1.html

  * igt@kms_pipe_crc_basic@suspend-read-crc:
    - bat-adlm-1:         NOTRUN -> [SKIP][5] ([i915#1845])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/bat-adlm-1/igt@kms_pipe_crc_basic@suspend-read-crc.html

  
#### Possible fixes ####

  * igt@i915_selftest@live@hangcheck:
    - bat-dg2-11:         [ABORT][6] ([i915#7913] / [i915#7979]) -> [PASS][7]
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/bat-dg2-11/igt@i915_selftest@live@hangcheck.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/bat-dg2-11/igt@i915_selftest@live@hangcheck.html

  * igt@i915_selftest@live@slpc:
    - bat-rpls-1:         [DMESG-WARN][8] ([i915#6367]) -> [PASS][9]
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/bat-rpls-1/igt@i915_selftest@live@slpc.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/bat-rpls-1/igt@i915_selftest@live@slpc.html

  * igt@i915_selftest@live@workarounds:
    - bat-adlm-1:         [INCOMPLETE][10] ([i915#4983] / [i915#7677]) -> [PASS][11]
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/bat-adlm-1/igt@i915_selftest@live@workarounds.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/bat-adlm-1/igt@i915_selftest@live@workarounds.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
  [i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
  [i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
  [i915#6868]: https://gitlab.freedesktop.org/drm/intel/issues/6868
  [i915#7677]: https://gitlab.freedesktop.org/drm/intel/issues/7677
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
  [i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
  [i915#7932]: https://gitlab.freedesktop.org/drm/intel/issues/7932
  [i915#7979]: https://gitlab.freedesktop.org/drm/intel/issues/7979
  [i915#8260]: https://gitlab.freedesktop.org/drm/intel/issues/8260


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

  * Linux: CI_DRM_13238 -> Patchwork_113042v2

  CI-20190529: 20190529
  CI_DRM_13238: 8c0b302811d744b945dcb6d78164a76188914db9 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7320: 1c96b08a4cde6f2d49824a8cc3303bd860617b52 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_113042v2: 8c0b302811d744b945dcb6d78164a76188914db9 @ git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

674b64159bd8 drm/i915: Do state check for color management changes
2e1001ec3012 drm/i915/dsb: Re-instate DSB for LUT updates
6e43a7fee4a7 drm/i915/dsb: Use DEwake to combat PkgC latency
5ec7a070502b drm/i915: Introudce intel_crtc_scanline_to_hw()
50f7843e76d9 drm/i915: Introduce skl_watermark_max_latency()
3f7be7a944e2 drm/i915/dsb: Evade transcoder undelayed vblank when using DSB
846fdd8f2a28 drm/i915/dsb: Use non-posted register writes for legacy LUT
cc7c791acea8 drm/i915/dsb: Load LUTs using the DSB during vblank
807de1a55e42 drm/i915/dsb: Don't use DSB to load the LUTs during full modeset
3d819e893e5e drm/i915/dsb: Add support for non-posted DSB registers writes
a80ebb27076d drm/i915/dsb: Introduce intel_dsb_reg_write_masked()
ded9559af5c6 drm/i915/dsb: Introduce intel_dsb_noop()
400f9b4d04a6 drm/i915/dsb: Don't use indexed writes when byte enables are not all set
5933dcfa8f94 drm/i915/dsb: Avoid corrupting the first register write
97f695db6320 drm/i915/dsb: Define the contents of some intstructions bit better
869a10664145 drm/i915/dsb: Define more DSB bits
99bd1791ac1c drm/i915/dsb: Dump the DSB command buffer when DSB fails
871d9c000850 drm/i915/dsb: Use non-locked register access
aee9c9b77994 drm/i915: Constify LUT entries in checker

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/index.html

[-- Attachment #2: Type: text/html, Size: 6276 bytes --]

^ permalink raw reply	[flat|nested] 52+ messages in thread

* [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Load LUTs with DSB (rev2)
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
                   ` (21 preceding siblings ...)
  2023-06-06 22:48 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
@ 2023-06-07 14:02 ` Patchwork
  2023-09-27 16:05 ` [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjälä
  23 siblings, 0 replies; 52+ messages in thread
From: Patchwork @ 2023-06-07 14:02 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 15586 bytes --]

== Series Details ==

Series: drm/i915: Load LUTs with DSB (rev2)
URL   : https://patchwork.freedesktop.org/series/113042/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_13238_full -> Patchwork_113042v2_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_113042v2_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_113042v2_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (7 -> 7)
------------------------------

  No changes in participating hosts

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_113042v2_full:

### IGT changes ###

#### Possible regressions ####

  * igt@gem_eio@suspend:
    - shard-glk:          [PASS][1] -> [FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-glk8/igt@gem_eio@suspend.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-glk9/igt@gem_eio@suspend.html

  
#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@kms_big_fb@linear-8bpp-rotate-270:
    - {shard-dg1}:        [SKIP][3] ([i915#3638]) -> [ABORT][4] +3 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-dg1-12/igt@kms_big_fb@linear-8bpp-rotate-270.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-dg1-19/igt@kms_big_fb@linear-8bpp-rotate-270.html

  * igt@kms_big_fb@x-tiled-8bpp-rotate-0:
    - {shard-dg1}:        NOTRUN -> [ABORT][5] +1 similar issue
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-dg1-14/igt@kms_big_fb@x-tiled-8bpp-rotate-0.html

  * igt@kms_color@ctm-0-75@pipe-d:
    - {shard-dg1}:        [PASS][6] -> [DMESG-WARN][7] +11 similar issues
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-dg1-19/igt@kms_color@ctm-0-75@pipe-d.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-dg1-17/igt@kms_color@ctm-0-75@pipe-d.html

  * igt@kms_color@legacy-gamma@pipe-a:
    - {shard-dg1}:        [PASS][8] -> [ABORT][9] +10 similar issues
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-dg1-13/igt@kms_color@legacy-gamma@pipe-a.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-dg1-15/igt@kms_color@legacy-gamma@pipe-a.html

  * igt@kms_color@legacy-gamma@pipe-c:
    - {shard-dg1}:        [PASS][10] -> [DMESG-FAIL][11] +2 similar issues
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-dg1-13/igt@kms_color@legacy-gamma@pipe-c.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-dg1-15/igt@kms_color@legacy-gamma@pipe-c.html

  * igt@kms_plane@pixel-format-source-clamping@pipe-a-planes:
    - {shard-dg1}:        [FAIL][12] ([i915#1623]) -> [ABORT][13]
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-dg1-14/igt@kms_plane@pixel-format-source-clamping@pipe-a-planes.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-dg1-14/igt@kms_plane@pixel-format-source-clamping@pipe-a-planes.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_persistence@engines-hang:
    - shard-snb:          NOTRUN -> [SKIP][14] ([fdo#109271] / [i915#1099])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-snb6/igt@gem_ctx_persistence@engines-hang.html

  * igt@gem_exec_fair@basic-none-share@rcs0:
    - shard-glk:          [PASS][15] -> [FAIL][16] ([i915#2842])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-glk5/igt@gem_exec_fair@basic-none-share@rcs0.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-glk6/igt@gem_exec_fair@basic-none-share@rcs0.html

  * igt@gem_exec_fair@basic-pace-solo@rcs0:
    - shard-apl:          [PASS][17] -> [FAIL][18] ([i915#2842])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-apl7/igt@gem_exec_fair@basic-pace-solo@rcs0.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-apl1/igt@gem_exec_fair@basic-pace-solo@rcs0.html

  * igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-vga:
    - shard-snb:          NOTRUN -> [SKIP][19] ([fdo#109271] / [i915#4579]) +11 similar issues
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-snb2/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-vga.html

  * igt@kms_big_fb@y-tiled-64bpp-rotate-180:
    - shard-snb:          NOTRUN -> [SKIP][20] ([fdo#109271]) +35 similar issues
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-snb6/igt@kms_big_fb@y-tiled-64bpp-rotate-180.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
    - shard-glk:          [PASS][21] -> [FAIL][22] ([i915#2346])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-glk2/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-glk3/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html

  * igt@kms_flip@flip-vs-expired-vblank@c-hdmi-a1:
    - shard-glk:          [PASS][23] -> [FAIL][24] ([i915#79])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-glk8/igt@kms_flip@flip-vs-expired-vblank@c-hdmi-a1.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-glk1/igt@kms_flip@flip-vs-expired-vblank@c-hdmi-a1.html

  * igt@kms_flip@flip-vs-suspend@c-hdmi-a2:
    - shard-glk:          [PASS][25] -> [FAIL][26] ([fdo#103375]) +6 similar issues
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-glk8/igt@kms_flip@flip-vs-suspend@c-hdmi-a2.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-glk9/igt@kms_flip@flip-vs-suspend@c-hdmi-a2.html

  * igt@perf_pmu@busy-check-all@rcs0:
    - shard-glk:          [PASS][27] -> [FAIL][28] ([i915#8107]) +3 similar issues
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-glk8/igt@perf_pmu@busy-check-all@rcs0.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-glk9/igt@perf_pmu@busy-check-all@rcs0.html

  * igt@perf_pmu@cpu-hotplug:
    - shard-glk:          [PASS][29] -> [TIMEOUT][30] ([i915#8116])
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-glk8/igt@perf_pmu@cpu-hotplug.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-glk9/igt@perf_pmu@cpu-hotplug.html

  
#### Possible fixes ####

  * igt@gem_barrier_race@remote-request@rcs0:
    - {shard-dg1}:        [ABORT][31] ([i915#7461] / [i915#8234]) -> [PASS][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-dg1-18/igt@gem_barrier_race@remote-request@rcs0.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-dg1-14/igt@gem_barrier_race@remote-request@rcs0.html

  * igt@gem_exec_fair@basic-none-share@rcs0:
    - {shard-rkl}:        [FAIL][33] ([i915#2842]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-rkl-4/igt@gem_exec_fair@basic-none-share@rcs0.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-rkl-2/igt@gem_exec_fair@basic-none-share@rcs0.html

  * igt@gem_exec_fair@basic-none-solo@rcs0:
    - shard-apl:          [FAIL][35] ([i915#2842]) -> [PASS][36]
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-apl4/igt@gem_exec_fair@basic-none-solo@rcs0.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-apl1/igt@gem_exec_fair@basic-none-solo@rcs0.html

  * igt@i915_pm_dc@dc9-dpms:
    - {shard-tglu}:       [SKIP][37] ([i915#4281]) -> [PASS][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-tglu-7/igt@i915_pm_dc@dc9-dpms.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-tglu-4/igt@i915_pm_dc@dc9-dpms.html

  * igt@i915_pm_rc6_residency@rc6-idle@rcs0:
    - {shard-dg1}:        [FAIL][39] ([i915#3591]) -> [PASS][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-dg1-18/igt@i915_pm_rc6_residency@rc6-idle@rcs0.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-dg1-17/igt@i915_pm_rc6_residency@rc6-idle@rcs0.html

  * igt@i915_pm_rpm@modeset-non-lpsp-stress:
    - {shard-rkl}:        [SKIP][41] ([i915#1397]) -> [PASS][42]
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-rkl-7/igt@i915_pm_rpm@modeset-non-lpsp-stress.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-rkl-4/igt@i915_pm_rpm@modeset-non-lpsp-stress.html
    - {shard-dg1}:        [SKIP][43] ([i915#1397]) -> [PASS][44]
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-dg1-19/igt@i915_pm_rpm@modeset-non-lpsp-stress.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-dg1-16/igt@i915_pm_rpm@modeset-non-lpsp-stress.html

  * igt@i915_pm_rps@reset:
    - shard-snb:          [INCOMPLETE][45] ([i915#7790]) -> [PASS][46]
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-snb1/igt@i915_pm_rps@reset.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-snb6/igt@i915_pm_rps@reset.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
    - shard-apl:          [FAIL][47] ([i915#2346]) -> [PASS][48]
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-apl6/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-apl2/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html

  * igt@kms_fbcon_fbt@fbc-suspend:
    - shard-apl:          [FAIL][49] ([i915#4767]) -> [PASS][50]
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-apl6/igt@kms_fbcon_fbt@fbc-suspend.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/shard-apl3/igt@kms_fbcon_fbt@fbc-suspend.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
  [fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
  [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1099]: https://gitlab.freedesktop.org/drm/intel/issues/1099
  [i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
  [i915#1623]: https://gitlab.freedesktop.org/drm/intel/issues/1623
  [i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
  [i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
  [i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
  [i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
  [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
  [i915#3063]: https://gitlab.freedesktop.org/drm/intel/issues/3063
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
  [i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3591]: https://gitlab.freedesktop.org/drm/intel/issues/3591
  [i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
  [i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
  [i915#3804]: https://gitlab.freedesktop.org/drm/intel/issues/3804
  [i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
  [i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
  [i915#3989]: https://gitlab.freedesktop.org/drm/intel/issues/3989
  [i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
  [i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
  [i915#4258]: https://gitlab.freedesktop.org/drm/intel/issues/4258
  [i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
  [i915#4281]: https://gitlab.freedesktop.org/drm/intel/issues/4281
  [i915#4423]: https://gitlab.freedesktop.org/drm/intel/issues/4423
  [i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
  [i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
  [i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
  [i915#4767]: https://gitlab.freedesktop.org/drm/intel/issues/4767
  [i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
  [i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
  [i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
  [i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
  [i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
  [i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
  [i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
  [i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
  [i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
  [i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
  [i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
  [i915#7461]: https://gitlab.freedesktop.org/drm/intel/issues/7461
  [i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
  [i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
  [i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
  [i915#7790]: https://gitlab.freedesktop.org/drm/intel/issues/7790
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
  [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
  [i915#8011]: https://gitlab.freedesktop.org/drm/intel/issues/8011
  [i915#8107]: https://gitlab.freedesktop.org/drm/intel/issues/8107
  [i915#8116]: https://gitlab.freedesktop.org/drm/intel/issues/8116
  [i915#8234]: https://gitlab.freedesktop.org/drm/intel/issues/8234
  [i915#8247]: https://gitlab.freedesktop.org/drm/intel/issues/8247
  [i915#8292]: https://gitlab.freedesktop.org/drm/intel/issues/8292
  [i915#8502]: https://gitlab.freedesktop.org/drm/intel/issues/8502
  [i915#8516]: https://gitlab.freedesktop.org/drm/intel/issues/8516


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

  * Linux: CI_DRM_13238 -> Patchwork_113042v2

  CI-20190529: 20190529
  CI_DRM_13238: 8c0b302811d744b945dcb6d78164a76188914db9 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7320: 1c96b08a4cde6f2d49824a8cc3303bd860617b52 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_113042v2: 8c0b302811d744b945dcb6d78164a76188914db9 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113042v2/index.html

[-- Attachment #2: Type: text/html, Size: 14168 bytes --]

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 02/19] drm/i915/dsb: Use non-locked register access
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 02/19] drm/i915/dsb: Use non-locked register access Ville Syrjala
@ 2023-06-08 11:46   ` Jani Nikula
  2023-09-11 20:22     ` Shankar, Uma
  0 siblings, 1 reply; 52+ messages in thread
From: Jani Nikula @ 2023-06-08 11:46 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx

On Tue, 06 Jun 2023, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Avoid the locking overhead for DSB registers. We don't need the locks
> and intel_dsb_commit() in particular needs to be called from the
> vblank evade critical section and thus needs to be fast.

Mmmh, I always find it slightly puzzling to encounter _fw calls in code,
wondering what the rationale was, and why we can use the _fw variants.

Should we start adding comments explaining why?

BR,
Jani.


>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dsb.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
> index bed058d2c3ac..97e593d9f100 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> @@ -96,7 +96,7 @@ static bool assert_dsb_has_room(struct intel_dsb *dsb)
>  static bool is_dsb_busy(struct drm_i915_private *i915, enum pipe pipe,
>  			enum dsb_id id)
>  {
> -	return intel_de_read(i915, DSB_CTRL(pipe, id)) & DSB_STATUS_BUSY;
> +	return intel_de_read_fw(i915, DSB_CTRL(pipe, id)) & DSB_STATUS_BUSY;
>  }
>  
>  static void intel_dsb_emit(struct intel_dsb *dsb, u32 ldw, u32 udw)
> @@ -243,13 +243,13 @@ void intel_dsb_commit(struct intel_dsb *dsb, bool wait_for_vblank)
>  		return;
>  	}
>  
> -	intel_de_write(dev_priv, DSB_CTRL(pipe, dsb->id),
> -		       (wait_for_vblank ? DSB_WAIT_FOR_VBLANK : 0) |
> -		       DSB_ENABLE);
> -	intel_de_write(dev_priv, DSB_HEAD(pipe, dsb->id),
> -		       i915_ggtt_offset(dsb->vma));
> -	intel_de_write(dev_priv, DSB_TAIL(pipe, dsb->id),
> -		       i915_ggtt_offset(dsb->vma) + tail);
> +	intel_de_write_fw(dev_priv, DSB_CTRL(pipe, dsb->id),
> +			  (wait_for_vblank ? DSB_WAIT_FOR_VBLANK : 0) |
> +			  DSB_ENABLE);
> +	intel_de_write_fw(dev_priv, DSB_HEAD(pipe, dsb->id),
> +			  i915_ggtt_offset(dsb->vma));
> +	intel_de_write_fw(dev_priv, DSB_TAIL(pipe, dsb->id),
> +			  i915_ggtt_offset(dsb->vma) + tail);
>  }
>  
>  void intel_dsb_wait(struct intel_dsb *dsb)
> @@ -266,7 +266,7 @@ void intel_dsb_wait(struct intel_dsb *dsb)
>  	/* Attempt to reset it */
>  	dsb->free_pos = 0;
>  	dsb->ins_start_offset = 0;
> -	intel_de_write(dev_priv, DSB_CTRL(pipe, dsb->id), 0);
> +	intel_de_write_fw(dev_priv, DSB_CTRL(pipe, dsb->id), 0);
>  }
>  
>  /**

-- 
Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 06/19] drm/i915/dsb: Avoid corrupting the first register write
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 06/19] drm/i915/dsb: Avoid corrupting the first register write Ville Syrjala
@ 2023-07-05  9:39   ` Manna, Animesh
  2023-07-05  9:46     ` Manna, Animesh
  0 siblings, 1 reply; 52+ messages in thread
From: Manna, Animesh @ 2023-07-05  9:39 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Wednesday, June 7, 2023 12:45 AM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH v2 06/19] drm/i915/dsb: Avoid corrupting the first
> register write
> 
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> i915_gem_object_create_internal() does not hand out zeroed memory. Thus
> we may confuse whatever stale garbage is in there as a previous register
> write and mistakenly handle the first actual register write as an indexed
> write. This can end up corrupting the instruction sufficiently well to lose the
> entire register write.
> 
> Make sure we've actually emitted a previous instruction before attemting
> indexed register write merging.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

LGTM.
Signed-off-by: Animesh Manna <animesh.manna@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_dsb.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c
> b/drivers/gpu/drm/i915/display/intel_dsb.c
> index 093b2567883d..a20ae5313d23 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> @@ -141,6 +141,14 @@ static bool intel_dsb_prev_ins_is_write(struct
> intel_dsb *dsb,
>  	const u32 *buf = dsb->cmd_buf;
>  	u32 prev_opcode, prev_reg;
> 
> +	/*
> +	 * Nothing emitted yet? Must check before looking
> +	 * at the actual data since i915_gem_object_create_internal()
> +	 * does *not* give you zeroed memory!
> +	 */
> +	if (dsb->free_pos == 0)
> +		return false;
> +
>  	prev_opcode = buf[dsb->ins_start_offset + 1] >>
> DSB_OPCODE_SHIFT;
>  	prev_reg = buf[dsb->ins_start_offset + 1] & DSB_REG_VALUE_MASK;
> 
> --
> 2.39.3


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 01/19] drm/i915: Constify LUT entries in checker
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 01/19] drm/i915: Constify LUT entries in checker Ville Syrjala
@ 2023-07-05  9:43   ` Manna, Animesh
  0 siblings, 0 replies; 52+ messages in thread
From: Manna, Animesh @ 2023-07-05  9:43 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Wednesday, June 7, 2023 12:45 AM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH v2 01/19] drm/i915: Constify LUT entries in
> checker
> 
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The LUT checker doesn't modify the LUT entries so make them const.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

LGTM.
Reviewed-by: Animesh Manna <animesh.manna@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_color.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_color.c
> b/drivers/gpu/drm/i915/display/intel_color.c
> index 8966e6560516..2d5640aab4d8 100644
> --- a/drivers/gpu/drm/i915/display/intel_color.c
> +++ b/drivers/gpu/drm/i915/display/intel_color.c
> @@ -2848,16 +2848,16 @@ static int icl_pre_csc_lut_precision(const struct
> intel_crtc_state *crtc_state)
>  	return 16;
>  }
> 
> -static bool err_check(struct drm_color_lut *lut1,
> -		      struct drm_color_lut *lut2, u32 err)
> +static bool err_check(const struct drm_color_lut *lut1,
> +		      const struct drm_color_lut *lut2, u32 err)
>  {
>  	return ((abs((long)lut2->red - lut1->red)) <= err) &&
>  		((abs((long)lut2->blue - lut1->blue)) <= err) &&
>  		((abs((long)lut2->green - lut1->green)) <= err);  }
> 
> -static bool intel_lut_entries_equal(struct drm_color_lut *lut1,
> -				    struct drm_color_lut *lut2,
> +static bool intel_lut_entries_equal(const struct drm_color_lut *lut1,
> +				    const struct drm_color_lut *lut2,
>  				    int lut_size, u32 err)
>  {
>  	int i;
> @@ -2874,7 +2874,7 @@ static bool intel_lut_equal(const struct
> drm_property_blob *blob1,
>  			    const struct drm_property_blob *blob2,
>  			    int check_size, int precision)
>  {
> -	struct drm_color_lut *lut1, *lut2;
> +	const struct drm_color_lut *lut1, *lut2;
>  	int lut_size1, lut_size2;
>  	u32 err;
> 
> --
> 2.39.3


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 06/19] drm/i915/dsb: Avoid corrupting the first register write
  2023-07-05  9:39   ` Manna, Animesh
@ 2023-07-05  9:46     ` Manna, Animesh
  0 siblings, 0 replies; 52+ messages in thread
From: Manna, Animesh @ 2023-07-05  9:46 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx



> -----Original Message-----
> From: Manna, Animesh
> Sent: Wednesday, July 5, 2023 3:10 PM
> To: Ville Syrjala <ville.syrjala@linux.intel.com>; intel-
> gfx@lists.freedesktop.org
> Subject: RE: [Intel-gfx] [PATCH v2 06/19] drm/i915/dsb: Avoid corrupting the
> first register write
> 
> 
> 
> > -----Original Message-----
> > From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of
> > Ville Syrjala
> > Sent: Wednesday, June 7, 2023 12:45 AM
> > To: intel-gfx@lists.freedesktop.org
> > Subject: [Intel-gfx] [PATCH v2 06/19] drm/i915/dsb: Avoid corrupting
> > the first register write
> >
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > i915_gem_object_create_internal() does not hand out zeroed memory.
> > Thus we may confuse whatever stale garbage is in there as a previous
> > register write and mistakenly handle the first actual register write
> > as an indexed write. This can end up corrupting the instruction
> > sufficiently well to lose the entire register write.
> >
> > Make sure we've actually emitted a previous instruction before
> > attemting indexed register write merging.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> LGTM.
> Signed-off-by: Animesh Manna <animesh.manna@intel.com>

Correction! By mistake added my Signed-off-by.

Reviewed-by: Animesh Manna <animesh.manna@intel.com>

> 
> > ---
> >  drivers/gpu/drm/i915/display/intel_dsb.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c
> > b/drivers/gpu/drm/i915/display/intel_dsb.c
> > index 093b2567883d..a20ae5313d23 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> > @@ -141,6 +141,14 @@ static bool intel_dsb_prev_ins_is_write(struct
> > intel_dsb *dsb,
> >  	const u32 *buf = dsb->cmd_buf;
> >  	u32 prev_opcode, prev_reg;
> >
> > +	/*
> > +	 * Nothing emitted yet? Must check before looking
> > +	 * at the actual data since i915_gem_object_create_internal()
> > +	 * does *not* give you zeroed memory!
> > +	 */
> > +	if (dsb->free_pos == 0)
> > +		return false;
> > +
> >  	prev_opcode = buf[dsb->ins_start_offset + 1] >>
> DSB_OPCODE_SHIFT;
> >  	prev_reg = buf[dsb->ins_start_offset + 1] & DSB_REG_VALUE_MASK;
> >
> > --
> > 2.39.3


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 03/19] drm/i915/dsb: Dump the DSB command buffer when DSB fails
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 03/19] drm/i915/dsb: Dump the DSB command buffer when DSB fails Ville Syrjala
@ 2023-07-11  4:55   ` Manna, Animesh
  0 siblings, 0 replies; 52+ messages in thread
From: Manna, Animesh @ 2023-07-11  4:55 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Wednesday, June 7, 2023 12:45 AM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH v2 03/19] drm/i915/dsb: Dump the DSB command
> buffer when DSB fails
> 
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Dump the full DSB command buffers and head/tail pointers if the the DSB
> hasn't completed its job in time.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

LGTM.
Reviewed-by: Animesh Manna <animesh.manna@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_dsb.c | 33 +++++++++++++++++++++---
>  1 file changed, 30 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c
> b/drivers/gpu/drm/i915/display/intel_dsb.c
> index 97e593d9f100..42911abcd3ab 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> @@ -93,6 +93,22 @@ static bool assert_dsb_has_room(struct intel_dsb
> *dsb)
>  			 crtc->base.base.id, crtc->base.name, dsb->id);  }
> 
> +static void intel_dsb_dump(struct intel_dsb *dsb) {
> +	struct intel_crtc *crtc = dsb->crtc;
> +	struct drm_i915_private *i915 = to_i915(crtc->base.dev);
> +	const u32 *buf = dsb->cmd_buf;
> +	int i;
> +
> +	drm_dbg_kms(&i915->drm, "[CRTC:%d:%s] DSB %d commands {\n",
> +		    crtc->base.base.id, crtc->base.name, dsb->id);
> +	for (i = 0; i < ALIGN(dsb->free_pos, 64 / 4); i += 4)
> +		drm_dbg_kms(&i915->drm,
> +			    " 0x%08x: 0x%08x 0x%08x 0x%08x 0x%08x\n",
> +			    i * 4, buf[i], buf[i+1], buf[i+2], buf[i+3]);
> +	drm_dbg_kms(&i915->drm, "}\n");
> +}
> +
>  static bool is_dsb_busy(struct drm_i915_private *i915, enum pipe pipe,
>  			enum dsb_id id)
>  {
> @@ -258,10 +274,21 @@ void intel_dsb_wait(struct intel_dsb *dsb)
>  	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
>  	enum pipe pipe = crtc->pipe;
> 
> -	if (wait_for(!is_dsb_busy(dev_priv, pipe, dsb->id), 1))
> +	if (wait_for(!is_dsb_busy(dev_priv, pipe, dsb->id), 1)) {
> +		u32 offset = i915_ggtt_offset(dsb->vma);
> +
> +		intel_de_write_fw(dev_priv, DSB_CTRL(pipe, dsb->id),
> +				  DSB_ENABLE | DSB_HALT);
> +
>  		drm_err(&dev_priv->drm,
> -			"[CRTC:%d:%s] DSB %d timed out waiting for idle\n",
> -			crtc->base.base.id, crtc->base.name, dsb->id);
> +			"[CRTC:%d:%s] DSB %d timed out waiting for idle
> (current head=0x%x, head=0x%x, tail=0x%x)\n",
> +			crtc->base.base.id, crtc->base.name, dsb->id,
> +			intel_de_read_fw(dev_priv,
> DSB_CURRENT_HEAD(pipe, dsb->id)) - offset,
> +			intel_de_read_fw(dev_priv, DSB_HEAD(pipe, dsb-
> >id)) - offset,
> +			intel_de_read_fw(dev_priv, DSB_TAIL(pipe, dsb->id))
> - offset);
> +
> +		intel_dsb_dump(dsb);
> +	}
> 
>  	/* Attempt to reset it */
>  	dsb->free_pos = 0;
> --
> 2.39.3


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 07/19] drm/i915/dsb: Don't use indexed writes when byte enables are not all set
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 07/19] drm/i915/dsb: Don't use indexed writes when byte enables are not all set Ville Syrjala
@ 2023-07-11  5:00   ` Manna, Animesh
  0 siblings, 0 replies; 52+ messages in thread
From: Manna, Animesh @ 2023-07-11  5:00 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Wednesday, June 7, 2023 12:45 AM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH v2 07/19] drm/i915/dsb: Don't use indexed writes
> when byte enables are not all set
> 
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The indexed write instruction doesn't support byte-enables, so if the non-
> indexed write used those we must not convert it to an indexed write.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

LGTM.
Reviewed-by: Animesh Manna <animesh.manna@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_dsb.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c
> b/drivers/gpu/drm/i915/display/intel_dsb.c
> index a20ae5313d23..22c716ee75e2 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> @@ -149,7 +149,7 @@ static bool intel_dsb_prev_ins_is_write(struct
> intel_dsb *dsb,
>  	if (dsb->free_pos == 0)
>  		return false;
> 
> -	prev_opcode = buf[dsb->ins_start_offset + 1] >>
> DSB_OPCODE_SHIFT;
> +	prev_opcode = buf[dsb->ins_start_offset + 1] &
> ~DSB_REG_VALUE_MASK;
>  	prev_reg = buf[dsb->ins_start_offset + 1] & DSB_REG_VALUE_MASK;
> 
>  	return prev_opcode == opcode && prev_reg ==
> i915_mmio_reg_offset(reg); @@ -157,12 +157,18 @@ static bool
> intel_dsb_prev_ins_is_write(struct intel_dsb *dsb,
> 
>  static bool intel_dsb_prev_ins_is_mmio_write(struct intel_dsb *dsb,
> i915_reg_t reg)  {
> -	return intel_dsb_prev_ins_is_write(dsb,
> DSB_OPCODE_MMIO_WRITE, reg);
> +	/* only full byte-enables can be converted to indexed writes */
> +	return intel_dsb_prev_ins_is_write(dsb,
> +					   DSB_OPCODE_MMIO_WRITE <<
> DSB_OPCODE_SHIFT |
> +					   DSB_BYTE_EN <<
> DSB_BYTE_EN_SHIFT,
> +					   reg);
>  }
> 
>  static bool intel_dsb_prev_ins_is_indexed_write(struct intel_dsb *dsb,
> i915_reg_t reg)  {
> -	return intel_dsb_prev_ins_is_write(dsb,
> DSB_OPCODE_INDEXED_WRITE, reg);
> +	return intel_dsb_prev_ins_is_write(dsb,
> +					   DSB_OPCODE_INDEXED_WRITE <<
> DSB_OPCODE_SHIFT,
> +					   reg);
>  }
> 
>  /**
> --
> 2.39.3


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 10/19] drm/i915/dsb: Add support for non-posted DSB registers writes
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 10/19] drm/i915/dsb: Add support for non-posted DSB registers writes Ville Syrjala
@ 2023-07-11  5:43   ` Manna, Animesh
  2023-09-11 21:04     ` Shankar, Uma
  0 siblings, 1 reply; 52+ messages in thread
From: Manna, Animesh @ 2023-07-11  5:43 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Wednesday, June 7, 2023 12:45 AM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH v2 10/19] drm/i915/dsb: Add support for non-
> posted DSB registers writes
> 
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Writing specific transcoder registers (and as it turns out, the legacy LUT as
> well) via DSB needs a magic sequence to emit non-posted register writes.
> Add a helper for this.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Tried to check in bspec where non-posted write for DSB is required and its advantage but could not locate. Not sure if it is captured in bspec. Would it be possible to add some reference in commit description.

Regards,
Animesh

> ---
>  drivers/gpu/drm/i915/display/intel_dsb.c | 20 ++++++++++++++++++++
> drivers/gpu/drm/i915/display/intel_dsb.h |  3 +++
>  2 files changed, 23 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c
> b/drivers/gpu/drm/i915/display/intel_dsb.c
> index 6be353fdc7fc..73d609507f24 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> @@ -261,6 +261,26 @@ void intel_dsb_noop(struct intel_dsb *dsb, int
> count)
>  			       DSB_OPCODE_NOOP << DSB_OPCODE_SHIFT);  }
> 
> +void intel_dsb_nonpost_start(struct intel_dsb *dsb) {
> +	struct intel_crtc *crtc = dsb->crtc;
> +	enum pipe pipe = crtc->pipe;
> +
> +	intel_dsb_reg_write_masked(dsb, DSB_CTRL(pipe, dsb->id),
> +				   DSB_NON_POSTED, DSB_NON_POSTED);
> +	intel_dsb_noop(dsb, 4);
> +}
> +
> +void intel_dsb_nonpost_end(struct intel_dsb *dsb) {
> +	struct intel_crtc *crtc = dsb->crtc;
> +	enum pipe pipe = crtc->pipe;
> +
> +	intel_dsb_reg_write_masked(dsb, DSB_CTRL(pipe, dsb->id),
> +				   DSB_NON_POSTED, 0);
> +	intel_dsb_noop(dsb, 4);
> +}
> +
>  static void intel_dsb_align_tail(struct intel_dsb *dsb)  {
>  	u32 aligned_tail, tail;
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb.h
> b/drivers/gpu/drm/i915/display/intel_dsb.h
> index 983b0d58ad44..54e9e1dc31ee 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.h
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.h
> @@ -22,6 +22,9 @@ void intel_dsb_reg_write(struct intel_dsb *dsb,  void
> intel_dsb_reg_write_masked(struct intel_dsb *dsb,
>  				i915_reg_t reg, u32 mask, u32 val);  void
> intel_dsb_noop(struct intel_dsb *dsb, int count);
> +void intel_dsb_nonpost_start(struct intel_dsb *dsb); void
> +intel_dsb_nonpost_end(struct intel_dsb *dsb);
> +
>  void intel_dsb_commit(struct intel_dsb *dsb,
>  		      bool wait_for_vblank);
>  void intel_dsb_wait(struct intel_dsb *dsb);
> --
> 2.39.3


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 02/19] drm/i915/dsb: Use non-locked register access
  2023-06-08 11:46   ` Jani Nikula
@ 2023-09-11 20:22     ` Shankar, Uma
  2023-09-12  7:37       ` Jani Nikula
  0 siblings, 1 reply; 52+ messages in thread
From: Shankar, Uma @ 2023-09-11 20:22 UTC (permalink / raw)
  To: Jani Nikula, Ville Syrjala, intel-gfx



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Jani
> Nikula
> Sent: Thursday, June 8, 2023 5:16 PM
> To: Ville Syrjala <ville.syrjala@linux.intel.com>; intel-gfx@lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH v2 02/19] drm/i915/dsb: Use non-locked register
> access
> 
> On Tue, 06 Jun 2023, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Avoid the locking overhead for DSB registers. We don't need the locks
> > and intel_dsb_commit() in particular needs to be called from the
> > vblank evade critical section and thus needs to be fast.
> 
> Mmmh, I always find it slightly puzzling to encounter _fw calls in code, wondering
> what the rationale was, and why we can use the _fw variants.
> 
> Should we start adding comments explaining why?

I believe it’s a light weight write without any locks and forcewake.
Maybe a comment to explain the rationale would be good.

With that added, this is:
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

> BR,
> Jani.
> 
> 
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_dsb.c | 18 +++++++++---------
> >  1 file changed, 9 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c
> > b/drivers/gpu/drm/i915/display/intel_dsb.c
> > index bed058d2c3ac..97e593d9f100 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> > @@ -96,7 +96,7 @@ static bool assert_dsb_has_room(struct intel_dsb
> > *dsb)  static bool is_dsb_busy(struct drm_i915_private *i915, enum pipe pipe,
> >  			enum dsb_id id)
> >  {
> > -	return intel_de_read(i915, DSB_CTRL(pipe, id)) & DSB_STATUS_BUSY;
> > +	return intel_de_read_fw(i915, DSB_CTRL(pipe, id)) & DSB_STATUS_BUSY;
> >  }
> >
> >  static void intel_dsb_emit(struct intel_dsb *dsb, u32 ldw, u32 udw)
> > @@ -243,13 +243,13 @@ void intel_dsb_commit(struct intel_dsb *dsb, bool
> wait_for_vblank)
> >  		return;
> >  	}
> >
> > -	intel_de_write(dev_priv, DSB_CTRL(pipe, dsb->id),
> > -		       (wait_for_vblank ? DSB_WAIT_FOR_VBLANK : 0) |
> > -		       DSB_ENABLE);
> > -	intel_de_write(dev_priv, DSB_HEAD(pipe, dsb->id),
> > -		       i915_ggtt_offset(dsb->vma));
> > -	intel_de_write(dev_priv, DSB_TAIL(pipe, dsb->id),
> > -		       i915_ggtt_offset(dsb->vma) + tail);
> > +	intel_de_write_fw(dev_priv, DSB_CTRL(pipe, dsb->id),
> > +			  (wait_for_vblank ? DSB_WAIT_FOR_VBLANK : 0) |
> > +			  DSB_ENABLE);
> > +	intel_de_write_fw(dev_priv, DSB_HEAD(pipe, dsb->id),
> > +			  i915_ggtt_offset(dsb->vma));
> > +	intel_de_write_fw(dev_priv, DSB_TAIL(pipe, dsb->id),
> > +			  i915_ggtt_offset(dsb->vma) + tail);
> >  }
> >
> >  void intel_dsb_wait(struct intel_dsb *dsb) @@ -266,7 +266,7 @@ void
> > intel_dsb_wait(struct intel_dsb *dsb)
> >  	/* Attempt to reset it */
> >  	dsb->free_pos = 0;
> >  	dsb->ins_start_offset = 0;
> > -	intel_de_write(dev_priv, DSB_CTRL(pipe, dsb->id), 0);
> > +	intel_de_write_fw(dev_priv, DSB_CTRL(pipe, dsb->id), 0);
> >  }
> >
> >  /**
> 
> --
> Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 04/19] drm/i915/dsb: Define more DSB bits
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 04/19] drm/i915/dsb: Define more DSB bits Ville Syrjala
@ 2023-09-11 20:32   ` Shankar, Uma
  0 siblings, 0 replies; 52+ messages in thread
From: Shankar, Uma @ 2023-09-11 20:32 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Wednesday, June 7, 2023 12:45 AM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH v2 04/19] drm/i915/dsb: Define more DSB bits
> 
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Define all the DSB register bits so I don't have to look through bspec to find them.

Looks Good to me.
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dsb_regs.h | 31 +++++++++++++++++++
>  1 file changed, 31 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb_regs.h
> b/drivers/gpu/drm/i915/display/intel_dsb_regs.h
> index 12535d478775..210e2665441d 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb_regs.h
> +++ b/drivers/gpu/drm/i915/display/intel_dsb_regs.h
> @@ -37,6 +37,19 @@
>  #define DSB_DEBUG(pipe, id)		_MMIO(DSBSL_INSTANCE(pipe, id) +
> 0x14)
>  #define DSB_POLLMASK(pipe, id)		_MMIO(DSBSL_INSTANCE(pipe,
> id) + 0x1c)
>  #define DSB_STATUS(pipe, id)		_MMIO(DSBSL_INSTANCE(pipe, id) +
> 0x24)
> +#define   DSB_HP_IDLE_STATUS		REG_BIT(31)
> +#define   DSB_DEWAKE_STATUS		REG_BIT(30)
> +#define   DSB_REQARB_SM_STATE_MASK	REG_GENMASK(29, 27)
> +#define   DSB_SAFE_WINDOW_LIVE		REG_BIT(26)
> +#define   DSB_VTDFAULT_ARB_SM_STATE_MASK	REG_GENMASK(25, 23)
> +#define   DSB_TLBTRANS_SM_STATE_MASK	REG_GENMASK(21, 20)
> +#define   DSB_SAFE_WINDOW		REG_BIT(19)
> +#define   DSB_POINTERS_SM_STATE_MASK	REG_GENMASK(18, 17)
> +#define   DSB_BUSY_ON_DELAYED_VBLANK	REG_BIT(16)
> +#define   DSB_MMIO_ARB_SM_STATE_MASK	REG_GENMASK(15, 13)
> +#define   DSB_MMIO_INST_SM_STATE_MASK	REG_GENMASK(11, 7)
> +#define   DSB_RESET_SM_STATE_MASK	REG_GENMASK(5, 4)
> +#define   DSB_RUN_SM_STATE_MASK		REG_GENMASK(2, 0)
>  #define DSB_INTERRUPT(pipe, id)		_MMIO(DSBSL_INSTANCE(pipe,
> id) + 0x28)
>  #define   DSB_ATS_FAULT_INT_EN		REG_BIT(20)
>  #define   DSB_GTT_FAULT_INT_EN		REG_BIT(19)
> @@ -58,10 +71,28 @@
>  #define   DSB_RM_READY_TIMEOUT_VALUE(x)
> 	REG_FIELD_PREP(DSB_RM_READY_TIMEOUT_VALUE, (x)) /* usec */
>  #define DSB_RMTIMEOUTREG_CAPTURE(pipe, id)
> 	_MMIO(DSBSL_INSTANCE(pipe, id) + 0x34)
>  #define DSB_PMCTRL(pipe, id)		_MMIO(DSBSL_INSTANCE(pipe, id) +
> 0x38)
> +#define   DSB_ENABLE_DEWAKE		REG_BIT(31)
> +#define   DSB_SCANLINE_FOR_DEWAKE_MASK	REG_GENMASK(30, 0)
> +#define   DSB_SCANLINE_FOR_DEWAKE(x)
> 	REG_FIELD_PREP(DSB_SCANLINE_FOR_DEWAKE_MASK, (x))
>  #define DSB_PMCTRL_2(pipe, id)		_MMIO(DSBSL_INSTANCE(pipe,
> id) + 0x3c)
> +#define   DSB_MMIOGEN_DEWAKE_DIS	REG_BIT(31)
> +#define   DSB_FORCE_DEWAKE		REG_BIT(23)
> +#define   DSB_BLOCK_DEWAKE_EXTENSION	REG_BIT(15)
> +#define   DSB_OVERRIDE_DC5_DC6_OK	REG_BIT(7)
>  #define DSB_PF_LN_LOWER(pipe, id)	_MMIO(DSBSL_INSTANCE(pipe, id) +
> 0x40)
>  #define DSB_PF_LN_UPPER(pipe, id)	_MMIO(DSBSL_INSTANCE(pipe, id) +
> 0x44)
>  #define DSB_BUFRPT_CNT(pipe, id)	_MMIO(DSBSL_INSTANCE(pipe, id) +
> 0x48)
>  #define DSB_CHICKEN(pipe, id)		_MMIO(DSBSL_INSTANCE(pipe, id) +
> 0xf0)
> +#define   DSB_FORCE_DMA_SYNC_RESET	REG_BIT(31)
> +#define   DSB_FORCE_VTD_ENGIE_RESET	REG_BIT(30)
> +#define   DSB_DISABLE_IPC_DEMOTE	REG_BIT(29)
> +#define   DSB_SKIP_WAITS_EN		REG_BIT(23)
> +#define   DSB_EXTEND_HP_IDLE		REG_BIT(16)
> +#define   DSB_CTRL_WAIT_SAFE_WINDOW	REG_BIT(15)
> +#define   DSB_CTRL_NO_WAIT_VBLANK	REG_BIT(14)
> +#define   DSB_INST_WAIT_SAFE_WINDOW	REG_BIT(7)
> +#define   DSB_INST_NO_WAIT_VBLANK	REG_BIT(6)
> +#define   DSB_MMIOGEN_DEWAKE_DIS_CHICKEN	REG_BIT(2)
> +#define   DSB_DISABLE_MMIO_COUNT_FOR_INDEXED	REG_BIT(0)
> 
>  #endif /* __INTEL_DSB_REGS_H__ */
> --
> 2.39.3


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 05/19] drm/i915/dsb: Define the contents of some intstructions bit better
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 05/19] drm/i915/dsb: Define the contents of some intstructions bit better Ville Syrjala
@ 2023-09-11 20:50   ` Shankar, Uma
  2023-09-27 15:38     ` Ville Syrjälä
  0 siblings, 1 reply; 52+ messages in thread
From: Shankar, Uma @ 2023-09-11 20:50 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Wednesday, June 7, 2023 12:45 AM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH v2 05/19] drm/i915/dsb: Define the contents of some
> intstructions bit better
> 
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Add some defines to specify what goes inside certain DSB instructions.

Only upper and lower shift seems to be added in the patch, do we need a
separate patch for this or we can squash with where its used.
Will leave the decision to you.

> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dsb.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c
> b/drivers/gpu/drm/i915/display/intel_dsb.c
> index 42911abcd3ab..093b2567883d 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> @@ -70,17 +70,21 @@ struct intel_dsb {
>  #define DSB_OPCODE_SHIFT		24
>  #define DSB_OPCODE_NOOP			0x0
>  #define DSB_OPCODE_MMIO_WRITE		0x1
> +#define   DSB_BYTE_EN			0xf
> +#define   DSB_BYTE_EN_SHIFT		20
> +#define   DSB_REG_VALUE_MASK		0xfffff
>  #define DSB_OPCODE_WAIT_USEC		0x2
> -#define DSB_OPCODE_WAIT_LINES		0x3
> +#define DSB_OPCODE_WAIT_SCANLINE	0x3
>  #define DSB_OPCODE_WAIT_VBLANKS		0x4
>  #define DSB_OPCODE_WAIT_DSL_IN		0x5
>  #define DSB_OPCODE_WAIT_DSL_OUT		0x6
> +#define   DSB_SCANLINE_UPPER_SHIFT	20
> +#define   DSB_SCANLINE_LOWER_SHIFT	0
>  #define DSB_OPCODE_INTERRUPT		0x7	
>  #define DSB_OPCODE_INDEXED_WRITE	0x9
> +/* see DSB_REG_VALUE_MASK */
>  #define DSB_OPCODE_POLL			0xA
> -#define DSB_BYTE_EN			0xF
> -#define DSB_BYTE_EN_SHIFT		20
> -#define DSB_REG_VALUE_MASK		0xfffff
> +/* see DSB_REG_VALUE_MASK */

This comment seems redundant. With this fixed,
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

> 
>  static bool assert_dsb_has_room(struct intel_dsb *dsb)  {
> --
> 2.39.3


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 08/19] drm/i915/dsb: Introduce intel_dsb_noop()
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 08/19] drm/i915/dsb: Introduce intel_dsb_noop() Ville Syrjala
@ 2023-09-11 20:52   ` Shankar, Uma
  0 siblings, 0 replies; 52+ messages in thread
From: Shankar, Uma @ 2023-09-11 20:52 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Wednesday, June 7, 2023 12:45 AM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH v2 08/19] drm/i915/dsb: Introduce intel_dsb_noop()
> 
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Add a helper for emitting a number of DSB NOOPs commands.

Looks Good to me.
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dsb.c | 9 +++++++++
> drivers/gpu/drm/i915/display/intel_dsb.h | 1 +
>  2 files changed, 10 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c
> b/drivers/gpu/drm/i915/display/intel_dsb.c
> index 22c716ee75e2..4ef799c087b4 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> @@ -234,6 +234,15 @@ void intel_dsb_reg_write(struct intel_dsb *dsb,
>  	}
>  }
> 
> +void intel_dsb_noop(struct intel_dsb *dsb, int count) {
> +	int i;
> +
> +	for (i = 0; i < count; i++)
> +		intel_dsb_emit(dsb, 0,
> +			       DSB_OPCODE_NOOP << DSB_OPCODE_SHIFT); }
> +
>  static void intel_dsb_align_tail(struct intel_dsb *dsb)  {
>  	u32 aligned_tail, tail;
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb.h
> b/drivers/gpu/drm/i915/display/intel_dsb.h
> index b8148b47022d..5a08bc21beda 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.h
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.h
> @@ -19,6 +19,7 @@ void intel_dsb_finish(struct intel_dsb *dsb);  void
> intel_dsb_cleanup(struct intel_dsb *dsb);  void intel_dsb_reg_write(struct
> intel_dsb *dsb,
>  			 i915_reg_t reg, u32 val);
> +void intel_dsb_noop(struct intel_dsb *dsb, int count);
>  void intel_dsb_commit(struct intel_dsb *dsb,
>  		      bool wait_for_vblank);
>  void intel_dsb_wait(struct intel_dsb *dsb);
> --
> 2.39.3


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 09/19] drm/i915/dsb: Introduce intel_dsb_reg_write_masked()
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 09/19] drm/i915/dsb: Introduce intel_dsb_reg_write_masked() Ville Syrjala
@ 2023-09-11 20:55   ` Shankar, Uma
  0 siblings, 0 replies; 52+ messages in thread
From: Shankar, Uma @ 2023-09-11 20:55 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Wednesday, June 7, 2023 12:45 AM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH v2 09/19] drm/i915/dsb: Introduce
> intel_dsb_reg_write_masked()
> 
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Add a function for emitting masked register writes.
> 
> Note that the mask is implemented through bvyte enables, so can only mask off

Nit: Typo in bytes

With this fixed, this is:
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

> aligned 8bit sets of bits.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dsb.c | 18 ++++++++++++++++++
> drivers/gpu/drm/i915/display/intel_dsb.h |  2 ++
>  2 files changed, 20 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c
> b/drivers/gpu/drm/i915/display/intel_dsb.c
> index 4ef799c087b4..6be353fdc7fc 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> @@ -234,6 +234,24 @@ void intel_dsb_reg_write(struct intel_dsb *dsb,
>  	}
>  }
> 
> +static u32 intel_dsb_mask_to_byte_en(u32 mask) {
> +	return (!!(mask & 0xff000000) << 3 |
> +		!!(mask & 0x00ff0000) << 2 |
> +		!!(mask & 0x0000ff00) << 1 |
> +		!!(mask & 0x000000ff) << 0);
> +}
> +
> +/* Note: mask implemented via byte enables! */ void
> +intel_dsb_reg_write_masked(struct intel_dsb *dsb,
> +				i915_reg_t reg, u32 mask, u32 val)
> +{
> +	intel_dsb_emit(dsb, val,
> +		       (DSB_OPCODE_MMIO_WRITE << DSB_OPCODE_SHIFT) |
> +		       (intel_dsb_mask_to_byte_en(mask) <<
> DSB_BYTE_EN_SHIFT) |
> +		       i915_mmio_reg_offset(reg));
> +}
> +
>  void intel_dsb_noop(struct intel_dsb *dsb, int count)  {
>  	int i;
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb.h
> b/drivers/gpu/drm/i915/display/intel_dsb.h
> index 5a08bc21beda..983b0d58ad44 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.h
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.h
> @@ -19,6 +19,8 @@ void intel_dsb_finish(struct intel_dsb *dsb);  void
> intel_dsb_cleanup(struct intel_dsb *dsb);  void intel_dsb_reg_write(struct
> intel_dsb *dsb,
>  			 i915_reg_t reg, u32 val);
> +void intel_dsb_reg_write_masked(struct intel_dsb *dsb,
> +				i915_reg_t reg, u32 mask, u32 val);
>  void intel_dsb_noop(struct intel_dsb *dsb, int count);  void
> intel_dsb_commit(struct intel_dsb *dsb,
>  		      bool wait_for_vblank);
> --
> 2.39.3


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 10/19] drm/i915/dsb: Add support for non-posted DSB registers writes
  2023-07-11  5:43   ` Manna, Animesh
@ 2023-09-11 21:04     ` Shankar, Uma
  0 siblings, 0 replies; 52+ messages in thread
From: Shankar, Uma @ 2023-09-11 21:04 UTC (permalink / raw)
  To: Manna, Animesh, Ville Syrjala, intel-gfx



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Manna,
> Animesh
> Sent: Tuesday, July 11, 2023 11:13 AM
> To: Ville Syrjala <ville.syrjala@linux.intel.com>; intel-gfx@lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH v2 10/19] drm/i915/dsb: Add support for non-
> posted DSB registers writes
> 
> 
> 
> > -----Original Message-----
> > From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of
> > Ville Syrjala
> > Sent: Wednesday, June 7, 2023 12:45 AM
> > To: intel-gfx@lists.freedesktop.org
> > Subject: [Intel-gfx] [PATCH v2 10/19] drm/i915/dsb: Add support for
> > non- posted DSB registers writes
> >
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Writing specific transcoder registers (and as it turns out, the legacy
> > LUT as
> > well) via DSB needs a magic sequence to emit non-posted register writes.
> > Add a helper for this.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Tried to check in bspec where non-posted write for DSB is required and its
> advantage but could not locate. Not sure if it is captured in bspec. Would it be
> possible to add some reference in commit description.

It's in "special programming" section in DSB Engine programming page in bspec.

Overall change looks good to me.
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

> Regards,
> Animesh
> 
> > ---
> >  drivers/gpu/drm/i915/display/intel_dsb.c | 20 ++++++++++++++++++++
> > drivers/gpu/drm/i915/display/intel_dsb.h |  3 +++
> >  2 files changed, 23 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c
> > b/drivers/gpu/drm/i915/display/intel_dsb.c
> > index 6be353fdc7fc..73d609507f24 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> > @@ -261,6 +261,26 @@ void intel_dsb_noop(struct intel_dsb *dsb, int
> > count)
> >  			       DSB_OPCODE_NOOP << DSB_OPCODE_SHIFT);  }
> >
> > +void intel_dsb_nonpost_start(struct intel_dsb *dsb) {
> > +	struct intel_crtc *crtc = dsb->crtc;
> > +	enum pipe pipe = crtc->pipe;
> > +
> > +	intel_dsb_reg_write_masked(dsb, DSB_CTRL(pipe, dsb->id),
> > +				   DSB_NON_POSTED, DSB_NON_POSTED);
> > +	intel_dsb_noop(dsb, 4);
> > +}
> > +
> > +void intel_dsb_nonpost_end(struct intel_dsb *dsb) {
> > +	struct intel_crtc *crtc = dsb->crtc;
> > +	enum pipe pipe = crtc->pipe;
> > +
> > +	intel_dsb_reg_write_masked(dsb, DSB_CTRL(pipe, dsb->id),
> > +				   DSB_NON_POSTED, 0);
> > +	intel_dsb_noop(dsb, 4);
> > +}
> > +
> >  static void intel_dsb_align_tail(struct intel_dsb *dsb)  {
> >  	u32 aligned_tail, tail;
> > diff --git a/drivers/gpu/drm/i915/display/intel_dsb.h
> > b/drivers/gpu/drm/i915/display/intel_dsb.h
> > index 983b0d58ad44..54e9e1dc31ee 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dsb.h
> > +++ b/drivers/gpu/drm/i915/display/intel_dsb.h
> > @@ -22,6 +22,9 @@ void intel_dsb_reg_write(struct intel_dsb *dsb,
> > void intel_dsb_reg_write_masked(struct intel_dsb *dsb,
> >  				i915_reg_t reg, u32 mask, u32 val);  void
> intel_dsb_noop(struct
> > intel_dsb *dsb, int count);
> > +void intel_dsb_nonpost_start(struct intel_dsb *dsb); void
> > +intel_dsb_nonpost_end(struct intel_dsb *dsb);
> > +
> >  void intel_dsb_commit(struct intel_dsb *dsb,
> >  		      bool wait_for_vblank);
> >  void intel_dsb_wait(struct intel_dsb *dsb);
> > --
> > 2.39.3


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 11/19] drm/i915/dsb: Don't use DSB to load the LUTs during full modeset
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 11/19] drm/i915/dsb: Don't use DSB to load the LUTs during full modeset Ville Syrjala
@ 2023-09-11 21:09   ` Shankar, Uma
  0 siblings, 0 replies; 52+ messages in thread
From: Shankar, Uma @ 2023-09-11 21:09 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Wednesday, June 7, 2023 12:45 AM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH v2 11/19] drm/i915/dsb: Don't use DSB to load the
> LUTs during full modeset
> 
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Using the DSB for LUT loading during full modesets would require some actual
> though. Let's just use mmio for the time being.

Looks Good to me.
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_color.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_color.c
> b/drivers/gpu/drm/i915/display/intel_color.c
> index 2d5640aab4d8..2db9d1d6dadd 100644
> --- a/drivers/gpu/drm/i915/display/intel_color.c
> +++ b/drivers/gpu/drm/i915/display/intel_color.c
> @@ -1805,6 +1805,10 @@ void intel_color_prepare_commit(struct
> intel_crtc_state *crtc_state)
>  	/* FIXME DSB has issues loading LUTs, disable it for now */
>  	return;
> 
> +	if (!crtc_state->hw.active ||
> +	    intel_crtc_needs_modeset(crtc_state))
> +		return;
> +
>  	if (!crtc_state->pre_csc_lut && !crtc_state->post_csc_lut)
>  		return;
> 
> --
> 2.39.3


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 02/19] drm/i915/dsb: Use non-locked register access
  2023-09-11 20:22     ` Shankar, Uma
@ 2023-09-12  7:37       ` Jani Nikula
  2023-09-12  7:49         ` Shankar, Uma
  0 siblings, 1 reply; 52+ messages in thread
From: Jani Nikula @ 2023-09-12  7:37 UTC (permalink / raw)
  To: Shankar, Uma, Ville Syrjala, intel-gfx

On Mon, 11 Sep 2023, "Shankar, Uma" <uma.shankar@intel.com> wrote:
>> -----Original Message-----
>> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Jani
>> Nikula
>> Sent: Thursday, June 8, 2023 5:16 PM
>> To: Ville Syrjala <ville.syrjala@linux.intel.com>; intel-gfx@lists.freedesktop.org
>> Subject: Re: [Intel-gfx] [PATCH v2 02/19] drm/i915/dsb: Use non-locked register
>> access
>> 
>> On Tue, 06 Jun 2023, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
>> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> >
>> > Avoid the locking overhead for DSB registers. We don't need the locks
>> > and intel_dsb_commit() in particular needs to be called from the
>> > vblank evade critical section and thus needs to be fast.
>> 
>> Mmmh, I always find it slightly puzzling to encounter _fw calls in code, wondering
>> what the rationale was, and why we can use the _fw variants.
>> 
>> Should we start adding comments explaining why?
>
> I believe it’s a light weight write without any locks and forcewake.

That part is clear; the why isn't. :)

> Maybe a comment to explain the rationale would be good.
>
> With that added, this is:
> Reviewed-by: Uma Shankar <uma.shankar@intel.com>
>
>> BR,
>> Jani.
>> 
>> 
>> >
>> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> > ---
>> >  drivers/gpu/drm/i915/display/intel_dsb.c | 18 +++++++++---------
>> >  1 file changed, 9 insertions(+), 9 deletions(-)
>> >
>> > diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c
>> > b/drivers/gpu/drm/i915/display/intel_dsb.c
>> > index bed058d2c3ac..97e593d9f100 100644
>> > --- a/drivers/gpu/drm/i915/display/intel_dsb.c
>> > +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
>> > @@ -96,7 +96,7 @@ static bool assert_dsb_has_room(struct intel_dsb
>> > *dsb)  static bool is_dsb_busy(struct drm_i915_private *i915, enum pipe pipe,
>> >  			enum dsb_id id)
>> >  {
>> > -	return intel_de_read(i915, DSB_CTRL(pipe, id)) & DSB_STATUS_BUSY;
>> > +	return intel_de_read_fw(i915, DSB_CTRL(pipe, id)) & DSB_STATUS_BUSY;
>> >  }
>> >
>> >  static void intel_dsb_emit(struct intel_dsb *dsb, u32 ldw, u32 udw)
>> > @@ -243,13 +243,13 @@ void intel_dsb_commit(struct intel_dsb *dsb, bool
>> wait_for_vblank)
>> >  		return;
>> >  	}
>> >
>> > -	intel_de_write(dev_priv, DSB_CTRL(pipe, dsb->id),
>> > -		       (wait_for_vblank ? DSB_WAIT_FOR_VBLANK : 0) |
>> > -		       DSB_ENABLE);
>> > -	intel_de_write(dev_priv, DSB_HEAD(pipe, dsb->id),
>> > -		       i915_ggtt_offset(dsb->vma));
>> > -	intel_de_write(dev_priv, DSB_TAIL(pipe, dsb->id),
>> > -		       i915_ggtt_offset(dsb->vma) + tail);
>> > +	intel_de_write_fw(dev_priv, DSB_CTRL(pipe, dsb->id),
>> > +			  (wait_for_vblank ? DSB_WAIT_FOR_VBLANK : 0) |
>> > +			  DSB_ENABLE);
>> > +	intel_de_write_fw(dev_priv, DSB_HEAD(pipe, dsb->id),
>> > +			  i915_ggtt_offset(dsb->vma));
>> > +	intel_de_write_fw(dev_priv, DSB_TAIL(pipe, dsb->id),
>> > +			  i915_ggtt_offset(dsb->vma) + tail);
>> >  }
>> >
>> >  void intel_dsb_wait(struct intel_dsb *dsb) @@ -266,7 +266,7 @@ void
>> > intel_dsb_wait(struct intel_dsb *dsb)
>> >  	/* Attempt to reset it */
>> >  	dsb->free_pos = 0;
>> >  	dsb->ins_start_offset = 0;
>> > -	intel_de_write(dev_priv, DSB_CTRL(pipe, dsb->id), 0);
>> > +	intel_de_write_fw(dev_priv, DSB_CTRL(pipe, dsb->id), 0);
>> >  }
>> >
>> >  /**
>> 
>> --
>> Jani Nikula, Intel Open Source Graphics Center

-- 
Jani Nikula, Intel

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 02/19] drm/i915/dsb: Use non-locked register access
  2023-09-12  7:37       ` Jani Nikula
@ 2023-09-12  7:49         ` Shankar, Uma
  0 siblings, 0 replies; 52+ messages in thread
From: Shankar, Uma @ 2023-09-12  7:49 UTC (permalink / raw)
  To: Jani Nikula, Ville Syrjala, intel-gfx



> -----Original Message-----
> From: Jani Nikula <jani.nikula@linux.intel.com>
> Sent: Tuesday, September 12, 2023 1:08 PM
> To: Shankar, Uma <uma.shankar@intel.com>; Ville Syrjala
> <ville.syrjala@linux.intel.com>; intel-gfx@lists.freedesktop.org
> Subject: RE: [Intel-gfx] [PATCH v2 02/19] drm/i915/dsb: Use non-locked register
> access
> 
> On Mon, 11 Sep 2023, "Shankar, Uma" <uma.shankar@intel.com> wrote:
> >> -----Original Message-----
> >> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf
> >> Of Jani Nikula
> >> Sent: Thursday, June 8, 2023 5:16 PM
> >> To: Ville Syrjala <ville.syrjala@linux.intel.com>;
> >> intel-gfx@lists.freedesktop.org
> >> Subject: Re: [Intel-gfx] [PATCH v2 02/19] drm/i915/dsb: Use
> >> non-locked register access
> >>
> >> On Tue, 06 Jun 2023, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> >> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >> >
> >> > Avoid the locking overhead for DSB registers. We don't need the
> >> > locks and intel_dsb_commit() in particular needs to be called from
> >> > the vblank evade critical section and thus needs to be fast.
> >>
> >> Mmmh, I always find it slightly puzzling to encounter _fw calls in
> >> code, wondering what the rationale was, and why we can use the _fw
> variants.
> >>
> >> Should we start adding comments explaining why?
> >
> > I believe it’s a light weight write without any locks and forcewake.
> 
> That part is clear; the why isn't. :)

Yes I agree, to add the reasoning will be good 😊. Some justification is added though:
"intel_dsb_commit() in particular needs to be called from the vblank evade
critical section and thus needs to be fast".

> > Maybe a comment to explain the rationale would be good.
> >
> > With that added, this is:
> > Reviewed-by: Uma Shankar <uma.shankar@intel.com>
> >
> >> BR,
> >> Jani.
> >>
> >>
> >> >
> >> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >> > ---
> >> >  drivers/gpu/drm/i915/display/intel_dsb.c | 18 +++++++++---------
> >> >  1 file changed, 9 insertions(+), 9 deletions(-)
> >> >
> >> > diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c
> >> > b/drivers/gpu/drm/i915/display/intel_dsb.c
> >> > index bed058d2c3ac..97e593d9f100 100644
> >> > --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> >> > +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> >> > @@ -96,7 +96,7 @@ static bool assert_dsb_has_room(struct intel_dsb
> >> > *dsb)  static bool is_dsb_busy(struct drm_i915_private *i915, enum pipe
> pipe,
> >> >  			enum dsb_id id)
> >> >  {
> >> > -	return intel_de_read(i915, DSB_CTRL(pipe, id)) & DSB_STATUS_BUSY;
> >> > +	return intel_de_read_fw(i915, DSB_CTRL(pipe, id)) &
> >> > +DSB_STATUS_BUSY;
> >> >  }
> >> >
> >> >  static void intel_dsb_emit(struct intel_dsb *dsb, u32 ldw, u32
> >> > udw) @@ -243,13 +243,13 @@ void intel_dsb_commit(struct intel_dsb
> >> > *dsb, bool
> >> wait_for_vblank)
> >> >  		return;
> >> >  	}
> >> >
> >> > -	intel_de_write(dev_priv, DSB_CTRL(pipe, dsb->id),
> >> > -		       (wait_for_vblank ? DSB_WAIT_FOR_VBLANK : 0) |
> >> > -		       DSB_ENABLE);
> >> > -	intel_de_write(dev_priv, DSB_HEAD(pipe, dsb->id),
> >> > -		       i915_ggtt_offset(dsb->vma));
> >> > -	intel_de_write(dev_priv, DSB_TAIL(pipe, dsb->id),
> >> > -		       i915_ggtt_offset(dsb->vma) + tail);
> >> > +	intel_de_write_fw(dev_priv, DSB_CTRL(pipe, dsb->id),
> >> > +			  (wait_for_vblank ? DSB_WAIT_FOR_VBLANK : 0) |
> >> > +			  DSB_ENABLE);
> >> > +	intel_de_write_fw(dev_priv, DSB_HEAD(pipe, dsb->id),
> >> > +			  i915_ggtt_offset(dsb->vma));
> >> > +	intel_de_write_fw(dev_priv, DSB_TAIL(pipe, dsb->id),
> >> > +			  i915_ggtt_offset(dsb->vma) + tail);
> >> >  }
> >> >
> >> >  void intel_dsb_wait(struct intel_dsb *dsb) @@ -266,7 +266,7 @@
> >> > void intel_dsb_wait(struct intel_dsb *dsb)
> >> >  	/* Attempt to reset it */
> >> >  	dsb->free_pos = 0;
> >> >  	dsb->ins_start_offset = 0;
> >> > -	intel_de_write(dev_priv, DSB_CTRL(pipe, dsb->id), 0);
> >> > +	intel_de_write_fw(dev_priv, DSB_CTRL(pipe, dsb->id), 0);
> >> >  }
> >> >
> >> >  /**
> >>
> >> --
> >> Jani Nikula, Intel Open Source Graphics Center
> 
> --
> Jani Nikula, Intel

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 12/19] drm/i915/dsb: Load LUTs using the DSB during vblank
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 12/19] drm/i915/dsb: Load LUTs using the DSB during vblank Ville Syrjala
@ 2023-09-13 16:24   ` Shankar, Uma
  0 siblings, 0 replies; 52+ messages in thread
From: Shankar, Uma @ 2023-09-13 16:24 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Wednesday, June 7, 2023 12:45 AM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH v2 12/19] drm/i915/dsb: Load LUTs using the DSB
> during vblank
> 
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Loading LUTs with the DSB outside of vblank doesn't really work due to the
> palette anti-collision logic. Apparently the DSB register writes don't get stalled
> like CPU mmio writes do and instead we end up corrupting the LUT entries.
> Disabling the anti-collision logic would allow us to successfully load the LUT
> outside of vblank, but presumably that risks the LUT reads from the scanout
> (temportarily) getting corrupted data from the LUT instead.

Nit: Typo in temporarily.
> 
> The anti-collision logic isn't active during vblank so that is when we can
> successfully load the LUT with the DSB. That is what we want to do anyway to
> avoid tearing.

Doing in vblank should be good, only case I see where we have to be watchful is the
HRR (high refresh rate) cases. We need to be sure, through DSB we will be able to get
this in time, it needs to be fast enough to fit the programming window, else we may
have to have some fallback to MMIO and do in active. Ideally it should work out with
DSB execution, just something to be mindful of.

Change looks good to me.
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_color.c   | 30 ++++++++++++++++----
>  drivers/gpu/drm/i915/display/intel_color.h   |  2 ++
>  drivers/gpu/drm/i915/display/intel_crtc.c    |  4 ++-
>  drivers/gpu/drm/i915/display/intel_display.c |  3 ++
>  4 files changed, 32 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_color.c
> b/drivers/gpu/drm/i915/display/intel_color.c
> index 2db9d1d6dadd..077e45372dab 100644
> --- a/drivers/gpu/drm/i915/display/intel_color.c
> +++ b/drivers/gpu/drm/i915/display/intel_color.c
> @@ -1660,12 +1660,6 @@ static void icl_load_luts(const struct intel_crtc_state
> *crtc_state)
>  		MISSING_CASE(crtc_state->gamma_mode);
>  		break;
>  	}
> -
> -	if (crtc_state->dsb) {
> -		intel_dsb_finish(crtc_state->dsb);
> -		intel_dsb_commit(crtc_state->dsb, false);
> -		intel_dsb_wait(crtc_state->dsb);
> -	}
>  }
> 
>  static void vlv_load_luts(const struct intel_crtc_state *crtc_state) @@ -1772,6
> +1766,9 @@ void intel_color_load_luts(const struct intel_crtc_state *crtc_state)
> {
>  	struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
> 
> +	if (crtc_state->dsb)
> +		return;
> +
>  	i915->display.funcs.color->load_luts(crtc_state);
>  }
> 
> @@ -1788,6 +1785,9 @@ void intel_color_commit_arm(const struct
> intel_crtc_state *crtc_state)
>  	struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
> 
>  	i915->display.funcs.color->color_commit_arm(crtc_state);
> +
> +	if (crtc_state->dsb)
> +		intel_dsb_commit(crtc_state->dsb, true);
>  }
> 
>  void intel_color_post_update(const struct intel_crtc_state *crtc_state) @@ -
> 1801,6 +1801,7 @@ void intel_color_post_update(const struct intel_crtc_state
> *crtc_state)  void intel_color_prepare_commit(struct intel_crtc_state
> *crtc_state)  {
>  	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> +	struct drm_i915_private *i915 = to_i915(crtc->base.dev);
> 
>  	/* FIXME DSB has issues loading LUTs, disable it for now */
>  	return;
> @@ -1813,6 +1814,12 @@ void intel_color_prepare_commit(struct
> intel_crtc_state *crtc_state)
>  		return;
> 
>  	crtc_state->dsb = intel_dsb_prepare(crtc, 1024);
> +	if (!crtc_state->dsb)
> +		return;
> +
> +	i915->display.funcs.color->load_luts(crtc_state);
> +
> +	intel_dsb_finish(crtc_state->dsb);
>  }
> 
>  void intel_color_cleanup_commit(struct intel_crtc_state *crtc_state) @@ -
> 1824,6 +1831,17 @@ void intel_color_cleanup_commit(struct intel_crtc_state
> *crtc_state)
>  	crtc_state->dsb = NULL;
>  }
> 
> +void intel_color_wait_commit(const struct intel_crtc_state *crtc_state)
> +{
> +	if (crtc_state->dsb)
> +		intel_dsb_wait(crtc_state->dsb);
> +}
> +
> +bool intel_color_uses_dsb(const struct intel_crtc_state *crtc_state) {
> +	return crtc_state->dsb;
> +}
> +
>  static bool intel_can_preload_luts(const struct intel_crtc_state *new_crtc_state)
> {
>  	struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->uapi.crtc);
> diff --git a/drivers/gpu/drm/i915/display/intel_color.h
> b/drivers/gpu/drm/i915/display/intel_color.h
> index 8002492be709..8ecd36149def 100644
> --- a/drivers/gpu/drm/i915/display/intel_color.h
> +++ b/drivers/gpu/drm/i915/display/intel_color.h
> @@ -19,6 +19,8 @@ void intel_color_crtc_init(struct intel_crtc *crtc);  int
> intel_color_check(struct intel_crtc_state *crtc_state);  void
> intel_color_prepare_commit(struct intel_crtc_state *crtc_state);  void
> intel_color_cleanup_commit(struct intel_crtc_state *crtc_state);
> +bool intel_color_uses_dsb(const struct intel_crtc_state *crtc_state);
> +void intel_color_wait_commit(const struct intel_crtc_state
> +*crtc_state);
>  void intel_color_commit_noarm(const struct intel_crtc_state *crtc_state);  void
> intel_color_commit_arm(const struct intel_crtc_state *crtc_state);  void
> intel_color_post_update(const struct intel_crtc_state *crtc_state); diff --git
> a/drivers/gpu/drm/i915/display/intel_crtc.c
> b/drivers/gpu/drm/i915/display/intel_crtc.c
> index 182c6dd64f47..36c9b590a058 100644
> --- a/drivers/gpu/drm/i915/display/intel_crtc.c
> +++ b/drivers/gpu/drm/i915/display/intel_crtc.c
> @@ -24,6 +24,7 @@
>  #include "intel_display_trace.h"
>  #include "intel_display_types.h"
>  #include "intel_drrs.h"
> +#include "intel_dsb.h"
>  #include "intel_dsi.h"
>  #include "intel_fifo_underrun.h"
>  #include "intel_pipe_crc.h"
> @@ -394,7 +395,8 @@ static bool intel_crtc_needs_vblank_work(const struct
> intel_crtc_state *crtc_sta
>  	return crtc_state->hw.active &&
>  		!intel_crtc_needs_modeset(crtc_state) &&
>  		!crtc_state->preload_luts &&
> -		intel_crtc_needs_color_update(crtc_state);
> +		intel_crtc_needs_color_update(crtc_state) &&
> +		!intel_color_uses_dsb(crtc_state);
>  }
> 
>  static void intel_crtc_vblank_work(struct kthread_work *base) diff --git
> a/drivers/gpu/drm/i915/display/intel_display.c
> b/drivers/gpu/drm/i915/display/intel_display.c
> index f23dd937c27c..25d6b19e6944 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -78,6 +78,7 @@
>  #include "intel_dpll_mgr.h"
>  #include "intel_dpt.h"
>  #include "intel_drrs.h"
> +#include "intel_dsb.h"
>  #include "intel_dsi.h"
>  #include "intel_dvo.h"
>  #include "intel_fb.h"
> @@ -7056,6 +7057,8 @@ static void intel_atomic_commit_tail(struct
> intel_atomic_state *state)
>  	for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) {
>  		if (new_crtc_state->do_async_flip)
>  			intel_crtc_disable_flip_done(state, crtc);
> +
> +		intel_color_wait_commit(new_crtc_state);
>  	}
> 
>  	/*
> --
> 2.39.3


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 13/19] drm/i915/dsb: Use non-posted register writes for legacy LUT
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 13/19] drm/i915/dsb: Use non-posted register writes for legacy LUT Ville Syrjala
@ 2023-09-13 17:02   ` Shankar, Uma
  0 siblings, 0 replies; 52+ messages in thread
From: Shankar, Uma @ 2023-09-13 17:02 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Wednesday, June 7, 2023 12:45 AM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH v2 13/19] drm/i915/dsb: Use non-posted register
> writes for legacy LUT
> 
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The DSB has problems writing the legacy LUT. The two workarounds I've
> discoverted are:
> - write each entry twice back to back
> - use non-posted writes
> 
> Let's use non-posted writes as that seems a bit more standard.

Change looks good but I feel it will be good to get this documented in spec.
Not able to locate any reference.

Anyways, with empirical data based on your findings no concern as such.
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

> TODO: measure which is faster
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_color.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_color.c
> b/drivers/gpu/drm/i915/display/intel_color.c
> index 077e45372dab..b3dd4013d058 100644
> --- a/drivers/gpu/drm/i915/display/intel_color.c
> +++ b/drivers/gpu/drm/i915/display/intel_color.c
> @@ -1265,9 +1265,20 @@ static void ilk_load_lut_8(const struct intel_crtc_state
> *crtc_state,
> 
>  	lut = blob->data;
> 
> +	/*
> +	 * DSB fails to correctly load the legacy LUT
> +	 * unless we either write each entry twice,
> +	 * or use non-posted writes
> +	 */
> +	if (crtc_state->dsb)
> +		intel_dsb_nonpost_start(crtc_state->dsb);
> +
>  	for (i = 0; i < 256; i++)
>  		ilk_lut_write(crtc_state, LGC_PALETTE(pipe, i),
>  			      i9xx_lut_8(&lut[i]));
> +
> +	if (crtc_state->dsb)
> +		intel_dsb_nonpost_end(crtc_state->dsb);
>  }
> 
>  static void ilk_load_lut_10(const struct intel_crtc_state *crtc_state,
> --
> 2.39.3


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 14/19] drm/i915/dsb: Evade transcoder undelayed vblank when using DSB
  2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 14/19] drm/i915/dsb: Evade transcoder undelayed vblank when using DSB Ville Syrjala
@ 2023-09-13 17:13   ` Shankar, Uma
  0 siblings, 0 replies; 52+ messages in thread
From: Shankar, Uma @ 2023-09-13 17:13 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Wednesday, June 7, 2023 12:45 AM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH v2 14/19] drm/i915/dsb: Evade transcoder undelayed
> vblank when using DSB
> 
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> We want to start the DSB execution from the transcoder's undelayed vblank, so in
> order to guarantee atomicity with the all the other mmio register writes we need
> to evade both vblanks.
> 
> Note that currently we don't add any vblank delay, so this is effectively a nop. But
> in the future when we start to program double buffered registers from the DSB
> we'll need to delay the pipe's vblank to provide the register programming
> "window2"
> for the DSB.

Agree with this, looks good.
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_crtc.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_crtc.c
> b/drivers/gpu/drm/i915/display/intel_crtc.c
> index 36c9b590a058..ff0ebdf7cde3 100644
> --- a/drivers/gpu/drm/i915/display/intel_crtc.c
> +++ b/drivers/gpu/drm/i915/display/intel_crtc.c
> @@ -519,8 +519,12 @@ void intel_pipe_update_start(struct intel_crtc_state
> *new_crtc_state)
>  	/*
>  	 * M/N is double buffered on the transcoder's undelayed vblank,
>  	 * so with seamless M/N we must evade both vblanks.
> +	 *
> +	 * DSB execution waits for the transcoder's undelayed vblank,
> +	 * hence we must kick off the commit before that.
>  	 */
> -	if (new_crtc_state->seamless_m_n &&
> intel_crtc_needs_fastset(new_crtc_state))
> +	if (new_crtc_state->dsb ||
> +	    (new_crtc_state->seamless_m_n &&
> +intel_crtc_needs_fastset(new_crtc_state)))
>  		min -= adjusted_mode->crtc_vblank_start - adjusted_mode-
> >crtc_vdisplay;
> 
>  	if (min <= 0 || max <= 0)
> --
> 2.39.3


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 15/19] drm/i915: Introduce skl_watermark_max_latency()
  2023-06-06 19:15 ` [Intel-gfx] [PATCH v2 15/19] drm/i915: Introduce skl_watermark_max_latency() Ville Syrjala
@ 2023-09-13 17:25   ` Shankar, Uma
  0 siblings, 0 replies; 52+ messages in thread
From: Shankar, Uma @ 2023-09-13 17:25 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Wednesday, June 7, 2023 12:45 AM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH v2 15/19] drm/i915: Introduce
> skl_watermark_max_latency()
> 
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The DSB code will want to know the maximum PkgC latency it has to contend
> with. Add a helper to expose that information.

Looks Good to me.
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/skl_watermark.c | 14 ++++++++++++++
> drivers/gpu/drm/i915/display/skl_watermark.h |  2 ++
>  2 files changed, 16 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c
> b/drivers/gpu/drm/i915/display/skl_watermark.c
> index d1245c847f1c..a31adbca9dbc 100644
> --- a/drivers/gpu/drm/i915/display/skl_watermark.c
> +++ b/drivers/gpu/drm/i915/display/skl_watermark.c
> @@ -3719,3 +3719,17 @@ void skl_watermark_debugfs_register(struct
> drm_i915_private *i915)
>  		debugfs_create_file("i915_sagv_status", 0444, minor-
> >debugfs_root, i915,
>  				    &intel_sagv_status_fops);
>  }
> +
> +unsigned int skl_watermark_max_latency(struct drm_i915_private *i915) {
> +	int level;
> +
> +	for (level = i915->display.wm.num_levels - 1; level >= 0; level--) {
> +		unsigned int latency = skl_wm_latency(i915, level, NULL);
> +
> +		if (latency)
> +			return latency;
> +	}
> +
> +	return 0;
> +}
> diff --git a/drivers/gpu/drm/i915/display/skl_watermark.h
> b/drivers/gpu/drm/i915/display/skl_watermark.h
> index f91a3d4ddc07..edb61e33df83 100644
> --- a/drivers/gpu/drm/i915/display/skl_watermark.h
> +++ b/drivers/gpu/drm/i915/display/skl_watermark.h
> @@ -46,6 +46,8 @@ void skl_watermark_ipc_update(struct drm_i915_private
> *i915);  bool skl_watermark_ipc_enabled(struct drm_i915_private *i915);  void
> skl_watermark_debugfs_register(struct drm_i915_private *i915);
> 
> +unsigned int skl_watermark_max_latency(struct drm_i915_private *i915);
> +
>  void skl_wm_init(struct drm_i915_private *i915);
> 
>  struct intel_dbuf_state {
> --
> 2.39.3


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 16/19] drm/i915: Introudce intel_crtc_scanline_to_hw()
  2023-06-06 19:15 ` [Intel-gfx] [PATCH v2 16/19] drm/i915: Introudce intel_crtc_scanline_to_hw() Ville Syrjala
@ 2023-09-13 17:37   ` Shankar, Uma
  0 siblings, 0 replies; 52+ messages in thread
From: Shankar, Uma @ 2023-09-13 17:37 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Wednesday, June 7, 2023 12:45 AM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH v2 16/19] drm/i915: Introudce
> intel_crtc_scanline_to_hw()

Typo in introduce

With this fixed, this is:
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Add a helper to convert our idea of a scanline to the hw's idea of the same
> scanline (ie. apply crtc->scanline_offset in reverse).
> We'll need this to tell the DSB do stuff on a specific scanline.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_vblank.c | 14 ++++++++++++++
> drivers/gpu/drm/i915/display/intel_vblank.h |  1 +
>  2 files changed, 15 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_vblank.c
> b/drivers/gpu/drm/i915/display/intel_vblank.c
> index f5659ebd08eb..2cec2abf9746 100644
> --- a/drivers/gpu/drm/i915/display/intel_vblank.c
> +++ b/drivers/gpu/drm/i915/display/intel_vblank.c
> @@ -251,6 +251,20 @@ static int __intel_get_crtc_scanline(struct intel_crtc
> *crtc)
>  	return (position + crtc->scanline_offset) % vtotal;  }
> 
> +int intel_crtc_scanline_to_hw(struct intel_crtc *crtc, int scanline) {
> +	const struct drm_vblank_crtc *vblank =
> +		&crtc->base.dev->vblank[drm_crtc_index(&crtc->base)];
> +	const struct drm_display_mode *mode = &vblank->hwmode;
> +	int vtotal;
> +
> +	vtotal = mode->crtc_vtotal;
> +	if (mode->flags & DRM_MODE_FLAG_INTERLACE)
> +		vtotal /= 2;
> +
> +	return (scanline + vtotal - crtc->scanline_offset) % vtotal; }
> +
>  static bool i915_get_crtc_scanoutpos(struct drm_crtc *_crtc,
>  				     bool in_vblank_irq,
>  				     int *vpos, int *hpos,
> diff --git a/drivers/gpu/drm/i915/display/intel_vblank.h
> b/drivers/gpu/drm/i915/display/intel_vblank.h
> index 08e706b29149..17636f140c71 100644
> --- a/drivers/gpu/drm/i915/display/intel_vblank.h
> +++ b/drivers/gpu/drm/i915/display/intel_vblank.h
> @@ -22,5 +22,6 @@ void intel_wait_for_pipe_scanline_stopped(struct intel_crtc
> *crtc);  void intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc);  void
> intel_crtc_update_active_timings(const struct intel_crtc_state *crtc_state,
>  				      bool vrr_enable);
> +int intel_crtc_scanline_to_hw(struct intel_crtc *crtc, int scanline);
> 
>  #endif /* __INTEL_VBLANK_H__ */
> --
> 2.39.3


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 17/19] drm/i915/dsb: Use DEwake to combat PkgC latency
  2023-06-06 19:15 ` [Intel-gfx] [PATCH v2 17/19] drm/i915/dsb: Use DEwake to combat PkgC latency Ville Syrjala
@ 2023-09-13 18:08   ` Shankar, Uma
  2023-09-27 15:51     ` Ville Syrjälä
  0 siblings, 1 reply; 52+ messages in thread
From: Shankar, Uma @ 2023-09-13 18:08 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Wednesday, June 7, 2023 12:45 AM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH v2 17/19] drm/i915/dsb: Use DEwake to combat PkgC
> latency
> 
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Normally we could be in a deep PkgC state all the way up to the point when DSB
> starts its execution at the transcoders undelayed vblank. The DSB will then have
> to wait for the hardware to wake up before it can execute anything. This will
> waste a huge chunk of the vblank time just waiting, and risks the DSB execution
> spilling into the vertical active period. That will be very bad, especially when
> programming the LUTs as the anti-collision logic will cause DSB to corrupt LUT
> writes during vertical active.
> 
> To avoid these problems we can instruct the DSB to pre-wake the display engined
> on a specific scanline so that everything will be 100% ready to go when we hit the
> transcoder's undelayed vblank.
> 
> One annoyance is that the scanline is specified as just that, a single scanline. So if
> we happen to start the DSB execution after passing said scanline no DEwake will
> happen and we may drop back into some PkgC state before reaching the
> transcoder's undelayed vblank. To prevent that we'll use the "force DEwake" bit
> to manually force the display engined to stay awake. We'll then have to clear the

Nit: Typo in engine

> force bit again after the DSB is done (the force bit remains effective even when
> the DSB is otherwise disabled).

Approach looks good, this will help hardware be ready and maximize the chance of
update within the vblank.

> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_color.c |  2 +-
>  drivers/gpu/drm/i915/display/intel_dsb.c   | 91 +++++++++++++++++++---
>  drivers/gpu/drm/i915/display/intel_dsb.h   |  3 +-
>  3 files changed, 82 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_color.c
> b/drivers/gpu/drm/i915/display/intel_color.c
> index b3dd4013d058..c5a9ea53a718 100644
> --- a/drivers/gpu/drm/i915/display/intel_color.c
> +++ b/drivers/gpu/drm/i915/display/intel_color.c
> @@ -1824,7 +1824,7 @@ void intel_color_prepare_commit(struct
> intel_crtc_state *crtc_state)
>  	if (!crtc_state->pre_csc_lut && !crtc_state->post_csc_lut)
>  		return;
> 
> -	crtc_state->dsb = intel_dsb_prepare(crtc, 1024);
> +	crtc_state->dsb = intel_dsb_prepare(crtc_state, 1024);
>  	if (!crtc_state->dsb)
>  		return;
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c
> b/drivers/gpu/drm/i915/display/intel_dsb.c
> index 73d609507f24..3e32aa49b8eb 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> @@ -7,11 +7,16 @@
>  #include "gem/i915_gem_internal.h"
> 
>  #include "i915_drv.h"
> +#include "i915_irq.h"
>  #include "i915_reg.h"
> +#include "intel_crtc.h"
>  #include "intel_de.h"
>  #include "intel_display_types.h"
>  #include "intel_dsb.h"
>  #include "intel_dsb_regs.h"
> +#include "intel_vblank.h"
> +#include "intel_vrr.h"
> +#include "skl_watermark.h"
> 
>  struct i915_vma;
> 
> @@ -47,6 +52,8 @@ struct intel_dsb {
>  	 * register.
>  	 */
>  	unsigned int ins_start_offset;
> +
> +	int dewake_scanline;
>  };
> 
>  /**
> @@ -297,17 +304,40 @@ static void intel_dsb_align_tail(struct intel_dsb *dsb)
> 
>  void intel_dsb_finish(struct intel_dsb *dsb)  {
> +	struct intel_crtc *crtc = dsb->crtc;
> +
> +	/*
> +	 * DSB_FORCE_DEWAKE remains active even after DSB is
> +	 * disabled, so make sure to clear it (if set during
> +	 * intel_dsb_commit()).
> +	 */
> +	intel_dsb_reg_write_masked(dsb, DSB_PMCTRL_2(crtc->pipe, dsb->id),
> +				   DSB_FORCE_DEWAKE, 0);

We should also keep DSB_BLOCK_DEWAKE_EXTENSION set to 1, the default .

With this fixed or clarified, this is:
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

>  	intel_dsb_align_tail(dsb);
>  }
> 
> -/**
> - * intel_dsb_commit() - Trigger workload execution of DSB.
> - * @dsb: DSB context
> - * @wait_for_vblank: wait for vblank before executing
> - *
> - * This function is used to do actual write to hardware using DSB.
> - */
> -void intel_dsb_commit(struct intel_dsb *dsb, bool wait_for_vblank)
> +static int intel_dsb_dewake_scanline(const struct intel_crtc_state
> +*crtc_state) {
> +	struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
> +	const struct drm_display_mode *adjusted_mode = &crtc_state-
> >hw.adjusted_mode;
> +	unsigned int latency = skl_watermark_max_latency(i915);
> +	int vblank_start;
> +
> +	if (crtc_state->vrr.enable) {
> +		vblank_start = intel_vrr_vmin_vblank_start(crtc_state);
> +	} else {
> +		vblank_start = adjusted_mode->crtc_vblank_start;
> +
> +		if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE)
> +			vblank_start = DIV_ROUND_UP(vblank_start, 2);
> +	}
> +
> +	return max(0, vblank_start - intel_usecs_to_scanlines(adjusted_mode,
> +latency)); }
> +
> +static void _intel_dsb_commit(struct intel_dsb *dsb, u32 ctrl,
> +			      unsigned int dewake_scanline)
>  {
>  	struct intel_crtc *crtc = dsb->crtc;
>  	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); @@ -
> 325,14 +355,49 @@ void intel_dsb_commit(struct intel_dsb *dsb, bool
> wait_for_vblank)
>  	}
> 
>  	intel_de_write_fw(dev_priv, DSB_CTRL(pipe, dsb->id),
> -			  (wait_for_vblank ? DSB_WAIT_FOR_VBLANK : 0) |
> -			  DSB_ENABLE);
> +			  ctrl | DSB_ENABLE);
> +
>  	intel_de_write_fw(dev_priv, DSB_HEAD(pipe, dsb->id),
>  			  i915_ggtt_offset(dsb->vma));
> +
> +	if (dewake_scanline >= 0) {
> +		int diff, hw_dewake_scanline;
> +
> +		hw_dewake_scanline = intel_crtc_scanline_to_hw(crtc,
> +dewake_scanline);
> +
> +		intel_de_write_fw(dev_priv, DSB_PMCTRL(pipe, dsb->id),
> +				  DSB_ENABLE_DEWAKE |
> +
> DSB_SCANLINE_FOR_DEWAKE(hw_dewake_scanline));
> +
> +		/*
> +		 * Force DEwake immediately if we're already past
> +		 * or close to racing past the target scanline.
> +		 */
> +		diff = dewake_scanline - intel_get_crtc_scanline(crtc);
> +		intel_de_write_fw(dev_priv, DSB_PMCTRL_2(pipe, dsb->id),
> +				  (diff >= 0 && diff < 5 ? DSB_FORCE_DEWAKE :
> 0) |
> +				  DSB_BLOCK_DEWAKE_EXTENSION);
> +	}
> +
>  	intel_de_write_fw(dev_priv, DSB_TAIL(pipe, dsb->id),
>  			  i915_ggtt_offset(dsb->vma) + tail);  }
> 
> +/**
> + * intel_dsb_commit() - Trigger workload execution of DSB.
> + * @dsb: DSB context
> + * @wait_for_vblank: wait for vblank before executing
> + *
> + * This function is used to do actual write to hardware using DSB.
> + */
> +void intel_dsb_commit(struct intel_dsb *dsb,
> +		      bool wait_for_vblank)
> +{
> +	_intel_dsb_commit(dsb,
> +			  wait_for_vblank ? DSB_WAIT_FOR_VBLANK : 0,
> +			  wait_for_vblank ? dsb->dewake_scanline : -1); }
> +
>  void intel_dsb_wait(struct intel_dsb *dsb)  {
>  	struct intel_crtc *crtc = dsb->crtc;
> @@ -363,7 +428,7 @@ void intel_dsb_wait(struct intel_dsb *dsb)
> 
>  /**
>   * intel_dsb_prepare() - Allocate, pin and map the DSB command buffer.
> - * @crtc: the CRTC
> + * @crtc_state: the CRTC state
>   * @max_cmds: number of commands we need to fit into command buffer
>   *
>   * This function prepare the command buffer which is used to store dsb @@ -
> 372,9 +437,10 @@ void intel_dsb_wait(struct intel_dsb *dsb)
>   * Returns:
>   * DSB context, NULL on failure
>   */
> -struct intel_dsb *intel_dsb_prepare(struct intel_crtc *crtc,
> +struct intel_dsb *intel_dsb_prepare(const struct intel_crtc_state
> +*crtc_state,
>  				    unsigned int max_cmds)
>  {
> +	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
>  	struct drm_i915_private *i915 = to_i915(crtc->base.dev);
>  	struct drm_i915_gem_object *obj;
>  	intel_wakeref_t wakeref;
> @@ -420,6 +486,7 @@ struct intel_dsb *intel_dsb_prepare(struct intel_crtc
> *crtc,
>  	dsb->size = size / 4; /* in dwords */
>  	dsb->free_pos = 0;
>  	dsb->ins_start_offset = 0;
> +	dsb->dewake_scanline = intel_dsb_dewake_scanline(crtc_state);
> 
>  	return dsb;
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb.h
> b/drivers/gpu/drm/i915/display/intel_dsb.h
> index 54e9e1dc31ee..16d80f434356 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.h
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.h
> @@ -11,9 +11,10 @@
>  #include "i915_reg_defs.h"
> 
>  struct intel_crtc;
> +struct intel_crtc_state;
>  struct intel_dsb;
> 
> -struct intel_dsb *intel_dsb_prepare(struct intel_crtc *crtc,
> +struct intel_dsb *intel_dsb_prepare(const struct intel_crtc_state
> +*crtc_state,
>  				    unsigned int max_cmds);
>  void intel_dsb_finish(struct intel_dsb *dsb);  void intel_dsb_cleanup(struct
> intel_dsb *dsb);
> --
> 2.39.3


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 18/19] drm/i915/dsb: Re-instate DSB for LUT updates
  2023-06-06 19:15 ` [Intel-gfx] [PATCH v2 18/19] drm/i915/dsb: Re-instate DSB for LUT updates Ville Syrjala
@ 2023-09-13 18:09   ` Shankar, Uma
  0 siblings, 0 replies; 52+ messages in thread
From: Shankar, Uma @ 2023-09-13 18:09 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Wednesday, June 7, 2023 12:45 AM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH v2 18/19] drm/i915/dsb: Re-instate DSB for LUT
> updates
> 
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> With all the known issues sorted out we can start to use DSB to load the LUTs.

Reviewed-by: Uma Shankar <uma.shankar@intel.com>

> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_color.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_color.c
> b/drivers/gpu/drm/i915/display/intel_color.c
> index c5a9ea53a718..213063872f26 100644
> --- a/drivers/gpu/drm/i915/display/intel_color.c
> +++ b/drivers/gpu/drm/i915/display/intel_color.c
> @@ -1814,9 +1814,6 @@ void intel_color_prepare_commit(struct
> intel_crtc_state *crtc_state)
>  	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
>  	struct drm_i915_private *i915 = to_i915(crtc->base.dev);
> 
> -	/* FIXME DSB has issues loading LUTs, disable it for now */
> -	return;
> -
>  	if (!crtc_state->hw.active ||
>  	    intel_crtc_needs_modeset(crtc_state))
>  		return;
> --
> 2.39.3


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 05/19] drm/i915/dsb: Define the contents of some intstructions bit better
  2023-09-11 20:50   ` Shankar, Uma
@ 2023-09-27 15:38     ` Ville Syrjälä
  2023-09-27 16:16       ` Shankar, Uma
  0 siblings, 1 reply; 52+ messages in thread
From: Ville Syrjälä @ 2023-09-27 15:38 UTC (permalink / raw)
  To: Shankar, Uma; +Cc: intel-gfx

On Mon, Sep 11, 2023 at 08:50:24PM +0000, Shankar, Uma wrote:
> 
> 
> > -----Original Message-----
> > From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> > Syrjala
> > Sent: Wednesday, June 7, 2023 12:45 AM
> > To: intel-gfx@lists.freedesktop.org
> > Subject: [Intel-gfx] [PATCH v2 05/19] drm/i915/dsb: Define the contents of some
> > intstructions bit better
> > 
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Add some defines to specify what goes inside certain DSB instructions.
> 
> Only upper and lower shift seems to be added in the patch, do we need a
> separate patch for this or we can squash with where its used.
> Will leave the decision to you.
> 
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_dsb.c | 12 ++++++++----
> >  1 file changed, 8 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c
> > b/drivers/gpu/drm/i915/display/intel_dsb.c
> > index 42911abcd3ab..093b2567883d 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> > @@ -70,17 +70,21 @@ struct intel_dsb {
> >  #define DSB_OPCODE_SHIFT		24
> >  #define DSB_OPCODE_NOOP			0x0
> >  #define DSB_OPCODE_MMIO_WRITE		0x1
> > +#define   DSB_BYTE_EN			0xf
> > +#define   DSB_BYTE_EN_SHIFT		20
> > +#define   DSB_REG_VALUE_MASK		0xfffff
> >  #define DSB_OPCODE_WAIT_USEC		0x2
> > -#define DSB_OPCODE_WAIT_LINES		0x3
> > +#define DSB_OPCODE_WAIT_SCANLINE	0x3
> >  #define DSB_OPCODE_WAIT_VBLANKS		0x4
> >  #define DSB_OPCODE_WAIT_DSL_IN		0x5
> >  #define DSB_OPCODE_WAIT_DSL_OUT		0x6
> > +#define   DSB_SCANLINE_UPPER_SHIFT	20
> > +#define   DSB_SCANLINE_LOWER_SHIFT	0
> >  #define DSB_OPCODE_INTERRUPT		0x7	
> >  #define DSB_OPCODE_INDEXED_WRITE	0x9
> > +/* see DSB_REG_VALUE_MASK */
> >  #define DSB_OPCODE_POLL			0xA
> > -#define DSB_BYTE_EN			0xF
> > -#define DSB_BYTE_EN_SHIFT		20
> > -#define DSB_REG_VALUE_MASK		0xfffff
> > +/* see DSB_REG_VALUE_MASK */
> 
> This comment seems redundant. With this fixed,

The comment indicates that DSB_OPCODE_POLL also uses DSB_REG_VALUE_MASK,
similar to DSB_OPCODE_INDEXED_WRITE.

> Reviewed-by: Uma Shankar <uma.shankar@intel.com>
> 
> > 
> >  static bool assert_dsb_has_room(struct intel_dsb *dsb)  {
> > --
> > 2.39.3
> 

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 17/19] drm/i915/dsb: Use DEwake to combat PkgC latency
  2023-09-13 18:08   ` Shankar, Uma
@ 2023-09-27 15:51     ` Ville Syrjälä
  2023-09-27 16:11       ` Shankar, Uma
  0 siblings, 1 reply; 52+ messages in thread
From: Ville Syrjälä @ 2023-09-27 15:51 UTC (permalink / raw)
  To: Shankar, Uma; +Cc: intel-gfx

On Wed, Sep 13, 2023 at 06:08:42PM +0000, Shankar, Uma wrote:
> 
> 
> > -----Original Message-----
> > From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville
> > Syrjala
> > Sent: Wednesday, June 7, 2023 12:45 AM
> > To: intel-gfx@lists.freedesktop.org
> > Subject: [Intel-gfx] [PATCH v2 17/19] drm/i915/dsb: Use DEwake to combat PkgC
> > latency
> > 
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Normally we could be in a deep PkgC state all the way up to the point when DSB
> > starts its execution at the transcoders undelayed vblank. The DSB will then have
> > to wait for the hardware to wake up before it can execute anything. This will
> > waste a huge chunk of the vblank time just waiting, and risks the DSB execution
> > spilling into the vertical active period. That will be very bad, especially when
> > programming the LUTs as the anti-collision logic will cause DSB to corrupt LUT
> > writes during vertical active.
> > 
> > To avoid these problems we can instruct the DSB to pre-wake the display engined
> > on a specific scanline so that everything will be 100% ready to go when we hit the
> > transcoder's undelayed vblank.
> > 
> > One annoyance is that the scanline is specified as just that, a single scanline. So if
> > we happen to start the DSB execution after passing said scanline no DEwake will
> > happen and we may drop back into some PkgC state before reaching the
> > transcoder's undelayed vblank. To prevent that we'll use the "force DEwake" bit
> > to manually force the display engined to stay awake. We'll then have to clear the
> 
> Nit: Typo in engine
> 
> > force bit again after the DSB is done (the force bit remains effective even when
> > the DSB is otherwise disabled).
> 
> Approach looks good, this will help hardware be ready and maximize the chance of
> update within the vblank.
> 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_color.c |  2 +-
> >  drivers/gpu/drm/i915/display/intel_dsb.c   | 91 +++++++++++++++++++---
> >  drivers/gpu/drm/i915/display/intel_dsb.h   |  3 +-
> >  3 files changed, 82 insertions(+), 14 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_color.c
> > b/drivers/gpu/drm/i915/display/intel_color.c
> > index b3dd4013d058..c5a9ea53a718 100644
> > --- a/drivers/gpu/drm/i915/display/intel_color.c
> > +++ b/drivers/gpu/drm/i915/display/intel_color.c
> > @@ -1824,7 +1824,7 @@ void intel_color_prepare_commit(struct
> > intel_crtc_state *crtc_state)
> >  	if (!crtc_state->pre_csc_lut && !crtc_state->post_csc_lut)
> >  		return;
> > 
> > -	crtc_state->dsb = intel_dsb_prepare(crtc, 1024);
> > +	crtc_state->dsb = intel_dsb_prepare(crtc_state, 1024);
> >  	if (!crtc_state->dsb)
> >  		return;
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c
> > b/drivers/gpu/drm/i915/display/intel_dsb.c
> > index 73d609507f24..3e32aa49b8eb 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> > @@ -7,11 +7,16 @@
> >  #include "gem/i915_gem_internal.h"
> > 
> >  #include "i915_drv.h"
> > +#include "i915_irq.h"
> >  #include "i915_reg.h"
> > +#include "intel_crtc.h"
> >  #include "intel_de.h"
> >  #include "intel_display_types.h"
> >  #include "intel_dsb.h"
> >  #include "intel_dsb_regs.h"
> > +#include "intel_vblank.h"
> > +#include "intel_vrr.h"
> > +#include "skl_watermark.h"
> > 
> >  struct i915_vma;
> > 
> > @@ -47,6 +52,8 @@ struct intel_dsb {
> >  	 * register.
> >  	 */
> >  	unsigned int ins_start_offset;
> > +
> > +	int dewake_scanline;
> >  };
> > 
> >  /**
> > @@ -297,17 +304,40 @@ static void intel_dsb_align_tail(struct intel_dsb *dsb)
> > 
> >  void intel_dsb_finish(struct intel_dsb *dsb)  {
> > +	struct intel_crtc *crtc = dsb->crtc;
> > +
> > +	/*
> > +	 * DSB_FORCE_DEWAKE remains active even after DSB is
> > +	 * disabled, so make sure to clear it (if set during
> > +	 * intel_dsb_commit()).
> > +	 */
> > +	intel_dsb_reg_write_masked(dsb, DSB_PMCTRL_2(crtc->pipe, dsb->id),
> > +				   DSB_FORCE_DEWAKE, 0);
> 
> We should also keep DSB_BLOCK_DEWAKE_EXTENSION set to 1, the default .

This is a masked write that doesn't touch that bit.

> 
> With this fixed or clarified, this is:
> Reviewed-by: Uma Shankar <uma.shankar@intel.com>
> 
> >  	intel_dsb_align_tail(dsb);
> >  }
> > 
> > -/**
> > - * intel_dsb_commit() - Trigger workload execution of DSB.
> > - * @dsb: DSB context
> > - * @wait_for_vblank: wait for vblank before executing
> > - *
> > - * This function is used to do actual write to hardware using DSB.
> > - */
> > -void intel_dsb_commit(struct intel_dsb *dsb, bool wait_for_vblank)
> > +static int intel_dsb_dewake_scanline(const struct intel_crtc_state
> > +*crtc_state) {
> > +	struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
> > +	const struct drm_display_mode *adjusted_mode = &crtc_state-
> > >hw.adjusted_mode;
> > +	unsigned int latency = skl_watermark_max_latency(i915);
> > +	int vblank_start;
> > +
> > +	if (crtc_state->vrr.enable) {
> > +		vblank_start = intel_vrr_vmin_vblank_start(crtc_state);
> > +	} else {
> > +		vblank_start = adjusted_mode->crtc_vblank_start;
> > +
> > +		if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE)
> > +			vblank_start = DIV_ROUND_UP(vblank_start, 2);
> > +	}
> > +
> > +	return max(0, vblank_start - intel_usecs_to_scanlines(adjusted_mode,
> > +latency)); }
> > +
> > +static void _intel_dsb_commit(struct intel_dsb *dsb, u32 ctrl,
> > +			      unsigned int dewake_scanline)
> >  {
> >  	struct intel_crtc *crtc = dsb->crtc;
> >  	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); @@ -
> > 325,14 +355,49 @@ void intel_dsb_commit(struct intel_dsb *dsb, bool
> > wait_for_vblank)
> >  	}
> > 
> >  	intel_de_write_fw(dev_priv, DSB_CTRL(pipe, dsb->id),
> > -			  (wait_for_vblank ? DSB_WAIT_FOR_VBLANK : 0) |
> > -			  DSB_ENABLE);
> > +			  ctrl | DSB_ENABLE);
> > +
> >  	intel_de_write_fw(dev_priv, DSB_HEAD(pipe, dsb->id),
> >  			  i915_ggtt_offset(dsb->vma));
> > +
> > +	if (dewake_scanline >= 0) {
> > +		int diff, hw_dewake_scanline;
> > +
> > +		hw_dewake_scanline = intel_crtc_scanline_to_hw(crtc,
> > +dewake_scanline);
> > +
> > +		intel_de_write_fw(dev_priv, DSB_PMCTRL(pipe, dsb->id),
> > +				  DSB_ENABLE_DEWAKE |
> > +
> > DSB_SCANLINE_FOR_DEWAKE(hw_dewake_scanline));
> > +
> > +		/*
> > +		 * Force DEwake immediately if we're already past
> > +		 * or close to racing past the target scanline.
> > +		 */
> > +		diff = dewake_scanline - intel_get_crtc_scanline(crtc);
> > +		intel_de_write_fw(dev_priv, DSB_PMCTRL_2(pipe, dsb->id),
> > +				  (diff >= 0 && diff < 5 ? DSB_FORCE_DEWAKE :
> > 0) |
> > +				  DSB_BLOCK_DEWAKE_EXTENSION);
> > +	}
> > +
> >  	intel_de_write_fw(dev_priv, DSB_TAIL(pipe, dsb->id),
> >  			  i915_ggtt_offset(dsb->vma) + tail);  }
> > 
> > +/**
> > + * intel_dsb_commit() - Trigger workload execution of DSB.
> > + * @dsb: DSB context
> > + * @wait_for_vblank: wait for vblank before executing
> > + *
> > + * This function is used to do actual write to hardware using DSB.
> > + */
> > +void intel_dsb_commit(struct intel_dsb *dsb,
> > +		      bool wait_for_vblank)
> > +{
> > +	_intel_dsb_commit(dsb,
> > +			  wait_for_vblank ? DSB_WAIT_FOR_VBLANK : 0,
> > +			  wait_for_vblank ? dsb->dewake_scanline : -1); }
> > +
> >  void intel_dsb_wait(struct intel_dsb *dsb)  {
> >  	struct intel_crtc *crtc = dsb->crtc;
> > @@ -363,7 +428,7 @@ void intel_dsb_wait(struct intel_dsb *dsb)
> > 
> >  /**
> >   * intel_dsb_prepare() - Allocate, pin and map the DSB command buffer.
> > - * @crtc: the CRTC
> > + * @crtc_state: the CRTC state
> >   * @max_cmds: number of commands we need to fit into command buffer
> >   *
> >   * This function prepare the command buffer which is used to store dsb @@ -
> > 372,9 +437,10 @@ void intel_dsb_wait(struct intel_dsb *dsb)
> >   * Returns:
> >   * DSB context, NULL on failure
> >   */
> > -struct intel_dsb *intel_dsb_prepare(struct intel_crtc *crtc,
> > +struct intel_dsb *intel_dsb_prepare(const struct intel_crtc_state
> > +*crtc_state,
> >  				    unsigned int max_cmds)
> >  {
> > +	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> >  	struct drm_i915_private *i915 = to_i915(crtc->base.dev);
> >  	struct drm_i915_gem_object *obj;
> >  	intel_wakeref_t wakeref;
> > @@ -420,6 +486,7 @@ struct intel_dsb *intel_dsb_prepare(struct intel_crtc
> > *crtc,
> >  	dsb->size = size / 4; /* in dwords */
> >  	dsb->free_pos = 0;
> >  	dsb->ins_start_offset = 0;
> > +	dsb->dewake_scanline = intel_dsb_dewake_scanline(crtc_state);
> > 
> >  	return dsb;
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_dsb.h
> > b/drivers/gpu/drm/i915/display/intel_dsb.h
> > index 54e9e1dc31ee..16d80f434356 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dsb.h
> > +++ b/drivers/gpu/drm/i915/display/intel_dsb.h
> > @@ -11,9 +11,10 @@
> >  #include "i915_reg_defs.h"
> > 
> >  struct intel_crtc;
> > +struct intel_crtc_state;
> >  struct intel_dsb;
> > 
> > -struct intel_dsb *intel_dsb_prepare(struct intel_crtc *crtc,
> > +struct intel_dsb *intel_dsb_prepare(const struct intel_crtc_state
> > +*crtc_state,
> >  				    unsigned int max_cmds);
> >  void intel_dsb_finish(struct intel_dsb *dsb);  void intel_dsb_cleanup(struct
> > intel_dsb *dsb);
> > --
> > 2.39.3
> 

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB
  2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
                   ` (22 preceding siblings ...)
  2023-06-07 14:02 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
@ 2023-09-27 16:05 ` Ville Syrjälä
  23 siblings, 0 replies; 52+ messages in thread
From: Ville Syrjälä @ 2023-09-27 16:05 UTC (permalink / raw)
  To: intel-gfx

On Tue, Jun 06, 2023 at 10:14:45PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Another attempt at re-enabling DSB based LUT loads.
> 
> The main change from the last attempt is that we now
> use the DSB's DEwake mechanism to combat PkgC latency
> which was causing the LUT to not always load correctly
> (due to the anti-collision logic not working correctly
> for DSB LUT accesses).
> 
> I also got the non-posted writes working correctly 
> which lets us load the legacy LUT without the 
> "write each entry twice" trick I used previously.
> 
> Ville Syrjälä (19):
>   drm/i915: Constify LUT entries in checker
>   drm/i915/dsb: Use non-locked register access
>   drm/i915/dsb: Dump the DSB command buffer when DSB fails
>   drm/i915/dsb: Define more DSB bits
>   drm/i915/dsb: Define the contents of some intstructions bit better
>   drm/i915/dsb: Avoid corrupting the first register write
>   drm/i915/dsb: Don't use indexed writes when byte enables are not all
>     set
>   drm/i915/dsb: Introduce intel_dsb_noop()
>   drm/i915/dsb: Introduce intel_dsb_reg_write_masked()
>   drm/i915/dsb: Add support for non-posted DSB registers writes
>   drm/i915/dsb: Don't use DSB to load the LUTs during full modeset
>   drm/i915/dsb: Load LUTs using the DSB during vblank
>   drm/i915/dsb: Use non-posted register writes for legacy LUT
>   drm/i915/dsb: Evade transcoder undelayed vblank when using DSB
>   drm/i915: Introduce skl_watermark_max_latency()
>   drm/i915: Introudce intel_crtc_scanline_to_hw()
>   drm/i915/dsb: Use DEwake to combat PkgC latency

Everything up to here pushed now.

>   drm/i915/dsb: Re-instate DSB for LUT updates
>   drm/i915: Do state check for color management changes

I'll do another repost of these two to get a fresh
CI run, just in case.

Thanks for the reviews.

> 
>  drivers/gpu/drm/i915/display/intel_color.c    |  58 +++--
>  drivers/gpu/drm/i915/display/intel_color.h    |   2 +
>  drivers/gpu/drm/i915/display/intel_crtc.c     |  10 +-
>  drivers/gpu/drm/i915/display/intel_display.c  |   3 +
>  drivers/gpu/drm/i915/display/intel_dsb.c      | 217 +++++++++++++++---
>  drivers/gpu/drm/i915/display/intel_dsb.h      |   9 +-
>  drivers/gpu/drm/i915/display/intel_dsb_regs.h |  31 +++
>  .../drm/i915/display/intel_modeset_verify.c   |   2 +
>  drivers/gpu/drm/i915/display/intel_vblank.c   |  14 ++
>  drivers/gpu/drm/i915/display/intel_vblank.h   |   1 +
>  drivers/gpu/drm/i915/display/skl_watermark.c  |  14 ++
>  drivers/gpu/drm/i915/display/skl_watermark.h  |   2 +
>  12 files changed, 317 insertions(+), 46 deletions(-)
> 
> -- 
> 2.39.3

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 17/19] drm/i915/dsb: Use DEwake to combat PkgC latency
  2023-09-27 15:51     ` Ville Syrjälä
@ 2023-09-27 16:11       ` Shankar, Uma
  0 siblings, 0 replies; 52+ messages in thread
From: Shankar, Uma @ 2023-09-27 16:11 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx



> -----Original Message-----
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Sent: Wednesday, September 27, 2023 9:22 PM
> To: Shankar, Uma <uma.shankar@intel.com>
> Cc: intel-gfx@lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH v2 17/19] drm/i915/dsb: Use DEwake to combat
> PkgC latency
> 
> On Wed, Sep 13, 2023 at 06:08:42PM +0000, Shankar, Uma wrote:
> >
> >
> > > -----Original Message-----
> > > From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf
> > > Of Ville Syrjala
> > > Sent: Wednesday, June 7, 2023 12:45 AM
> > > To: intel-gfx@lists.freedesktop.org
> > > Subject: [Intel-gfx] [PATCH v2 17/19] drm/i915/dsb: Use DEwake to
> > > combat PkgC latency
> > >
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > >
> > > Normally we could be in a deep PkgC state all the way up to the
> > > point when DSB starts its execution at the transcoders undelayed
> > > vblank. The DSB will then have to wait for the hardware to wake up
> > > before it can execute anything. This will waste a huge chunk of the
> > > vblank time just waiting, and risks the DSB execution spilling into
> > > the vertical active period. That will be very bad, especially when
> > > programming the LUTs as the anti-collision logic will cause DSB to corrupt LUT
> writes during vertical active.
> > >
> > > To avoid these problems we can instruct the DSB to pre-wake the
> > > display engined on a specific scanline so that everything will be
> > > 100% ready to go when we hit the transcoder's undelayed vblank.
> > >
> > > One annoyance is that the scanline is specified as just that, a
> > > single scanline. So if we happen to start the DSB execution after
> > > passing said scanline no DEwake will happen and we may drop back
> > > into some PkgC state before reaching the transcoder's undelayed
> > > vblank. To prevent that we'll use the "force DEwake" bit to manually
> > > force the display engined to stay awake. We'll then have to clear
> > > the
> >
> > Nit: Typo in engine
> >
> > > force bit again after the DSB is done (the force bit remains
> > > effective even when the DSB is otherwise disabled).
> >
> > Approach looks good, this will help hardware be ready and maximize the
> > chance of update within the vblank.
> >
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/display/intel_color.c |  2 +-
> > >  drivers/gpu/drm/i915/display/intel_dsb.c   | 91 +++++++++++++++++++---
> > >  drivers/gpu/drm/i915/display/intel_dsb.h   |  3 +-
> > >  3 files changed, 82 insertions(+), 14 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/display/intel_color.c
> > > b/drivers/gpu/drm/i915/display/intel_color.c
> > > index b3dd4013d058..c5a9ea53a718 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_color.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_color.c
> > > @@ -1824,7 +1824,7 @@ void intel_color_prepare_commit(struct
> > > intel_crtc_state *crtc_state)
> > >  	if (!crtc_state->pre_csc_lut && !crtc_state->post_csc_lut)
> > >  		return;
> > >
> > > -	crtc_state->dsb = intel_dsb_prepare(crtc, 1024);
> > > +	crtc_state->dsb = intel_dsb_prepare(crtc_state, 1024);
> > >  	if (!crtc_state->dsb)
> > >  		return;
> > >
> > > diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c
> > > b/drivers/gpu/drm/i915/display/intel_dsb.c
> > > index 73d609507f24..3e32aa49b8eb 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> > > @@ -7,11 +7,16 @@
> > >  #include "gem/i915_gem_internal.h"
> > >
> > >  #include "i915_drv.h"
> > > +#include "i915_irq.h"
> > >  #include "i915_reg.h"
> > > +#include "intel_crtc.h"
> > >  #include "intel_de.h"
> > >  #include "intel_display_types.h"
> > >  #include "intel_dsb.h"
> > >  #include "intel_dsb_regs.h"
> > > +#include "intel_vblank.h"
> > > +#include "intel_vrr.h"
> > > +#include "skl_watermark.h"
> > >
> > >  struct i915_vma;
> > >
> > > @@ -47,6 +52,8 @@ struct intel_dsb {
> > >  	 * register.
> > >  	 */
> > >  	unsigned int ins_start_offset;
> > > +
> > > +	int dewake_scanline;
> > >  };
> > >
> > >  /**
> > > @@ -297,17 +304,40 @@ static void intel_dsb_align_tail(struct
> > > intel_dsb *dsb)
> > >
> > >  void intel_dsb_finish(struct intel_dsb *dsb)  {
> > > +	struct intel_crtc *crtc = dsb->crtc;
> > > +
> > > +	/*
> > > +	 * DSB_FORCE_DEWAKE remains active even after DSB is
> > > +	 * disabled, so make sure to clear it (if set during
> > > +	 * intel_dsb_commit()).
> > > +	 */
> > > +	intel_dsb_reg_write_masked(dsb, DSB_PMCTRL_2(crtc->pipe, dsb->id),
> > > +				   DSB_FORCE_DEWAKE, 0);
> >
> > We should also keep DSB_BLOCK_DEWAKE_EXTENSION set to 1, the default .
> 
> This is a masked write that doesn't touch that bit.

Oh ok, yeah got it.

> >
> > With this fixed or clarified, this is:
> > Reviewed-by: Uma Shankar <uma.shankar@intel.com>
> >
> > >  	intel_dsb_align_tail(dsb);
> > >  }
> > >
> > > -/**
> > > - * intel_dsb_commit() - Trigger workload execution of DSB.
> > > - * @dsb: DSB context
> > > - * @wait_for_vblank: wait for vblank before executing
> > > - *
> > > - * This function is used to do actual write to hardware using DSB.
> > > - */
> > > -void intel_dsb_commit(struct intel_dsb *dsb, bool wait_for_vblank)
> > > +static int intel_dsb_dewake_scanline(const struct intel_crtc_state
> > > +*crtc_state) {
> > > +	struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
> > > +	const struct drm_display_mode *adjusted_mode = &crtc_state-
> > > >hw.adjusted_mode;
> > > +	unsigned int latency = skl_watermark_max_latency(i915);
> > > +	int vblank_start;
> > > +
> > > +	if (crtc_state->vrr.enable) {
> > > +		vblank_start = intel_vrr_vmin_vblank_start(crtc_state);
> > > +	} else {
> > > +		vblank_start = adjusted_mode->crtc_vblank_start;
> > > +
> > > +		if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE)
> > > +			vblank_start = DIV_ROUND_UP(vblank_start, 2);
> > > +	}
> > > +
> > > +	return max(0, vblank_start -
> > > +intel_usecs_to_scanlines(adjusted_mode,
> > > +latency)); }
> > > +
> > > +static void _intel_dsb_commit(struct intel_dsb *dsb, u32 ctrl,
> > > +			      unsigned int dewake_scanline)
> > >  {
> > >  	struct intel_crtc *crtc = dsb->crtc;
> > >  	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); @@ -
> > > 325,14 +355,49 @@ void intel_dsb_commit(struct intel_dsb *dsb, bool
> > > wait_for_vblank)
> > >  	}
> > >
> > >  	intel_de_write_fw(dev_priv, DSB_CTRL(pipe, dsb->id),
> > > -			  (wait_for_vblank ? DSB_WAIT_FOR_VBLANK : 0) |
> > > -			  DSB_ENABLE);
> > > +			  ctrl | DSB_ENABLE);
> > > +
> > >  	intel_de_write_fw(dev_priv, DSB_HEAD(pipe, dsb->id),
> > >  			  i915_ggtt_offset(dsb->vma));
> > > +
> > > +	if (dewake_scanline >= 0) {
> > > +		int diff, hw_dewake_scanline;
> > > +
> > > +		hw_dewake_scanline = intel_crtc_scanline_to_hw(crtc,
> > > +dewake_scanline);
> > > +
> > > +		intel_de_write_fw(dev_priv, DSB_PMCTRL(pipe, dsb->id),
> > > +				  DSB_ENABLE_DEWAKE |
> > > +
> > > DSB_SCANLINE_FOR_DEWAKE(hw_dewake_scanline));
> > > +
> > > +		/*
> > > +		 * Force DEwake immediately if we're already past
> > > +		 * or close to racing past the target scanline.
> > > +		 */
> > > +		diff = dewake_scanline - intel_get_crtc_scanline(crtc);
> > > +		intel_de_write_fw(dev_priv, DSB_PMCTRL_2(pipe, dsb->id),
> > > +				  (diff >= 0 && diff < 5 ? DSB_FORCE_DEWAKE :
> > > 0) |
> > > +				  DSB_BLOCK_DEWAKE_EXTENSION);
> > > +	}
> > > +
> > >  	intel_de_write_fw(dev_priv, DSB_TAIL(pipe, dsb->id),
> > >  			  i915_ggtt_offset(dsb->vma) + tail);  }
> > >
> > > +/**
> > > + * intel_dsb_commit() - Trigger workload execution of DSB.
> > > + * @dsb: DSB context
> > > + * @wait_for_vblank: wait for vblank before executing
> > > + *
> > > + * This function is used to do actual write to hardware using DSB.
> > > + */
> > > +void intel_dsb_commit(struct intel_dsb *dsb,
> > > +		      bool wait_for_vblank)
> > > +{
> > > +	_intel_dsb_commit(dsb,
> > > +			  wait_for_vblank ? DSB_WAIT_FOR_VBLANK : 0,
> > > +			  wait_for_vblank ? dsb->dewake_scanline : -1); }
> > > +
> > >  void intel_dsb_wait(struct intel_dsb *dsb)  {
> > >  	struct intel_crtc *crtc = dsb->crtc; @@ -363,7 +428,7 @@ void
> > > intel_dsb_wait(struct intel_dsb *dsb)
> > >
> > >  /**
> > >   * intel_dsb_prepare() - Allocate, pin and map the DSB command buffer.
> > > - * @crtc: the CRTC
> > > + * @crtc_state: the CRTC state
> > >   * @max_cmds: number of commands we need to fit into command buffer
> > >   *
> > >   * This function prepare the command buffer which is used to store
> > > dsb @@ -
> > > 372,9 +437,10 @@ void intel_dsb_wait(struct intel_dsb *dsb)
> > >   * Returns:
> > >   * DSB context, NULL on failure
> > >   */
> > > -struct intel_dsb *intel_dsb_prepare(struct intel_crtc *crtc,
> > > +struct intel_dsb *intel_dsb_prepare(const struct intel_crtc_state
> > > +*crtc_state,
> > >  				    unsigned int max_cmds)
> > >  {
> > > +	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> > >  	struct drm_i915_private *i915 = to_i915(crtc->base.dev);
> > >  	struct drm_i915_gem_object *obj;
> > >  	intel_wakeref_t wakeref;
> > > @@ -420,6 +486,7 @@ struct intel_dsb *intel_dsb_prepare(struct
> > > intel_crtc *crtc,
> > >  	dsb->size = size / 4; /* in dwords */
> > >  	dsb->free_pos = 0;
> > >  	dsb->ins_start_offset = 0;
> > > +	dsb->dewake_scanline = intel_dsb_dewake_scanline(crtc_state);
> > >
> > >  	return dsb;
> > >
> > > diff --git a/drivers/gpu/drm/i915/display/intel_dsb.h
> > > b/drivers/gpu/drm/i915/display/intel_dsb.h
> > > index 54e9e1dc31ee..16d80f434356 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_dsb.h
> > > +++ b/drivers/gpu/drm/i915/display/intel_dsb.h
> > > @@ -11,9 +11,10 @@
> > >  #include "i915_reg_defs.h"
> > >
> > >  struct intel_crtc;
> > > +struct intel_crtc_state;
> > >  struct intel_dsb;
> > >
> > > -struct intel_dsb *intel_dsb_prepare(struct intel_crtc *crtc,
> > > +struct intel_dsb *intel_dsb_prepare(const struct intel_crtc_state
> > > +*crtc_state,
> > >  				    unsigned int max_cmds);
> > >  void intel_dsb_finish(struct intel_dsb *dsb);  void
> > > intel_dsb_cleanup(struct intel_dsb *dsb);
> > > --
> > > 2.39.3
> >
> 
> --
> Ville Syrjälä
> Intel

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [Intel-gfx] [PATCH v2 05/19] drm/i915/dsb: Define the contents of some intstructions bit better
  2023-09-27 15:38     ` Ville Syrjälä
@ 2023-09-27 16:16       ` Shankar, Uma
  0 siblings, 0 replies; 52+ messages in thread
From: Shankar, Uma @ 2023-09-27 16:16 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx



> -----Original Message-----
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Sent: Wednesday, September 27, 2023 9:08 PM
> To: Shankar, Uma <uma.shankar@intel.com>
> Cc: intel-gfx@lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH v2 05/19] drm/i915/dsb: Define the contents of
> some intstructions bit better
> 
> On Mon, Sep 11, 2023 at 08:50:24PM +0000, Shankar, Uma wrote:
> >
> >
> > > -----Original Message-----
> > > From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf
> > > Of Ville Syrjala
> > > Sent: Wednesday, June 7, 2023 12:45 AM
> > > To: intel-gfx@lists.freedesktop.org
> > > Subject: [Intel-gfx] [PATCH v2 05/19] drm/i915/dsb: Define the
> > > contents of some intstructions bit better
> > >
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > >
> > > Add some defines to specify what goes inside certain DSB instructions.
> >
> > Only upper and lower shift seems to be added in the patch, do we need
> > a separate patch for this or we can squash with where its used.
> > Will leave the decision to you.
> >
> > >
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/display/intel_dsb.c | 12 ++++++++----
> > >  1 file changed, 8 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c
> > > b/drivers/gpu/drm/i915/display/intel_dsb.c
> > > index 42911abcd3ab..093b2567883d 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> > > @@ -70,17 +70,21 @@ struct intel_dsb {
> > >  #define DSB_OPCODE_SHIFT		24
> > >  #define DSB_OPCODE_NOOP			0x0
> > >  #define DSB_OPCODE_MMIO_WRITE		0x1
> > > +#define   DSB_BYTE_EN			0xf
> > > +#define   DSB_BYTE_EN_SHIFT		20
> > > +#define   DSB_REG_VALUE_MASK		0xfffff
> > >  #define DSB_OPCODE_WAIT_USEC		0x2
> > > -#define DSB_OPCODE_WAIT_LINES		0x3
> > > +#define DSB_OPCODE_WAIT_SCANLINE	0x3
> > >  #define DSB_OPCODE_WAIT_VBLANKS		0x4
> > >  #define DSB_OPCODE_WAIT_DSL_IN		0x5
> > >  #define DSB_OPCODE_WAIT_DSL_OUT		0x6
> > > +#define   DSB_SCANLINE_UPPER_SHIFT	20
> > > +#define   DSB_SCANLINE_LOWER_SHIFT	0
> > >  #define DSB_OPCODE_INTERRUPT		0x7
> > >  #define DSB_OPCODE_INDEXED_WRITE	0x9
> > > +/* see DSB_REG_VALUE_MASK */
> > >  #define DSB_OPCODE_POLL			0xA
> > > -#define DSB_BYTE_EN			0xF
> > > -#define DSB_BYTE_EN_SHIFT		20
> > > -#define DSB_REG_VALUE_MASK		0xfffff
> > > +/* see DSB_REG_VALUE_MASK */
> >
> > This comment seems redundant. With this fixed,
> 
> The comment indicates that DSB_OPCODE_POLL also uses
> DSB_REG_VALUE_MASK, similar to DSB_OPCODE_INDEXED_WRITE.

I meant comment is useful, but it got duplicated here.

Regards,
Uma Shankar

> > Reviewed-by: Uma Shankar <uma.shankar@intel.com>
> >
> > >
> > >  static bool assert_dsb_has_room(struct intel_dsb *dsb)  {
> > > --
> > > 2.39.3
> >
> 
> --
> Ville Syrjälä
> Intel

^ permalink raw reply	[flat|nested] 52+ messages in thread

end of thread, other threads:[~2023-09-27 16:22 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-06 19:14 [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjala
2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 01/19] drm/i915: Constify LUT entries in checker Ville Syrjala
2023-07-05  9:43   ` Manna, Animesh
2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 02/19] drm/i915/dsb: Use non-locked register access Ville Syrjala
2023-06-08 11:46   ` Jani Nikula
2023-09-11 20:22     ` Shankar, Uma
2023-09-12  7:37       ` Jani Nikula
2023-09-12  7:49         ` Shankar, Uma
2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 03/19] drm/i915/dsb: Dump the DSB command buffer when DSB fails Ville Syrjala
2023-07-11  4:55   ` Manna, Animesh
2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 04/19] drm/i915/dsb: Define more DSB bits Ville Syrjala
2023-09-11 20:32   ` Shankar, Uma
2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 05/19] drm/i915/dsb: Define the contents of some intstructions bit better Ville Syrjala
2023-09-11 20:50   ` Shankar, Uma
2023-09-27 15:38     ` Ville Syrjälä
2023-09-27 16:16       ` Shankar, Uma
2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 06/19] drm/i915/dsb: Avoid corrupting the first register write Ville Syrjala
2023-07-05  9:39   ` Manna, Animesh
2023-07-05  9:46     ` Manna, Animesh
2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 07/19] drm/i915/dsb: Don't use indexed writes when byte enables are not all set Ville Syrjala
2023-07-11  5:00   ` Manna, Animesh
2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 08/19] drm/i915/dsb: Introduce intel_dsb_noop() Ville Syrjala
2023-09-11 20:52   ` Shankar, Uma
2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 09/19] drm/i915/dsb: Introduce intel_dsb_reg_write_masked() Ville Syrjala
2023-09-11 20:55   ` Shankar, Uma
2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 10/19] drm/i915/dsb: Add support for non-posted DSB registers writes Ville Syrjala
2023-07-11  5:43   ` Manna, Animesh
2023-09-11 21:04     ` Shankar, Uma
2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 11/19] drm/i915/dsb: Don't use DSB to load the LUTs during full modeset Ville Syrjala
2023-09-11 21:09   ` Shankar, Uma
2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 12/19] drm/i915/dsb: Load LUTs using the DSB during vblank Ville Syrjala
2023-09-13 16:24   ` Shankar, Uma
2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 13/19] drm/i915/dsb: Use non-posted register writes for legacy LUT Ville Syrjala
2023-09-13 17:02   ` Shankar, Uma
2023-06-06 19:14 ` [Intel-gfx] [PATCH v2 14/19] drm/i915/dsb: Evade transcoder undelayed vblank when using DSB Ville Syrjala
2023-09-13 17:13   ` Shankar, Uma
2023-06-06 19:15 ` [Intel-gfx] [PATCH v2 15/19] drm/i915: Introduce skl_watermark_max_latency() Ville Syrjala
2023-09-13 17:25   ` Shankar, Uma
2023-06-06 19:15 ` [Intel-gfx] [PATCH v2 16/19] drm/i915: Introudce intel_crtc_scanline_to_hw() Ville Syrjala
2023-09-13 17:37   ` Shankar, Uma
2023-06-06 19:15 ` [Intel-gfx] [PATCH v2 17/19] drm/i915/dsb: Use DEwake to combat PkgC latency Ville Syrjala
2023-09-13 18:08   ` Shankar, Uma
2023-09-27 15:51     ` Ville Syrjälä
2023-09-27 16:11       ` Shankar, Uma
2023-06-06 19:15 ` [Intel-gfx] [PATCH v2 18/19] drm/i915/dsb: Re-instate DSB for LUT updates Ville Syrjala
2023-09-13 18:09   ` Shankar, Uma
2023-06-06 19:15 ` [Intel-gfx] [PATCH v2 19/19] drm/i915: Do state check for color management changes Ville Syrjala
2023-06-06 22:34 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Load LUTs with DSB (rev2) Patchwork
2023-06-06 22:34 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-06-06 22:48 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-06-07 14:02 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-09-27 16:05 ` [Intel-gfx] [PATCH v2 00/19] drm/i915: Load LUTs with DSB Ville Syrjälä

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.