From: Sam Ravnborg <sam@ravnborg.org>
To: Luiz Otavio Mello <luiz.mello@estudante.ufscar.br>
Cc: airlied@gmail.com, jani.nikula@linux.intel.com,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
mairacanal@riseup.net
Subject: Re: [PATCH] [PATCH v2] drm/i915: move struct_mutex from drm_device to drm_i915_private
Date: Fri, 18 Jul 2025 19:06:30 +0200 [thread overview]
Message-ID: <20250718170630.GA114969@ravnborg.org> (raw)
In-Reply-To: <20250718163413.291909-1-luiz.mello@estudante.ufscar.br>
On Fri, Jul 18, 2025 at 01:34:13PM -0300, Luiz Otavio Mello wrote:
> Includes the missing file drm_device.h, which was unintentionally
> omitted in v1.
>
> i915 is the only remaining user of struct_mutex lock.
>
> Move it from drm_device to drm_i915_private so it is only used within
> the i915 driver.
>
> Also update intel_guc_log.c to use the new location of struct_mutex.
>
> Signed-off-by: Luiz Otavio Mello <luiz.mello@estudante.ufscar.br>
> ---
> drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 4 ++--
> drivers/gpu/drm/i915/i915_drv.h | 8 ++++++++
> include/drm/drm_device.h | 10 ----------
> 3 files changed, 10 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> index e8a04e476c57..7135fdb0ebb4 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> @@ -678,7 +678,7 @@ int intel_guc_log_set_level(struct intel_guc_log *log, u32 level)
> if (level < GUC_LOG_LEVEL_DISABLED || level > GUC_LOG_LEVEL_MAX)
> return -EINVAL;
>
> - mutex_lock(&i915->drm.struct_mutex);
> + mutex_lock(&i915->struct_mutex);
>
> if (log->level == level)
> goto out_unlock;
> @@ -696,7 +696,7 @@ int intel_guc_log_set_level(struct intel_guc_log *log, u32 level)
> log->level = level;
>
> out_unlock:
> - mutex_unlock(&i915->drm.struct_mutex);
> + mutex_unlock(&i915->struct_mutex);
>
> return ret;
> }
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index d0e1980dcba2..c585569b6036 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -224,6 +224,14 @@ struct drm_i915_private {
>
> bool irqs_enabled;
>
> + /*
> + * Currently, struct_mutex is only used by the i915 driver as a replacement
> + * for BLK.
^BKL.
Sam
next prev parent reply other threads:[~2025-07-18 17:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-18 16:34 [PATCH] [PATCH v2] drm/i915: move struct_mutex from drm_device to drm_i915_private Luiz Otavio Mello
2025-07-18 17:06 ` Sam Ravnborg [this message]
2025-07-18 17:19 ` ✗ LGCI.VerificationFailed: failure for drm/i915: move struct_mutex from drm_device to drm_i915_private (rev2) Patchwork
2025-07-18 20:10 ` [PATCH] [PATCH v2] drm/i915: move struct_mutex from drm_device to drm_i915_private Rodrigo Vivi
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=20250718170630.GA114969@ravnborg.org \
--to=sam@ravnborg.org \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=luiz.mello@estudante.ufscar.br \
--cc=mairacanal@riseup.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.