The drm_vblank_wait() function was renamed to drm_vblank_wait_ioctl() in the DRM tree in commit b6dcaaac4474 ("drm/vblank: _ioctl posfix for ioctl handler"), while the DRM compat code was changed independently in commit d5288c88c67c ("switch compat_drm_wait_vblank() to drm_ioctl_kernel()") to call the old function.
Fix the resulting compilation breakage by calling the correct function.
Fixes: b6dcaaac4474 ("drm/vblank: _ioctl posfix for ioctl handler") Fixes: d5288c88c67c ("switch compat_drm_wait_vblank() to drm_ioctl_kernel()") Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com --- drivers/gpu/drm/drm_ioc32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Hello,
This patch fixes a compilation breakage waiting to happen when v4.13-rc1 will be merged back in the drm-misc tree, as b6dcaaac4474 is in drm-misc-next and d5288c88c67c in Linus' master branch.
I suppose that drm-misc-next is not an option, so we can apply this patch on top of the merge, or squash it with the merge commit if we want to avoid breaking bisection.
diff --git a/drivers/gpu/drm/drm_ioc32.c b/drivers/gpu/drm/drm_ioc32.c index 0b2d8c4a2fa5..98c54ad5b433 100644 --- a/drivers/gpu/drm/drm_ioc32.c +++ b/drivers/gpu/drm/drm_ioc32.c @@ -839,7 +839,7 @@ static int compat_drm_wait_vblank(struct file *file, unsigned int cmd, req.request.type = req32.request.type; req.request.sequence = req32.request.sequence; req.request.signal = req32.request.signal; - err = drm_ioctl_kernel(file, drm_wait_vblank, &req, DRM_UNLOCKED); + err = drm_ioctl_kernel(file, drm_wait_vblank_ioctl, &req, DRM_UNLOCKED); if (err) return err;
Hi Laurent,
[auto build test ERROR on next-20170710] [cannot apply to drm/drm-next drm-exynos/exynos-drm/for-next drm-intel/for-linux-next v4.12 v4.12-rc7 v4.12-rc6 v4.12] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Laurent-Pinchart/drm-compat-Fix-com... config: sparc64-allyesconfig (attached as .config) compiler: sparc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=sparc64
All errors (new ones prefixed by >>):
drivers/gpu//drm/drm_ioc32.c: In function 'compat_drm_wait_vblank':
drivers/gpu//drm/drm_ioc32.c:842:31: error: 'drm_wait_vblank_ioctl' undeclared (first use in this function)
err = drm_ioctl_kernel(file, drm_wait_vblank_ioctl, &req, DRM_UNLOCKED); ^~~~~~~~~~~~~~~~~~~~~ drivers/gpu//drm/drm_ioc32.c:842:31: note: each undeclared identifier is reported only once for each function it appears in
vim +/drm_wait_vblank_ioctl +842 drivers/gpu//drm/drm_ioc32.c
827 828 static int compat_drm_wait_vblank(struct file *file, unsigned int cmd, 829 unsigned long arg) 830 { 831 drm_wait_vblank32_t __user *argp = (void __user *)arg; 832 drm_wait_vblank32_t req32; 833 union drm_wait_vblank req; 834 int err; 835 836 if (copy_from_user(&req32, argp, sizeof(req32))) 837 return -EFAULT; 838 839 req.request.type = req32.request.type; 840 req.request.sequence = req32.request.sequence; 841 req.request.signal = req32.request.signal;
842 err = drm_ioctl_kernel(file, drm_wait_vblank_ioctl, &req, DRM_UNLOCKED);
843 if (err) 844 return err; 845 846 req32.reply.type = req.reply.type; 847 req32.reply.sequence = req.reply.sequence; 848 req32.reply.tval_sec = req.reply.tval_sec; 849 req32.reply.tval_usec = req.reply.tval_usec; 850 if (copy_to_user(argp, &req32, sizeof(req32))) 851 return -EFAULT; 852 853 return 0; 854 } 855
--- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
dri-devel@lists.freedesktop.org