All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Price <steven.price@arm.com>
To: Rob Herring <robh@kernel.org>, dri-devel@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>,
	Robin Murphy <robin.murphy@arm.com>,
	Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>,
	Tomeu Vizoso <tomeu.vizoso@collabora.com>
Subject: Re: [PATCH v3 8/8] drm/panfrost: Remove unnecessary hwaccess_lock spin_lock
Date: Wed, 28 Aug 2019 11:59:26 +0100	[thread overview]
Message-ID: <72a3950b-8daf-224c-2b0a-21cac72cc5c0@arm.com> (raw)
In-Reply-To: <20190826223317.28509-9-robh@kernel.org>

On 26/08/2019 23:33, Rob Herring wrote:
> With the introduction of the as_lock to serialize address space registers,
> the hwaccess_lock is only used within the job code and is not protecting
> anything. panfrost_job_hw_submit() only accesses registers for 1 job slot
> and it's already serialized by drm_sched.
> 
> Fixes: 7282f7645d06 ("drm/panfrost: Implement per FD address spaces")
> Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
> Cc: Steven Price <steven.price@arm.com>
> Cc: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Signed-off-by: Rob Herring <robh@kernel.org>

Reviewed-by: Steven Price <steven.price@arm.com>

Steve

> ---
> v3:
>  - New patch
> 
>  drivers/gpu/drm/panfrost/panfrost_device.c | 1 -
>  drivers/gpu/drm/panfrost/panfrost_device.h | 2 --
>  drivers/gpu/drm/panfrost/panfrost_job.c    | 4 ----
>  3 files changed, 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
> index 73805210834e..46b0b02e4289 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_device.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_device.c
> @@ -124,7 +124,6 @@ int panfrost_device_init(struct panfrost_device *pfdev)
>  	INIT_LIST_HEAD(&pfdev->scheduled_jobs);
>  	INIT_LIST_HEAD(&pfdev->as_lru_list);
> 
> -	spin_lock_init(&pfdev->hwaccess_lock);
>  	spin_lock_init(&pfdev->as_lock);
> 
>  	err = panfrost_clk_init(pfdev);
> diff --git a/drivers/gpu/drm/panfrost/panfrost_device.h b/drivers/gpu/drm/panfrost/panfrost_device.h
> index b7fa08ed3a23..9c39b9794811 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_device.h
> +++ b/drivers/gpu/drm/panfrost/panfrost_device.h
> @@ -63,8 +63,6 @@ struct panfrost_device {
>  	struct drm_device *ddev;
>  	struct platform_device *pdev;
> 
> -	spinlock_t hwaccess_lock;
> -
>  	void __iomem *iomem;
>  	struct clk *clock;
>  	struct clk *bus_clock;
> diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c
> index 18bcc9bac6d2..a58551668d9a 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_job.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_job.c
> @@ -141,7 +141,6 @@ static void panfrost_job_write_affinity(struct panfrost_device *pfdev,
>  static void panfrost_job_hw_submit(struct panfrost_job *job, int js)
>  {
>  	struct panfrost_device *pfdev = job->pfdev;
> -	unsigned long flags;
>  	u32 cfg;
>  	u64 jc_head = job->jc;
>  	int ret;
> @@ -158,7 +157,6 @@ static void panfrost_job_hw_submit(struct panfrost_job *job, int js)
>  	cfg = panfrost_mmu_as_get(pfdev, &job->file_priv->mmu);
> 
>  	panfrost_devfreq_record_transition(pfdev, js);
> -	spin_lock_irqsave(&pfdev->hwaccess_lock, flags);
> 
>  	job_write(pfdev, JS_HEAD_NEXT_LO(js), jc_head & 0xFFFFFFFF);
>  	job_write(pfdev, JS_HEAD_NEXT_HI(js), jc_head >> 32);
> @@ -187,8 +185,6 @@ static void panfrost_job_hw_submit(struct panfrost_job *job, int js)
>  				job, js, jc_head);
> 
>  	job_write(pfdev, JS_COMMAND_NEXT(js), JS_COMMAND_START);
> -
> -	spin_unlock_irqrestore(&pfdev->hwaccess_lock, flags);
>  }
> 
>  static void panfrost_acquire_object_fences(struct drm_gem_object **bos,
> --
> 2.20.1
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-08-28 10:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-26 22:33 [PATCH v3 0/8] panfrost: Locking and runtime PM fixes Rob Herring
2019-08-26 22:33 ` [PATCH v3 1/8] drm/panfrost: Rework runtime PM initialization Rob Herring
2019-08-27 10:59   ` Robin Murphy
2019-08-28 10:39   ` Steven Price
2019-08-26 22:33 ` [PATCH v3 2/8] drm/panfrost: Hold runtime PM reference until jobs complete Rob Herring
2019-08-28 10:40   ` Steven Price
2019-08-26 22:33 ` [PATCH v3 3/8] drm/panfrost: Remove unnecessary mmu->lock mutex Rob Herring
2019-08-27 11:00   ` Robin Murphy
2019-08-28 10:42   ` Steven Price
2019-08-26 22:33 ` [PATCH v3 4/8] drm/panfrost: Rework page table flushing and runtime PM interaction Rob Herring
2019-08-27 11:06   ` Robin Murphy
2019-08-28 10:54   ` Steven Price
2019-08-26 22:33 ` [PATCH v3 5/8] drm/panfrost: Split mmu_hw_do_operation into locked and unlocked version Rob Herring
2019-08-28 10:54   ` Steven Price
2019-08-26 22:33 ` [PATCH v3 6/8] drm/panfrost: Add cache/TLB flush before switching address space Rob Herring
2019-08-27 11:30   ` Robin Murphy
2019-08-28 13:17   ` Steven Price
2019-08-26 22:33 ` [PATCH v3 7/8] drm/panfrost: Flush and disable address space when freeing page tables Rob Herring
2019-08-27 11:24   ` Robin Murphy
2019-08-28 10:55   ` Steven Price
2019-08-28 12:35     ` Rob Herring
2019-08-28 13:12       ` Steven Price
2019-08-26 22:33 ` [PATCH v3 8/8] drm/panfrost: Remove unnecessary hwaccess_lock spin_lock Rob Herring
2019-08-28 10:59   ` Steven Price [this message]
2019-08-26 23:35 ` [PATCH v3 0/8] panfrost: Locking and runtime PM fixes Alyssa Rosenzweig

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=72a3950b-8daf-224c-2b0a-21cac72cc5c0@arm.com \
    --to=steven.price@arm.com \
    --cc=airlied@linux.ie \
    --cc=alyssa.rosenzweig@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=robh@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=tomeu.vizoso@collabora.com \
    /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.