Skip to contentSkip to conversation

drm/i915: re-enable -Wunused-but-set-variable

PATCH Superseded Jani Nikula 8 participants 37 messages May 26, 2023 – Jun 8, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover drm/i915: re-enable -Wunused-but-set-variable

Bring back -Wunused-but-set-variable both in W=1 build as well as locally for CI and development. This already found dubious code.

Jani Nikula (15):
drm/i915/plane: warn on non-zero plane offset drm/i915/ddi: drop unused but set variable intel_dp drm/i915/dsi: drop unused but set variable data drm/i915/dsi: drop unused but set variable vbp drm/i915/dpll: drop unused but set variables bestn and bestm1 drm/i915/fb: drop unused but set variable cpp drm/i915/irq: drop unused but set variable tmp drm/i915/gt/uc: drop unused but set variable sseu drm/i915/gem: drop unused but set variable unpinned drm/i915/gem: annotate maybe unused but set variable c drm/i915/selftest: annotate maybe unused but set variable unused drm/i915: annotate maybe unused but set intel_plane_state variables drm/i915: annotate maybe unused but set intel_crtc_state variables drm/i915/gvt: annotate maybe unused gma_bottom variables drm/i915: re-enable -Wunused-but-set-variable

 drivers/gpu/drm/i915/Makefile                      |  2 +-
 drivers/gpu/drm/i915/display/i9xx_plane.c          |  2 ++
 drivers/gpu/drm/i915/display/intel_atomic_plane.c  |  2 +-
 drivers/gpu/drm/i915/display/intel_cdclk.c         |  2 +-
 drivers/gpu/drm/i915/display/intel_ddi.c           |  4 ----
 drivers/gpu/drm/i915/display/intel_display.c       | 10 +++++-----
 drivers/gpu/drm/i915/display/intel_display_irq.c   |  4 ++--
 drivers/gpu/drm/i915/display/intel_dpll.c          |  4 +---
 drivers/gpu/drm/i915/display/intel_fb.c            |  3 +--
 drivers/gpu/drm/i915/display/intel_fbc.c           |  6 +++---
 drivers/gpu/drm/i915/display/skl_universal_plane.c |  1 +
 drivers/gpu/drm/i915/display/skl_watermark.c       |  2 +-
 drivers/gpu/drm/i915/display/vlv_dsi.c             |  6 ++----
 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c     |  3 +--
 drivers/gpu/drm/i915/gem/i915_gem_shmem.c          |  2 +-
 drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c     |  2 --
 drivers/gpu/drm/i915/gvt/cmd_parser.c              |  4 ++--
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c      |  2 +-
 18 files changed, 26 insertions(+), 35 deletions(-)
Signature · 1 line
2.39.2
#1 lore raw

PATCH 1/15 drm/i915/plane: warn on non-zero plane offset

We assume the plane offset is 0. Warn if it's not. This also fixes a warn on unused but set variable offset.

---
 drivers/gpu/drm/i915/display/i9xx_plane.c          | 2 ++
 drivers/gpu/drm/i915/display/skl_universal_plane.c | 1 +
 2 files changed, 3 insertions(+)
drivers/gpu/drm/i915/display/i9xx_plane.c +2 -0
index 616654adbfb8..b52a681ca85e 100644
@@ -1037,6 +1037,8 @@ i9xx_get_initial_plane_config(struct intel_crtc *crtc,
 	}
 	plane_config->base = base;
 
+	drm_WARN_ON(&dev_priv->drm, offset != 0);
+
 	val = intel_de_read(dev_priv, PIPESRC(pipe));
 	fb->width = REG_FIELD_GET(PIPESRC_WIDTH_MASK, val) + 1;
 	fb->height = REG_FIELD_GET(PIPESRC_HEIGHT_MASK, val) + 1;
