* [linux-next:master 910/1340] drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:857 amdgpu_acpi_init() warn: this array is probably non-NULL. 'dm->backlight_dev'
@ 2021-07-13 16:02 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-07-13 16:02 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 5797 bytes --]
CC: kbuild-all(a)lists.01.org
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Alex Deucher <alexander.deucher@amd.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 8f0df15bafc1e1c92b6d96bf8ef24dd8be3aec7b
commit: 6728748313351e2ce2f07c929f1328730379d765 [910/1340] drm/amdgpu/display: add support for multiple backlights
:::::: branch date: 8 hours ago
:::::: commit date: 5 days ago
config: x86_64-randconfig-m001-20210713 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:857 amdgpu_acpi_init() warn: this array is probably non-NULL. 'dm->backlight_dev'
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3552 amdgpu_dm_backlight_update_status() error: testing array offset 'i' after use.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3594 amdgpu_dm_backlight_get_brightness() error: testing array offset 'i' after use.
Old smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1336 amdgpu_dm_fini() error: we previously assumed 'adev->dm.dc' could be null (see line 1324)
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1349 amdgpu_dm_fini() warn: variable dereferenced before check 'adev->dm.dc' (see line 1336)
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5888 create_stream_for_sink() error: we previously assumed 'aconnector->dc_sink' could be null (see line 5786)
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:8192 handle_cursor_update() error: we previously assumed 'afb' could be null (see line 8151)
vim +857 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
d38ceaf99ed015 Alex Deucher 2015-04-20 837
d38ceaf99ed015 Alex Deucher 2015-04-20 838 /* Call all ACPI methods here */
d38ceaf99ed015 Alex Deucher 2015-04-20 839 /**
d38ceaf99ed015 Alex Deucher 2015-04-20 840 * amdgpu_acpi_init - init driver acpi support
d38ceaf99ed015 Alex Deucher 2015-04-20 841 *
d38ceaf99ed015 Alex Deucher 2015-04-20 842 * @adev: amdgpu_device pointer
d38ceaf99ed015 Alex Deucher 2015-04-20 843 *
d38ceaf99ed015 Alex Deucher 2015-04-20 844 * Verifies the AMD ACPI interfaces and registers with the acpi
d38ceaf99ed015 Alex Deucher 2015-04-20 845 * notifier chain (all asics).
d38ceaf99ed015 Alex Deucher 2015-04-20 846 * Returns 0 on success, error on failure.
d38ceaf99ed015 Alex Deucher 2015-04-20 847 */
d38ceaf99ed015 Alex Deucher 2015-04-20 848 int amdgpu_acpi_init(struct amdgpu_device *adev)
d38ceaf99ed015 Alex Deucher 2015-04-20 849 {
f9b7f3703ff977 Alex Deucher 2021-05-25 850 struct amdgpu_atif *atif = &amdgpu_acpi_priv.atif;
d38ceaf99ed015 Alex Deucher 2015-04-20 851
97d798b276e94a Alex Deucher 2020-05-05 852 #if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE)
9c27bc97aff8bb Ye Bin 2020-10-09 853 if (atif->notifications.brightness_change) {
97d798b276e94a Alex Deucher 2020-05-05 854 if (amdgpu_device_has_dc_support(adev)) {
97d798b276e94a Alex Deucher 2020-05-05 855 #if defined(CONFIG_DRM_AMD_DC)
97d798b276e94a Alex Deucher 2020-05-05 856 struct amdgpu_display_manager *dm = &adev->dm;
77bf762f8b3011 Alex Deucher 2021-05-19 @857 if (dm->backlight_dev)
6728748313351e Alex Deucher 2021-07-08 858 atif->bd = dm->backlight_dev[0];
97d798b276e94a Alex Deucher 2020-05-05 859 #endif
97d798b276e94a Alex Deucher 2020-05-05 860 } else {
d38ceaf99ed015 Alex Deucher 2015-04-20 861 struct drm_encoder *tmp;
d38ceaf99ed015 Alex Deucher 2015-04-20 862
d38ceaf99ed015 Alex Deucher 2015-04-20 863 /* Find the encoder controlling the brightness */
4a580877bdcb83 Luben Tuikov 2020-08-24 864 list_for_each_entry(tmp, &adev_to_drm(adev)->mode_config.encoder_list,
d38ceaf99ed015 Alex Deucher 2015-04-20 865 head) {
d38ceaf99ed015 Alex Deucher 2015-04-20 866 struct amdgpu_encoder *enc = to_amdgpu_encoder(tmp);
d38ceaf99ed015 Alex Deucher 2015-04-20 867
d38ceaf99ed015 Alex Deucher 2015-04-20 868 if ((enc->devices & (ATOM_DEVICE_LCD_SUPPORT)) &&
d38ceaf99ed015 Alex Deucher 2015-04-20 869 enc->enc_priv) {
d38ceaf99ed015 Alex Deucher 2015-04-20 870 struct amdgpu_encoder_atom_dig *dig = enc->enc_priv;
d38ceaf99ed015 Alex Deucher 2015-04-20 871 if (dig->bl_dev) {
97d798b276e94a Alex Deucher 2020-05-05 872 atif->bd = dig->bl_dev;
d38ceaf99ed015 Alex Deucher 2015-04-20 873 break;
d38ceaf99ed015 Alex Deucher 2015-04-20 874 }
d38ceaf99ed015 Alex Deucher 2015-04-20 875 }
d38ceaf99ed015 Alex Deucher 2015-04-20 876 }
d38ceaf99ed015 Alex Deucher 2015-04-20 877 }
97d798b276e94a Alex Deucher 2020-05-05 878 }
97d798b276e94a Alex Deucher 2020-05-05 879 #endif
f9b7f3703ff977 Alex Deucher 2021-05-25 880 adev->acpi_nb.notifier_call = amdgpu_acpi_event;
f9b7f3703ff977 Alex Deucher 2021-05-25 881 register_acpi_notifier(&adev->acpi_nb);
f9b7f3703ff977 Alex Deucher 2021-05-25 882
f9b7f3703ff977 Alex Deucher 2021-05-25 883 return 0;
f9b7f3703ff977 Alex Deucher 2021-05-25 884 }
f9b7f3703ff977 Alex Deucher 2021-05-25 885
:::::: The code at line 857 was first introduced by commit
:::::: 77bf762f8b3011b2d00eb49098071952956da892 drm/amdgpu/acpi: unify ATCS handling (v3)
:::::: TO: Alex Deucher <alexander.deucher@amd.com>
:::::: CC: Alex Deucher <alexander.deucher@amd.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 47651 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-13 16:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-13 16:02 [linux-next:master 910/1340] drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:857 amdgpu_acpi_init() warn: this array is probably non-NULL. 'dm->backlight_dev' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.