tree:
https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: 809c83e943a3ab40a494a11ab9762e3f0401fb2d
commit: 50cb478a31388684f2ce39a7afb595c1623be0f1 [30/31] FROMLIST: drm/amd/display: Fix
two cursor duplication when using overlay
config: m68k-randconfig-r033-20210421 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
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
git remote add chrome-os
https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.4
git checkout 50cb478a31388684f2ce39a7afb595c1623be0f1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:645:6: warning: no previous
prototype for 'amdgpu_dm_audio_eld_notify' [-Wmissing-prototypes]
645 | void amdgpu_dm_audio_eld_notify(struct amdgpu_device *adev, int pin)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function
'dm_resume':
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1220:20: warning: variable
'plane' set but not used [-Wunused-but-set-variable]
1220 | struct drm_plane *plane;
| ^~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1217:19: warning: variable
'crtc' set but not used [-Wunused-but-set-variable]
1217 | struct drm_crtc *crtc;
| ^~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: At top level:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:2066:1: warning: no
previous prototype for 'dm_atomic_get_new_state' [-Wmissing-prototypes]
2066 | dm_atomic_get_new_state(struct drm_atomic_state *state)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:2084:1: warning: no
previous prototype for 'dm_atomic_get_old_state' [-Wmissing-prototypes]
2084 | dm_atomic_get_old_state(struct drm_atomic_state *state)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4748:6: warning: no
previous prototype for 'dm_drm_plane_destroy_state' [-Wmissing-prototypes]
4748 | void dm_drm_plane_destroy_state(struct drm_plane *plane,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function
'amdgpu_dm_commit_cursors':
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5989:44: warning: variable
'new_plane_state' set but not used [-Wunused-but-set-variable]
5989 | struct drm_plane_state *old_plane_state, *new_plane_state;
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function
'amdgpu_dm_atomic_commit_tail':
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6515:24: warning: variable
'connector' set but not used [-Wunused-but-set-variable]
6515 | struct drm_connector *connector;
| ^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function
'dm_determine_update_type_for_commit':
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:7463:36: warning: variable
'old_plane_crtc' set but not used [-Wunused-but-set-variable]
7463 | struct drm_crtc *new_plane_crtc, *old_plane_crtc;
| ^~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function
'validate_overlay':
>
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:7643:26: warning: variable
'old_plane_state' set but not used [-Wunused-but-set-variable]
7643 |
struct drm_plane_state *old_plane_state, *new_plane_state;
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function
'amdgpu_dm_atomic_check':
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:7717:24: warning: variable
'connector' set but not used [-Wunused-but-set-variable]
7717 | struct drm_connector *connector;
| ^~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/core_types.h:32,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:31:
At top level:
drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:124:22: warning:
'DP_DVI_CONVERTER_ID_4' defined but not used [-Wunused-const-variable=]
124 | static const uint8_t DP_DVI_CONVERTER_ID_4[] = "m2DVIa";
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:122:22: warning:
'DP_VGA_LVDS_CONVERTER_ID_3' defined but not used [-Wunused-const-variable=]
122 | static const uint8_t DP_VGA_LVDS_CONVERTER_ID_3[] = "dnomlA";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:120:22: warning:
'DP_VGA_LVDS_CONVERTER_ID_2' defined but not used [-Wunused-const-variable=]
120 | static const uint8_t DP_VGA_LVDS_CONVERTER_ID_2[] = "sivarT";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:29:
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning:
'dc_fixpt_ln2_div_2' defined but not used [-Wunused-const-variable=]
76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning:
'dc_fixpt_ln2' defined but not used [-Wunused-const-variable=]
75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
| ^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning:
'dc_fixpt_e' defined but not used [-Wunused-const-variable=]
74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning:
'dc_fixpt_two_pi' defined but not used [-Wunused-const-variable=]
73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning:
'dc_fixpt_pi' defined but not used [-Wunused-const-variable=]
72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
| ^~~~~~~~~~~
vim +/old_plane_state +7643 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
7638
7639 static int validate_overlay(struct drm_atomic_state *state)
7640 {
7641 int i;
7642 struct drm_plane *plane;
7643 struct drm_plane_state *old_plane_state, *new_plane_state;
7644 struct drm_plane_state *primary_state, *overlay_state = NULL;
7645
7646 /* Check if primary plane is contained inside overlay */
7647 for_each_oldnew_plane_in_state_reverse(state, plane, old_plane_state,
new_plane_state, i) {
7648 if (plane->type == DRM_PLANE_TYPE_OVERLAY) {
7649 if (drm_atomic_plane_disabling(plane->state, new_plane_state))
7650 return 0;
7651
7652 overlay_state = new_plane_state;
7653 continue;
7654 }
7655 }
7656
7657 /* check if we're making changes to the overlay plane */
7658 if (!overlay_state)
7659 return 0;
7660
7661 /* check if overlay plane is enabled */
7662 if (!overlay_state->crtc)
7663 return 0;
7664
7665 /* find the primary plane for the CRTC that the overlay is enabled on */
7666 primary_state = drm_atomic_get_plane_state(state,
overlay_state->crtc->primary);
7667 if (IS_ERR(primary_state))
7668 return PTR_ERR(primary_state);
7669
7670 /* check if primary plane is enabled */
7671 if (!primary_state->crtc)
7672 return 0;
7673
7674 /* Perform the bounds check to ensure the overlay plane covers the primary */
7675 if (primary_state->crtc_x < overlay_state->crtc_x ||
7676 primary_state->crtc_y < overlay_state->crtc_y ||
7677 primary_state->crtc_x + primary_state->crtc_w >
overlay_state->crtc_x + overlay_state->crtc_w ||
7678 primary_state->crtc_y + primary_state->crtc_h >
overlay_state->crtc_y + overlay_state->crtc_h) {
7679 DRM_DEBUG_ATOMIC("Overlay plane is enabled with hardware cursor but does not
fully cover primary plane\n");
7680 return -EINVAL;
7681 }
7682
7683 return 0;
7684 }
7685
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org