Skip to contentSkip to conversation

Patches to enable writeback in i915

RFC PATCH New Suraj Kandpal 3 participants 6 messages Feb 23, 2022

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

cover Patches to enable writeback in i915

These patches introduce the set of definitions and functions to enable writeback functionality using the interrupt mechanism in i915 driver.
They work on top of the previous set of patch series floated by me which is still in review and can be found below
https://patchwork.freedesktop.org/series/99610/

Suraj Kandpal (2):
drm/i915: Define WD trancoder for i915
drm/i915: Enabling WD Transcoder

 drivers/gpu/drm/i915/Makefile                 |   1 +
 drivers/gpu/drm/i915/display/intel_acpi.c     |   1 +
 drivers/gpu/drm/i915/display/intel_display.c  |  78 +-
 drivers/gpu/drm/i915/display/intel_display.h  |  15 +
 .../drm/i915/display/intel_display_types.h    |  17 +
 drivers/gpu/drm/i915/display/intel_dpll.c     |   6 +
 drivers/gpu/drm/i915/display/intel_opregion.c |   3 +
 .../gpu/drm/i915/display/intel_wb_connector.h |  20 +
 drivers/gpu/drm/i915/display/intel_wd.c       | 769 ++++++++++++++++++
 drivers/gpu/drm/i915/display/intel_wd.h       |  70 ++
 drivers/gpu/drm/i915/i915_drv.h               |   2 +
 drivers/gpu/drm/i915/i915_irq.c               |   8 +-
 drivers/gpu/drm/i915/i915_pci.c               |   7 +-
 drivers/gpu/drm/i915/i915_reg.h               | 133 +++
 14 files changed, 1127 insertions(+), 3 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/display/intel_wb_connector.h
 create mode 100644 drivers/gpu/drm/i915/display/intel_wd.c
 create mode 100644 drivers/gpu/drm/i915/display/intel_wd.h
Signature · 1 line
2.17.1
#1 lore raw

RFC PATCH 1/2 drm/i915: Define WD trancoder for i915

Adding WD Types, WD transcoder to enum list and WD Transcoder offsets

---
 drivers/gpu/drm/i915/display/intel_display.h       | 6 ++++++
 drivers/gpu/drm/i915/display/intel_display_types.h | 1 +
 drivers/gpu/drm/i915/i915_reg.h                    | 2 ++
 3 files changed, 9 insertions(+)
drivers/gpu/drm/i915/display/intel_display.h +6 -0
index 11d6134c53c8..30b639051e64 100644
@@ -119,6 +119,8 @@ enum transcoder {
 	TRANSCODER_DSI_1,
 	TRANSCODER_DSI_A = TRANSCODER_DSI_0,	/* legacy DSI */
 	TRANSCODER_DSI_C = TRANSCODER_DSI_1,	/* legacy DSI */
+	TRANSCODER_WD_0,
+	TRANSCODER_WD_1,
 
 	I915_MAX_TRANSCODERS
 };
@@ -140,6 +142,10 @@ static inline const char *transcoder_name(enum transcoder transcoder)
 		return "DSI A";
 	case TRANSCODER_DSI_C:
 		return "DSI C";
+	case TRANSCODER_WD_0:
+		return "WD 0";
+	case TRANSCODER_WD_1:
+		return "WD 1";
 	default:
 		return "<invalid>";
 	}