drivers/gpu/drm/i915/display/skl_universal_plane.c +1 -0
index 36070d86550f..6b01a0b68b97 100644
@@ -2529,6 +2529,7 @@ skl_get_initial_plane_config(struct intel_crtc *crtc,
 	plane_config->base = base;
 
 	offset = intel_de_read(dev_priv, PLANE_OFFSET(pipe, plane_id));
+	drm_WARN_ON(&dev_priv->drm, offset != 0);
 
 	val = intel_de_read(dev_priv, PLANE_SIZE(pipe, plane_id));
 	fb->height = REG_FIELD_GET(PLANE_HEIGHT_MASK, val) + 1;
Signature · 1 line
2.39.2
#9 lore raw

PATCH 2/15 drm/i915/ddi: drop unused but set variable intel_dp

In reply to Jani Nikula

Prepare for re-enabling -Wunused-but-set-variable.

The intel_dp variable has been unused since commit ef79fafe9dae ("drm/i915: Eliminate intel_dp.regs.dp_tp_{ctl,status}").

---
 drivers/gpu/drm/i915/display/intel_ddi.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/i915/display/intel_ddi.c +0 -4
index d1a9a3cf94b5..ced01813e097 100644
@@ -2225,12 +2225,10 @@ static void intel_ddi_enable_fec(struct intel_encoder *encoder,
 				 const struct intel_crtc_state *crtc_state)
 {
 	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
-	struct intel_dp *intel_dp;
 
 	if (!crtc_state->fec_enable)
 		return;
 
-	intel_dp = enc_to_intel_dp(encoder);
 	intel_de_rmw(dev_priv, dp_tp_ctl_reg(encoder, crtc_state),
 		     0, DP_TP_CTL_FEC_ENABLE);
 }
@@ -2239,12 +2237,10 @@ static void intel_ddi_disable_fec_state(struct intel_encoder *encoder,
 					const struct intel_crtc_state *crtc_state)
 {
 	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
-	struct intel_dp *intel_dp;
 
 	if (!crtc_state->fec_enable)
 		return;
 
-	intel_dp = enc_to_intel_dp(encoder);
 	intel_de_rmw(dev_priv, dp_tp_ctl_reg(encoder, crtc_state),
 		     DP_TP_CTL_FEC_ENABLE, 0);
 	intel_de_posting_read(dev_priv, dp_tp_ctl_reg(encoder, crtc_state));
Signature · 1 line
2.39.2
#10 lore raw

PATCH 3/15 drm/i915/dsi: drop unused but set variable data

In reply to Jani Nikula

Prepare for re-enabling -Wunused-but-set-variable.

---
 drivers/gpu/drm/i915/display/vlv_dsi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/display/vlv_dsi.c +1 -2
index cd90a30e04d8..aecd0142ce40 100644
@@ -136,7 +136,7 @@ static ssize_t intel_dsi_host_transfer(struct mipi_dsi_host *host,
 	enum port port = intel_dsi_host->port;
 	struct mipi_dsi_packet packet;
 	ssize_t ret;
-	const u8 *header, *data;
+	const u8 *header;
 	i915_reg_t data_reg, ctrl_reg;
 	u32 data_mask, ctrl_mask;
 
@@ -145,7 +145,6 @@ static ssize_t intel_dsi_host_transfer(struct mipi_dsi_host *host,
 		return ret;
 
 	header = packet.header;
-	data = packet.payload;
 
 	if (msg->flags & MIPI_DSI_MSG_USE_LPM) {
 		data_reg = MIPI_LP_GEN_DATA(port);
Signature · 1 line
2.39.2
#11 lore raw

PATCH 4/15 drm/i915/dsi: drop unused but set variable vbp

In reply to Jani Nikula

Prepare for re-enabling -Wunused-but-set-variable.

The vbp is not used for anything in the readout, as we get e.g. crtc_vtotal from BXT_MIPI_TRANS_VTOTAL.

---
 drivers/gpu/drm/i915/display/vlv_dsi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/display/vlv_dsi.c +1 -2
index aecd0142ce40..ae2f3ab3e73d 100644
@@ -1039,7 +1039,7 @@ static void bxt_dsi_get_pipe_config(struct intel_encoder *encoder,
 	unsigned int lane_count = intel_dsi->lane_count;
 	unsigned int bpp, fmt;
 	enum port port;
-	u16 hactive, hfp, hsync, hbp, vfp, vsync, vbp;
+	u16 hactive, hfp, hsync, hbp, vfp, vsync;
 	u16 hfp_sw, hsync_sw, hbp_sw;
 	u16 crtc_htotal_sw, crtc_hsync_start_sw, crtc_hsync_end_sw,
 				crtc_hblank_start_sw, crtc_hblank_end_sw;
@@ -1104,7 +1104,6 @@ static void bxt_dsi_get_pipe_config(struct intel_encoder *encoder,
 	/* vertical values are in terms of lines */
 	vfp = intel_de_read(dev_priv, MIPI_VFP_COUNT(port));
 	vsync = intel_de_read(dev_priv, MIPI_VSYNC_PADDING_COUNT(port));
-	vbp = intel_de_read(dev_priv, MIPI_VBP_COUNT(port));
 
 	adjusted_mode->crtc_htotal = hactive + hfp + hsync + hbp;
 	adjusted_mode->crtc_hsync_start = hfp + adjusted_mode->crtc_hdisplay;
Signature · 1 line
2.39.2
#12 lore raw

PATCH 5/15 drm/i915/dpll: drop unused but set variables bestn and bestm1

In reply to Jani Nikula

Prepare for re-enabling -Wunused-but-set-variable.

---
 drivers/gpu/drm/i915/display/intel_dpll.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_dpll.c +1 -3
index 824be7f03724..999badfe2906 100644
@@ -1793,13 +1793,11 @@ static void chv_prepare_pll(const struct intel_crtc_state *crtc_state)
 	enum pipe pipe = crtc->pipe;
 	enum dpio_channel port = vlv_pipe_to_channel(pipe);
 	u32 loopfilter, tribuf_calcntr;
-	u32 bestn, bestm1, bestm2, bestp1, bestp2, bestm2_frac;
+	u32 bestm2, bestp1, bestp2, bestm2_frac;
 	u32 dpio_val;
 	int vco;
 
-	bestn = crtc_state->dpll.n;
 	bestm2_frac = crtc_state->dpll.m2 & 0x3fffff;
-	bestm1 = crtc_state->dpll.m1;
 	bestm2 = crtc_state->dpll.m2 >> 22;
 	bestp1 = crtc_state->dpll.p1;
 	bestp2 = crtc_state->dpll.p2;
Signature · 1 line
2.39.2
#14 lore raw

PATCH 7/15 drm/i915/irq: drop unused but set variable tmp

In reply to Jani Nikula

Prepare for re-enabling -Wunused-but-set-variable.

---
 drivers/gpu/drm/i915/display/intel_display_irq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/display/intel_display_irq.c +2 -2
index 3b2a287d2041..31dd7c9c76b9 100644
@@ -873,7 +873,7 @@ static void gen11_dsi_te_interrupt_handler(struct drm_i915_private *dev_priv,
 	enum pipe pipe = INVALID_PIPE;
 	enum transcoder dsi_trans;
 	enum port port;
-	u32 val, tmp;
+	u32 val;
 
 	/*
 	 * Incase of dual link, TE comes from DSI_1
@@ -920,7 +920,7 @@ static void gen11_dsi_te_interrupt_handler(struct drm_i915_private *dev_priv,
 
 	/* clear TE in dsi IIR */
 	port = (te_trigger & DSI1_TE) ? PORT_B : PORT_A;
-	tmp = intel_uncore_rmw(&dev_priv->uncore, DSI_INTR_IDENT_REG(port), 0, 0);
+	intel_uncore_rmw(&dev_priv->uncore, DSI_INTR_IDENT_REG(port), 0, 0);
 }
 
 static u32 gen8_de_pipe_flip_done_mask(struct drm_i915_private *i915)
Signature · 1 line
2.39.2
#15 lore raw

PATCH 8/15 drm/i915/gt/uc: drop unused but set variable sseu

In reply to Jani Nikula

Prepare for re-enabling -Wunused-but-set-variable.

Apparently sseu is leftover from commit 9a92732f040a ("drm/i915/gt: Add general DSS steering iterator to intel_gt_mcr").

---
 drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c +0 -2
index 0ff864da92df..331cec07c125 100644
@@ -301,7 +301,6 @@ guc_capture_alloc_steered_lists(struct intel_guc *guc,
 	const struct __guc_mmio_reg_descr_group *list;
 	struct __guc_mmio_reg_descr_group *extlists;
 	struct __guc_mmio_reg_descr *extarray;
-	struct sseu_dev_info *sseu;
 	bool has_xehpg_extregs;
 
 	/* steered registers currently only exist for the render-class */
@@ -318,7 +317,6 @@ guc_capture_alloc_steered_lists(struct intel_guc *guc,
 	if (has_xehpg_extregs)
 		num_steer_regs += ARRAY_SIZE(xehpg_extregs);
 
-	sseu = &gt->info.sseu;
 	for_each_ss_steering(iter, gt, slice, subslice)
 		num_tot_regs += num_steer_regs;
 
Signature · 1 line
2.39.2
#13 lore raw

PATCH 6/15 drm/i915/fb: drop unused but set variable cpp

In reply to Jani Nikula

Prepare for re-enabling -Wunused-but-set-variable.

---
 drivers/gpu/drm/i915/display/intel_fb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/display/intel_fb.c +1 -2
index 0d27a98dcbbe..446bbf7986b6 100644
@@ -1601,7 +1601,7 @@ int intel_fill_fb_info(struct drm_i915_private *i915, struct intel_framebuffer *
 	for (i = 0; i < num_planes; i++) {
 		struct fb_plane_view_dims view_dims;
 		unsigned int width, height;
-		unsigned int cpp, size;
+		unsigned int size;
 		u32 offset;
 		int x, y;
 		int ret;
@@ -1618,7 +1618,6 @@ int intel_fill_fb_info(struct drm_i915_private *i915, struct intel_framebuffer *
 				return -EINVAL;
 		}
 
-		cpp = fb->base.format->cpp[i];
 		intel_fb_plane_dims(fb, i, &width, &height);
 
 		ret = convert_plane_offset_to_xy(fb, i, width, &x, &y);
Signature · 1 line
2.39.2
#17 lore raw

PATCH 9/15 drm/i915/gem: drop unused but set variable unpinned

In reply to Jani Nikula

Prepare for re-enabling -Wunused-but-set-variable.

---
 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +1 -2
index 5fb459ea4294..cfd7929587d8 100644
@@ -736,7 +736,6 @@ static int eb_reserve(struct i915_execbuffer *eb)
 	struct eb_vma *ev;
 	unsigned int pass;
 	int err = 0;
-	bool unpinned;
 
 	/*
 	 * We have one more buffers that we couldn't bind, which could be due to
@@ -776,7 +775,7 @@ static int eb_reserve(struct i915_execbuffer *eb)
 			pin_flags |= PIN_NONBLOCK;
 
 		if (pass >= 1)
-			unpinned = eb_unbind(eb, pass >= 2);
+			eb_unbind(eb, pass >= 2);
 
 		if (pass == 2) {
 			err = mutex_lock_interruptible(&eb->context->vm->mutex);
Signature · 1 line
2.39.2
#19 lore raw

PATCH 10/15 drm/i915/gem: annotate maybe unused but set variable c

In reply to Jani Nikula

Prepare for re-enabling -Wunused-but-set-variable.

The variable 'c' appears unused, but I'm not sure what should be done with it. Annotate it with __maybe_unused.

---
 drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/gem/i915_gem_shmem.c +1 -1
index cad4a6017f4b..33d5d5178103 100644
@@ -455,7 +455,7 @@ shmem_pwrite(struct drm_i915_gem_object *obj,
 		struct page *page;
 		void *data, *vaddr;
 		int err;
-		char c;
+		char __maybe_unused c;
 
 		len = PAGE_SIZE - pg;
 		if (len > remain)
Signature · 1 line
2.39.2
#21 lore raw

PATCH 11/15 drm/i915/selftest: annotate maybe unused but set variable unused

In reply to Jani Nikula

Prepare for re-enabling -Wunused-but-set-variable.

The variable is indeed 'unused' as the name suggests, but we can't just drop it because i915_vma_unbind_unlocked() is annotated __must_check. Apparently the selftest does not really need to check the value.

---
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +1 -1
index 36940ef10108..5c397a2df70e 100644
@@ -391,7 +391,7 @@ static void close_object_list(struct list_head *objects,
 			      struct i915_address_space *vm)
 {
 	struct drm_i915_gem_object *obj, *on;
-	int ignored;
+	int __maybe_unused ignored;
 
 	list_for_each_entry_safe(obj, on, objects, st_link) {
 		struct i915_vma *vma;
Signature · 1 line
2.39.2
#22 lore raw

PATCH 12/15 drm/i915: annotate maybe unused but set intel_plane_state variables

In reply to Jani Nikula

Prepare for re-enabling -Wunused-but-set-variable.

for_each_new_intel_plane_in_state() requires passing in a struct intel_plane_state pointer, which it uses, but in many places this leads to warning about unused but set variables. Annotate them with __maybe_unused.

---
 drivers/gpu/drm/i915/display/intel_atomic_plane.c | 2 +-
 drivers/gpu/drm/i915/display/intel_cdclk.c        | 2 +-
 drivers/gpu/drm/i915/display/intel_display.c      | 8 ++++----
 drivers/gpu/drm/i915/display/intel_fbc.c          | 6 +++---
 4 files changed, 9 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/display/intel_atomic_plane.c +1 -1
index 4125ee07a271..7d9578ebae55 100644
@@ -722,7 +722,7 @@ skl_next_plane_to_commit(struct intel_atomic_state *state,
 {
 	struct intel_crtc_state *crtc_state =
 		intel_atomic_get_new_crtc_state(state, crtc);
-	struct intel_plane_state *plane_state;
+	struct intel_plane_state __maybe_unused *plane_state;
 	struct intel_plane *plane;
 	int i;
 
drivers/gpu/drm/i915/display/intel_cdclk.c +1 -1
index 6bed75f1541a..41eebae46d99 100644
@@ -2947,7 +2947,7 @@ int intel_cdclk_atomic_check(struct intel_atomic_state *state,
 {
 	const struct intel_cdclk_state *old_cdclk_state;
 	const struct intel_cdclk_state *new_cdclk_state;
-	struct intel_plane_state *plane_state;
+	struct intel_plane_state __maybe_unused *plane_state;
 	struct intel_plane *plane;
 	int ret;
 	int i;
drivers/gpu/drm/i915/display/intel_display.c +4 -4
index 38836e2e8807..a1e635ab0315 100644
@@ -971,7 +971,7 @@ static void intel_crtc_enable_flip_done(struct intel_atomic_state *state,
 	const struct intel_crtc_state *crtc_state =
 		intel_atomic_get_new_crtc_state(state, crtc);
 	u8 update_planes = crtc_state->update_planes;
-	const struct intel_plane_state *plane_state;
+	const struct intel_plane_state __maybe_unused *plane_state;
 	struct intel_plane *plane;
 	int i;
 
@@ -988,7 +988,7 @@ static void intel_crtc_disable_flip_done(struct intel_atomic_state *state,
 	const struct intel_crtc_state *crtc_state =
 		intel_atomic_get_new_crtc_state(state, crtc);
 	u8 update_planes = crtc_state->update_planes;
-	const struct intel_plane_state *plane_state;
+	const struct intel_plane_state __maybe_unused *plane_state;
 	struct intel_plane *plane;
 	int i;
 
@@ -5609,7 +5609,7 @@ static int intel_crtc_add_bigjoiner_planes(struct intel_atomic_state *state,
 					   struct intel_crtc *crtc,
 					   struct intel_crtc *other)
 {
-	const struct intel_plane_state *plane_state;
+	const struct intel_plane_state __maybe_unused *plane_state;
 	struct intel_plane *plane;
 	u8 plane_ids = 0;
 	int i;
@@ -5652,7 +5652,7 @@ static int intel_atomic_check_planes(struct intel_atomic_state *state)
 {
 	struct drm_i915_private *dev_priv = to_i915(state->base.dev);
 	struct intel_crtc_state *old_crtc_state, *new_crtc_state;
-	struct intel_plane_state *plane_state;
+	struct intel_plane_state __maybe_unused *plane_state;
 	struct intel_plane *plane;
 	struct intel_crtc *crtc;
 	int i, ret;
drivers/gpu/drm/i915/display/intel_fbc.c +3 -3
index 1966f9396201..29aa029d249d 100644
@@ -1254,7 +1254,7 @@ static bool __intel_fbc_pre_update(struct intel_atomic_state *state,
 bool intel_fbc_pre_update(struct intel_atomic_state *state,
 			  struct intel_crtc *crtc)
 {
-	const struct intel_plane_state *plane_state;
+	const struct intel_plane_state __maybe_unused *plane_state;
 	bool need_vblank_wait = false;
 	struct intel_plane *plane;
 	int i;
@@ -1309,7 +1309,7 @@ static void __intel_fbc_post_update(struct intel_fbc *fbc)
 void intel_fbc_post_update(struct intel_atomic_state *state,
 			   struct intel_crtc *crtc)
 {
-	const struct intel_plane_state *plane_state;
+	const struct intel_plane_state __maybe_unused *plane_state;
 	struct intel_plane *plane;
 	int i;
 
@@ -1408,7 +1408,7 @@ void intel_fbc_flush(struct drm_i915_private *i915,
 
 int intel_fbc_atomic_check(struct intel_atomic_state *state)
 {
-	struct intel_plane_state *plane_state;
+	struct intel_plane_state __maybe_unused *plane_state;
 	struct intel_plane *plane;
 	int i;
 
Signature · 1 line
2.39.2
#23 lore raw

PATCH 13/15 drm/i915: annotate maybe unused but set intel_crtc_state variables

In reply to Jani Nikula

Prepare for re-enabling -Wunused-but-set-variable.

for_each_new_intel_crtc_in_state() requires passing in a struct intel_crtc_state pointer, which it uses, but in a few places this leads to warning about unused but set variables. Annotate them with __maybe_unused.

---
 drivers/gpu/drm/i915/display/intel_display.c | 2 +-
 drivers/gpu/drm/i915/display/skl_watermark.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +1 -1
index a1e635ab0315..4854d8ff6e1e 100644
@@ -5707,7 +5707,7 @@ static int intel_atomic_check_planes(struct intel_atomic_state *state)
 
 static int intel_atomic_check_crtcs(struct intel_atomic_state *state)
 {
-	struct intel_crtc_state *crtc_state;
+	struct intel_crtc_state __maybe_unused *crtc_state;
 	struct intel_crtc *crtc;
 	int i;
 
drivers/gpu/drm/i915/display/skl_watermark.c +1 -1
index d1245c847f1c..063929a42a42 100644
@@ -2900,7 +2900,7 @@ static int
 skl_compute_wm(struct intel_atomic_state *state)
 {
 	struct intel_crtc *crtc;
-	struct intel_crtc_state *new_crtc_state;
+	struct intel_crtc_state __maybe_unused *new_crtc_state;
 	int ret, i;
 
 	for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) {
Signature · 1 line
2.39.2
#24 lore raw

PATCH 14/15 drm/i915/gvt: annotate maybe unused gma_bottom variables

In reply to Jani Nikula

Prepare for re-enabling -Wunused-but-set-variable.

Lacking a better idea, annotate the gma_bottom variables with __maybe_unused.

---

Frankly I'm not sure what to do with these. Maybe the variables should be dropped altogether?

---
 drivers/gpu/drm/i915/gvt/cmd_parser.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/gvt/cmd_parser.c +2 -2
index 3c4ae1da0d41..2801e17e5522 100644
@@ -2833,7 +2833,7 @@ static int command_scan(struct parser_exec_state *s,
 
 static int scan_workload(struct intel_vgpu_workload *workload)
 {
-	unsigned long gma_head, gma_tail, gma_bottom;
+	unsigned long gma_head, gma_tail, __maybe_unused gma_bottom;
 	struct parser_exec_state s;
 	int ret = 0;
 
@@ -2874,7 +2874,7 @@ static int scan_workload(struct intel_vgpu_workload *workload)
 static int scan_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx)
 {
 
-	unsigned long gma_head, gma_tail, gma_bottom, ring_size, ring_tail;
+	unsigned long gma_head, gma_tail, __maybe_unused gma_bottom, ring_size, ring_tail;
 	struct parser_exec_state s;
 	int ret = 0;
 	struct intel_vgpu_workload *workload = container_of(wa_ctx,
Signature · 1 line
2.39.2
#26 lore raw

PATCH 15/15 drm/i915: re-enable -Wunused-but-set-variable

In reply to Jani Nikula

W=1 enables -Wunused-but-set-variable. We disabled it locally in i915 Makefile as we were hitting a bunch of warnings. See commit 6a05d2900464 ("drm/i915: Disable unused-but-set compiler warning").

With the issues fixed or annotated with __maybe_unused, re-enable the warning not only in W=1 but also locally as part of i915 build.

---
 drivers/gpu/drm/i915/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/Makefile +1 -1
index 06374fc072d3..c704824e2a8c 100644
@@ -19,7 +19,7 @@ subdir-ccflags-y += -Wno-type-limits
 subdir-ccflags-y += -Wno-missing-field-initializers
 subdir-ccflags-y += -Wno-sign-compare
 subdir-ccflags-y += -Wno-shift-negative-value
-subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
+subdir-ccflags-y += $(call cc-option, -Wunused-but-set-variable)
 subdir-ccflags-y += $(call cc-disable-warning, frame-address)
 subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
 
Signature · 1 line
2.39.2
Reviewed-by on v1 1/15
#2 lore raw

Re: [Intel-gfx] [PATCH 01/15] drm/i915/plane: warn on non-zero plane offset

In reply to Jani Nikula
Quoted 15 lines · Jani Nikula

We assume the plane offset is 0. Warn if it's not. This also fixes a warn on unused but set variable offset.

---
 drivers/gpu/drm/i915/display/i9xx_plane.c          | 2 ++
 drivers/gpu/drm/i915/display/skl_universal_plane.c | 1 +
 2 files changed, 3 insertions(+)
drivers/gpu/drm/i915/display/i9xx_plane.c +0 -0
index 616654adbfb8..b52a681ca85e 100644

drivers/gpu/drm/i915/display/i9xx_plane.c i9xx_get_initial_plane_config(struct intel_crtc *crtc, · line 1041

Quoted 5 lines
drivers/gpu/drm/i915/display/i9xx_plane.c +2 -0
@@ -1037,6 +1037,8 @@ i9xx_get_initial_plane_config(struct intel_crtc *crtc,
 	}
 	plane_config->base = base;
 
+	drm_WARN_ON(&dev_priv->drm, offset != 0);
+

The gen2/3 codepath doesn't appear to initialize offset at all.

With that fixed this is

Quoted 17 lines
drivers/gpu/drm/i915/display/i9xx_plane.c +0 -0
 	val = intel_de_read(dev_priv, PIPESRC(pipe));
 	fb->width = REG_FIELD_GET(PIPESRC_WIDTH_MASK, val) + 1;
 	fb->height = REG_FIELD_GET(PIPESRC_HEIGHT_MASK, val) + 1;
drivers/gpu/drm/i915/display/skl_universal_plane.c +1 -0
index 36070d86550f..6b01a0b68b97 100644
@@ -2529,6 +2529,7 @@ skl_get_initial_plane_config(struct intel_crtc *crtc,
 	plane_config->base = base;
 
 	offset = intel_de_read(dev_priv, PLANE_OFFSET(pipe, plane_id));
+	drm_WARN_ON(&dev_priv->drm, offset != 0);
 
 	val = intel_de_read(dev_priv, PLANE_SIZE(pipe, plane_id));
 	fb->height = REG_FIELD_GET(PLANE_HEIGHT_MASK, val) + 1;
Signature · 1 line
2.39.2
Signature · 2 lines
Ville Syrjälä
Intel
#4 lore raw

PATCH v2 1/1 drm/i915/plane: warn on non-zero plane offset

In reply to Jani Nikula

We assume the plane offset is 0. Warn if it's not. This also fixes a warn on unused but set variable offset.

v2: initialize offset on the gen2/3 path (Ville)

---
 drivers/gpu/drm/i915/display/i9xx_plane.c          | 3 +++
 drivers/gpu/drm/i915/display/skl_universal_plane.c | 1 +
 2 files changed, 4 insertions(+)
drivers/gpu/drm/i915/display/i9xx_plane.c +3 -0
index 616654adbfb8..b10488324457 100644
@@ -1033,10 +1033,13 @@ i9xx_get_initial_plane_config(struct intel_crtc *crtc,
 					       DSPLINOFF(i9xx_plane));
 		base = intel_de_read(dev_priv, DSPSURF(i9xx_plane)) & DISP_ADDR_MASK;
 	} else {
+		offset = 0;
 		base = intel_de_read(dev_priv, DSPADDR(i9xx_plane));
 	}
 	plane_config->base = base;
 
+	drm_WARN_ON(&dev_priv->drm, offset != 0);
+
 	val = intel_de_read(dev_priv, PIPESRC(pipe));
 	fb->width = REG_FIELD_GET(PIPESRC_WIDTH_MASK, val) + 1;
 	fb->height = REG_FIELD_GET(PIPESRC_HEIGHT_MASK, val) + 1;
drivers/gpu/drm/i915/display/skl_universal_plane.c +1 -0
index 36070d86550f..6b01a0b68b97 100644
@@ -2529,6 +2529,7 @@ skl_get_initial_plane_config(struct intel_crtc *crtc,
 	plane_config->base = base;
 
 	offset = intel_de_read(dev_priv, PLANE_OFFSET(pipe, plane_id));
+	drm_WARN_ON(&dev_priv->drm, offset != 0);
 
 	val = intel_de_read(dev_priv, PLANE_SIZE(pipe, plane_id));
 	fb->height = REG_FIELD_GET(PLANE_HEIGHT_MASK, val) + 1;
Signature · 1 line
2.39.2
#3 lore raw

Re: [Intel-gfx] [PATCH 01/15] drm/i915/plane: warn on non-zero plane offset

In reply to Ville Syrjälä
Quoted 19 lines · Ville Syrjälä
Quoted 18 lines · Jani Nikula

We assume the plane offset is 0. Warn if it's not. This also fixes a warn on unused but set variable offset.

---
 drivers/gpu/drm/i915/display/i9xx_plane.c          | 2 ++
 drivers/gpu/drm/i915/display/skl_universal_plane.c | 1 +
 2 files changed, 3 insertions(+)
drivers/gpu/drm/i915/display/i9xx_plane.c +0 -0
index 616654adbfb8..b52a681ca85e 100644
@@ -1037,6 +1037,8 @@ i9xx_get_initial_plane_config(struct intel_crtc *crtc,
 	}
 	plane_config->base = base;
 
Quoted 4 lines

drivers/gpu/drm/i915/display/i9xx_plane.c i9xx_get_initial_plane_config(struct intel_crtc *crtc, · line 1041

Quoted 2 lines
drivers/gpu/drm/i915/display/i9xx_plane.c +2 -0
+	drm_WARN_ON(&dev_priv->drm, offset != 0);
+

The gen2/3 codepath doesn't appear to initialize offset at all.

Right. I wonder why I didn't get a warning about using an uninitialized variable.

Quoted 3 lines

With that fixed this is

Thanks, v2 sent.

Quoted 18 lines
Quoted 18 lines
drivers/gpu/drm/i915/display/i9xx_plane.c +0 -0
 	val = intel_de_read(dev_priv, PIPESRC(pipe));
 	fb->width = REG_FIELD_GET(PIPESRC_WIDTH_MASK, val) + 1;
 	fb->height = REG_FIELD_GET(PIPESRC_HEIGHT_MASK, val) + 1;
drivers/gpu/drm/i915/display/skl_universal_plane.c +1 -0
index 36070d86550f..6b01a0b68b97 100644
@@ -2529,6 +2529,7 @@ skl_get_initial_plane_config(struct intel_crtc *crtc,
 	plane_config->base = base;
 
 	offset = intel_de_read(dev_priv, PLANE_OFFSET(pipe, plane_id));
+	drm_WARN_ON(&dev_priv->drm, offset != 0);
 
 	val = intel_de_read(dev_priv, PLANE_SIZE(pipe, plane_id));
 	fb->height = REG_FIELD_GET(PLANE_HEIGHT_MASK, val) + 1;
Signature · 1 line
2.39.2
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Reviewed-by on v1 9/15
#18 lore raw

Re: [Intel-gfx] [PATCH 09/15] drm/i915/gem: drop unused but set variable unpinned

In reply to Jani Nikula

Hi Jani,

Quoted 20 lines · Jani Nikula

Prepare for re-enabling -Wunused-but-set-variable.

---
 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +0 -1
index 5fb459ea4294..cfd7929587d8 100644
@@ -736,7 +736,6 @@ static int eb_reserve(struct i915_execbuffer *eb)
 	struct eb_vma *ev;
 	unsigned int pass;
 	int err = 0;
-	bool unpinned;
 
 	/*
 	 * We have one more buffers that we couldn't bind, which could be due to

drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c static int eb_reserve(struct i915_execbuffer *eb) · line 778

Quoted 5 lines
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +1 -1
@@ -776,7 +775,7 @@ static int eb_reserve(struct i915_execbuffer *eb)
 			pin_flags |= PIN_NONBLOCK;
 
 		if (pass >= 1)
-			unpinned = eb_unbind(eb, pass >= 2);
+			eb_unbind(eb, pass >= 2);

A next patch can make eb_unbind() a void function.

Andi

Quoted 5 lines
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +0 -0
 		if (pass == 2) {
 			err = mutex_lock_interruptible(&eb->context->vm->mutex);
Signature · 1 line
2.39.2
Reviewed-by on v1 10/15
#20 lore raw

Re: [Intel-gfx] [PATCH 10/15] drm/i915/gem: annotate maybe unused but set variable c

In reply to Jani Nikula

Hi Jani,

Quoted 15 lines · Jani Nikula

Prepare for re-enabling -Wunused-but-set-variable.

The variable 'c' appears unused, but I'm not sure what should be done with it. Annotate it with __maybe_unused.

---
 drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/gem/i915_gem_shmem.c +0 -0
index cad4a6017f4b..33d5d5178103 100644

drivers/gpu/drm/i915/gem/i915_gem_shmem.c shmem_pwrite(struct drm_i915_gem_object *obj, · line 458

Quoted 5 lines
drivers/gpu/drm/i915/gem/i915_gem_shmem.c +1 -1
@@ -455,7 +455,7 @@ shmem_pwrite(struct drm_i915_gem_object *obj,
 		struct page *page;
 		void *data, *vaddr;
 		int err;
-		char c;
+		char __maybe_unused c;

Yes... it's only initialized... maybe we need to come out with a version of __get_user() that doesn't need 'c'. I think the __maybe_unused fits good here.

Andi

Quoted 5 lines
drivers/gpu/drm/i915/gem/i915_gem_shmem.c +0 -0
 		len = PAGE_SIZE - pg;
 		if (len > remain)
Signature · 1 line
2.39.2
Reviewed-by on v1 8/15
#16 lore raw

Re: [Intel-gfx] [PATCH 08/15] drm/i915/gt/uc: drop unused but set variable sseu

In reply to Jani Nikula

Hi Jani,

Quoted 23 lines · Jani Nikula

Prepare for re-enabling -Wunused-but-set-variable.

Apparently sseu is leftover from commit 9a92732f040a ("drm/i915/gt: Add general DSS steering iterator to intel_gt_mcr").

---
 drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c +0 -1
index 0ff864da92df..331cec07c125 100644
@@ -301,7 +301,6 @@ guc_capture_alloc_steered_lists(struct intel_guc *guc,
 	const struct __guc_mmio_reg_descr_group *list;
 	struct __guc_mmio_reg_descr_group *extlists;
 	struct __guc_mmio_reg_descr *extarray;
-	struct sseu_dev_info *sseu;
 	bool has_xehpg_extregs;
 
 	/* steered registers currently only exist for the render-class */

drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c guc_capture_alloc_steered_lists(struct intel_guc *guc, · line 321

Quoted 4 lines
drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c +0 -1
@@ -318,7 +317,6 @@ guc_capture_alloc_steered_lists(struct intel_guc *guc,
 	if (has_xehpg_extregs)
 		num_steer_regs += ARRAY_SIZE(xehpg_extregs);
 
-	sseu = &gt->info.sseu;

leftovers...

Thanks,
Andi

Quoted 5 lines
drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c +0 -0
 	for_each_ss_steering(iter, gt, slice, subslice)
 		num_tot_regs += num_steer_regs;
 
Signature · 1 line
2.39.2
#27 lore raw

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: re-enable -Wunused-but-set-variable (rev2)

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: drm/i915: re-enable -Wunused-but-set-variable (rev2)
URL : https://patchwork.freedesktop.org/series/118439/
State : warning

== Summary ==

Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.

#28 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: re-enable -Wunused-but-set-variable (rev2)

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: drm/i915: re-enable -Wunused-but-set-variable (rev2)
URL : https://patchwork.freedesktop.org/series/118439/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_13196 -> Patchwork_118439v2
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_118439v2 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_118439v2, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

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

Participating hosts (39 -> 37)
------------------------------

Additional (1): bat-mtlp-6
Missing (3): fi-kbl-soraka bat-rpls-2 fi-snb-2520m

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

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

### IGT changes ###

#### Possible regressions ####

* igt@gem_exec_suspend@basic-s3@smem:
- fi-kbl-7567u: [PASS][1] -> [ABORT][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/fi-kbl-7567u/igt@gem_exec_suspend@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v2/fi-kbl-7567u/igt@gem_exec_suspend@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@kms_pipe_crc_basic@read-crc:
- bat-adlp-9: NOTRUN -> [SKIP][3] ([i915#3546]) +1 similar issue
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v2/bat-adlp-9/igt@[email protected]

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

[IGT#6]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/6
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3595]: https://gitlab.freedesktop.org/drm/intel/issues/3595
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4342]: https://gitlab.freedesktop.org/drm/intel/issues/4342
[i915#4423]: https://gitlab.freedesktop.org/drm/intel/issues/4423
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190
[i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6645]: https://gitlab.freedesktop.org/drm/intel/issues/6645
[i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#8189]: https://gitlab.freedesktop.org/drm/intel/issues/8189
[i915#8497]: https://gitlab.freedesktop.org/drm/intel/issues/8497

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

* Linux: CI_DRM_13196 -> Patchwork_118439v2

CI-20190529: 20190529
CI_DRM_13196: 9e0c716f834ec17dbf96c47c8b5a2b32c4f483cd @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7307: f0714273cd896c637759b3790f485308c4c97008 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_118439v2: 9e0c716f834ec17dbf96c47c8b5a2b32c4f483cd @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

3ef9c8c74ec9 drm/i915: re-enable -Wunused-but-set-variable 9b1a4adb1b4e drm/i915/gvt: annotate maybe unused gma_bottom variables 8b28c0135913 drm/i915: annotate maybe unused but set intel_crtc_state variables 1caf639aaf5b drm/i915: annotate maybe unused but set intel_plane_state variables e8eaaab78575 drm/i915/selftest: annotate maybe unused but set variable unused 490b1b022a65 drm/i915/gem: annotate maybe unused but set variable c bb8796b1c2d0 drm/i915/gem: drop unused but set variable unpinned ff36790f4842 drm/i915/gt/uc: drop unused but set variable sseu ffc92a428946 drm/i915/irq: drop unused but set variable tmp a8ccf96d01b8 drm/i915/fb: drop unused but set variable cpp 74b50481ad7a drm/i915/dpll: drop unused but set variables bestn and bestm1 1c18cd00d3a1 drm/i915/dsi: drop unused but set variable vbp 00848cc2cce8 drm/i915/dsi: drop unused but set variable data acf88ad05a5f drm/i915/ddi: drop unused but set variable intel_dp 1a721d3357cb drm/i915/plane: warn on non-zero plane offset

== Logs ==

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

#29 lore raw

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: re-enable -Wunused-but-set-variable (rev3)

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: drm/i915: re-enable -Wunused-but-set-variable (rev3)
URL : https://patchwork.freedesktop.org/series/118439/
State : warning

== Summary ==

Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.

#30 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: re-enable -Wunused-but-set-variable (rev3)

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: drm/i915: re-enable -Wunused-but-set-variable (rev3)
URL : https://patchwork.freedesktop.org/series/118439/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_13196 -> Patchwork_118439v3
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_118439v3 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_118439v3, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

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

Participating hosts (39 -> 37)
------------------------------

Additional (1): bat-mtlp-6
Missing (3): bat-rpls-2 bat-atsm-1 fi-snb-2520m

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

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

### IGT changes ###

#### Possible regressions ####

* igt@gem_flink_basic@flink-lifetime:
- fi-kbl-soraka: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/fi-kbl-soraka/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v3/fi-kbl-soraka/igt@[email protected]

#### Suppressed ####

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

* igt@i915_selftest@live@gem_contexts:
- {bat-mtlp-8}: [PASS][3] -> [INCOMPLETE][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/bat-mtlp-8/igt@i915_selftest@live@gem_contexts.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v3/bat-mtlp-8/igt@i915_selftest@live@gem_contexts.html

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

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

### IGT changes ###

#### Issues hit ####

* igt@kms_chamelium_hpd@common-hpd-after-suspend:
- fi-skl-6600u: NOTRUN -> [SKIP][5] ([fdo#109271])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v3/fi-skl-6600u/igt@[email protected]

* igt@kms_pipe_crc_basic@compare-crc-sanitycheck@pipe-d-dp-1:
- bat-dg2-8: [PASS][6] -> [FAIL][7] ([i915#7932])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v3/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]

* igt@kms_pipe_crc_basic@read-crc:
- bat-adlp-9: NOTRUN -> [SKIP][8] ([i915#3546]) +1 similar issue
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v3/bat-adlp-9/igt@[email protected]

#### Possible fixes ####

* igt@core_auth@basic-auth:
- {bat-adlp-11}: [ABORT][9] ([i915#8011]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/bat-adlp-11/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v3/bat-adlp-11/igt@[email protected]

* igt@gem_exec_suspend@basic-s3@smem:
- fi-skl-6600u: [ABORT][11] -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/fi-skl-6600u/igt@gem_exec_suspend@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v3/fi-skl-6600u/igt@gem_exec_suspend@[email protected]

* igt@i915_module_load@load:
- {bat-adlp-11}: [DMESG-WARN][13] ([i915#4423] / [i915#8189]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/bat-adlp-11/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v3/bat-adlp-11/igt@[email protected]

* igt@i915_selftest@live@gt_heartbeat:
- fi-kbl-soraka: [DMESG-FAIL][15] ([i915#5334] / [i915#7872]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/fi-kbl-soraka/igt@i915_selftest@live@gt_heartbeat.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v3/fi-kbl-soraka/igt@i915_selftest@live@gt_heartbeat.html

* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-c-dp-1:
- bat-dg2-8: [FAIL][17] ([i915#7932]) -> [PASS][18] +1 similar issue
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13196/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v3/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]

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

[IGT#6]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/6
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3595]: https://gitlab.freedesktop.org/drm/intel/issues/3595
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4342]: https://gitlab.freedesktop.org/drm/intel/issues/4342
[i915#4423]: https://gitlab.freedesktop.org/drm/intel/issues/4423
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190
[i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6645]: https://gitlab.freedesktop.org/drm/intel/issues/6645
[i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7872]: https://gitlab.freedesktop.org/drm/intel/issues/7872
[i915#7932]: https://gitlab.freedesktop.org/drm/intel/issues/7932
[i915#8011]: https://gitlab.freedesktop.org/drm/intel/issues/8011
[i915#8189]: https://gitlab.freedesktop.org/drm/intel/issues/8189

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

* Linux: CI_DRM_13196 -> Patchwork_118439v3

CI-20190529: 20190529
CI_DRM_13196: 9e0c716f834ec17dbf96c47c8b5a2b32c4f483cd @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7307: f0714273cd896c637759b3790f485308c4c97008 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_118439v3: 9e0c716f834ec17dbf96c47c8b5a2b32c4f483cd @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

0b03fa4d7e40 drm/i915: re-enable -Wunused-but-set-variable e13091495d07 drm/i915/gvt: annotate maybe unused gma_bottom variables 6219c3e7e2c4 drm/i915: annotate maybe unused but set intel_crtc_state variables 2a8a5e12fd2b drm/i915: annotate maybe unused but set intel_plane_state variables 2344042b68b1 drm/i915/selftest: annotate maybe unused but set variable unused 7110d11bf6db drm/i915/gem: annotate maybe unused but set variable c 66b3505e1366 drm/i915/gem: drop unused but set variable unpinned b3a5d7bb1488 drm/i915/gt/uc: drop unused but set variable sseu c41102ff1f6c drm/i915/irq: drop unused but set variable tmp c0106bcded9d drm/i915/fb: drop unused but set variable cpp edaafc6cc672 drm/i915/dpll: drop unused but set variables bestn and bestm1 d7ef93b2a158 drm/i915/dsi: drop unused but set variable vbp 2f5ec65d8d27 drm/i915/dsi: drop unused but set variable data 435d1ed11ed0 drm/i915/ddi: drop unused but set variable intel_dp a69ab13781de drm/i915/plane: warn on non-zero plane offset

== Logs ==

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

#5 lore raw

Re: [Intel-gfx] [PATCH 01/15] drm/i915/plane: warn on non-zero plane offset

In reply to Jani Nikula
kernel test robot noticed the following build errors:

Hi Jani,

kernel test robot noticed the following build errors:

[auto build test ERROR on drm-tip/drm-tip]

url:    https://github.com/intel-lab-lkp/linux/commits/Jani-Nikula/drm-i915-plane-warn-on-non-zero-plane-offset/20230527-003951
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
patch link:    https://lore.kernel.org/r/0988d237e56c56568f035053da8e2e2308a17d3a.1685119007.git.jani.nikula%40intel.com
patch subject: [Intel-gfx] [PATCH 01/15] drm/i915/plane: warn on non-zero plane offset
config: x86_64-randconfig-x056-20230526 (https://download.01.org/0day-ci/archive/20230527/[email protected]/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)

reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/40c3d9e9221e230ab6f0b2e3051b6c4566a1e852
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Jani-Nikula/drm-i915-plane-warn-on-non-zero-plane-offset/20230527-003951 git checkout 40c3d9e9221e230ab6f0b2e3051b6c4566a1e852
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/i915/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/i915/display/i9xx_plane.c:1027:13: error: variable 'offset' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
           } else if (DISPLAY_VER(dev_priv) >= 4) {
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/i915_drv.h:433:27: note: expanded from macro 'DISPLAY_VER'
   #define DISPLAY_VER(i915)       (DISPLAY_RUNTIME_INFO(i915)->ip.ver)
                                   ^
   drivers/gpu/drm/i915/display/i9xx_plane.c:1040:30: note: uninitialized use occurs here
           drm_WARN_ON(&dev_priv->drm, offset != 0);
                                       ^~~~~~
   include/drm/drm_print.h:630:19: note: expanded from macro 'drm_WARN_ON'
           drm_WARN((drm), (x), "%s",                                      \
                            ^
   include/drm/drm_print.h:620:7: note: expanded from macro 'drm_WARN'
           WARN(condition, "%s %s: " format,                               \
                ^~~~~~~~~
   include/asm-generic/bug.h:131:25: note: expanded from macro 'WARN'
           int __ret_warn_on = !!(condition);                              \
                                  ^~~~~~~~~
   drivers/gpu/drm/i915/display/i9xx_plane.c:1027:9: note: remove the 'if' if its condition is always true
           } else if (DISPLAY_VER(dev_priv) >= 4) {
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/display/i9xx_plane.c:983:23: note: initialize the variable 'offset' to silence this warning
           u32 val, base, offset;
                                ^
                                 = 0

1 error generated.

vim +1027 drivers/gpu/drm/i915/display/i9xx_plane.c

2a3014490cd18a Dave Airlie   2021-02-05   973  
2a3014490cd18a Dave Airlie   2021-02-05   974  void
2a3014490cd18a Dave Airlie   2021-02-05   975  i9xx_get_initial_plane_config(struct intel_crtc *crtc,
2a3014490cd18a Dave Airlie   2021-02-05   976  			      struct intel_initial_plane_config *plane_config)
2a3014490cd18a Dave Airlie   2021-02-05   977  {
2a3014490cd18a Dave Airlie   2021-02-05   978  	struct drm_device *dev = crtc->base.dev;
2a3014490cd18a Dave Airlie   2021-02-05   979  	struct drm_i915_private *dev_priv = to_i915(dev);
2a3014490cd18a Dave Airlie   2021-02-05   980  	struct intel_plane *plane = to_intel_plane(crtc->base.primary);
2a3014490cd18a Dave Airlie   2021-02-05   981  	enum i9xx_plane_id i9xx_plane = plane->i9xx_plane;
2a3014490cd18a Dave Airlie   2021-02-05   982  	enum pipe pipe;
2a3014490cd18a Dave Airlie   2021-02-05   983  	u32 val, base, offset;
2a3014490cd18a Dave Airlie   2021-02-05   984  	int fourcc, pixel_format;
2a3014490cd18a Dave Airlie   2021-02-05   985  	unsigned int aligned_height;
2a3014490cd18a Dave Airlie   2021-02-05   986  	struct drm_framebuffer *fb;
2a3014490cd18a Dave Airlie   2021-02-05   987  	struct intel_framebuffer *intel_fb;
2a3014490cd18a Dave Airlie   2021-02-05   988  
2a3014490cd18a Dave Airlie   2021-02-05   989  	if (!plane->get_hw_state(plane, &pipe))
2a3014490cd18a Dave Airlie   2021-02-05   990  		return;
2a3014490cd18a Dave Airlie   2021-02-05   991  
2a3014490cd18a Dave Airlie   2021-02-05   992  	drm_WARN_ON(dev, pipe != crtc->pipe);
2a3014490cd18a Dave Airlie   2021-02-05   993  
2a3014490cd18a Dave Airlie   2021-02-05   994  	intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL);
2a3014490cd18a Dave Airlie   2021-02-05   995  	if (!intel_fb) {
2a3014490cd18a Dave Airlie   2021-02-05   996  		drm_dbg_kms(&dev_priv->drm, "failed to alloc fb\n");
2a3014490cd18a Dave Airlie   2021-02-05   997  		return;
2a3014490cd18a Dave Airlie   2021-02-05   998  	}
2a3014490cd18a Dave Airlie   2021-02-05   999  
2a3014490cd18a Dave Airlie   2021-02-05  1000  	fb = &intel_fb->base;
2a3014490cd18a Dave Airlie   2021-02-05  1001  
2a3014490cd18a Dave Airlie   2021-02-05  1002  	fb->dev = dev;
2a3014490cd18a Dave Airlie   2021-02-05  1003  
2a3014490cd18a Dave Airlie   2021-02-05  1004  	val = intel_de_read(dev_priv, DSPCNTR(i9xx_plane));
2a3014490cd18a Dave Airlie   2021-02-05  1005  
005e95377249cb Matt Roper    2021-03-19  1006  	if (DISPLAY_VER(dev_priv) >= 4) {
428cb15d5b0031 Ville Syrjälä 2022-01-21  1007  		if (val & DISP_TILED) {
2a3014490cd18a Dave Airlie   2021-02-05  1008  			plane_config->tiling = I915_TILING_X;
2a3014490cd18a Dave Airlie   2021-02-05  1009  			fb->modifier = I915_FORMAT_MOD_X_TILED;
2a3014490cd18a Dave Airlie   2021-02-05  1010  		}
2a3014490cd18a Dave Airlie   2021-02-05  1011  
428cb15d5b0031 Ville Syrjälä 2022-01-21  1012  		if (val & DISP_ROTATE_180)
2a3014490cd18a Dave Airlie   2021-02-05  1013  			plane_config->rotation = DRM_MODE_ROTATE_180;
2a3014490cd18a Dave Airlie   2021-02-05  1014  	}
2a3014490cd18a Dave Airlie   2021-02-05  1015  
2a3014490cd18a Dave Airlie   2021-02-05  1016  	if (IS_CHERRYVIEW(dev_priv) && pipe == PIPE_B &&
428cb15d5b0031 Ville Syrjälä 2022-01-21  1017  	    val & DISP_MIRROR)
2a3014490cd18a Dave Airlie   2021-02-05  1018  		plane_config->rotation |= DRM_MODE_REFLECT_X;
2a3014490cd18a Dave Airlie   2021-02-05  1019  
428cb15d5b0031 Ville Syrjälä 2022-01-21  1020  	pixel_format = val & DISP_FORMAT_MASK;
2a3014490cd18a Dave Airlie   2021-02-05  1021  	fourcc = i9xx_format_to_fourcc(pixel_format);
2a3014490cd18a Dave Airlie   2021-02-05  1022  	fb->format = drm_format_info(fourcc);
2a3014490cd18a Dave Airlie   2021-02-05  1023  
2a3014490cd18a Dave Airlie   2021-02-05  1024  	if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) {
2a3014490cd18a Dave Airlie   2021-02-05  1025  		offset = intel_de_read(dev_priv, DSPOFFSET(i9xx_plane));

428cb15d5b0031 Ville Syrjälä 2022-01-21 1026 base = intel_de_read(dev_priv, DSPSURF(i9xx_plane)) & DISP_ADDR_MASK;
005e95377249cb Matt Roper 2021-03-19 @1027 } else if (DISPLAY_VER(dev_priv) >= 4) {

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#6 lore raw

Re: [Intel-gfx] [PATCH 01/15] drm/i915/plane: warn on non-zero plane offset

In reply to Jani Nikula
kernel test robot noticed the following build warnings:

Hi Jani,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-tip/drm-tip]

url:    https://github.com/intel-lab-lkp/linux/commits/Jani-Nikula/drm-i915-plane-warn-on-non-zero-plane-offset/20230527-003951
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
patch link:    https://lore.kernel.org/r/0988d237e56c56568f035053da8e2e2308a17d3a.1685119007.git.jani.nikula%40intel.com
patch subject: [Intel-gfx] [PATCH 01/15] drm/i915/plane: warn on non-zero plane offset
config: i386-randconfig-i076-20230526 (https://download.01.org/0day-ci/archive/20230527/[email protected]/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)

reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/40c3d9e9221e230ab6f0b2e3051b6c4566a1e852
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Jani-Nikula/drm-i915-plane-warn-on-non-zero-plane-offset/20230527-003951 git checkout 40c3d9e9221e230ab6f0b2e3051b6c4566a1e852
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=i386 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/i915/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/i915/display/i9xx_plane.c:1027:13: warning: variable 'offset' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
           } else if (DISPLAY_VER(dev_priv) >= 4) {
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/i915_drv.h:433:27: note: expanded from macro 'DISPLAY_VER'
   #define DISPLAY_VER(i915)       (DISPLAY_RUNTIME_INFO(i915)->ip.ver)
                                   ^
   drivers/gpu/drm/i915/display/i9xx_plane.c:1040:30: note: uninitialized use occurs here
           drm_WARN_ON(&dev_priv->drm, offset != 0);
                                       ^~~~~~
   include/drm/drm_print.h:630:19: note: expanded from macro 'drm_WARN_ON'
           drm_WARN((drm), (x), "%s",                                      \
                            ^
   include/drm/drm_print.h:620:7: note: expanded from macro 'drm_WARN'
           WARN(condition, "%s %s: " format,                               \
                ^~~~~~~~~
   include/asm-generic/bug.h:131:25: note: expanded from macro 'WARN'
           int __ret_warn_on = !!(condition);                              \
                                  ^~~~~~~~~
   drivers/gpu/drm/i915/display/i9xx_plane.c:1027:9: note: remove the 'if' if its condition is always true
           } else if (DISPLAY_VER(dev_priv) >= 4) {
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/display/i9xx_plane.c:983:23: note: initialize the variable 'offset' to silence this warning
           u32 val, base, offset;
                                ^
                                 = 0

1 warning generated.

vim +1027 drivers/gpu/drm/i915/display/i9xx_plane.c

2a3014490cd18a Dave Airlie   2021-02-05   973  
2a3014490cd18a Dave Airlie   2021-02-05   974  void
2a3014490cd18a Dave Airlie   2021-02-05   975  i9xx_get_initial_plane_config(struct intel_crtc *crtc,
2a3014490cd18a Dave Airlie   2021-02-05   976  			      struct intel_initial_plane_config *plane_config)
2a3014490cd18a Dave Airlie   2021-02-05   977  {
2a3014490cd18a Dave Airlie   2021-02-05   978  	struct drm_device *dev = crtc->base.dev;
2a3014490cd18a Dave Airlie   2021-02-05   979  	struct drm_i915_private *dev_priv = to_i915(dev);
2a3014490cd18a Dave Airlie   2021-02-05   980  	struct intel_plane *plane = to_intel_plane(crtc->base.primary);
2a3014490cd18a Dave Airlie   2021-02-05   981  	enum i9xx_plane_id i9xx_plane = plane->i9xx_plane;
2a3014490cd18a Dave Airlie   2021-02-05   982  	enum pipe pipe;
2a3014490cd18a Dave Airlie   2021-02-05   983  	u32 val, base, offset;
2a3014490cd18a Dave Airlie   2021-02-05   984  	int fourcc, pixel_format;
2a3014490cd18a Dave Airlie   2021-02-05   985  	unsigned int aligned_height;
2a3014490cd18a Dave Airlie   2021-02-05   986  	struct drm_framebuffer *fb;
2a3014490cd18a Dave Airlie   2021-02-05   987  	struct intel_framebuffer *intel_fb;
2a3014490cd18a Dave Airlie   2021-02-05   988  
2a3014490cd18a Dave Airlie   2021-02-05   989  	if (!plane->get_hw_state(plane, &pipe))
2a3014490cd18a Dave Airlie   2021-02-05   990  		return;
2a3014490cd18a Dave Airlie   2021-02-05   991  
2a3014490cd18a Dave Airlie   2021-02-05   992  	drm_WARN_ON(dev, pipe != crtc->pipe);
2a3014490cd18a Dave Airlie   2021-02-05   993  
2a3014490cd18a Dave Airlie   2021-02-05   994  	intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL);
2a3014490cd18a Dave Airlie   2021-02-05   995  	if (!intel_fb) {
2a3014490cd18a Dave Airlie   2021-02-05   996  		drm_dbg_kms(&dev_priv->drm, "failed to alloc fb\n");
2a3014490cd18a Dave Airlie   2021-02-05   997  		return;
2a3014490cd18a Dave Airlie   2021-02-05   998  	}
2a3014490cd18a Dave Airlie   2021-02-05   999  
2a3014490cd18a Dave Airlie   2021-02-05  1000  	fb = &intel_fb->base;
2a3014490cd18a Dave Airlie   2021-02-05  1001  
2a3014490cd18a Dave Airlie   2021-02-05  1002  	fb->dev = dev;
2a3014490cd18a Dave Airlie   2021-02-05  1003  
2a3014490cd18a Dave Airlie   2021-02-05  1004  	val = intel_de_read(dev_priv, DSPCNTR(i9xx_plane));
2a3014490cd18a Dave Airlie   2021-02-05  1005  
005e95377249cb Matt Roper    2021-03-19  1006  	if (DISPLAY_VER(dev_priv) >= 4) {
428cb15d5b0031 Ville Syrjälä 2022-01-21  1007  		if (val & DISP_TILED) {
2a3014490cd18a Dave Airlie   2021-02-05  1008  			plane_config->tiling = I915_TILING_X;
2a3014490cd18a Dave Airlie   2021-02-05  1009  			fb->modifier = I915_FORMAT_MOD_X_TILED;
2a3014490cd18a Dave Airlie   2021-02-05  1010  		}
2a3014490cd18a Dave Airlie   2021-02-05  1011  
428cb15d5b0031 Ville Syrjälä 2022-01-21  1012  		if (val & DISP_ROTATE_180)
2a3014490cd18a Dave Airlie   2021-02-05  1013  			plane_config->rotation = DRM_MODE_ROTATE_180;
2a3014490cd18a Dave Airlie   2021-02-05  1014  	}
2a3014490cd18a Dave Airlie   2021-02-05  1015  
2a3014490cd18a Dave Airlie   2021-02-05  1016  	if (IS_CHERRYVIEW(dev_priv) && pipe == PIPE_B &&
428cb15d5b0031 Ville Syrjälä 2022-01-21  1017  	    val & DISP_MIRROR)
2a3014490cd18a Dave Airlie   2021-02-05  1018  		plane_config->rotation |= DRM_MODE_REFLECT_X;
2a3014490cd18a Dave Airlie   2021-02-05  1019  
428cb15d5b0031 Ville Syrjälä 2022-01-21  1020  	pixel_format = val & DISP_FORMAT_MASK;
2a3014490cd18a Dave Airlie   2021-02-05  1021  	fourcc = i9xx_format_to_fourcc(pixel_format);
2a3014490cd18a Dave Airlie   2021-02-05  1022  	fb->format = drm_format_info(fourcc);
2a3014490cd18a Dave Airlie   2021-02-05  1023  
2a3014490cd18a Dave Airlie   2021-02-05  1024  	if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) {
2a3014490cd18a Dave Airlie   2021-02-05  1025  		offset = intel_de_read(dev_priv, DSPOFFSET(i9xx_plane));

428cb15d5b0031 Ville Syrjälä 2022-01-21 1026 base = intel_de_read(dev_priv, DSPSURF(i9xx_plane)) & DISP_ADDR_MASK;
005e95377249cb Matt Roper 2021-03-19 @1027 } else if (DISPLAY_VER(dev_priv) >= 4) {

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#31 lore raw

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: re-enable -Wunused-but-set-variable (rev4)

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: drm/i915: re-enable -Wunused-but-set-variable (rev4)
URL : https://patchwork.freedesktop.org/series/118439/
State : warning

== Summary ==

Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.

#7 lore raw

Re: [Intel-gfx] [PATCH 01/15] drm/i915/plane: warn on non-zero plane offset

In reply to Jani Nikula

Hi Jani,

kernel test robot noticed the following build warnings:

url:    https://github.com/intel-lab-lkp/linux/commits/Jani-Nikula/drm-i915-plane-warn-on-non-zero-plane-offset/20230527-003951
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
patch link:    https://lore.kernel.org/r/0988d237e56c56568f035053da8e2e2308a17d3a.1685119007.git.jani.nikula%40intel.com
patch subject: [Intel-gfx] [PATCH 01/15] drm/i915/plane: warn on non-zero plane offset
config: x86_64-randconfig-m031-20230526 (https://download.01.org/0day-ci/archive/20230528/[email protected]/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0

If you fix the issue, kindly add following tag where applicable

| Reported-by: kernel test robot <[email protected]>
| Reported-by: Dan Carpenter <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

smatch warnings:
drivers/gpu/drm/i915/display/i9xx_plane.c:1040 i9xx_get_initial_plane_config() error: uninitialized symbol 'offset'.

vim +/offset +1040 drivers/gpu/drm/i915/display/i9xx_plane.c

2a3014490cd18a Dave Airlie   2021-02-05   974  void
2a3014490cd18a Dave Airlie   2021-02-05   975  i9xx_get_initial_plane_config(struct intel_crtc *crtc,
2a3014490cd18a Dave Airlie   2021-02-05   976  			      struct intel_initial_plane_config *plane_config)
2a3014490cd18a Dave Airlie   2021-02-05   977  {
2a3014490cd18a Dave Airlie   2021-02-05   978  	struct drm_device *dev = crtc->base.dev;
2a3014490cd18a Dave Airlie   2021-02-05   979  	struct drm_i915_private *dev_priv = to_i915(dev);
2a3014490cd18a Dave Airlie   2021-02-05   980  	struct intel_plane *plane = to_intel_plane(crtc->base.primary);
2a3014490cd18a Dave Airlie   2021-02-05   981  	enum i9xx_plane_id i9xx_plane = plane->i9xx_plane;
2a3014490cd18a Dave Airlie   2021-02-05   982  	enum pipe pipe;
2a3014490cd18a Dave Airlie   2021-02-05   983  	u32 val, base, offset;
2a3014490cd18a Dave Airlie   2021-02-05   984  	int fourcc, pixel_format;
2a3014490cd18a Dave Airlie   2021-02-05   985  	unsigned int aligned_height;
2a3014490cd18a Dave Airlie   2021-02-05   986  	struct drm_framebuffer *fb;
2a3014490cd18a Dave Airlie   2021-02-05   987  	struct intel_framebuffer *intel_fb;
2a3014490cd18a Dave Airlie   2021-02-05   988  
2a3014490cd18a Dave Airlie   2021-02-05   989  	if (!plane->get_hw_state(plane, &pipe))
2a3014490cd18a Dave Airlie   2021-02-05   990  		return;
2a3014490cd18a Dave Airlie   2021-02-05   991  
2a3014490cd18a Dave Airlie   2021-02-05   992  	drm_WARN_ON(dev, pipe != crtc->pipe);
2a3014490cd18a Dave Airlie   2021-02-05   993  
2a3014490cd18a Dave Airlie   2021-02-05   994  	intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL);
2a3014490cd18a Dave Airlie   2021-02-05   995  	if (!intel_fb) {
2a3014490cd18a Dave Airlie   2021-02-05   996  		drm_dbg_kms(&dev_priv->drm, "failed to alloc fb\n");
2a3014490cd18a Dave Airlie   2021-02-05   997  		return;
2a3014490cd18a Dave Airlie   2021-02-05   998  	}
2a3014490cd18a Dave Airlie   2021-02-05   999  
2a3014490cd18a Dave Airlie   2021-02-05  1000  	fb = &intel_fb->base;
2a3014490cd18a Dave Airlie   2021-02-05  1001  
2a3014490cd18a Dave Airlie   2021-02-05  1002  	fb->dev = dev;
2a3014490cd18a Dave Airlie   2021-02-05  1003  
2a3014490cd18a Dave Airlie   2021-02-05  1004  	val = intel_de_read(dev_priv, DSPCNTR(i9xx_plane));
2a3014490cd18a Dave Airlie   2021-02-05  1005  
005e95377249cb Matt Roper    2021-03-19  1006  	if (DISPLAY_VER(dev_priv) >= 4) {
428cb15d5b0031 Ville Syrjälä 2022-01-21  1007  		if (val & DISP_TILED) {
2a3014490cd18a Dave Airlie   2021-02-05  1008  			plane_config->tiling = I915_TILING_X;
2a3014490cd18a Dave Airlie   2021-02-05  1009  			fb->modifier = I915_FORMAT_MOD_X_TILED;
2a3014490cd18a Dave Airlie   2021-02-05  1010  		}
2a3014490cd18a Dave Airlie   2021-02-05  1011  
428cb15d5b0031 Ville Syrjälä 2022-01-21  1012  		if (val & DISP_ROTATE_180)
2a3014490cd18a Dave Airlie   2021-02-05  1013  			plane_config->rotation = DRM_MODE_ROTATE_180;
2a3014490cd18a Dave Airlie   2021-02-05  1014  	}
2a3014490cd18a Dave Airlie   2021-02-05  1015  
2a3014490cd18a Dave Airlie   2021-02-05  1016  	if (IS_CHERRYVIEW(dev_priv) && pipe == PIPE_B &&
428cb15d5b0031 Ville Syrjälä 2022-01-21  1017  	    val & DISP_MIRROR)
2a3014490cd18a Dave Airlie   2021-02-05  1018  		plane_config->rotation |= DRM_MODE_REFLECT_X;
2a3014490cd18a Dave Airlie   2021-02-05  1019  
428cb15d5b0031 Ville Syrjälä 2022-01-21  1020  	pixel_format = val & DISP_FORMAT_MASK;
2a3014490cd18a Dave Airlie   2021-02-05  1021  	fourcc = i9xx_format_to_fourcc(pixel_format);
2a3014490cd18a Dave Airlie   2021-02-05  1022  	fb->format = drm_format_info(fourcc);
2a3014490cd18a Dave Airlie   2021-02-05  1023  
2a3014490cd18a Dave Airlie   2021-02-05  1024  	if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) {
2a3014490cd18a Dave Airlie   2021-02-05  1025  		offset = intel_de_read(dev_priv, DSPOFFSET(i9xx_plane));
428cb15d5b0031 Ville Syrjälä 2022-01-21  1026  		base = intel_de_read(dev_priv, DSPSURF(i9xx_plane)) & DISP_ADDR_MASK;
005e95377249cb Matt Roper    2021-03-19  1027  	} else if (DISPLAY_VER(dev_priv) >= 4) {
2a3014490cd18a Dave Airlie   2021-02-05  1028  		if (plane_config->tiling)
2a3014490cd18a Dave Airlie   2021-02-05  1029  			offset = intel_de_read(dev_priv,
2a3014490cd18a Dave Airlie   2021-02-05  1030  					       DSPTILEOFF(i9xx_plane));
2a3014490cd18a Dave Airlie   2021-02-05  1031  		else
2a3014490cd18a Dave Airlie   2021-02-05  1032  			offset = intel_de_read(dev_priv,
2a3014490cd18a Dave Airlie   2021-02-05  1033  					       DSPLINOFF(i9xx_plane));
428cb15d5b0031 Ville Syrjälä 2022-01-21  1034  		base = intel_de_read(dev_priv, DSPSURF(i9xx_plane)) & DISP_ADDR_MASK;
2a3014490cd18a Dave Airlie   2021-02-05  1035  	} else {
2a3014490cd18a Dave Airlie   2021-02-05  1036  		base = intel_de_read(dev_priv, DSPADDR(i9xx_plane));

offset not initialized on this path.

2a3014490cd18a Dave Airlie   2021-02-05  1037  	}
2a3014490cd18a Dave Airlie   2021-02-05  1038  	plane_config->base = base;
2a3014490cd18a Dave Airlie   2021-02-05  1039  
40c3d9e9221e23 Jani Nikula   2023-05-26 @1040  	drm_WARN_ON(&dev_priv->drm, offset != 0);
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#32 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: re-enable -Wunused-but-set-variable (rev4)

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: drm/i915: re-enable -Wunused-but-set-variable (rev4)
URL : https://patchwork.freedesktop.org/series/118439/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_13198 -> Patchwork_118439v4
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

Participating hosts (38 -> 38)
------------------------------

No changes in participating hosts

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

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

### CI changes ###

#### Issues hit ####

* boot:
- fi-kbl-8809g: [PASS][1] -> [FAIL][2] ([i915#8293] / [i915#8298])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/fi-kbl-8809g/boot.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/fi-kbl-8809g/boot.html

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live@gt_heartbeat:
- fi-apl-guc: [PASS][3] -> [DMESG-FAIL][4] ([i915#5334])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html

* igt@i915_selftest@live@slpc:
- bat-rpls-1: NOTRUN -> [DMESG-WARN][5] ([i915#6367])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/bat-rpls-1/igt@i915_selftest@[email protected]

* igt@i915_suspend@basic-s3-without-i915:
- bat-rpls-1: NOTRUN -> [ABORT][6] ([i915#6687] / [i915#7978])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/bat-rpls-1/igt@[email protected]

* igt@kms_chamelium_hpd@common-hpd-after-suspend:
- fi-skl-6600u: NOTRUN -> [SKIP][7] ([fdo#109271])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/fi-skl-6600u/igt@[email protected]

#### Possible fixes ####

* igt@dmabuf@all-tests@dma_fence:
- fi-skl-6600u: [DMESG-FAIL][8] ([i915#8189]) -> [PASS][9]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/fi-skl-6600u/igt@dmabuf@all-tests@dma_fence.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/fi-skl-6600u/igt@dmabuf@all-tests@dma_fence.html

* igt@dmabuf@all-tests@sanitycheck:
- fi-skl-6600u: [ABORT][10] -> [PASS][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/fi-skl-6600u/igt@dmabuf@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/fi-skl-6600u/igt@dmabuf@[email protected]

* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-hsw-4770: [SKIP][12] ([fdo#109271]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/fi-hsw-4770/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/fi-hsw-4770/igt@[email protected]

* igt@i915_pm_rpm@basic-rte:
- fi-hsw-4770: [FAIL][14] ([i915#7364]) -> [PASS][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/fi-hsw-4770/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/fi-hsw-4770/igt@[email protected]

* igt@i915_selftest@live@requests:
- bat-rpls-1: [ABORT][16] ([i915#4983] / [i915#7911] / [i915#7920]) -> [PASS][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/bat-rpls-1/igt@i915_selftest@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/bat-rpls-1/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@slpc:
- {bat-mtlp-6}: [DMESG-WARN][18] ([i915#6367]) -> [PASS][19]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/bat-mtlp-6/igt@i915_selftest@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/bat-mtlp-6/igt@i915_selftest@[email protected]
- bat-rpls-2: [DMESG-WARN][20] ([i915#6367]) -> [PASS][21]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/bat-rpls-2/igt@i915_selftest@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/bat-rpls-2/igt@i915_selftest@[email protected]

* igt@kms_pipe_crc_basic@nonblocking-crc@pipe-c-dp-1:
- bat-dg2-8: [FAIL][22] ([i915#7932]) -> [PASS][23]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]

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

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#4423]: https://gitlab.freedesktop.org/drm/intel/issues/4423
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6687]: https://gitlab.freedesktop.org/drm/intel/issues/6687
[i915#7364]: https://gitlab.freedesktop.org/drm/intel/issues/7364
[i915#7911]: https://gitlab.freedesktop.org/drm/intel/issues/7911
[i915#7920]: https://gitlab.freedesktop.org/drm/intel/issues/7920
[i915#7932]: https://gitlab.freedesktop.org/drm/intel/issues/7932
[i915#7978]: https://gitlab.freedesktop.org/drm/intel/issues/7978
[i915#8189]: https://gitlab.freedesktop.org/drm/intel/issues/8189
[i915#8293]: https://gitlab.freedesktop.org/drm/intel/issues/8293
[i915#8298]: https://gitlab.freedesktop.org/drm/intel/issues/8298

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

* Linux: CI_DRM_13198 -> Patchwork_118439v4

CI-20190529: 20190529
CI_DRM_13198: cf59b48ea3c0c0075d7c4e8538177d38999da7b0 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7308: 766edf96979bf13a10c9985c007f2baca5c9e308 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_118439v4: cf59b48ea3c0c0075d7c4e8538177d38999da7b0 @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

6fd1361ad2f8 drm/i915: re-enable -Wunused-but-set-variable b791b638cf74 drm/i915/gvt: annotate maybe unused gma_bottom variables 61b8b121d2e7 drm/i915: annotate maybe unused but set intel_crtc_state variables e0ac7872dedb drm/i915: annotate maybe unused but set intel_plane_state variables 024a6f19db4c drm/i915/selftest: annotate maybe unused but set variable unused f15a7f6589e7 drm/i915/gem: annotate maybe unused but set variable c 5c68180512f5 drm/i915/gem: drop unused but set variable unpinned f9e8e8f17935 drm/i915/gt/uc: drop unused but set variable sseu 7dbce8c6be3c drm/i915/irq: drop unused but set variable tmp 3d7821bca6aa drm/i915/fb: drop unused but set variable cpp feb7d7a6e4bb drm/i915/dpll: drop unused but set variables bestn and bestm1 f8ac4950f964 drm/i915/dsi: drop unused but set variable vbp 0177e31410c1 drm/i915/dsi: drop unused but set variable data 17dea6197a75 drm/i915/ddi: drop unused but set variable intel_dp 909e7103df9d drm/i915/plane: warn on non-zero plane offset

== Logs ==

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

#8 lore raw

Re: [Intel-gfx] [PATCH 01/15] drm/i915/plane: warn on non-zero plane offset

In reply to Dan Carpenter
Quoted 3 lines · Dan Carpenter

Hi Jani,

kernel test robot noticed the following build warnings:

Thanks, v2 already on the list:

https://patchwork.freedesktop.org/patch/msgid/[email protected]

Quoted 88 lines
url:    https://github.com/intel-lab-lkp/linux/commits/Jani-Nikula/drm-i915-plane-warn-on-non-zero-plane-offset/20230527-003951
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
patch link:    https://lore.kernel.org/r/0988d237e56c56568f035053da8e2e2308a17d3a.1685119007.git.jani.nikula%40intel.com
patch subject: [Intel-gfx] [PATCH 01/15] drm/i915/plane: warn on non-zero plane offset
config: x86_64-randconfig-m031-20230526 (https://download.01.org/0day-ci/archive/20230528/[email protected]/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0

If you fix the issue, kindly add following tag where applicable

| Reported-by: kernel test robot <[email protected]>
| Reported-by: Dan Carpenter <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

smatch warnings:
drivers/gpu/drm/i915/display/i9xx_plane.c:1040 i9xx_get_initial_plane_config() error: uninitialized symbol 'offset'.

vim +/offset +1040 drivers/gpu/drm/i915/display/i9xx_plane.c

2a3014490cd18a Dave Airlie   2021-02-05   974  void
2a3014490cd18a Dave Airlie   2021-02-05   975  i9xx_get_initial_plane_config(struct intel_crtc *crtc,
2a3014490cd18a Dave Airlie   2021-02-05   976  			      struct intel_initial_plane_config *plane_config)
2a3014490cd18a Dave Airlie   2021-02-05   977  {
2a3014490cd18a Dave Airlie   2021-02-05   978  	struct drm_device *dev = crtc->base.dev;
2a3014490cd18a Dave Airlie   2021-02-05   979  	struct drm_i915_private *dev_priv = to_i915(dev);
2a3014490cd18a Dave Airlie   2021-02-05   980  	struct intel_plane *plane = to_intel_plane(crtc->base.primary);
2a3014490cd18a Dave Airlie   2021-02-05   981  	enum i9xx_plane_id i9xx_plane = plane->i9xx_plane;
2a3014490cd18a Dave Airlie   2021-02-05   982  	enum pipe pipe;
2a3014490cd18a Dave Airlie   2021-02-05   983  	u32 val, base, offset;
2a3014490cd18a Dave Airlie   2021-02-05   984  	int fourcc, pixel_format;
2a3014490cd18a Dave Airlie   2021-02-05   985  	unsigned int aligned_height;
2a3014490cd18a Dave Airlie   2021-02-05   986  	struct drm_framebuffer *fb;
2a3014490cd18a Dave Airlie   2021-02-05   987  	struct intel_framebuffer *intel_fb;
2a3014490cd18a Dave Airlie   2021-02-05   988  
2a3014490cd18a Dave Airlie   2021-02-05   989  	if (!plane->get_hw_state(plane, &pipe))
2a3014490cd18a Dave Airlie   2021-02-05   990  		return;
2a3014490cd18a Dave Airlie   2021-02-05   991  
2a3014490cd18a Dave Airlie   2021-02-05   992  	drm_WARN_ON(dev, pipe != crtc->pipe);
2a3014490cd18a Dave Airlie   2021-02-05   993  
2a3014490cd18a Dave Airlie   2021-02-05   994  	intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL);
2a3014490cd18a Dave Airlie   2021-02-05   995  	if (!intel_fb) {
2a3014490cd18a Dave Airlie   2021-02-05   996  		drm_dbg_kms(&dev_priv->drm, "failed to alloc fb\n");
2a3014490cd18a Dave Airlie   2021-02-05   997  		return;
2a3014490cd18a Dave Airlie   2021-02-05   998  	}
2a3014490cd18a Dave Airlie   2021-02-05   999  
2a3014490cd18a Dave Airlie   2021-02-05  1000  	fb = &intel_fb->base;
2a3014490cd18a Dave Airlie   2021-02-05  1001  
2a3014490cd18a Dave Airlie   2021-02-05  1002  	fb->dev = dev;
2a3014490cd18a Dave Airlie   2021-02-05  1003  
2a3014490cd18a Dave Airlie   2021-02-05  1004  	val = intel_de_read(dev_priv, DSPCNTR(i9xx_plane));
2a3014490cd18a Dave Airlie   2021-02-05  1005  
005e95377249cb Matt Roper    2021-03-19  1006  	if (DISPLAY_VER(dev_priv) >= 4) {
428cb15d5b0031 Ville Syrjälä 2022-01-21  1007  		if (val & DISP_TILED) {
2a3014490cd18a Dave Airlie   2021-02-05  1008  			plane_config->tiling = I915_TILING_X;
2a3014490cd18a Dave Airlie   2021-02-05  1009  			fb->modifier = I915_FORMAT_MOD_X_TILED;
2a3014490cd18a Dave Airlie   2021-02-05  1010  		}
2a3014490cd18a Dave Airlie   2021-02-05  1011  
428cb15d5b0031 Ville Syrjälä 2022-01-21  1012  		if (val & DISP_ROTATE_180)
2a3014490cd18a Dave Airlie   2021-02-05  1013  			plane_config->rotation = DRM_MODE_ROTATE_180;
2a3014490cd18a Dave Airlie   2021-02-05  1014  	}
2a3014490cd18a Dave Airlie   2021-02-05  1015  
2a3014490cd18a Dave Airlie   2021-02-05  1016  	if (IS_CHERRYVIEW(dev_priv) && pipe == PIPE_B &&
428cb15d5b0031 Ville Syrjälä 2022-01-21  1017  	    val & DISP_MIRROR)
2a3014490cd18a Dave Airlie   2021-02-05  1018  		plane_config->rotation |= DRM_MODE_REFLECT_X;
2a3014490cd18a Dave Airlie   2021-02-05  1019  
428cb15d5b0031 Ville Syrjälä 2022-01-21  1020  	pixel_format = val & DISP_FORMAT_MASK;
2a3014490cd18a Dave Airlie   2021-02-05  1021  	fourcc = i9xx_format_to_fourcc(pixel_format);
2a3014490cd18a Dave Airlie   2021-02-05  1022  	fb->format = drm_format_info(fourcc);
2a3014490cd18a Dave Airlie   2021-02-05  1023  
2a3014490cd18a Dave Airlie   2021-02-05  1024  	if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) {
2a3014490cd18a Dave Airlie   2021-02-05  1025  		offset = intel_de_read(dev_priv, DSPOFFSET(i9xx_plane));
428cb15d5b0031 Ville Syrjälä 2022-01-21  1026  		base = intel_de_read(dev_priv, DSPSURF(i9xx_plane)) & DISP_ADDR_MASK;
005e95377249cb Matt Roper    2021-03-19  1027  	} else if (DISPLAY_VER(dev_priv) >= 4) {
2a3014490cd18a Dave Airlie   2021-02-05  1028  		if (plane_config->tiling)
2a3014490cd18a Dave Airlie   2021-02-05  1029  			offset = intel_de_read(dev_priv,
2a3014490cd18a Dave Airlie   2021-02-05  1030  					       DSPTILEOFF(i9xx_plane));
2a3014490cd18a Dave Airlie   2021-02-05  1031  		else
2a3014490cd18a Dave Airlie   2021-02-05  1032  			offset = intel_de_read(dev_priv,
2a3014490cd18a Dave Airlie   2021-02-05  1033  					       DSPLINOFF(i9xx_plane));
428cb15d5b0031 Ville Syrjälä 2022-01-21  1034  		base = intel_de_read(dev_priv, DSPSURF(i9xx_plane)) & DISP_ADDR_MASK;
2a3014490cd18a Dave Airlie   2021-02-05  1035  	} else {
2a3014490cd18a Dave Airlie   2021-02-05  1036  		base = intel_de_read(dev_priv, DSPADDR(i9xx_plane));

offset not initialized on this path.

2a3014490cd18a Dave Airlie   2021-02-05  1037  	}
2a3014490cd18a Dave Airlie   2021-02-05  1038  	plane_config->base = base;
2a3014490cd18a Dave Airlie   2021-02-05  1039  
40c3d9e9221e23 Jani Nikula   2023-05-26 @1040  	drm_WARN_ON(&dev_priv->drm, offset != 0);
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
#33 lore raw

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: re-enable -Wunused-but-set-variable (rev4)

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: drm/i915: re-enable -Wunused-but-set-variable (rev4)
URL : https://patchwork.freedesktop.org/series/118439/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_13198_full -> Patchwork_118439v4_full
====================================================

Summary
-------

**WARNING**

Minor unknown changes coming with Patchwork_118439v4_full need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_118439v4_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

Participating hosts (8 -> 8)
------------------------------

Additional (1): pig-kbl-iris
Missing (1): shard-rkl0

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

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

### IGT changes ###

#### Warnings ####

* igt@kms_hdmi_inject@inject-audio:
- shard-snb: [SKIP][1] ([fdo#109271]) -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/shard-snb6/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-snb2/igt@[email protected]

#### Suppressed ####

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

* igt@kms_cursor_legacy@forked-move@all-pipes:
- {shard-tglu}: [PASS][3] -> [INCOMPLETE][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/shard-tglu-10/igt@kms_cursor_legacy@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-tglu-4/igt@kms_cursor_legacy@[email protected]

* igt@kms_hdmi_inject@inject-audio:
- {shard-tglu}: [SKIP][5] ([i915#433]) -> [FAIL][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/shard-tglu-3/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-tglu-10/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_fair@basic-deadline:
- shard-glk: [PASS][7] -> [FAIL][8] ([i915#2846])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/shard-glk7/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-glk3/igt@[email protected]

* igt@gem_lmem_swapping@heavy-multi:
- shard-apl: NOTRUN -> [SKIP][9] ([fdo#109271] / [i915#4613])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-apl7/igt@[email protected]

* igt@i915_pm_rpm@modeset-lpsp:
- shard-apl: NOTRUN -> [SKIP][10] ([fdo#109271]) +30 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-apl7/igt@[email protected]

* igt@i915_selftest@live@gt_heartbeat:
- shard-glk: [PASS][11] -> [DMESG-FAIL][12] ([i915#5334])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/shard-glk2/igt@i915_selftest@live@gt_heartbeat.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-glk3/igt@i915_selftest@live@gt_heartbeat.html

* igt@kms_ccs@pipe-b-crc-primary-basic-y_tiled_gen12_rc_ccs_cc:
- shard-apl: NOTRUN -> [SKIP][13] ([fdo#109271] / [i915#3886]) +1 similar issue
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-apl7/igt@kms_ccs@pipe-b-crc-primary-basic-y_tiled_gen12_rc_ccs_cc.html

* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
- shard-glk: [PASS][14] -> [FAIL][15] ([IGT#6] / [i915#2346])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/shard-glk6/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-glk6/igt@[email protected]

* igt@kms_flip@2x-flip-vs-blocking-wf-vblank@ac-hdmi-a1-hdmi-a2:
- shard-glk: [PASS][16] -> [FAIL][17] ([i915#2122])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/shard-glk4/igt@kms_flip@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-glk4/igt@kms_flip@[email protected]

* igt@kms_flip@2x-plain-flip-fb-recreate:
- shard-snb: NOTRUN -> [SKIP][18] ([fdo#109271]) +9 similar issues
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-snb4/igt@[email protected]

* igt@kms_flip_scaled_crc@flip-32bpp-linear-to-64bpp-linear-downscaling@pipe-a-valid-mode:
- shard-apl: NOTRUN -> [SKIP][19] ([fdo#109271] / [i915#4579]) +4 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-apl7/igt@kms_flip_scaled_crc@flip-32bpp-linear-to-64bpp-linear-downscaling@pipe-a-valid-mode.html

* igt@kms_frontbuffer_tracking@psr-2p-primscrn-indfb-plflip-blt:
- shard-apl: NOTRUN -> [SKIP][20] ([IGT#6] / [fdo#109271]) +21 similar issues
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-apl7/igt@[email protected]

* igt@kms_hdr@static-swap:
- shard-apl: NOTRUN -> [SKIP][21] ([IGT#6] / [fdo#109271] / [i915#4579])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-apl7/igt@[email protected]

* igt@kms_plane_scaling@plane-upscale-with-modifiers-20x20@pipe-b-vga-1:
- shard-snb: NOTRUN -> [SKIP][22] ([fdo#109271] / [i915#4579]) +5 similar issues
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-snb4/igt@kms_plane_scaling@[email protected]

* igt@kms_psr2_sf@overlay-plane-move-continuous-sf:
- shard-apl: NOTRUN -> [SKIP][23] ([fdo#109271] / [i915#658])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-apl7/igt@[email protected]

#### Possible fixes ####

* igt@drm_fdinfo@most-busy-check-all@rcs0:
- {shard-rkl}: [FAIL][24] ([i915#7742]) -> [PASS][25]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/shard-rkl-3/igt@drm_fdinfo@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-rkl-7/igt@drm_fdinfo@[email protected]

* igt@gem_ctx_freq@sysfs:
- {shard-dg1}: [FAIL][26] ([i915#6786]) -> [PASS][27]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/shard-dg1-16/igt@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-dg1-14/igt@[email protected]

* igt@gem_exec_fair@basic-pace-share@rcs0:
- {shard-rkl}: [FAIL][28] ([i915#2842]) -> [PASS][29] +1 similar issue
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/shard-rkl-6/igt@gem_exec_fair@[email protected]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-rkl-3/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-pace@rcs0:
- shard-glk: [FAIL][30] ([i915#2842]) -> [PASS][31]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/shard-glk6/igt@gem_exec_fair@[email protected]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-glk8/igt@gem_exec_fair@[email protected]

* igt@i915_pm_rpm@dpms-mode-unset-non-lpsp:
- {shard-rkl}: [SKIP][32] ([i915#1397]) -> [PASS][33] +1 similar issue
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/shard-rkl-7/igt@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-rkl-1/igt@[email protected]

* igt@kms_cursor_crc@cursor-suspend@pipe-c-dp-1:
- shard-apl: [ABORT][34] ([i915#180]) -> [PASS][35]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/shard-apl1/igt@kms_cursor_crc@[email protected]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-apl7/igt@kms_cursor_crc@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
- shard-apl: [FAIL][36] ([IGT#6] / [i915#2346]) -> [PASS][37]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/shard-apl2/igt@[email protected]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-apl1/igt@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
- shard-glk: [FAIL][38] ([IGT#6] / [i915#2346]) -> [PASS][39]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/shard-glk3/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-glk2/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html

* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ab-hdmi-a1-hdmi-a2:
- shard-glk: [FAIL][40] ([i915#79]) -> [PASS][41]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/shard-glk6/igt@kms_flip@[email protected]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-glk8/igt@kms_flip@[email protected]

* igt@kms_flip@plain-flip-ts-check@b-hdmi-a1:
- shard-glk: [FAIL][42] ([i915#2122]) -> [PASS][43]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13198/shard-glk6/igt@kms_flip@[email protected]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/shard-glk1/igt@kms_flip@[email protected]

### Piglit changes ###

#### Issues hit ####

* igt@i915_suspend@basic-s3-without-i915:
- pig-kbl-iris: NOTRUN -> [INCOMPLETE][44] ([i915#5603])
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118439v4/pig-kbl-iris/igt@[email protected]

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

[IGT#6]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/6
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#109302]: https://bugs.freedesktop.org/show_bug.cgi?id=109302
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
[fdo#111656]: https://bugs.freedesktop.org/show_bug.cgi?id=111656
[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#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
[i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2433]: https://gitlab.freedesktop.org/drm/intel/issues/2433
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[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#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
[i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
[i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
[i915#3023]: https://gitlab.freedesktop.org/drm/intel/issues/3023
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3318]: https://gitlab.freedesktop.org/drm/intel/issues/3318
[i915#3361]: https://gitlab.freedesktop.org/drm/intel/issues/3361
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[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#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
[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#404]: https://gitlab.freedesktop.org/drm/intel/issues/404
[i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4275]: https://gitlab.freedesktop.org/drm/intel/issues/4275
[i915#4281]: https://gitlab.freedesktop.org/drm/intel/issues/4281
[i915#433]: https://gitlab.freedesktop.org/drm/intel/issues/433
[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#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4771]: https://gitlab.freedesktop.org/drm/intel/issues/4771
[i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
[i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
[i915#4854]: https://gitlab.freedesktop.org/drm/intel/issues/4854
[i915#4881]: https://gitlab.freedesktop.org/drm/intel/issues/4881
[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#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439
[i915#5603]: https://gitlab.freedesktop.org/drm/intel/issues/5603
[i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6230]: https://gitlab.freedesktop.org/drm/intel/issues/6230
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
[i915#6786]: https://gitlab.freedesktop.org/drm/intel/issues/6786
[i915#7461]: https://gitlab.freedesktop.org/drm/intel/issues/7461
[i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
[i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#7975]: https://gitlab.freedesktop.org/drm/intel/issues/7975
[i915#7984]: https://gitlab.freedesktop.org/drm/intel/issues/7984
[i915#8011]: https://gitlab.freedesktop.org/drm/intel/issues/8011
[i915#8213]: https://gitlab.freedesktop.org/drm/intel/issues/8213
[i915#8234]: https://gitlab.freedesktop.org/drm/intel/issues/8234
[i915#8414]: https://gitlab.freedesktop.org/drm/intel/issues/8414

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

* Linux: CI_DRM_13198 -> Patchwork_118439v4

CI-20190529: 20190529
CI_DRM_13198: cf59b48ea3c0c0075d7c4e8538177d38999da7b0 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7308: 766edf96979bf13a10c9985c007f2baca5c9e308 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_118439v4: cf59b48ea3c0c0075d7c4e8538177d38999da7b0 @ 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_118439v4/index.html

#25 lore raw

Re: [Intel-gfx] [PATCH 14/15] drm/i915/gvt: annotate maybe unused gma_bottom variables

In reply to Jani Nikula
Quoted 10 lines · Jani Nikula

Prepare for re-enabling -Wunused-but-set-variable.

Lacking a better idea, annotate the gma_bottom variables with __maybe_unused.

Quoted 4 lines

---

Frankly I'm not sure what to do with these. Maybe the variables should be dropped altogether?

I sent an patch to fix the warnings. You can include that one in the series. Zhenyu, can you give an rb?

Quoted 26 lines
---
  drivers/gpu/drm/i915/gvt/cmd_parser.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/gvt/cmd_parser.c +2 -2
index 3c4ae1da0d41..2801e17e5522 100644
@@ -2833,7 +2833,7 @@ static int command_scan(struct parser_exec_state *s,
 
  static int scan_workload(struct intel_vgpu_workload *workload)
  {
-	unsigned long gma_head, gma_tail, gma_bottom;
+	unsigned long gma_head, gma_tail, __maybe_unused gma_bottom;
  	struct parser_exec_state s;
  	int ret = 0;
 
@@ -2874,7 +2874,7 @@ static int scan_workload(struct intel_vgpu_workload *workload)
  static int scan_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx)
  {
 
-	unsigned long gma_head, gma_tail, gma_bottom, ring_size, ring_tail;
+	unsigned long gma_head, gma_tail, __maybe_unused gma_bottom, ring_size, ring_tail;
  	struct parser_exec_state s;
  	int ret = 0;
  	struct intel_vgpu_workload *workload = container_of(wa_ctx,
Reviewed-by on the v1 series
#34 lore raw
In reply to Jani Nikula
Quoted 2 lines · Jani Nikula

Bring back -Wunused-but-set-variable both in W=1 build as well as locally for CI and development. This already found dubious code.

for the whole set (including v2 of patch 01) :

Quoted 38 lines

Jani Nikula (15):
  drm/i915/plane: warn on non-zero plane offset drm/i915/ddi: drop unused but set variable intel_dp drm/i915/dsi: drop unused but set variable data drm/i915/dsi: drop unused but set variable vbp drm/i915/dpll: drop unused but set variables bestn and bestm1 drm/i915/fb: drop unused but set variable cpp drm/i915/irq: drop unused but set variable tmp drm/i915/gt/uc: drop unused but set variable sseu drm/i915/gem: drop unused but set variable unpinned drm/i915/gem: annotate maybe unused but set variable c drm/i915/selftest: annotate maybe unused but set variable unused drm/i915: annotate maybe unused but set intel_plane_state variables drm/i915: annotate maybe unused but set intel_crtc_state variables drm/i915/gvt: annotate maybe unused gma_bottom variables drm/i915: re-enable -Wunused-but-set-variable

 drivers/gpu/drm/i915/Makefile                      |  2 +- drivers/gpu/drm/i915/display/i9xx_plane.c          |  2 ++ drivers/gpu/drm/i915/display/intel_atomic_plane.c  |  2 +- drivers/gpu/drm/i915/display/intel_cdclk.c         |  2 +- drivers/gpu/drm/i915/display/intel_ddi.c           |  4 ---- drivers/gpu/drm/i915/display/intel_display.c       | 10 +++++----- drivers/gpu/drm/i915/display/intel_display_irq.c   |  4 ++-- drivers/gpu/drm/i915/display/intel_dpll.c          |  4 +--- drivers/gpu/drm/i915/display/intel_fb.c            |  3 +-- drivers/gpu/drm/i915/display/intel_fbc.c           |  6 +++--- drivers/gpu/drm/i915/display/skl_universal_plane.c |  1 + drivers/gpu/drm/i915/display/skl_watermark.c       |  2 +- drivers/gpu/drm/i915/display/vlv_dsi.c             |  6 ++---- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c     |  3 +-- drivers/gpu/drm/i915/gem/i915_gem_shmem.c          |  2 +- drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c     |  2 -- drivers/gpu/drm/i915/gvt/cmd_parser.c              |  4 ++-- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c      |  2 +-

 18 files changed, 26 insertions(+), 35 deletions(-)
#35 lore raw
Quoted 7 lines · Jouni
Quoted 2 lines · Jani Nikula

Bring back -Wunused-but-set-variable both in W=1 build as well as locally for CI and development. This already found dubious code.

for the whole set (including v2 of patch 01) :

Thanks for the review, pushed patches 1-13 to drm-intel-next. There's a different version for patch 14 pending from Zhi, and can't enable the warning in patch 15 without it.

BR,
Jani.

Quoted 40 lines
Quoted 39 lines

Jani Nikula (15):
drm/i915/plane: warn on non-zero plane offset drm/i915/ddi: drop unused but set variable intel_dp drm/i915/dsi: drop unused but set variable data drm/i915/dsi: drop unused but set variable vbp drm/i915/dpll: drop unused but set variables bestn and bestm1 drm/i915/fb: drop unused but set variable cpp drm/i915/irq: drop unused but set variable tmp drm/i915/gt/uc: drop unused but set variable sseu drm/i915/gem: drop unused but set variable unpinned drm/i915/gem: annotate maybe unused but set variable c drm/i915/selftest: annotate maybe unused but set variable unused drm/i915: annotate maybe unused but set intel_plane_state variables drm/i915: annotate maybe unused but set intel_crtc_state variables drm/i915/gvt: annotate maybe unused gma_bottom variables drm/i915: re-enable -Wunused-but-set-variable

 drivers/gpu/drm/i915/Makefile                      |  2 +-
 drivers/gpu/drm/i915/display/i9xx_plane.c          |  2 ++
 drivers/gpu/drm/i915/display/intel_atomic_plane.c  |  2 +-
 drivers/gpu/drm/i915/display/intel_cdclk.c         |  2 +-
 drivers/gpu/drm/i915/display/intel_ddi.c           |  4 ----
 drivers/gpu/drm/i915/display/intel_display.c       | 10 +++++-----
 drivers/gpu/drm/i915/display/intel_display_irq.c   |  4 ++--
 drivers/gpu/drm/i915/display/intel_dpll.c          |  4 +---
 drivers/gpu/drm/i915/display/intel_fb.c            |  3 +--
 drivers/gpu/drm/i915/display/intel_fbc.c           |  6 +++---
 drivers/gpu/drm/i915/display/skl_universal_plane.c |  1 +
 drivers/gpu/drm/i915/display/skl_watermark.c       |  2 +-
 drivers/gpu/drm/i915/display/vlv_dsi.c             |  6 ++----
 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c     |  3 +--
 drivers/gpu/drm/i915/gem/i915_gem_shmem.c          |  2 +-
 drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c     |  2 --
 drivers/gpu/drm/i915/gvt/cmd_parser.c              |  4 ++--
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c      |  2 +-
 18 files changed, 26 insertions(+), 35 deletions(-)
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
#36 lore raw
Quoted 5 lines · Jani Nikula
Quoted 4 lines · Jouni
Quoted 2 lines · Jani Nikula

Bring back -Wunused-but-set-variable both in W=1 build as well as locally for CI and development. This already found dubious code.

Quoted 7 lines
Quoted 3 lines

for the whole set (including v2 of patch 01) :

Thanks for the review, pushed patches 1-13 to drm-intel-next. There's a different version for patch 14 pending from Zhi, and can't enable the warning in patch 15 without it.

And pushed the rest, thanks.

BR,
Jani.

Quoted 44 lines

BR,
Jani.

Quoted 40 lines
Quoted 39 lines

Jani Nikula (15):
drm/i915/plane: warn on non-zero plane offset drm/i915/ddi: drop unused but set variable intel_dp drm/i915/dsi: drop unused but set variable data drm/i915/dsi: drop unused but set variable vbp drm/i915/dpll: drop unused but set variables bestn and bestm1 drm/i915/fb: drop unused but set variable cpp drm/i915/irq: drop unused but set variable tmp drm/i915/gt/uc: drop unused but set variable sseu drm/i915/gem: drop unused but set variable unpinned drm/i915/gem: annotate maybe unused but set variable c drm/i915/selftest: annotate maybe unused but set variable unused drm/i915: annotate maybe unused but set intel_plane_state variables drm/i915: annotate maybe unused but set intel_crtc_state variables drm/i915/gvt: annotate maybe unused gma_bottom variables drm/i915: re-enable -Wunused-but-set-variable

 drivers/gpu/drm/i915/Makefile                      |  2 +-
 drivers/gpu/drm/i915/display/i9xx_plane.c          |  2 ++
 drivers/gpu/drm/i915/display/intel_atomic_plane.c  |  2 +-
 drivers/gpu/drm/i915/display/intel_cdclk.c         |  2 +-
 drivers/gpu/drm/i915/display/intel_ddi.c           |  4 ----
 drivers/gpu/drm/i915/display/intel_display.c       | 10 +++++-----
 drivers/gpu/drm/i915/display/intel_display_irq.c   |  4 ++--
 drivers/gpu/drm/i915/display/intel_dpll.c          |  4 +---
 drivers/gpu/drm/i915/display/intel_fb.c            |  3 +--
 drivers/gpu/drm/i915/display/intel_fbc.c           |  6 +++---
 drivers/gpu/drm/i915/display/skl_universal_plane.c |  1 +
 drivers/gpu/drm/i915/display/skl_watermark.c       |  2 +-
 drivers/gpu/drm/i915/display/vlv_dsi.c             |  6 ++----
 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c     |  3 +--
 drivers/gpu/drm/i915/gem/i915_gem_shmem.c          |  2 +-
 drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c     |  2 --
 drivers/gpu/drm/i915/gvt/cmd_parser.c              |  4 ++--
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c      |  2 +-
 18 files changed, 26 insertions(+), 35 deletions(-)
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center