From 3083894f7f2963bb017c79636cd064eb0d7f05da Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Wed, 27 Nov 2013 16:29:59 -0500 Subject: [PATCH] drm/msm: COMPILE_TEST support With a simple stub, we can get COMPILE_TEST support. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/Kconfig | 3 +-- drivers/gpu/drm/msm/mdp4/mdp4_dtv_encoder.c | 2 -- drivers/gpu/drm/msm/msm_drv.h | 9 +++++++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig index f39ab7554fc9..bb103fb4519e 100644 --- a/drivers/gpu/drm/msm/Kconfig +++ b/drivers/gpu/drm/msm/Kconfig @@ -2,8 +2,7 @@ config DRM_MSM tristate "MSM DRM" depends on DRM - depends on ARCH_MSM - depends on ARCH_MSM8960 + depends on (ARCH_MSM && ARCH_MSM8960) || (ARM && COMPILE_TEST) select DRM_KMS_HELPER select SHMEM select TMPFS diff --git a/drivers/gpu/drm/msm/mdp4/mdp4_dtv_encoder.c b/drivers/gpu/drm/msm/mdp4/mdp4_dtv_encoder.c index 5e0dcae70ab5..3799ccc517b2 100644 --- a/drivers/gpu/drm/msm/mdp4/mdp4_dtv_encoder.c +++ b/drivers/gpu/drm/msm/mdp4/mdp4_dtv_encoder.c @@ -15,8 +15,6 @@ * this program. If not, see . */ -#include - #include "mdp4_kms.h" #include "drm_crtc.h" diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h index d39f0862b19e..a4c52cfe7fca 100644 --- a/drivers/gpu/drm/msm/msm_drv.h +++ b/drivers/gpu/drm/msm/msm_drv.h @@ -31,6 +31,15 @@ #include #include + +#if defined(CONFIG_COMPILE_TEST) && !defined(CONFIG_ARCH_MSM) +/* stubs we need for compile-test: */ +static inline struct device *msm_iommu_get_ctx(const char *ctx_name) +{ + return NULL; +} +#endif + #ifndef CONFIG_OF #include #include -- 2.20.1