Hi Vandita, Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next] [cannot apply to v5.4-rc8 next-20191118] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Vandita-Kulkarni/Add-support-for-mipi-dsi-cmd-mode/20191120-015713 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: i386-defconfig (attached as .config) compiler: gcc-7 (Debian 7.4.0-14) 7.4.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 If you fix the issue, kindly add following tag Reported-by: kbuild test robot <l...@intel.com> All errors (new ones prefixed by >>): drivers/gpu/drm/i915/display/icl_dsi.c:203:52: error: 'struct intel_crtc_state' has no member named 'uapi' struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); ^ include/linux/kernel.h:993:26: note: in definition of macro 'container_of' void *__mptr = (void *)(ptr); \ ^~~ drivers/gpu/drm/i915/display/icl_dsi.c:203:28: note: in expansion of macro 'to_intel_crtc' struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); ^~~~~~~~~~~~~ In file included from include/linux/ioport.h:13:0, from include/linux/acpi.h:12, from include/linux/i2c.h:13, from include/drm/drm_crtc.h:28, from include/drm/drm_atomic_helper.h:31, from drivers/gpu/drm/i915/display/icl_dsi.c:28: drivers/gpu/drm/i915/display/icl_dsi.c:203:52: error: 'struct intel_crtc_state' has no member named 'uapi' struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); ^ include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert' if (!(condition)) \ ^~~~~~~~~ include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ include/linux/kernel.h:994:2: note: in expansion of macro 'BUILD_BUG_ON_MSG' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~~~~~~~~~~~~~ include/linux/kernel.h:994:20: note: in expansion of macro '__same_type' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~~~~~~~~ drivers/gpu/drm/i915/display/intel_display_types.h:1125:26: note: in expansion of macro 'container_of' #define to_intel_crtc(x) container_of(x, struct intel_crtc, base) ^~~~~~~~~~~~ drivers/gpu/drm/i915/display/icl_dsi.c:203:28: note: in expansion of macro 'to_intel_crtc' struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); ^~~~~~~~~~~~~ drivers/gpu/drm/i915/display/icl_dsi.c:203:52: error: 'struct intel_crtc_state' has no member named 'uapi' struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); ^ include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert' if (!(condition)) \ ^~~~~~~~~ include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ include/linux/kernel.h:994:2: note: in expansion of macro 'BUILD_BUG_ON_MSG' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~~~~~~~~~~~~~ include/linux/kernel.h:995:6: note: in expansion of macro '__same_type' !__same_type(*(ptr), void), \ ^~~~~~~~~~~ drivers/gpu/drm/i915/display/intel_display_types.h:1125:26: note: in expansion of macro 'container_of' #define to_intel_crtc(x) container_of(x, struct intel_crtc, base) ^~~~~~~~~~~~ drivers/gpu/drm/i915/display/icl_dsi.c:203:28: note: in expansion of macro 'to_intel_crtc' struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); ^~~~~~~~~~~~~ drivers/gpu/drm/i915/display/icl_dsi.c:208:28: error: 'struct intel_crtc_state' has no member named 'hw' private_flags = crtc_state->hw.adjusted_mode.private_flags; ^~ In file included from drivers/gpu/drm/i915/display/intel_display_types.h:46:0, from drivers/gpu/drm/i915/display/intel_dsi.h:30, from drivers/gpu/drm/i915/display/icl_dsi.c:35: drivers/gpu/drm/i915/display/icl_dsi.c:218:18: error: implicit declaration of function 'DSI_CMD_FRMCTL'; did you mean 'DSI_CMD_RXCTL'? [-Werror=implicit-function-declaration] tmp = I915_READ(DSI_CMD_FRMCTL(port)); ^ drivers/gpu/drm/i915/i915_drv.h:1979:45: note: in definition of macro '__I915_REG_OP' intel_uncore_##op__(&(dev_priv__)->uncore, __VA_ARGS__) ^~~~~~~~~~~ drivers/gpu/drm/i915/display/icl_dsi.c:218:8: note: in expansion of macro 'I915_READ' tmp = I915_READ(DSI_CMD_FRMCTL(port)); ^~~~~~~~~ drivers/gpu/drm/i915/i915_drv.h:1981:57: error: incompatible type for argument 2 of 'intel_uncore_read' #define I915_READ(reg__) __I915_REG_OP(read, dev_priv, (reg__)) ^ drivers/gpu/drm/i915/i915_drv.h:1979:45: note: in definition of macro '__I915_REG_OP' intel_uncore_##op__(&(dev_priv__)->uncore, __VA_ARGS__) ^~~~~~~~~~~ drivers/gpu/drm/i915/display/icl_dsi.c:218:8: note: in expansion of macro 'I915_READ' tmp = I915_READ(DSI_CMD_FRMCTL(port)); ^~~~~~~~~ In file included from drivers/gpu/drm/i915/gt/uc/intel_guc.h:9:0, from drivers/gpu/drm/i915/gt/uc/intel_uc.h:9, from drivers/gpu/drm/i915/gt/intel_gt_types.h:16, from drivers/gpu/drm/i915/i915_drv.h:81, from drivers/gpu/drm/i915/display/intel_display_types.h:46, from drivers/gpu/drm/i915/display/intel_dsi.h:30, from drivers/gpu/drm/i915/display/icl_dsi.c:35: drivers/gpu/drm/i915/intel_uncore.h:287:22: note: expected 'i915_reg_t {aka struct <anonymous>}' but argument is of type 'int' static inline u##x__ intel_uncore_##name__(struct intel_uncore *uncore, \ ^ drivers/gpu/drm/i915/intel_uncore.h:302:1: note: in expansion of macro '__uncore_read' __uncore_read(read, 32, l, true) ^~~~~~~~~~~~~ >> drivers/gpu/drm/i915/display/icl_dsi.c:219:9: error: >> 'DSI_FRAME_UPDATE_REQUEST' undeclared (first use in this function); did you >> mean 'HDCP_REAUTH_REQUEST'? tmp |= DSI_FRAME_UPDATE_REQUEST; ^~~~~~~~~~~~~~~~~~~~~~~~ HDCP_REAUTH_REQUEST drivers/gpu/drm/i915/display/icl_dsi.c:219:9: note: each undeclared identifier is reported only once for each function it appears in In file included from drivers/gpu/drm/i915/display/intel_display_types.h:46:0, from drivers/gpu/drm/i915/display/intel_dsi.h:30, from drivers/gpu/drm/i915/display/icl_dsi.c:35: drivers/gpu/drm/i915/i915_drv.h:1982:65: error: incompatible type for argument 2 of 'intel_uncore_write' #define I915_WRITE(reg__, val__) __I915_REG_OP(write, dev_priv, (reg__), (val__)) ^ drivers/gpu/drm/i915/i915_drv.h:1979:45: note: in definition of macro '__I915_REG_OP' intel_uncore_##op__(&(dev_priv__)->uncore, __VA_ARGS__) ^~~~~~~~~~~ drivers/gpu/drm/i915/display/icl_dsi.c:220:2: note: in expansion of macro 'I915_WRITE' I915_WRITE(DSI_CMD_FRMCTL(port), tmp); ^~~~~~~~~~ In file included from drivers/gpu/drm/i915/gt/uc/intel_guc.h:9:0, from drivers/gpu/drm/i915/gt/uc/intel_uc.h:9, from drivers/gpu/drm/i915/gt/intel_gt_types.h:16, from drivers/gpu/drm/i915/i915_drv.h:81, from drivers/gpu/drm/i915/display/intel_display_types.h:46, from drivers/gpu/drm/i915/display/intel_dsi.h:30, from drivers/gpu/drm/i915/display/icl_dsi.c:35: drivers/gpu/drm/i915/intel_uncore.h:294:20: note: expected 'i915_reg_t {aka struct <anonymous>}' but argument is of type 'int' static inline void intel_uncore_##name__(struct intel_uncore *uncore, \ ^ drivers/gpu/drm/i915/intel_uncore.h:308:1: note: in expansion of macro '__uncore_write' __uncore_write(write, 32, l, true) ^~~~~~~~~~~~~~ drivers/gpu/drm/i915/display/icl_dsi.c: In function 'gen11_dsi_configure_transcoder': drivers/gpu/drm/i915/display/icl_dsi.c:740:11: error: 'TE_SOURCE_GPIO' undeclared (first use in this function); did you mean 'DP_SOURCE_OUI'? tmp |= TE_SOURCE_GPIO; ^~~~~~~~~~~~~~ DP_SOURCE_OUI drivers/gpu/drm/i915/display/icl_dsi.c: In function 'gen11_dsi_config_util_pin': drivers/gpu/drm/i915/display/icl_dsi.c:1021:10: error: 'UTIL_PIN_DIRECTION_INPUT' undeclared (first use in this function); did you mean 'UTIL_PIN_PIPE_MASK'? tmp |= UTIL_PIN_DIRECTION_INPUT; ^~~~~~~~~~~~~~~~~~~~~~~~ UTIL_PIN_PIPE_MASK In file included from drivers/gpu/drm/i915/display/intel_display_types.h:46:0, from drivers/gpu/drm/i915/display/intel_dsi.h:30, from drivers/gpu/drm/i915/display/icl_dsi.c:35: drivers/gpu/drm/i915/display/icl_dsi.c: In function 'gen11_dsi_deconfigure_trancoder': drivers/gpu/drm/i915/i915_drv.h:1981:57: error: incompatible type for argument 2 of 'intel_uncore_read' #define I915_READ(reg__) __I915_REG_OP(read, dev_priv, (reg__)) ^ drivers/gpu/drm/i915/i915_drv.h:1979:45: note: in definition of macro '__I915_REG_OP' intel_uncore_##op__(&(dev_priv__)->uncore, __VA_ARGS__) ^~~~~~~~~~~ drivers/gpu/drm/i915/display/icl_dsi.c:1186:10: note: in expansion of macro 'I915_READ' tmp = I915_READ(DSI_CMD_FRMCTL(port)); ^~~~~~~~~ In file included from drivers/gpu/drm/i915/gt/uc/intel_guc.h:9:0, from drivers/gpu/drm/i915/gt/uc/intel_uc.h:9, from drivers/gpu/drm/i915/gt/intel_gt_types.h:16, from drivers/gpu/drm/i915/i915_drv.h:81, from drivers/gpu/drm/i915/display/intel_display_types.h:46, from drivers/gpu/drm/i915/display/intel_dsi.h:30, from drivers/gpu/drm/i915/display/icl_dsi.c:35: drivers/gpu/drm/i915/intel_uncore.h:287:22: note: expected 'i915_reg_t {aka struct <anonymous>}' but argument is of type 'int' static inline u##x__ intel_uncore_##name__(struct intel_uncore *uncore, \ ^ drivers/gpu/drm/i915/intel_uncore.h:302:1: note: in expansion of macro '__uncore_read' __uncore_read(read, 32, l, true) ^~~~~~~~~~~~~ drivers/gpu/drm/i915/display/icl_dsi.c:1187:12: error: 'DSI_PERIODIC_FRAME_UPDATE_ENABLE' undeclared (first use in this function); did you mean 'GEN6_MBCTL_BME_UPDATE_ENABLE'? tmp &= ~DSI_PERIODIC_FRAME_UPDATE_ENABLE; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GEN6_MBCTL_BME_UPDATE_ENABLE In file included from drivers/gpu/drm/i915/display/intel_display_types.h:46:0, from drivers/gpu/drm/i915/display/intel_dsi.h:30, from drivers/gpu/drm/i915/display/icl_dsi.c:35: drivers/gpu/drm/i915/i915_drv.h:1982:65: error: incompatible type for argument 2 of 'intel_uncore_write' #define I915_WRITE(reg__, val__) __I915_REG_OP(write, dev_priv, (reg__), (val__)) ^ drivers/gpu/drm/i915/i915_drv.h:1979:45: note: in definition of macro '__I915_REG_OP' intel_uncore_##op__(&(dev_priv__)->uncore, __VA_ARGS__) ^~~~~~~~~~~ drivers/gpu/drm/i915/display/icl_dsi.c:1188:4: note: in expansion of macro 'I915_WRITE' I915_WRITE(DSI_CMD_FRMCTL(port), tmp); ^~~~~~~~~~ In file included from drivers/gpu/drm/i915/gt/uc/intel_guc.h:9:0, from drivers/gpu/drm/i915/gt/uc/intel_uc.h:9, from drivers/gpu/drm/i915/gt/intel_gt_types.h:16, from drivers/gpu/drm/i915/i915_drv.h:81, from drivers/gpu/drm/i915/display/intel_display_types.h:46, from drivers/gpu/drm/i915/display/intel_dsi.h:30, from drivers/gpu/drm/i915/display/icl_dsi.c:35: drivers/gpu/drm/i915/intel_uncore.h:294:20: note: expected 'i915_reg_t {aka struct <anonymous>}' but argument is of type 'int' static inline void intel_uncore_##name__(struct intel_uncore *uncore, \ ^ drivers/gpu/drm/i915/intel_uncore.h:308:1: note: in expansion of macro '__uncore_write' __uncore_write(write, 32, l, true) ^~~~~~~~~~~~~~ drivers/gpu/drm/i915/display/icl_dsi.c: In function 'gen11_dsi_is_periodic_cmd_mode': drivers/gpu/drm/i915/display/icl_dsi.c:1340:16: error: 'DSI_PERIODIC_FRAME_UPDATE_ENABLE' undeclared (first use in this function); did you mean 'GEN6_MBCTL_BME_UPDATE_ENABLE'? return (val & DSI_PERIODIC_FRAME_UPDATE_ENABLE); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GEN6_MBCTL_BME_UPDATE_ENABLE drivers/gpu/drm/i915/display/icl_dsi.c: In function 'gen11_dsi_get_config': vim +219 drivers/gpu/drm/i915/display/icl_dsi.c 30 31 #include "intel_atomic.h" 32 #include "intel_combo_phy.h" 33 #include "intel_connector.h" 34 #include "intel_ddi.h" > 35 #include "intel_dsi.h" 36 #include "intel_panel.h" 37 38 static inline int header_credits_available(struct drm_i915_private *dev_priv, 39 enum transcoder dsi_trans) 40 { 41 return (I915_READ(DSI_CMD_TXCTL(dsi_trans)) & FREE_HEADER_CREDIT_MASK) 42 >> FREE_HEADER_CREDIT_SHIFT; 43 } 44 45 static inline int payload_credits_available(struct drm_i915_private *dev_priv, 46 enum transcoder dsi_trans) 47 { 48 return (I915_READ(DSI_CMD_TXCTL(dsi_trans)) & FREE_PLOAD_CREDIT_MASK) 49 >> FREE_PLOAD_CREDIT_SHIFT; 50 } 51 52 static void wait_for_header_credits(struct drm_i915_private *dev_priv, 53 enum transcoder dsi_trans) 54 { 55 if (wait_for_us(header_credits_available(dev_priv, dsi_trans) >= 56 MAX_HEADER_CREDIT, 100)) 57 DRM_ERROR("DSI header credits not released\n"); 58 } 59 60 static void wait_for_payload_credits(struct drm_i915_private *dev_priv, 61 enum transcoder dsi_trans) 62 { 63 if (wait_for_us(payload_credits_available(dev_priv, dsi_trans) >= 64 MAX_PLOAD_CREDIT, 100)) 65 DRM_ERROR("DSI payload credits not released\n"); 66 } 67 68 static enum transcoder dsi_port_to_transcoder(enum port port) 69 { 70 if (port == PORT_A) 71 return TRANSCODER_DSI_0; 72 else 73 return TRANSCODER_DSI_1; 74 } 75 76 static void wait_for_cmds_dispatched_to_panel(struct intel_encoder *encoder) 77 { 78 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); 79 struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base); 80 struct mipi_dsi_device *dsi; 81 enum port port; 82 enum transcoder dsi_trans; 83 int ret; 84 85 /* wait for header/payload credits to be released */ 86 for_each_dsi_port(port, intel_dsi->ports) { 87 dsi_trans = dsi_port_to_transcoder(port); 88 wait_for_header_credits(dev_priv, dsi_trans); 89 wait_for_payload_credits(dev_priv, dsi_trans); 90 } 91 92 /* send nop DCS command */ 93 for_each_dsi_port(port, intel_dsi->ports) { 94 dsi = intel_dsi->dsi_hosts[port]->device; 95 dsi->mode_flags |= MIPI_DSI_MODE_LPM; 96 dsi->channel = 0; 97 ret = mipi_dsi_dcs_nop(dsi); 98 if (ret < 0) 99 DRM_ERROR("error sending DCS NOP command\n"); 100 } 101 102 /* wait for header credits to be released */ 103 for_each_dsi_port(port, intel_dsi->ports) { 104 dsi_trans = dsi_port_to_transcoder(port); 105 wait_for_header_credits(dev_priv, dsi_trans); 106 } 107 108 /* wait for LP TX in progress bit to be cleared */ 109 for_each_dsi_port(port, intel_dsi->ports) { 110 dsi_trans = dsi_port_to_transcoder(port); 111 if (wait_for_us(!(I915_READ(DSI_LP_MSG(dsi_trans)) & 112 LPTX_IN_PROGRESS), 20)) 113 DRM_ERROR("LPTX bit not cleared\n"); 114 } 115 } 116 117 static bool add_payld_to_queue(struct intel_dsi_host *host, const u8 *data, 118 u32 len) 119 { 120 struct intel_dsi *intel_dsi = host->intel_dsi; 121 struct drm_i915_private *dev_priv = to_i915(intel_dsi->base.base.dev); 122 enum transcoder dsi_trans = dsi_port_to_transcoder(host->port); 123 int free_credits; 124 int i, j; 125 126 for (i = 0; i < len; i += 4) { 127 u32 tmp = 0; 128 129 free_credits = payload_credits_available(dev_priv, dsi_trans); 130 if (free_credits < 1) { 131 DRM_ERROR("Payload credit not available\n"); 132 return false; 133 } 134 135 for (j = 0; j < min_t(u32, len - i, 4); j++) 136 tmp |= *data++ << 8 * j; 137 138 I915_WRITE(DSI_CMD_TXPYLD(dsi_trans), tmp); 139 } 140 141 return true; 142 } 143 144 static int dsi_send_pkt_hdr(struct intel_dsi_host *host, 145 struct mipi_dsi_packet pkt, bool enable_lpdt) 146 { 147 struct intel_dsi *intel_dsi = host->intel_dsi; 148 struct drm_i915_private *dev_priv = to_i915(intel_dsi->base.base.dev); 149 enum transcoder dsi_trans = dsi_port_to_transcoder(host->port); 150 u32 tmp; 151 int free_credits; 152 153 /* check if header credit available */ 154 free_credits = header_credits_available(dev_priv, dsi_trans); 155 if (free_credits < 1) { 156 DRM_ERROR("send pkt header failed, not enough hdr credits\n"); 157 return -1; 158 } 159 160 tmp = I915_READ(DSI_CMD_TXHDR(dsi_trans)); 161 162 if (pkt.payload) 163 tmp |= PAYLOAD_PRESENT; 164 else 165 tmp &= ~PAYLOAD_PRESENT; 166 167 tmp &= ~VBLANK_FENCE; 168 169 if (enable_lpdt) 170 tmp |= LP_DATA_TRANSFER; 171 172 tmp &= ~(PARAM_WC_MASK | VC_MASK | DT_MASK); 173 tmp |= ((pkt.header[0] & VC_MASK) << VC_SHIFT); 174 tmp |= ((pkt.header[0] & DT_MASK) << DT_SHIFT); 175 tmp |= (pkt.header[1] << PARAM_WC_LOWER_SHIFT); 176 tmp |= (pkt.header[2] << PARAM_WC_UPPER_SHIFT); 177 I915_WRITE(DSI_CMD_TXHDR(dsi_trans), tmp); 178 179 return 0; 180 } 181 182 static int dsi_send_pkt_payld(struct intel_dsi_host *host, 183 struct mipi_dsi_packet pkt) 184 { 185 /* payload queue can accept *256 bytes*, check limit */ 186 if (pkt.payload_length > MAX_PLOAD_CREDIT * 4) { 187 DRM_ERROR("payload size exceeds max queue limit\n"); 188 return -1; 189 } 190 191 /* load data into command payload queue */ 192 if (!add_payld_to_queue(host, pkt.payload, 193 pkt.payload_length)) { 194 DRM_ERROR("adding payload to queue failed\n"); 195 return -1; 196 } 197 198 return 0; 199 } 200 201 void gen11_dsi_frame_update(struct intel_crtc_state *crtc_state) 202 { 203 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); 204 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); 205 u32 tmp, private_flags; 206 enum port port; 207 208 private_flags = crtc_state->hw.adjusted_mode.private_flags; 209 210 /* case 1 also covers dual link */ 211 if (private_flags & I915_MODE_FLAG_DSI_USE_TE0) 212 port = PORT_A; 213 else if (private_flags & I915_MODE_FLAG_DSI_USE_TE1) 214 port = PORT_B; 215 else 216 return; 217 218 tmp = I915_READ(DSI_CMD_FRMCTL(port)); > 219 tmp |= DSI_FRAME_UPDATE_REQUEST; 220 I915_WRITE(DSI_CMD_FRMCTL(port), tmp); 221 } 222 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org Intel Corporation
.config.gz
Description: application/gzip
_______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx