drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:1042 dpu_plane_virtual_atomic_check() error: uninitialized symbol 'crtc_state'.
PATCH 13/20 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:1042 dpu_plane_virtual_atomic_check() error: uninitialized symbol 'crtc_state'.
tree: https://gitlab.freedesktop.org/lumag/msm msm-next-lumag head: c9261bcc1546a564407513e148c35a79a58bc2b9 commit: 774bcfb731765d092992136b54c34958d7c64bea [13/20] drm/msm/dpu: add support for virtual planes config: powerpc-randconfig-r072-20241223 (https://download.01.org/0day-ci/archive/20241223/[email protected]/config) compiler: powerpc-linux-gcc (GCC) 14.2.0
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 <[email protected]> | Reported-by: Dan Carpenter <[email protected]> | Closes: https://lore.kernel.org/r/[email protected]/
smatch warnings:drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:1042 dpu_plane_virtual_atomic_check() error: uninitialized symbol 'crtc_state'. drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:1130 dpu_assign_plane_resources() error: uninitialized symbol 'ret'.
vim +/crtc_state +1042 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
774bcfb731765d Dmitry Baryshkov 2024-12-15 1027 static int dpu_plane_virtual_atomic_check(struct drm_plane *plane,
774bcfb731765d Dmitry Baryshkov 2024-12-15 1028 struct drm_atomic_state *state)
774bcfb731765d Dmitry Baryshkov 2024-12-15 1029 {
774bcfb731765d Dmitry Baryshkov 2024-12-15 1030 struct drm_plane_state *plane_state =
774bcfb731765d Dmitry Baryshkov 2024-12-15 1031 drm_atomic_get_plane_state(state, plane);
774bcfb731765d Dmitry Baryshkov 2024-12-15 1032 struct drm_plane_state *old_plane_state =
774bcfb731765d Dmitry Baryshkov 2024-12-15 1033 drm_atomic_get_old_plane_state(state, plane);
774bcfb731765d Dmitry Baryshkov 2024-12-15 1034 struct dpu_plane_state *pstate = to_dpu_plane_state(plane_state);
774bcfb731765d Dmitry Baryshkov 2024-12-15 1035 struct drm_crtc_state *crtc_state;
774bcfb731765d Dmitry Baryshkov 2024-12-15 1036 int ret;
774bcfb731765d Dmitry Baryshkov 2024-12-15 1037
774bcfb731765d Dmitry Baryshkov 2024-12-15 1038 if (plane_state->crtc)
774bcfb731765d Dmitry Baryshkov 2024-12-15 1039 crtc_state = drm_atomic_get_new_crtc_state(state,
774bcfb731765d Dmitry Baryshkov 2024-12-15 1040 plane_state->crtc);crtc_state not initialized on else path.
774bcfb731765d Dmitry Baryshkov 2024-12-15 1041
774bcfb731765d Dmitry Baryshkov 2024-12-15 @1042 ret = dpu_plane_atomic_check_nosspp(plane, plane_state, crtc_state);
^^^^^^^^^^uninitialized. My guess is that it isn't used in this case, however passing uninitialized variables is still considered a bug. If dpu_plane_atomic_check_nosspp() were inlined (it's not) and the variable isn't used then that's fine.
774bcfb731765d Dmitry Baryshkov 2024-12-15 1043 if (ret)
774bcfb731765d Dmitry Baryshkov 2024-12-15 1044 return ret;
774bcfb731765d Dmitry Baryshkov 2024-12-15 1045
774bcfb731765d Dmitry Baryshkov 2024-12-15 1046 if (!plane_state->visible) {
774bcfb731765d Dmitry Baryshkov 2024-12-15 1047 /*
774bcfb731765d Dmitry Baryshkov 2024-12-15 1048 * resources are freed by dpu_crtc_assign_plane_resources(),Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki