All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Luiz Otavio Mello <luiz.mello@estudante.ufscar.br>
Cc: <joonas.lahtinen@linux.intel.com>, <tursulin@ursulin.net>,
	<jani.nikula@linux.intel.com>, <airlied@gmail.com>,
	<simona@ffwll.ch>, <intel-gfx@lists.freedesktop.org>,
	<dri-devel@lists.freedesktop.org>, <mairacanal@riseup.net>
Subject: Re: [PATCH 7/9 v2] drm/i915: Clean-up outdated struct_mutex comments
Date: Fri, 8 Aug 2025 10:39:25 -0400	[thread overview]
Message-ID: <aJYMHYiluWXRJ6vk@intel.com> (raw)
In-Reply-To: <20250807170212.285385-8-luiz.mello@estudante.ufscar.br>

On Thu, Aug 07, 2025 at 02:02:06PM -0300, Luiz Otavio Mello wrote:
> The struct_mutex will be removed from the DRM subsystem, as it was a
> legacy BKL that was only used by i915 driver. After review, it was
> concluded that its usage was no longer necessary
> 
> This patch updates various comments in the i915 codebase to
> either remove or clarify references to struct_mutex, in order to
> prevent future misunderstandings.
> 
> * i915_drv.h: Removed the statement that stolen_lock is the inner lock
>   when overlaps with struct_mutex, since struct_mutex is no longer used
>   in the driver.
> * i915_gem.c: Removed parentheses suggesting usage of struct_mutex, which
>   which is no longer used.
> 
> Signed-off-by: Luiz Otavio Mello <luiz.mello@estudante.ufscar.br>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_drv.h | 3 +--
>  drivers/gpu/drm/i915/i915_gem.c | 3 +--
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 6093dbaf4009..e8cb94962482 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -114,8 +114,7 @@ struct i915_gem_mm {
>  	struct intel_memory_region *stolen_region;
>  	/** Memory allocator for GTT stolen memory */
>  	struct drm_mm stolen;
> -	/** Protects the usage of the GTT stolen memory allocator. This is
> -	 * always the inner lock when overlapping with struct_mutex. */
> +	/** Protects the usage of the GTT stolen memory allocator */
>  	struct mutex stolen_lock;
>  
>  	/* Protects bound_list/unbound_list and #drm_i915_gem_object.mm.link */
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 8c8d43451f35..e14a0c3db999 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -847,8 +847,7 @@ void i915_gem_runtime_suspend(struct drm_i915_private *i915)
>  	/*
>  	 * Only called during RPM suspend. All users of the userfault_list
>  	 * must be holding an RPM wakeref to ensure that this can not
> -	 * run concurrently with themselves (and use the struct_mutex for
> -	 * protection between themselves).
> +	 * run concurrently with themselves.
>  	 */
>  
>  	list_for_each_entry_safe(obj, on,
> -- 
> 2.50.1
> 

  reply	other threads:[~2025-08-08 14:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-07 17:01 [PATCH 0/9 v2] drm/i915: Remove legacy struct_mutex usage Luiz Otavio Mello
2025-08-07 17:02 ` [PATCH 1/9 v2] drm/i915: Move struct_mutex to drm_i915_private Luiz Otavio Mello
2025-08-08 14:37   ` Rodrigo Vivi
2025-08-07 17:02 ` [PATCH 2/9 v2] drm/i915: Remove struct_mutex in i915_irq.c Luiz Otavio Mello
2025-08-08 14:37   ` Rodrigo Vivi
2025-08-07 17:02 ` [PATCH 3/9 v2] drm/i915: Change mutex initialization in intel_guc_log Luiz Otavio Mello
2025-08-08 14:38   ` Rodrigo Vivi
2025-08-07 17:02 ` [PATCH 4/9 v2] drm/i915: Replace struct_mutex in intel_guc_log.c Luiz Otavio Mello
2025-08-08 14:38   ` Rodrigo Vivi
2025-08-07 17:02 ` [PATCH 5/9 v2] drm/i915/gem: Clean-up outdated struct_mutex comments Luiz Otavio Mello
2025-08-08 14:38   ` Rodrigo Vivi
2025-08-07 17:02 ` [PATCH 6/9 v2] drm/i915/display: Remove " Luiz Otavio Mello
2025-08-08 14:39   ` Rodrigo Vivi
2025-08-07 17:02 ` [PATCH 7/9 v2] drm/i915: Clean-up " Luiz Otavio Mello
2025-08-08 14:39   ` Rodrigo Vivi [this message]
2025-08-07 17:02 ` [PATCH 8/9 v2] drm/i915: Remove unused struct_mutex from drm_i915_private Luiz Otavio Mello
2025-08-08 14:40   ` Rodrigo Vivi
2025-08-07 17:02 ` [PATCH 9/9 v2] drm/i915: Remove todo and comments about struct_mutex Luiz Otavio Mello
2025-08-08 14:42   ` Rodrigo Vivi
2025-08-07 17:18 ` ✗ LGCI.VerificationFailed: failure for drm/i915: Remove legacy struct_mutex usage (rev2) Patchwork

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=aJYMHYiluWXRJ6vk@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=luiz.mello@estudante.ufscar.br \
    --cc=mairacanal@riseup.net \
    --cc=simona@ffwll.ch \
    --cc=tursulin@ursulin.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.