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: 8f36a88f84 ("drm/rockchip: Add dw hdcp2 controller driver")
Change-Id: I3090bcb03e509360b54194d1152cf05437dc0627
Signed-off-by: Eddy Zhang <eddy.zhang@rock-chips.com>
This commit is contained in:
Eddy Zhang
2024-03-21 16:28:52 +08:00
committed by Tao Huang
parent cd4db62ef0
commit 8c05e5bfef

View File

@@ -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,