drivers/gpu/drm/i915/display/intel_display_types.h +1 -0
index b50d0e6efe21..2b137909e0ab 100644
@@ -78,6 +78,7 @@ enum intel_output_type {
 	INTEL_OUTPUT_DSI = 9,
 	INTEL_OUTPUT_DDI = 10,
 	INTEL_OUTPUT_DP_MST = 11,
+	INTEL_OUTPUT_WD = 12,
 };
 
 enum hdmi_force_audio {
drivers/gpu/drm/i915/i915_reg.h +2 -0
index 2b8a3086ed35..912384eee068 100644
@@ -2019,6 +2019,8 @@
 #define TRANSCODER_EDP_OFFSET 0x6f000
 #define TRANSCODER_DSI0_OFFSET	0x6b000
 #define TRANSCODER_DSI1_OFFSET	0x6b800
+#define TRANSCODER_WD0_OFFSET	0x6e000
+#define TRANSCODER_WD1_OFFSET	0x6e800
 
 #define HTOTAL(trans)		_MMIO_TRANS2(trans, _HTOTAL_A)
 #define HBLANK(trans)		_MMIO_TRANS2(trans, _HBLANK_A)
Signature · 1 line
2.17.1
#2 lore raw

RFC PATCH 2/2 drm/i915: Enabling WD Transcoder

In reply to Suraj Kandpal

Adding support for writeback transcoder to start capturing frames using interrupt mechanism

---
 drivers/gpu/drm/i915/Makefile                 |   1 +
 drivers/gpu/drm/i915/display/intel_acpi.c     |   1 +
 drivers/gpu/drm/i915/display/intel_display.c  |  78 +-
 drivers/gpu/drm/i915/display/intel_display.h  |   9 +
 .../drm/i915/display/intel_display_types.h    |  16 +
 drivers/gpu/drm/i915/display/intel_dpll.c     |   6 +
 drivers/gpu/drm/i915/display/intel_opregion.c |   3 +
 .../gpu/drm/i915/display/intel_wb_connector.h |  20 +
 drivers/gpu/drm/i915/display/intel_wd.c       | 769 ++++++++++++++++++
 drivers/gpu/drm/i915/display/intel_wd.h       |  70 ++
 drivers/gpu/drm/i915/i915_drv.h               |   2 +
 drivers/gpu/drm/i915/i915_irq.c               |   8 +-
 drivers/gpu/drm/i915/i915_pci.c               |   7 +-
 drivers/gpu/drm/i915/i915_reg.h               | 131 +++
 14 files changed, 1118 insertions(+), 3 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/display/intel_wb_connector.h
 create mode 100644 drivers/gpu/drm/i915/display/intel_wd.c
 create mode 100644 drivers/gpu/drm/i915/display/intel_wd.h
drivers/gpu/drm/i915/Makefile +1 -0
index 9d588d936e3d..3e2e0162115b 100644
@@ -285,6 +285,7 @@ i915-y += \
 	display/intel_tv.o \
 	display/intel_vdsc.o \
 	display/intel_vrr.o \
+	display/intel_wd.o \
 	display/vlv_dsi.o \
 	display/vlv_dsi_pll.o
 
drivers/gpu/drm/i915/display/intel_acpi.c +1 -0
index e78430001f07..ae08db164f73 100644
@@ -247,6 +247,7 @@ static u32 acpi_display_type(struct intel_connector *connector)
 	case DRM_MODE_CONNECTOR_LVDS:
 	case DRM_MODE_CONNECTOR_eDP:
 	case DRM_MODE_CONNECTOR_DSI:
+	case DRM_MODE_CONNECTOR_WRITEBACK:
 		display_type = ACPI_DISPLAY_TYPE_INTERNAL_DIGITAL;
 		break;
 	case DRM_MODE_CONNECTOR_Unknown:
drivers/gpu/drm/i915/display/intel_display.c +77 -1

120 lines not on this page · raw message

drivers/gpu/drm/i915/display/intel_display.h +9 -0
index 30b639051e64..a8d167eb7242 100644
@@ -156,6 +156,11 @@ static inline bool transcoder_is_dsi(enum transcoder transcoder)
 	return transcoder == TRANSCODER_DSI_A || transcoder == TRANSCODER_DSI_C;
 }
 
