* [linux-next:master 11345/11865] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9804:38: warning: variable 'i' is uninitialized when used here
@ 2021-02-20 15:37 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-02-20 15:37 UTC (permalink / raw)
To: Stylon Wang
Cc: kbuild-all, clang-built-linux, Linux Memory Management List,
Alex Deucher, Nicholas Kazlauskas
[-- Attachment #1: Type: text/plain, Size: 6266 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: abaf6f60176f1ae9d946d63e4db63164600b7b1a
commit: f9b4f20c4777bd305ef04f9485294692bc65968c [11345/11865] drm/amd/display: Add Freesync HDMI support to DM
config: x86_64-randconfig-a013-20210220 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f9b4f20c4777bd305ef04f9485294692bc65968c
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout f9b4f20c4777bd305ef04f9485294692bc65968c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9804:38: warning: variable 'i' is uninitialized when used here [-Wuninitialized]
timing = &edid->detailed_timings[i];
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9714:7: note: initialize the variable 'i' to silence this warning
int i;
^
= 0
1 warning generated.
vim +/i +9804 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
9710
9711 void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
9712 struct edid *edid)
9713 {
9714 int i;
9715 struct detailed_timing *timing;
9716 struct detailed_non_pixel *data;
9717 struct detailed_data_monitor_range *range;
9718 struct amdgpu_dm_connector *amdgpu_dm_connector =
9719 to_amdgpu_dm_connector(connector);
9720 struct dm_connector_state *dm_con_state = NULL;
9721
9722 struct drm_device *dev = connector->dev;
9723 struct amdgpu_device *adev = drm_to_adev(dev);
9724 bool freesync_capable = false;
9725 struct amdgpu_hdmi_vsdb_info vsdb_info = {0};
9726 bool hdmi_valid_vsdb_found = false;
9727
9728 if (!connector->state) {
9729 DRM_ERROR("%s - Connector has no state", __func__);
9730 goto update;
9731 }
9732
9733 if (!edid) {
9734 dm_con_state = to_dm_connector_state(connector->state);
9735
9736 amdgpu_dm_connector->min_vfreq = 0;
9737 amdgpu_dm_connector->max_vfreq = 0;
9738 amdgpu_dm_connector->pixel_clock_mhz = 0;
9739
9740 goto update;
9741 }
9742
9743 dm_con_state = to_dm_connector_state(connector->state);
9744
9745 if (!amdgpu_dm_connector->dc_sink) {
9746 DRM_ERROR("dc_sink NULL, could not add free_sync module.\n");
9747 goto update;
9748 }
9749 if (!adev->dm.freesync_module)
9750 goto update;
9751
9752
9753 if (amdgpu_dm_connector->dc_sink->sink_signal == SIGNAL_TYPE_DISPLAY_PORT
9754 || amdgpu_dm_connector->dc_sink->sink_signal == SIGNAL_TYPE_EDP) {
9755 bool edid_check_required = false;
9756
9757 if (edid) {
9758 edid_check_required = is_dp_capable_without_timing_msa(
9759 adev->dm.dc,
9760 amdgpu_dm_connector);
9761 }
9762
9763 if (edid_check_required == true && (edid->version > 1 ||
9764 (edid->version == 1 && edid->revision > 1))) {
9765 for (i = 0; i < 4; i++) {
9766
9767 timing = &edid->detailed_timings[i];
9768 data = &timing->data.other_data;
9769 range = &data->data.range;
9770 /*
9771 * Check if monitor has continuous frequency mode
9772 */
9773 if (data->type != EDID_DETAIL_MONITOR_RANGE)
9774 continue;
9775 /*
9776 * Check for flag range limits only. If flag == 1 then
9777 * no additional timing information provided.
9778 * Default GTF, GTF Secondary curve and CVT are not
9779 * supported
9780 */
9781 if (range->flags != 1)
9782 continue;
9783
9784 amdgpu_dm_connector->min_vfreq = range->min_vfreq;
9785 amdgpu_dm_connector->max_vfreq = range->max_vfreq;
9786 amdgpu_dm_connector->pixel_clock_mhz =
9787 range->pixel_clock_mhz * 10;
9788
9789 connector->display_info.monitor_range.min_vfreq = range->min_vfreq;
9790 connector->display_info.monitor_range.max_vfreq = range->max_vfreq;
9791
9792 break;
9793 }
9794
9795 if (amdgpu_dm_connector->max_vfreq -
9796 amdgpu_dm_connector->min_vfreq > 10) {
9797
9798 freesync_capable = true;
9799 }
9800 }
9801 } else if (edid && amdgpu_dm_connector->dc_sink->sink_signal == SIGNAL_TYPE_HDMI_TYPE_A) {
9802 hdmi_valid_vsdb_found = parse_hdmi_amd_vsdb(amdgpu_dm_connector, edid, &vsdb_info);
9803 if (hdmi_valid_vsdb_found && vsdb_info.freesync_supported) {
> 9804 timing = &edid->detailed_timings[i];
9805 data = &timing->data.other_data;
9806
9807 amdgpu_dm_connector->min_vfreq = vsdb_info.min_refresh_rate_hz;
9808 amdgpu_dm_connector->max_vfreq = vsdb_info.max_refresh_rate_hz;
9809 if (amdgpu_dm_connector->max_vfreq - amdgpu_dm_connector->min_vfreq > 10)
9810 freesync_capable = true;
9811
9812 connector->display_info.monitor_range.min_vfreq = vsdb_info.min_refresh_rate_hz;
9813 connector->display_info.monitor_range.max_vfreq = vsdb_info.max_refresh_rate_hz;
9814 }
9815 }
9816
9817 update:
9818 if (dm_con_state)
9819 dm_con_state->freesync_capable = freesync_capable;
9820
9821 if (connector->vrr_capable_property)
9822 drm_connector_set_vrr_capable_property(connector,
9823 freesync_capable);
9824 }
9825
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37527 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-20 15:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-20 15:37 [linux-next:master 11345/11865] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9804:38: warning: variable 'i' is uninitialized when used here kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).