Skip to content

Commit 7abb543

Browse files
author
Rob Clark
committed
drm/msm: Fix build with KMS disabled
When commit 98290b0 ("drm/msm: make it possible to disable KMS-related code.") was rebased on top of commit 3bebfd5 ("drm/msm: Defer VMA unmap for fb unpins"), the additional use of msm_kms was overlooked, resulting in a build break when KMS is disabled. Add some additional ifdef to fix that. Reported-by: Arnd Bergmann <arnd@arndb.de> Fixes: 98290b0 ("drm/msm: make it possible to disable KMS-related code.") Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com> Tested-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/663240/
1 parent bb324f8 commit 7abb543

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

drivers/gpu/drm/msm/msm_gem.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,20 @@ void msm_gem_vma_get(struct drm_gem_object *obj)
9696
void msm_gem_vma_put(struct drm_gem_object *obj)
9797
{
9898
struct msm_drm_private *priv = obj->dev->dev_private;
99-
struct drm_exec exec;
10099

101100
if (atomic_dec_return(&to_msm_bo(obj)->vma_ref))
102101
return;
103102

104103
if (!priv->kms)
105104
return;
106105

106+
#ifdef CONFIG_DRM_MSM_KMS
107+
struct drm_exec exec;
108+
107109
msm_gem_lock_vm_and_obj(&exec, obj, priv->kms->vm);
108110
put_iova_spaces(obj, priv->kms->vm, true, "vma_put");
109111
drm_exec_fini(&exec); /* drop locks */
112+
#endif
110113
}
111114

112115
/*
@@ -664,9 +667,13 @@ int msm_gem_set_iova(struct drm_gem_object *obj,
664667

665668
static bool is_kms_vm(struct drm_gpuvm *vm)
666669
{
670+
#ifdef CONFIG_DRM_MSM_KMS
667671
struct msm_drm_private *priv = vm->drm->dev_private;
668672

669673
return priv->kms && (priv->kms->vm == vm);
674+
#else
675+
return false;
676+
#endif
670677
}
671678

672679
/*

0 commit comments

Comments
 (0)