* [linux-next:master 7056/9522] drivers/gpu/drm/tegra/dc.c:1856:2: warning: Value stored to 'old_dc_state' is never read [clang-analyzer-deadcode.DeadStores]
@ 2021-08-22 16:06 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-22 16:06 UTC (permalink / raw)
To: Dmitry Osipenko
Cc: clang-built-linux, kbuild-all, Linux Memory Management List,
Thierry Reding
[-- Attachment #1: Type: text/plain, Size: 21393 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 86ed57fd8c93fdfaabb4f58e78455180fa7d8a84
commit: 04d5d5df9df79f9045e76404775fc8a084aac23d [7056/9522] drm/tegra: dc: Support memory bandwidth management
config: arm-randconfig-c002-20210822 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9e9d70591e72fc6762b4b9a226b68ed1307419bf)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=04d5d5df9df79f9045e76404775fc8a084aac23d
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 04d5d5df9df79f9045e76404775fc8a084aac23d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
14 warnings generated.
>> drivers/gpu/drm/tegra/dc.c:1856:2: warning: Value stored to 'old_dc_state' is never read [clang-analyzer-deadcode.DeadStores]
old_dc_state = to_const_dc_state(old_crtc_state);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/tegra/dc.c:1856:2: note: Value stored to 'old_dc_state' is never read
old_dc_state = to_const_dc_state(old_crtc_state);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/tegra/dc.c:1857:2: warning: Value stored to 'new_dc_state' is never read [clang-analyzer-deadcode.DeadStores]
new_dc_state = to_const_dc_state(crtc->state);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/tegra/dc.c:1857:2: note: Value stored to 'new_dc_state' is never read
new_dc_state = to_const_dc_state(crtc->state);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/tegra/dc.c:2145:2: warning: Value stored to 'value' is never read [clang-analyzer-deadcode.DeadStores]
value = tegra_dc_readl(dc, DC_CMD_STATE_CONTROL);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/tegra/dc.c:2145:2: note: Value stored to 'value' is never read
value = tegra_dc_readl(dc, DC_CMD_STATE_CONTROL);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/tegra/dc.c:2149:2: warning: Value stored to 'value' is never read [clang-analyzer-deadcode.DeadStores]
value = tegra_dc_readl(dc, DC_CMD_STATE_CONTROL);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/tegra/dc.c:2149:2: note: Value stored to 'value' is never read
value = tegra_dc_readl(dc, DC_CMD_STATE_CONTROL);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/tegra/dc.c:2238:2: warning: Value stored to 'old_state' is never read [clang-analyzer-deadcode.DeadStores]
old_state = drm_atomic_get_old_crtc_state(state, crtc);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/tegra/dc.c:2238:2: note: Value stored to 'old_state' is never read
old_state = drm_atomic_get_old_crtc_state(state, crtc);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 9 warnings (6 in non-user code, 3 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning generated.
drivers/gpu/drm/tegra/hda.c:53:3: warning: Value stored to 'bits' is never read [clang-analyzer-deadcode.DeadStores]
bits = (format & AC_FMT_BITS_MASK) >> AC_FMT_BITS_SHIFT;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/tegra/hda.c:53:3: note: Value stored to 'bits' is never read
bits = (format & AC_FMT_BITS_MASK) >> AC_FMT_BITS_SHIFT;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
vim +/old_dc_state +1856 drivers/gpu/drm/tegra/dc.c
1836
1837 static void
1838 tegra_crtc_update_memory_bandwidth(struct drm_crtc *crtc,
1839 struct drm_atomic_state *state,
1840 bool prepare_bandwidth_transition)
1841 {
1842 const struct tegra_plane_state *old_tegra_state, *new_tegra_state;
1843 const struct tegra_dc_state *old_dc_state, *new_dc_state;
1844 u32 i, new_avg_bw, old_avg_bw, new_peak_bw, old_peak_bw;
1845 const struct drm_plane_state *old_plane_state;
1846 const struct drm_crtc_state *old_crtc_state;
1847 struct tegra_dc_window window, old_window;
1848 struct tegra_dc *dc = to_tegra_dc(crtc);
1849 struct tegra_plane *tegra;
1850 struct drm_plane *plane;
1851
1852 if (dc->soc->has_nvdisplay)
1853 return;
1854
1855 old_crtc_state = drm_atomic_get_old_crtc_state(state, crtc);
> 1856 old_dc_state = to_const_dc_state(old_crtc_state);
> 1857 new_dc_state = to_const_dc_state(crtc->state);
1858
1859 if (!crtc->state->active) {
1860 if (!old_crtc_state->active)
1861 return;
1862
1863 /*
1864 * When CRTC is disabled on DPMS, the state of attached planes
1865 * is kept unchanged. Hence we need to enforce removal of the
1866 * bandwidths from the ICC paths.
1867 */
1868 drm_atomic_crtc_for_each_plane(plane, crtc) {
1869 tegra = to_tegra_plane(plane);
1870
1871 icc_set_bw(tegra->icc_mem, 0, 0);
1872 icc_set_bw(tegra->icc_mem_vfilter, 0, 0);
1873 }
1874
1875 return;
1876 }
1877
1878 for_each_old_plane_in_state(old_crtc_state->state, plane,
1879 old_plane_state, i) {
1880 old_tegra_state = to_const_tegra_plane_state(old_plane_state);
1881 new_tegra_state = to_const_tegra_plane_state(plane->state);
1882 tegra = to_tegra_plane(plane);
1883
1884 /*
1885 * We're iterating over the global atomic state and it contains
1886 * planes from another CRTC, hence we need to filter out the
1887 * planes unrelated to this CRTC.
1888 */
1889 if (tegra->dc != dc)
1890 continue;
1891
1892 new_avg_bw = new_tegra_state->avg_memory_bandwidth;
1893 old_avg_bw = old_tegra_state->avg_memory_bandwidth;
1894
1895 new_peak_bw = new_tegra_state->total_peak_memory_bandwidth;
1896 old_peak_bw = old_tegra_state->total_peak_memory_bandwidth;
1897
1898 /*
1899 * See the comment related to !crtc->state->active above,
1900 * which explains why bandwidths need to be updated when
1901 * CRTC is turning ON.
1902 */
1903 if (new_avg_bw == old_avg_bw && new_peak_bw == old_peak_bw &&
1904 old_crtc_state->active)
1905 continue;
1906
1907 window.src.h = drm_rect_height(&plane->state->src) >> 16;
1908 window.dst.h = drm_rect_height(&plane->state->dst);
1909
1910 old_window.src.h = drm_rect_height(&old_plane_state->src) >> 16;
1911 old_window.dst.h = drm_rect_height(&old_plane_state->dst);
1912
1913 /*
1914 * During the preparation phase (atomic_begin), the memory
1915 * freq should go high before the DC changes are committed
1916 * if bandwidth requirement goes up, otherwise memory freq
1917 * should to stay high if BW requirement goes down. The
1918 * opposite applies to the completion phase (post_commit).
1919 */
1920 if (prepare_bandwidth_transition) {
1921 new_avg_bw = max(old_avg_bw, new_avg_bw);
1922 new_peak_bw = max(old_peak_bw, new_peak_bw);
1923
1924 if (tegra_plane_use_vertical_filtering(tegra, &old_window))
1925 window = old_window;
1926 }
1927
1928 icc_set_bw(tegra->icc_mem, new_avg_bw, new_peak_bw);
1929
1930 if (tegra_plane_use_vertical_filtering(tegra, &window))
1931 icc_set_bw(tegra->icc_mem_vfilter, new_avg_bw, new_peak_bw);
1932 else
1933 icc_set_bw(tegra->icc_mem_vfilter, 0, 0);
1934 }
1935 }
1936
---
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: 37313 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-22 16:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-22 16:06 [linux-next:master 7056/9522] drivers/gpu/drm/tegra/dc.c:1856:2: warning: Value stored to 'old_dc_state' is never read [clang-analyzer-deadcode.DeadStores] 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).