+static inline bool transcoder_is_wd(enum transcoder transcoder)
+{
+	return transcoder == TRANSCODER_WD_0 || transcoder == TRANSCODER_WD_1;
+}
+
 /*
  * Global legacy plane identifier. Valid only for primary/sprite
  * planes on pre-g4x, and only for primary planes on g4x-bdw.
@@ -467,6 +472,10 @@ enum hpd_pin {
 	for_each_intel_encoder((dev), (intel_encoder)) \
 		for_each_if(intel_encoder_can_psr(intel_encoder))
 
+#define for_each_intel_encoder_with_wd(dev, intel_encoder)	\
+	for_each_intel_encoder(dev, intel_encoder)		\
+		for_each_if(intel_encoder_is_wd(intel_encoder))
+
 #define for_each_intel_connector_iter(intel_connector, iter) \
 	while ((intel_connector = to_intel_connector(drm_connector_list_iter_next(iter))))
 
drivers/gpu/drm/i915/display/intel_display_types.h +16 -0
index 2b137909e0ab..3afc87590990 100644
@@ -43,6 +43,7 @@
 #include <drm/drm_vblank.h>
 #include <drm/drm_vblank_work.h>
 #include <drm/i915_mei_hdcp_interface.h>
+#include <drm/drm_writeback.h>
 #include <media/cec-notifier.h>
 
 #include "i915_vma.h"
@@ -539,6 +540,8 @@ struct intel_connector {
 	struct work_struct modeset_retry_work;
 
 	struct intel_hdcp hdcp;
+
+	struct drm_writeback_connector wb_conn;
 };
 
 struct intel_digital_connector_state {
@@ -1285,6 +1288,11 @@ struct intel_crtc {
 	bool cpu_fifo_underrun_disabled;
 	bool pch_fifo_underrun_disabled;
 
+	struct {
+		struct drm_pending_vblank_event *e;
+		atomic_t work_busy;
+		wait_queue_head_t wd_wait;
+	} wd;
 	/* per-pipe watermark state */
 	struct {
 		/* watermarks currently being used  */
@@ -1403,6 +1411,7 @@ struct cxsr_latency {
 #define to_intel_crtc(x) container_of(x, struct intel_crtc, base)
 #define to_intel_crtc_state(x) container_of(x, struct intel_crtc_state, uapi)
 #define to_intel_connector(x) container_of(x, struct intel_connector, base)
+#define to_intel_wb_connector(x) container_of(x, struct intel_wb_connector, base)
 #define to_intel_encoder(x) container_of(x, struct intel_encoder, base)
 #define to_intel_framebuffer(x) container_of(x, struct intel_framebuffer, base)
 #define to_intel_plane(x) container_of(x, struct intel_plane, base)
@@ -1834,6 +1843,13 @@ static inline bool intel_encoder_is_dp(struct intel_encoder *encoder)
 	}
 }
 
+static inline bool intel_encoder_is_wd(struct intel_encoder *encoder)
+{
+	if (encoder->type == INTEL_OUTPUT_WD)
+		return true;
+	return false;
+}
+
 static inline struct intel_lspcon *
 enc_to_intel_lspcon(struct intel_encoder *encoder)
 {
drivers/gpu/drm/i915/display/intel_dpll.c +6 -0
index 14f5ffe27d05..dabedf2a34ff 100644
@@ -947,6 +947,12 @@ static int hsw_crtc_compute_clock(struct intel_crtc_state *crtc_state)
 	if (IS_DG2(dev_priv))
 		return intel_mpllb_calc_state(crtc_state, encoder);
 
+	if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_WD)) {
+		pr_alert("%s: %d: output type: 0x%x",
+			__func__, __LINE__, crtc_state->output_types);
+		return 0;
+		}
+
 	if (DISPLAY_VER(dev_priv) < 11 &&
 	    intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DSI))
 		return 0;
