From 8c05e5bfef35585b4921ca1064906cb7874f2c67 Mon Sep 17 00:00:00 2001 From: Eddy Zhang Date: Thu, 21 Mar 2024 16:28:52 +0800 Subject: [PATCH] drm/rockchip: dw_hdcp2: always support unlocked_ioctl() file operation In both the Android SDK and Linux SDK, when compiling for a 64-bit system, the CONFIG_COMPAT macro is enabled, but the unlocked_ioctl call is not compiled. The hdcp2_tx_rx service compiled on Android is 32-bit, corresponding to a 64-bit kernel. Therefore, ioctl calls go through compat_ioctl without any issues. However, services and kernels built with the NVR SDK and Linux SDK are consistent at 64 bits. This causes ioctl calls to go through unlocked_ioctl, leading to exceptions. Fixes: 8f36a88f84ff ("drm/rockchip: Add dw hdcp2 controller driver") Change-Id: I3090bcb03e509360b54194d1152cf05437dc0627 Signed-off-by: Eddy Zhang --- drivers/gpu/drm/rockchip/dw_hdcp2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/dw_hdcp2.c b/drivers/gpu/drm/rockchip/dw_hdcp2.c index f8362ddea171..8546b97fafca 100644 --- a/drivers/gpu/drm/rockchip/dw_hdcp2.c +++ b/drivers/gpu/drm/rockchip/dw_hdcp2.c @@ -486,9 +486,8 @@ static int dw_hdcp_hld_release(struct inode *inode, struct file *f) static const struct file_operations dw_hdcp_hld_file_operations = { #ifdef CONFIG_COMPAT .compat_ioctl = dw_hdcp_hld_ioctl, -#else - .unlocked_ioctl = dw_hdcp_hld_ioctl, #endif + .unlocked_ioctl = dw_hdcp_hld_ioctl, .open = dw_hdcp_hld_open, .release = dw_hdcp_hld_release, .owner = THIS_MODULE,