1
0
Fork 0

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>
zero-colors
Xianzhong 2020-11-10 18:11:49 +08:00
parent 0cbc4419bd
commit 082c76fc34
2 changed files with 11 additions and 1 deletions

View File

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

View File

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