drivers/gpu/drm/i915/display/intel_opregion.c +3 -0
index f31e8c3f8ce0..b7a0ac9bad05 100644
@@ -370,6 +370,9 @@ int intel_opregion_notify_encoder(struct intel_encoder *intel_encoder,
 	if (ret)
 		return ret;
 
+	if (intel_encoder->type == INTEL_OUTPUT_WD)
+		return 0;
+
 	if (intel_encoder->type == INTEL_OUTPUT_DSI)
 		port = 0;
 	else
drivers/gpu/drm/i915/display/intel_wb_connector.h new file +20 -0
new file mode 100644
index 000000000000..8063a9273bc7
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2020 Intel Corporation
+ */
+
+#ifndef __INTEL_WB_CONNECTOR_H__
+#define __INTEL_WB_CONNECTOR_H__
+
+#include "intel_display.h"
+
+struct intel_wb_connector *intel_wb_connector_alloc(void);
+void intel_wb_connector_free(struct intel_wb_connector *connector);
+void intel_wb_connector_destroy(struct drm_connector *connector);
+bool intel_wb_connector_get_hw_state(struct intel_wb_connector *connector);
+enum pipe intel_wb_connector_get_pipe(struct intel_wb_connector *connector);
+void intel_wb_connector_attach_encoder(struct intel_wb_connector *connector,
+					struct intel_encoder *encoder);
+
+#endif /* __INTEL_WB_CONNECTOR_H__ */
+
drivers/gpu/drm/i915/display/intel_wd.c new file +769 -0

769 lines not on this page · raw message

drivers/gpu/drm/i915/display/intel_wd.h new file +70 -0

70 lines not on this page · raw message

drivers/gpu/drm/i915/i915_drv.h +2 -0
index 1c2f4ae4ebf9..a90226b0dcd8 100644
@@ -40,6 +40,8 @@
 #include <linux/pm_qos.h>
 
 #include <drm/drm_connector.h>
+#include <drm/drm_writeback.h>
+#include <drm/i915_mei_hdcp_interface.h>
 #include <drm/ttm/ttm_device.h>
 
 #include "display/intel_bios.h"
drivers/gpu/drm/i915/i915_irq.c +7 -1
index 73cebc6aa650..95a6a8f7a911 100644
@@ -42,6 +42,7 @@
 #include "display/intel_hotplug.h"
 #include "display/intel_lpe_audio.h"
 #include "display/intel_psr.h"
+#include "display/intel_wd.h"
 
 #include "gt/intel_breadcrumbs.h"
 #include "gt/intel_gt.h"
@@ -2342,6 +2343,11 @@ gen8_de_misc_irq_handler(struct drm_i915_private *dev_priv, u32 iir)
 		found = true;
 	}
 
+	if (iir & GEN8_DE_MISC_WD0) {
+		intel_wd_handle_isr(dev_priv);
+		found = true;
+	}
+
 	if (iir & GEN8_DE_EDP_PSR) {
 		struct intel_encoder *encoder;
 		u32 psr_iir;
@@ -3767,7 +3773,7 @@ static void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv)
 	u32 de_pipe_enables;
 	u32 de_port_masked = gen8_de_port_aux_mask(dev_priv);
 	u32 de_port_enables;
-	u32 de_misc_masked = GEN8_DE_EDP_PSR;
+	u32 de_misc_masked = GEN8_DE_EDP_PSR | GEN8_DE_MISC_WD0;
 	u32 trans_mask = BIT(TRANSCODER_A) | BIT(TRANSCODER_B) |
 		BIT(TRANSCODER_C) | BIT(TRANSCODER_D);
 	enum pipe pipe;
drivers/gpu/drm/i915/i915_pci.c +6 -1
index f449c454b6f8..36bbdc08fb7c 100644
@@ -853,7 +853,8 @@ static const struct intel_device_info jsl_info = {
 	.display.pipe_mask = BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C) | BIT(PIPE_D), \
 	.display.cpu_transcoder_mask = BIT(TRANSCODER_A) | BIT(TRANSCODER_B) | \
 		BIT(TRANSCODER_C) | BIT(TRANSCODER_D) | \
