Message ID | 20200612160056.2082681-6-daniel.vetter@ffwll.ch (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/8] drm/atomic-helper: reset vblank on crtc reset | expand |
Hi Daniel, I love your patch! Yet something to improve: [auto build test ERROR on drm-intel/for-linux-next] [also build test ERROR on drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master v5.7 next-20200612] [cannot apply to drm/drm-next] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Daniel-Vetter/drm-atomic-helper-reset-vblank-on-crtc-reset/20200613-000414 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: x86_64-allyesconfig (attached as .config) compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3b43f006294971b8049d4807110032169780e5b8) 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 # 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 errors (new ones prefixed by >>, old ones prefixed by <<): >> drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:632:40: error: use of undeclared identifier 'state' __drm_atomic_helper_crtc_reset(crtc, &state->base); ^ 1 error generated. vim +/state +632 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c 604 605 606 /** 607 * vmw_du_crtc_reset - creates a blank vmw crtc state 608 * @crtc: DRM crtc 609 * 610 * Resets the atomic state for @crtc by freeing the state pointer (which 611 * might be NULL, e.g. at driver load time) and allocating a new empty state 612 * object. 613 */ 614 void vmw_du_crtc_reset(struct drm_crtc *crtc) 615 { 616 struct vmw_crtc_state *vcs; 617 618 619 if (crtc->state) { 620 __drm_atomic_helper_crtc_destroy_state(crtc->state); 621 622 kfree(vmw_crtc_state_to_vcs(crtc->state)); 623 } 624 625 vcs = kzalloc(sizeof(*vcs), GFP_KERNEL); 626 627 if (!vcs) { 628 DRM_ERROR("Cannot allocate vmw_crtc_state\n"); 629 return; 630 } 631 > 632 __drm_atomic_helper_crtc_reset(crtc, &state->base); 633 } 634 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Hi Daniel, I love your patch! Yet something to improve: [auto build test ERROR on drm-intel/for-linux-next] [also build test ERROR on drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master v5.7 next-20200612] [cannot apply to drm/drm-next] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Daniel-Vetter/drm-atomic-helper-reset-vblank-on-crtc-reset/20200613-000414 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: x86_64-rhel-7.6 (attached as .config) compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 reproduce (this is a W=1 build): # save the attached .config to linux build tree make W=1 ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>, old ones prefixed by <<): drivers/gpu/drm/vmwgfx/vmwgfx_kms.c: In function 'vmw_du_primary_plane_atomic_check': drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:460:31: warning: variable 'vcs' set but not used [-Wunused-but-set-variable] 460 | struct vmw_connector_state *vcs; | ^~~ drivers/gpu/drm/vmwgfx/vmwgfx_kms.c: In function 'vmw_du_crtc_reset': << In file included from drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:37: >> drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:632:40: error: 'state' undeclared (first use in this function); did you mean 'statx'? 632 | __drm_atomic_helper_crtc_reset(crtc, &state->base); | ^~~~~ | statx drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:632:40: note: each undeclared identifier is reported only once for each function it appears in In file included from drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:37: At top level: drivers/gpu/drm/vmwgfx/vmwgfx_kms.h:256:23: warning: 'vmw_cursor_plane_formats' defined but not used [-Wunused-const-variable=] 256 | static const uint32_t vmw_cursor_plane_formats[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/vmwgfx/vmwgfx_kms.h:248:23: warning: 'vmw_primary_plane_formats' defined but not used [-Wunused-const-variable=] 248 | static const uint32_t vmw_primary_plane_formats[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~~ vim +632 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c 604 605 606 /** 607 * vmw_du_crtc_reset - creates a blank vmw crtc state 608 * @crtc: DRM crtc 609 * 610 * Resets the atomic state for @crtc by freeing the state pointer (which 611 * might be NULL, e.g. at driver load time) and allocating a new empty state 612 * object. 613 */ 614 void vmw_du_crtc_reset(struct drm_crtc *crtc) 615 { 616 struct vmw_crtc_state *vcs; 617 618 619 if (crtc->state) { 620 __drm_atomic_helper_crtc_destroy_state(crtc->state); 621 622 kfree(vmw_crtc_state_to_vcs(crtc->state)); 623 } 624 625 vcs = kzalloc(sizeof(*vcs), GFP_KERNEL); 626 627 if (!vcs) { 628 DRM_ERROR("Cannot allocate vmw_crtc_state\n"); 629 return; 630 } 631 > 632 __drm_atomic_helper_crtc_reset(crtc, &state->base); 633 } 634 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 3c97654b5a43..e91dfc65a93f 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -629,8 +629,7 @@ void vmw_du_crtc_reset(struct drm_crtc *crtc) return; } - crtc->state = &vcs->base; - crtc->state->crtc = crtc; + __drm_atomic_helper_crtc_reset(crtc, &state->base); }
Now also comes with the added benefit of doing a drm_crtc_vblank_off(), which means vblank state isn't ill-defined and fail-y at driver load before the first modeset on each crtc. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: VMware Graphics <linux-graphics-maintainer@vmware.com> Cc: Roland Scheidegger <sroland@vmware.com> --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)