From: Jessica Zhang <jessica.zhang@oss.qualcomm.com>
To: Rob Clark <robin.clark@oss.qualcomm.com>,
dri-devel@lists.freedesktop.org
Cc: linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org,
Arnd Bergmann <arnd@arndb.de>,
Dmitry Baryshkov <lumag@kernel.org>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/msm: Fix build with KMS disabled
Date: Fri, 11 Jul 2025 10:40:39 -0700 [thread overview]
Message-ID: <fdc5c2a6-1df8-41b6-b0c4-5557f8e5d720@oss.qualcomm.com> (raw)
In-Reply-To: <20250709140838.144599-1-robin.clark@oss.qualcomm.com>
On 7/9/2025 7:08 AM, Rob Clark wrote:
> When commit 98290b0a7d60 ("drm/msm: make it possible to disable
> KMS-related code.") was rebased on top of commit 3bebfd53af0f ("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: 98290b0a7d60 ("drm/msm: make it possible to disable KMS-related code.")
> Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
Reviewed-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com>
> ---
> drivers/gpu/drm/msm/msm_gem.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c
> index 33d3354c6102..c853ab3a2cda 100644
> --- a/drivers/gpu/drm/msm/msm_gem.c
> +++ b/drivers/gpu/drm/msm/msm_gem.c
> @@ -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
> }
>
> /*
prev parent reply other threads:[~2025-07-11 17:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-09 14:08 Rob Clark
2025-07-09 14:58 ` Arnd Bergmann
2025-07-11 17:40 ` Jessica Zhang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fdc5c2a6-1df8-41b6-b0c4-5557f8e5d720@oss.qualcomm.com \
--to=jessica.zhang@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=arnd@arndb.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®