Message ID | 20241109-hdmi-mode-valid-v3-3-5348c2368076@linaro.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | drm/display: hdmi: add drm_hdmi_connector_mode_valid() | expand |
Hi Dmitry, kernel test robot noticed the following build warnings: [auto build test WARNING on 929beafbe7acce3267c06115e13e03ff6e50548a] url: https://github.com/intel-lab-lkp/linux/commits/Dmitry-Baryshkov/drm-display-hdmi-add-generic-mode_valid-helper/20241109-203557 base: 929beafbe7acce3267c06115e13e03ff6e50548a patch link: https://lore.kernel.org/r/20241109-hdmi-mode-valid-v3-3-5348c2368076%40linaro.org patch subject: [PATCH v3 3/7] drm/vc4: use drm_hdmi_connector_mode_valid() config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20241110/202411100456.0JcsAx2b-lkp@intel.com/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241110/202411100456.0JcsAx2b-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202411100456.0JcsAx2b-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/gpu/drm/vc4/vc4_hdmi.c: In function 'vc4_hdmi_encoder_mode_valid': >> drivers/gpu/drm/vc4/vc4_hdmi.c:1762:68: warning: passing argument 2 of 'drm_hdmi_connector_mode_valid' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 1762 | return drm_hdmi_connector_mode_valid(&vc4_hdmi->connector, mode); | ^~~~ In file included from drivers/gpu/drm/vc4/vc4_hdmi.c:35: include/drm/display/drm_hdmi_state_helper.h:25:56: note: expected 'struct drm_display_mode *' but argument is of type 'const struct drm_display_mode *' 25 | struct drm_display_mode *mode); | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ vim +1762 drivers/gpu/drm/vc4/vc4_hdmi.c 1749 1750 static enum drm_mode_status 1751 vc4_hdmi_encoder_mode_valid(struct drm_encoder *encoder, 1752 const struct drm_display_mode *mode) 1753 { 1754 struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); 1755 1756 if (vc4_hdmi->variant->unsupported_odd_h_timings && 1757 !(mode->flags & DRM_MODE_FLAG_DBLCLK) && 1758 ((mode->hdisplay % 2) || (mode->hsync_start % 2) || 1759 (mode->hsync_end % 2) || (mode->htotal % 2))) 1760 return MODE_H_ILLEGAL; 1761 > 1762 return drm_hdmi_connector_mode_valid(&vc4_hdmi->connector, mode); 1763 } 1764
Hi Dmitry, kernel test robot noticed the following build errors: [auto build test ERROR on 929beafbe7acce3267c06115e13e03ff6e50548a] url: https://github.com/intel-lab-lkp/linux/commits/Dmitry-Baryshkov/drm-display-hdmi-add-generic-mode_valid-helper/20241109-203557 base: 929beafbe7acce3267c06115e13e03ff6e50548a patch link: https://lore.kernel.org/r/20241109-hdmi-mode-valid-v3-3-5348c2368076%40linaro.org patch subject: [PATCH v3 3/7] drm/vc4: use drm_hdmi_connector_mode_valid() config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20241110/202411100659.T6WKBFbI-lkp@intel.com/config) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241110/202411100659.T6WKBFbI-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202411100659.T6WKBFbI-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from drivers/gpu/drm/vc4/vc4_hdmi.c:37: In file included from include/drm/drm_atomic_helper.h:31: In file included from include/drm/drm_crtc.h:32: In file included from include/drm/drm_modes.h:33: In file included from include/drm/drm_connector.h:32: In file included from include/drm/drm_util.h:36: In file included from include/linux/kgdb.h:19: In file included from include/linux/kprobes.h:28: In file included from include/linux/ftrace.h:13: In file included from include/linux/kallsyms.h:13: In file included from include/linux/mm.h:2223: include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 504 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 505 | item]; | ~~~~ include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 511 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 512 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 524 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 525 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ >> drivers/gpu/drm/vc4/vc4_hdmi.c:1762:61: error: passing 'const struct drm_display_mode *' to parameter of type 'struct drm_display_mode *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] 1762 | return drm_hdmi_connector_mode_valid(&vc4_hdmi->connector, mode); | ^~~~ include/drm/display/drm_hdmi_state_helper.h:25:35: note: passing argument to parameter 'mode' here 25 | struct drm_display_mode *mode); | ^ 4 warnings and 1 error generated. vim +1762 drivers/gpu/drm/vc4/vc4_hdmi.c 1749 1750 static enum drm_mode_status 1751 vc4_hdmi_encoder_mode_valid(struct drm_encoder *encoder, 1752 const struct drm_display_mode *mode) 1753 { 1754 struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); 1755 1756 if (vc4_hdmi->variant->unsupported_odd_h_timings && 1757 !(mode->flags & DRM_MODE_FLAG_DBLCLK) && 1758 ((mode->hdisplay % 2) || (mode->hsync_start % 2) || 1759 (mode->hsync_end % 2) || (mode->htotal % 2))) 1760 return MODE_H_ILLEGAL; 1761 > 1762 return drm_hdmi_connector_mode_valid(&vc4_hdmi->connector, mode); 1763 } 1764
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 62b82b1eeb3694d1685969c49b2760cbbddc840e..486e513b898d7f761e8615f2afc193ca44b23200 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -1752,7 +1752,6 @@ vc4_hdmi_encoder_mode_valid(struct drm_encoder *encoder, const struct drm_display_mode *mode) { struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); - unsigned long long rate; if (vc4_hdmi->variant->unsupported_odd_h_timings && !(mode->flags & DRM_MODE_FLAG_DBLCLK) && @@ -1760,8 +1759,7 @@ vc4_hdmi_encoder_mode_valid(struct drm_encoder *encoder, (mode->hsync_end % 2) || (mode->htotal % 2))) return MODE_H_ILLEGAL; - rate = drm_hdmi_compute_mode_clock(mode, 8, HDMI_COLORSPACE_RGB); - return vc4_hdmi_connector_clock_valid(&vc4_hdmi->connector, mode, rate); + return drm_hdmi_connector_mode_valid(&vc4_hdmi->connector, mode); } static const struct drm_encoder_helper_funcs vc4_hdmi_encoder_helper_funcs = {