diff options
author | Xianzhong <xianzhong.li@nxp.com> | 2020-11-10 18:11:49 +0800 |
---|---|---|
committer | Xianzhong <xianzhong.li@nxp.com> | 2020-11-19 11:54:17 +0800 |
commit | 082c76fc345fc1e5a862df56a688c614d3072166 (patch) | |
tree | d2a39844233ceb0b4d9da89a4edaf5964cc75b63 /drivers/mxc | |
parent | 0cbc4419bd2f810d1689d81f24884bb527bbe5fd (diff) |
MGS-6058 [#imx-2391] fix vivante drm build break for L5.10
fix drm header and function related changes for new kernel
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Diffstat (limited to 'drivers/mxc')
-rw-r--r-- | drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_drm.h | 5 | ||||
-rw-r--r-- | drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_drm.h b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_drm.h index 6699ea39c9f6..5b6018ed931a 100644 --- a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_drm.h +++ b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_drm.h @@ -198,7 +198,10 @@ struct drm_viv_gem_ref_node { #define DRM_IOCTL_VIV_GEM_REF_NODE DRM_IOWR(DRM_COMMAND_BASE + DRM_VIV_GEM_REF_NODE, struct drm_viv_gem_ref_node) #ifdef __KERNEL__ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,4,0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0) +#define drm_gem_object_unreference_unlocked drm_gem_object_put_locked +#define drm_dev_unref drm_dev_put +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5,4,0) #define drm_gem_object_unreference_unlocked drm_gem_object_put_unlocked #define drm_dev_unref drm_dev_put #endif diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c index 795a0e1866b8..df8dcf4f1d2d 100644 --- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c +++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c @@ -55,7 +55,14 @@ #if gcdENABLE_DRM +#include <linux/version.h> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0) +#include <drm/drm_drv.h> +#include <drm/drm_file.h> +#include <drm/drm_ioctl.h> +#else #include <drm/drmP.h> +#endif #include <drm/drm_gem.h> #include <linux/dma-buf.h> #include "gc_hal_kernel_linux.h" |