Re: [Intel-gfx] [PATCH v6 3/3] drm/i915/dp: Expose connector VRR monitor range via debugfs
Hi Manasi, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on drm-intel/for-linux-next] [also build test WARNING on drm-tip/drm-tip drm-exynos/exynos-drm-next linus/master next-20200613] [cannot apply to tegra-drm/drm/tegra/for-next drm/drm-next v5.7] [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/Manasi-Navare/VRR-capable-attach-prop-in-i915-DPCD-helper-VRR-debugfs/20200613-070517 base: git://anongit.freedesktop.org/drm-intel for-linux-next :: branch date: 2 days ago :: commit date: 2 days ago compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot cppcheck warnings: (new ones prefixed by >>) >> drivers/gpu/drm/i915/display/intel_display_debugfs.c:2258:0: warning: >> Invalid number of character '{' when no macros are defined. [syntaxError] ^ >> drivers/gpu/drm/i915/display/intel_display_debugfs.c:2258:0: warning: >> Invalid number of character '{' when these macros are defined: >> 'CONFIG_DEBUG_FS'. [syntaxError] ^ >> drivers/gpu/drm/i915/display/intel_display_debugfs.c:2258:0: warning: >> Invalid number of character '{' when these macros are defined: >> 'CONFIG_DRM_FBDEV_EMULATION'. [syntaxError] ^ # https://github.com/0day-ci/linux/commit/670af3cf7a3a36bb87776fbfd7f913cd33681bbc git remote add linux-review https://github.com/0day-ci/linux git remote update linux-review git checkout 670af3cf7a3a36bb87776fbfd7f913cd33681bbc vim +2258 drivers/gpu/drm/i915/display/intel_display_debugfs.c 670af3cf7a3a36 Bhanuprakash Modem 2020-06-12 2202 926b005cd8c4e3 Jani Nikula2020-02-11 2203 /** 926b005cd8c4e3 Jani Nikula2020-02-11 2204 * intel_connector_debugfs_add - add i915 specific connector debugfs files 926b005cd8c4e3 Jani Nikula2020-02-11 2205 * @connector: pointer to a registered drm_connector 926b005cd8c4e3 Jani Nikula2020-02-11 2206 * 926b005cd8c4e3 Jani Nikula2020-02-11 2207 * Cleanup will be done by drm_connector_unregister() through a call to 926b005cd8c4e3 Jani Nikula2020-02-11 2208 * drm_debugfs_connector_remove(). 926b005cd8c4e3 Jani Nikula2020-02-11 2209 * 926b005cd8c4e3 Jani Nikula2020-02-11 2210 * Returns 0 on success, negative error codes on error. 926b005cd8c4e3 Jani Nikula2020-02-11 2211 */ 926b005cd8c4e3 Jani Nikula2020-02-11 2212 int intel_connector_debugfs_add(struct drm_connector *connector) 926b005cd8c4e3 Jani Nikula2020-02-11 2213 { 926b005cd8c4e3 Jani Nikula2020-02-11 2214 struct dentry *root = connector->debugfs_entry; 926b005cd8c4e3 Jani Nikula2020-02-11 2215 struct drm_i915_private *dev_priv = to_i915(connector->dev); 926b005cd8c4e3 Jani Nikula2020-02-11 2216 926b005cd8c4e3 Jani Nikula2020-02-11 2217 /* The connector must have been registered beforehands. */ 926b005cd8c4e3 Jani Nikula2020-02-11 2218 if (!root) 926b005cd8c4e3 Jani Nikula2020-02-11 2219 return -ENODEV; 926b005cd8c4e3 Jani Nikula2020-02-11 2220 926b005cd8c4e3 Jani Nikula2020-02-11 2221 if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) { 926b005cd8c4e3 Jani Nikula2020-02-11 debugfs_create_file("i915_panel_timings", S_IRUGO, root, 926b005cd8c4e3 Jani Nikula2020-02-11 2223 connector, _panel_fops); 926b005cd8c4e3 Jani Nikula2020-02-11 2224 debugfs_create_file("i915_psr_sink_status", S_IRUGO, root, 926b005cd8c4e3 Jani Nikula2020-02-11 2225 connector, _psr_sink_status_fops); 926b005cd8c4e3 Jani Nikula2020-02-11 2226 } 926b005cd8c4e3 Jani Nikula2020-02-11 2227 926b005cd8c4e3 Jani Nikula2020-02-11 2228 if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort || 926b005cd8c4e3 Jani Nikula2020-02-11 2229 connector->connector_type == DRM_MODE_CONNECTOR_HDMIA || 926b005cd8c4e3 Jani Nikula2020-02-11 2230 connector->connector_type == DRM_MODE_CONNECTOR_HDMIB) { 926b005cd8c4e3 Jani Nikula2020-02-11 2231 debugfs_create_file("i915_hdcp_sink_capability", S_IRUGO, root, 926b005cd8c4e3 Jani Nikula2020-02-11 2232 connector, _hdcp_sink_capability_fops); 926b005cd8c4e3 Jani Nikula2020-02-11 2233 } 926b005cd8c4e3 Jani Nikula2020-02-11 2234 926b005cd8c4e3 Jani Nikula2020-02-11 2235 if (INTEL_GEN(dev_priv) >= 10 && 926b005cd8c4e3 Jani Nikula2020-02-11 2236
Re: [Intel-gfx] [PATCH v6 3/3] drm/i915/dp: Expose connector VRR monitor range via debugfs
Hi Manasi, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm-intel/for-linux-next] [also build test ERROR on drm-tip/drm-tip drm-exynos/exynos-drm-next linus/master next-20200612] [cannot apply to tegra-drm/drm/tegra/for-next drm/drm-next v5.7] [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/Manasi-Navare/VRR-capable-attach-prop-in-i915-DPCD-helper-VRR-debugfs/20200613-070517 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: x86_64-randconfig-a014-20200613 (attached as .config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce (this is a W=1 build): # save the attached .config to linux build tree make W=1 ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>, old ones prefixed by <<): drivers/gpu/drm/i915/display/intel_display_debugfs.c: In function 'intel_connector_debugfs_add': >> drivers/gpu/drm/i915/display/intel_display_debugfs.c:2235:2: error: this >> 'if' clause does not guard... [-Werror=misleading-indentation] if (INTEL_GEN(dev_priv) >= 10 && ^~ drivers/gpu/drm/i915/display/intel_display_debugfs.c:2241:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' if (INTEL_GEN(dev_priv) >= 12) ^~ drivers/gpu/drm/i915/display/intel_display_debugfs.c: At top level: drivers/gpu/drm/i915/display/intel_display_debugfs.c:2247:2: error: expected identifier or '(' before 'if' if ((INTEL_GEN(dev_priv) >= 9 || IS_HASWELL(dev_priv) || ^~ drivers/gpu/drm/i915/display/intel_display_debugfs.c:2257:2: error: expected identifier or '(' before 'return' return 0; ^~ drivers/gpu/drm/i915/display/intel_display_debugfs.c:2258:1: error: expected identifier or '(' before '}' token } ^ drivers/gpu/drm/i915/display/intel_display_debugfs.c: In function 'intel_connector_debugfs_add': drivers/gpu/drm/i915/display/intel_display_debugfs.c:2244:2: error: control reaches end of non-void function [-Werror=return-type] } ^ In file included from include/drm/drm_debugfs.h:36:0, from drivers/gpu/drm/i915/display/intel_display_debugfs.c:6: At top level: >> drivers/gpu/drm/i915/display/intel_display_debugfs.c:2081:23: error: >> 'i915_lpsp_capability_fops' defined but not used >> [-Werror=unused-const-variable=] DEFINE_SHOW_ATTRIBUTE(i915_lpsp_capability); ^ include/linux/seq_file.h:154:37: note: in definition of macro 'DEFINE_SHOW_ATTRIBUTE' static const struct file_operations __name ## _fops = { ^~ cc1: all warnings being treated as errors vim +/if +2235 drivers/gpu/drm/i915/display/intel_display_debugfs.c 926b005cd8c4e3 Jani Nikula2020-02-11 2040 8806211fe7b306 Anshuman Gupta 2020-04-15 2041 #define LPSP_CAPABLE(COND) (COND ? seq_puts(m, "LPSP: capable\n") : \ 8806211fe7b306 Anshuman Gupta 2020-04-15 2042 seq_puts(m, "LPSP: incapable\n")) 8806211fe7b306 Anshuman Gupta 2020-04-15 2043 8806211fe7b306 Anshuman Gupta 2020-04-15 2044 static int i915_lpsp_capability_show(struct seq_file *m, void *data) 8806211fe7b306 Anshuman Gupta 2020-04-15 2045 { 8806211fe7b306 Anshuman Gupta 2020-04-15 2046 struct drm_connector *connector = m->private; 8806211fe7b306 Anshuman Gupta 2020-04-15 2047 struct intel_encoder *encoder = 8806211fe7b306 Anshuman Gupta 2020-04-15 2048 intel_attached_encoder(to_intel_connector(connector)); 8806211fe7b306 Anshuman Gupta 2020-04-15 2049 struct drm_i915_private *i915 = to_i915(connector->dev); 8806211fe7b306 Anshuman Gupta 2020-04-15 2050 8806211fe7b306 Anshuman Gupta 2020-04-15 2051 if (connector->status != connector_status_connected) 8806211fe7b306 Anshuman Gupta 2020-04-15 2052 return -ENODEV; 8806211fe7b306 Anshuman Gupta 2020-04-15 2053 8806211fe7b306 Anshuman Gupta 2020-04-15 2054 switch (INTEL_GEN(i915)) { 8806211fe7b306 Anshuman Gupta 2020-04-15 2055 case 12: 8806211fe7b306 Anshuman Gupta 2020-04-15 2056 /* 8806211fe7b306 Anshuman Gupta 2020-04-15 2057 * Actually TGL can drive LPSP on port till DDI_C 8806211fe7b306 Anshuman Gupta 2020-04-15 2058 * but there is no physical connected DDI_C on TGL sku's, 8806211fe7b306 Anshuman Gupta 2020-04-15 2059 * even driver is not initilizing DDI_C port for gen12. 8806211fe7b306 Anshuman Gupta 2020-04-15 2060 */ 8806211fe7b306 Anshuman Gupta 2020-04-15 2061 LPSP_CAPABLE(encoder->port <= PORT_B); 8806211fe7b306 Anshuman Gupta 2020-04-15 2062
Re: [Intel-gfx] [PATCH v6 3/3] drm/i915/dp: Expose connector VRR monitor range via debugfs
Hi Manasi, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm-intel/for-linux-next] [also build test ERROR on drm-tip/drm-tip drm-exynos/exynos-drm-next linus/master next-20200612] [cannot apply to tegra-drm/drm/tegra/for-next drm/drm-next v5.7] [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/Manasi-Navare/VRR-capable-attach-prop-in-i915-DPCD-helper-VRR-debugfs/20200613-070517 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: x86_64-rhel (attached as .config) compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 reproduce (this is a W=1 build): # save the attached .config to linux build tree make W=1 ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All error/warnings (new ones prefixed by >>, old ones prefixed by <<): drivers/gpu/drm/i915/display/intel_display_debugfs.c: In function 'intel_connector_debugfs_add': >> drivers/gpu/drm/i915/display/intel_display_debugfs.c:2235:2: warning: this >> 'if' clause does not guard... [-Wmisleading-indentation] 2235 | if (INTEL_GEN(dev_priv) >= 10 && | ^~ drivers/gpu/drm/i915/display/intel_display_debugfs.c:2241:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' 2241 | if (INTEL_GEN(dev_priv) >= 12) | ^~ drivers/gpu/drm/i915/display/intel_display_debugfs.c: At top level: >> drivers/gpu/drm/i915/display/intel_display_debugfs.c:2247:2: error: expected >> identifier or '(' before 'if' 2247 | if ((INTEL_GEN(dev_priv) >= 9 || IS_HASWELL(dev_priv) || | ^~ >> drivers/gpu/drm/i915/display/intel_display_debugfs.c:2257:2: error: expected >> identifier or '(' before 'return' 2257 | return 0; | ^~ >> drivers/gpu/drm/i915/display/intel_display_debugfs.c:2258:1: error: expected >> identifier or '(' before '}' token 2258 | } | ^ drivers/gpu/drm/i915/display/intel_display_debugfs.c: In function 'intel_connector_debugfs_add': >> drivers/gpu/drm/i915/display/intel_display_debugfs.c:2244:2: warning: >> control reaches end of non-void function [-Wreturn-type] 2244 | } | ^ In file included from include/drm/drm_debugfs.h:36, from drivers/gpu/drm/i915/display/intel_display_debugfs.c:6: At top level: drivers/gpu/drm/i915/display/intel_display_debugfs.c:2081:23: warning: 'i915_lpsp_capability_fops' defined but not used [-Wunused-const-variable=] 2081 | DEFINE_SHOW_ATTRIBUTE(i915_lpsp_capability); | ^~~~ include/linux/seq_file.h:154:37: note: in definition of macro 'DEFINE_SHOW_ATTRIBUTE' 154 | static const struct file_operations __name ## _fops = {| ^~ vim +2247 drivers/gpu/drm/i915/display/intel_display_debugfs.c 670af3cf7a3a36 Bhanuprakash Modem 2020-06-12 2202 926b005cd8c4e3 Jani Nikula2020-02-11 2203 /** 926b005cd8c4e3 Jani Nikula2020-02-11 2204 * intel_connector_debugfs_add - add i915 specific connector debugfs files 926b005cd8c4e3 Jani Nikula2020-02-11 2205 * @connector: pointer to a registered drm_connector 926b005cd8c4e3 Jani Nikula2020-02-11 2206 * 926b005cd8c4e3 Jani Nikula2020-02-11 2207 * Cleanup will be done by drm_connector_unregister() through a call to 926b005cd8c4e3 Jani Nikula2020-02-11 2208 * drm_debugfs_connector_remove(). 926b005cd8c4e3 Jani Nikula2020-02-11 2209 * 926b005cd8c4e3 Jani Nikula2020-02-11 2210 * Returns 0 on success, negative error codes on error. 926b005cd8c4e3 Jani Nikula2020-02-11 2211 */ 926b005cd8c4e3 Jani Nikula2020-02-11 2212 int intel_connector_debugfs_add(struct drm_connector *connector) 926b005cd8c4e3 Jani Nikula2020-02-11 2213 { 926b005cd8c4e3 Jani Nikula2020-02-11 2214 struct dentry *root = connector->debugfs_entry; 926b005cd8c4e3 Jani Nikula2020-02-11 2215 struct drm_i915_private *dev_priv = to_i915(connector->dev); 926b005cd8c4e3 Jani Nikula2020-02-11 2216 926b005cd8c4e3 Jani Nikula2020-02-11 2217 /* The connector must have been registered beforehands. */ 926b005cd8c4e3 Jani Nikula2020-02-11 2218 if (!root) 926b005cd8c4e3 Jani Nikula2020-02-11 2219 return -ENODEV; 926b005cd8c4e3 Jani Nikula2020-02-11 2220 926b005cd8c4e3 Jani Nikula2020-02-11 2221 if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) { 926b005cd8c4e3 Jani Nikula2020-02-11 debugfs_create_file("i915_panel_timings", S_IRUGO, root, 926b005cd8c4e3 Jani Nikula2020-02-11 2223 connector, _panel_fops); 926b005cd8c4e3 Jani Nikula2020-02-11 2224