-		BIT(TRANSCODER_DSI_0) | BIT(TRANSCODER_DSI_1), \
+		BIT(TRANSCODER_DSI_0) | BIT(TRANSCODER_DSI_1)| \
+		BIT(TRANSCODER_WD_0), \
 	.pipe_offsets = { \
 		[TRANSCODER_A] = PIPE_A_OFFSET, \
 		[TRANSCODER_B] = PIPE_B_OFFSET, \
@@ -861,6 +862,8 @@ static const struct intel_device_info jsl_info = {
 		[TRANSCODER_D] = PIPE_D_OFFSET, \
 		[TRANSCODER_DSI_0] = PIPE_DSI0_OFFSET, \
 		[TRANSCODER_DSI_1] = PIPE_DSI1_OFFSET, \
+		[TRANSCODER_WD_0] = PIPE_WD0_OFFSET, \
+		[TRANSCODER_WD_1] = PIPE_WD1_OFFSET, \
 	}, \
 	.trans_offsets = { \
 		[TRANSCODER_A] = TRANSCODER_A_OFFSET, \
@@ -869,6 +872,8 @@ static const struct intel_device_info jsl_info = {
 		[TRANSCODER_D] = TRANSCODER_D_OFFSET, \
 		[TRANSCODER_DSI_0] = TRANSCODER_DSI0_OFFSET, \
 		[TRANSCODER_DSI_1] = TRANSCODER_DSI1_OFFSET, \
+		[TRANSCODER_WD_0] = TRANSCODER_WD0_OFFSET, \
+		[TRANSCODER_WD_1] = TRANSCODER_WD1_OFFSET, \
 	}, \
 	TGL_CURSOR_OFFSETS, \
 	.has_global_mocs = 1, \
drivers/gpu/drm/i915/i915_reg.h +131 -0

155 lines not on this page · raw message

Signature · 1 line
2.17.1
#3 lore raw

Re: [Intel-gfx] [RFC PATCH 2/2] drm/i915: Enabling WD Transcoder

[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch]

Hi Suraj,

[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip next-20220222] [cannot apply to v5.17-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Suraj-Kandpal/Patches-to-enable-writeback-in-i915/20220223-141252
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-randconfig-a014-20220221 (https://download.01.org/0day-ci/archive/20220223/[email protected]/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e)

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/0bebda2fa91f41b1cd2c0ff7aa92fc6c653bc03c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Suraj-Kandpal/Patches-to-enable-writeback-in-i915/20220223-141252 git checkout 0bebda2fa91f41b1cd2c0ff7aa92fc6c653bc03c
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 as appropriate

All error/warnings (new ones prefixed by >>):

>> drivers/gpu/drm/i915/display/intel_display.c:1575:38: error: no member named 'wb_connector' in 'struct drm_connector'
                   drm_writeback_queue_job(connector->wb_connector, new_conn_state);
                                           ~~~~~~~~~  ^
   1 error generated.
--
>> drivers/gpu/drm/i915/display/intel_wd.c:50:38: error: no member named 'wb_connector' in 'struct drm_connector'
                   intel_wd->attached_connector->base.wb_connector;
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
>> drivers/gpu/drm/i915/display/intel_wd.c:66:6: warning: no previous prototype for function 'print_connectors' [-Wmissing-prototypes]
   void print_connectors(struct drm_i915_private *dev_priv)
        ^
   drivers/gpu/drm/i915/display/intel_wd.c:66:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void print_connectors(struct drm_i915_private *dev_priv)
   ^
   static 
>> drivers/gpu/drm/i915/display/intel_wd.c:397:16: error: assigning to 'struct drm_connector' from incompatible type 'struct drm_connector *'; remove &
           wb_conn->base = &intel_connector->base;
                         ^ ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/i915/display/intel_wd.c:398:19: error: assigning to 'struct drm_encoder' from incompatible type 'struct drm_encoder *'; remove &
           wb_conn->encoder = &intel_wd->base.base;
                            ^ ~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/i915/display/intel_wd.c:430:27: error: passing 'struct drm_connector' to parameter of incompatible type 'struct drm_connector *'; take the address with &
           drm_connector_helper_add(wb_conn->base, &wd_connector_helper_funcs);
                                    ^~~~~~~~~~~~~
                                    &
   include/drm/drm_modeset_helper_vtables.h:1153:67: note: passing argument to parameter 'connector' here
   static inline void drm_connector_helper_add(struct drm_connector *connector,
                                                                     ^
>> drivers/gpu/drm/i915/display/intel_wd.c:432:15: error: member reference type 'struct drm_connector' is not a pointer; did you mean to use '.'?
           wb_conn->base->status = connector_status_connected;
           ~~~~~~~~~~~~~^~
                        .
>> drivers/gpu/drm/i915/display/intel_wd.c:432:24: error: expression is not assignable
           wb_conn->base->status = connector_status_connected;
           ~~~~~~~~~~~~~~~~~~~~~ ^
   drivers/gpu/drm/i915/display/intel_wd.c:444:38: error: no member named 'wb_connector' in 'struct drm_connector'
                   intel_wd->attached_connector->base.wb_connector;
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
>> drivers/gpu/drm/i915/display/intel_wd.c:440:6: warning: no previous prototype for function 'intel_wd_writeback_complete' [-Wmissing-prototypes]
   void intel_wd_writeback_complete(struct intel_wd *intel_wd,
        ^
   drivers/gpu/drm/i915/display/intel_wd.c:440:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void intel_wd_writeback_complete(struct intel_wd *intel_wd,
   ^
   static 
>> drivers/gpu/drm/i915/display/intel_wd.c:448:5: warning: no previous prototype for function 'intel_wd_setup_transcoder' [-Wmissing-prototypes]
   int intel_wd_setup_transcoder(struct intel_wd *intel_wd,
       ^
   drivers/gpu/drm/i915/display/intel_wd.c:448:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int intel_wd_setup_transcoder(struct intel_wd *intel_wd,
   ^
   static 
>> drivers/gpu/drm/i915/display/intel_wd.c:613:5: warning: no previous prototype for function 'intel_wd_capture' [-Wmissing-prototypes]
   int intel_wd_capture(struct intel_wd *intel_wd,
       ^

drivers/gpu/drm/i915/display/intel_wd.c:613:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int intel_wd_capture(struct intel_wd *intel_wd,
^
static
4 warnings and 7 errors generated.

vim +1575 drivers/gpu/drm/i915/display/intel_display.c

1551
1552 static void intel_queue_writeback_job(struct intel_atomic_state *state,
1553 struct intel_crtc *intel_crtc, struct intel_crtc_state *crtc_state)
1554 {
1555 struct drm_connector_state *new_conn_state;
1556 struct drm_connector *connector;
1557 struct drm_i915_private *dev_priv = to_i915(intel_crtc->base.dev);
1558 struct intel_wd *intel_wd;
1559 struct intel_encoder *encoder;
1560 int i;
1561
1562 for_each_intel_encoder_with_wd(&dev_priv->drm, encoder) {
1563 intel_wd = enc_to_intel_wd(encoder);
1564
1565 if (intel_wd->wd_crtc != intel_crtc)
1566 return;
1567
1568 }
1569
1570 for_each_new_connector_in_state(&state->base, connector, new_conn_state,
1571 i) {
1572 if (!new_conn_state->writeback_job)
1573 continue;
1574

> 1575			drm_writeback_queue_job(connector->wb_connector, new_conn_state);

1576 drm_dbg_kms(&dev_priv->drm, "queueing writeback job\n");
1577 }
1578 }
1579

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

#4 lore raw

Re: [Intel-gfx] [RFC PATCH 2/2] drm/i915: Enabling WD Transcoder

In reply to Suraj Kandpal
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch]

Hi Suraj,

[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip next-20220222] [cannot apply to v5.17-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Suraj-Kandpal/Patches-to-enable-writeback-in-i915/20220223-141252
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-a012-20220221 (https://download.01.org/0day-ci/archive/20220223/[email protected]/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e)

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/0bebda2fa91f41b1cd2c0ff7aa92fc6c653bc03c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Suraj-Kandpal/Patches-to-enable-writeback-in-i915/20220223-141252 git checkout 0bebda2fa91f41b1cd2c0ff7aa92fc6c653bc03c
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

drivers/gpu/drm/i915/display/intel_wd.c:50:38: error: no member named 'wb_connector' in 'struct drm_connector'

                   intel_wd->attached_connector->base.wb_connector;
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
>> drivers/gpu/drm/i915/display/intel_wd.c:66:6: error: no previous prototype for function 'print_connectors' [-Werror,-Wmissing-prototypes]
   void print_connectors(struct drm_i915_private *dev_priv)
        ^
   drivers/gpu/drm/i915/display/intel_wd.c:66:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void print_connectors(struct drm_i915_private *dev_priv)
   ^
   static 
   drivers/gpu/drm/i915/display/intel_wd.c:397:16: error: assigning to 'struct drm_connector' from incompatible type 'struct drm_connector *'; remove &
           wb_conn->base = &intel_connector->base;
                         ^ ~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/display/intel_wd.c:398:19: error: assigning to 'struct drm_encoder' from incompatible type 'struct drm_encoder *'; remove &
           wb_conn->encoder = &intel_wd->base.base;
                            ^ ~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/display/intel_wd.c:430:27: error: passing 'struct drm_connector' to parameter of incompatible type 'struct drm_connector *'; take the address with &
           drm_connector_helper_add(wb_conn->base, &wd_connector_helper_funcs);
                                    ^~~~~~~~~~~~~
                                    &
   include/drm/drm_modeset_helper_vtables.h:1153:67: note: passing argument to parameter 'connector' here
   static inline void drm_connector_helper_add(struct drm_connector *connector,
                                                                     ^
   drivers/gpu/drm/i915/display/intel_wd.c:432:15: error: member reference type 'struct drm_connector' is not a pointer; did you mean to use '.'?
           wb_conn->base->status = connector_status_connected;
           ~~~~~~~~~~~~~^~
                        .
   drivers/gpu/drm/i915/display/intel_wd.c:432:24: error: expression is not assignable
           wb_conn->base->status = connector_status_connected;
           ~~~~~~~~~~~~~~~~~~~~~ ^
   drivers/gpu/drm/i915/display/intel_wd.c:444:38: error: no member named 'wb_connector' in 'struct drm_connector'
                   intel_wd->attached_connector->base.wb_connector;
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
>> drivers/gpu/drm/i915/display/intel_wd.c:440:6: error: no previous prototype for function 'intel_wd_writeback_complete' [-Werror,-Wmissing-prototypes]
   void intel_wd_writeback_complete(struct intel_wd *intel_wd,
        ^
   drivers/gpu/drm/i915/display/intel_wd.c:440:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void intel_wd_writeback_complete(struct intel_wd *intel_wd,
   ^
   static 
>> drivers/gpu/drm/i915/display/intel_wd.c:448:5: error: no previous prototype for function 'intel_wd_setup_transcoder' [-Werror,-Wmissing-prototypes]
   int intel_wd_setup_transcoder(struct intel_wd *intel_wd,
       ^
   drivers/gpu/drm/i915/display/intel_wd.c:448:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int intel_wd_setup_transcoder(struct intel_wd *intel_wd,
   ^
   static 
>> drivers/gpu/drm/i915/display/intel_wd.c:613:5: error: no previous prototype for function 'intel_wd_capture' [-Werror,-Wmissing-prototypes]
   int intel_wd_capture(struct intel_wd *intel_wd,
       ^

drivers/gpu/drm/i915/display/intel_wd.c:613:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int intel_wd_capture(struct intel_wd *intel_wd,
^
static
11 errors generated.

vim +/print_connectors +66 drivers/gpu/drm/i915/display/intel_wd.c

    65	
  > 66	void print_connectors(struct drm_i915_private *dev_priv)
    67	{
    68		struct drm_connector *connector;
    69		struct drm_connector_list_iter conn_iter;
    70		struct intel_connector *intel_connector;
    71	
    72		drm_modeset_lock_all(&dev_priv->drm);
    73		drm_connector_list_iter_begin(&dev_priv->drm, &conn_iter);
    74		drm_for_each_connector_iter(connector, &conn_iter) {
    75			intel_connector = to_intel_connector(connector);
    76			drm_dbg_kms(&dev_priv->drm, "[CONNECTOR:%d:%s]: status: %s\n",
    77				connector->base.id, connector->name,
    78				drm_get_connector_status_name(connector->status));
    79		}
    80		drm_connector_list_iter_end(&conn_iter);
    81		drm_modeset_unlock_all(&dev_priv->drm);
    82	}
    83	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

#5 lore raw

[Intel-gfx] ✗ Fi.CI.BUILD: failure for Patches to enable writeback in i915

In reply to Suraj Kandpal
== Series Details ==

== Series Details ==

Series: Patches to enable writeback in i915
URL : https://patchwork.freedesktop.org/series/100617/
State : failure

== Summary ==

CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
DESCEND objtool
CHK include/generated/compile.h
CC [M] drivers/gpu/drm/i915/display/intel_display.o
drivers/gpu/drm/i915/display/intel_display.c: In function ‘intel_queue_writeback_job’:
drivers/gpu/drm/i915/display/intel_display.c:1575:36: error: ‘struct drm_connector’ has no member named ‘wb_connector’

   drm_writeback_queue_job(connector->wb_connector, new_conn_state);
                                    ^~

scripts/Makefile.build:288: recipe for target 'drivers/gpu/drm/i915/display/intel_display.o' failed make[4]: *** [drivers/gpu/drm/i915/display/intel_display.o] Error 1 scripts/Makefile.build:550: recipe for target 'drivers/gpu/drm/i915' failed make[3]: *** [drivers/gpu/drm/i915] Error 2
scripts/Makefile.build:550: recipe for target 'drivers/gpu/drm' failed
make[2]: *** [drivers/gpu/drm] Error 2
scripts/Makefile.build:550: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1831: recipe for target 'drivers' failed
make: *** [drivers] Error 2