mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-23 23:11:24 -04:00
drm/msm: Fix build with KMS disabled
When commit98290b0a7d("drm/msm: make it possible to disable KMS-related code.") was rebased on top of commit3bebfd53af("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:98290b0a7d("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/
This commit is contained in:
@@ -96,7 +96,6 @@ void msm_gem_vma_get(struct drm_gem_object *obj)
|
||||
void msm_gem_vma_put(struct drm_gem_object *obj)
|
||||
{
|
||||
struct msm_drm_private *priv = obj->dev->dev_private;
|
||||
struct drm_exec exec;
|
||||
|
||||
if (atomic_dec_return(&to_msm_bo(obj)->vma_ref))
|
||||
return;
|
||||
@@ -104,9 +103,13 @@ void msm_gem_vma_put(struct drm_gem_object *obj)
|
||||
if (!priv->kms)
|
||||
return;
|
||||
|
||||
#ifdef CONFIG_DRM_MSM_KMS
|
||||
struct drm_exec exec;
|
||||
|
||||
msm_gem_lock_vm_and_obj(&exec, obj, priv->kms->vm);
|
||||
put_iova_spaces(obj, priv->kms->vm, true, "vma_put");
|
||||
drm_exec_fini(&exec); /* drop locks */
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -664,9 +667,13 @@ int msm_gem_set_iova(struct drm_gem_object *obj,
|
||||
|
||||
static bool is_kms_vm(struct drm_gpuvm *vm)
|
||||
{
|
||||
#ifdef CONFIG_DRM_MSM_KMS
|
||||
struct msm_drm_private *priv = vm->drm->dev_private;
|
||||
|
||||
return priv->kms && (priv->kms->vm == vm);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user