Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: "Coelho, Luciano" <luciano.coelho@intel.com>,
	"Vivi, Rodrigo" <rodrigo.vivi@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Cc: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH v3] drm/i915: handle uncore spinlock when not available
Date: Fri, 3 Nov 2023 09:47:20 +0000	[thread overview]
Message-ID: <1b16d7ff-f61e-475f-bed4-2f287ecb32da@linux.intel.com> (raw)
In-Reply-To: <a227240f5e9ccff944cf6bf1a920c034d0b7b099.camel@intel.com>


On 03/11/2023 08:58, Coelho, Luciano wrote:
> On Fri, 2023-11-03 at 03:31 +0000, Vivi, Rodrigo wrote:
>>>>
>>>> Any other suggestions?
>>>
>>> I think it will boil down to the reason uncore lock is held over
>>> the
>>> respective sections ie. the comment in i915_get_crtc_scanoutpos.
>>>
>>> If it is timing sensitive to the extent irq off was needed it may
>>> apply
>>> to Xe as well. Likewise the need to use mmio helpers which rely on
>>> the
>>> uncore lock already held. Question of whether there is conceptual
>>> commonality, will probably drive the best name, or the best
>>> approach
>>> in
>>> general.
>>
>> yeap, this is how I'm seeing this. If i915-display needs this global
>> lock around mmio operations, then we wound need to add it to the
>> xe_mmio as well and then solve the name, etc.
>>
>> However, I don't believe that other users of the mmio would need
>> this lock. So I believe the right thing to do is to create a i915-
>> display only spin_lock, around the intel_de_mmio calls and here.
>>
>> With this we entirely kill the dependency on someone-else's lock
>> and have something that is entirely inside display code so it
>> doesn't need to be ported to one or another driver core components.
> 
> Right, I agree too.
> 
> My patch was just trying to address the quick hack made for Xe, not the
> actual implementation in Xe's side.  But it makes sense to implement
> this new lock internally in the display so there are no dependencies or
> wrappers needed.
> 
> I'll respin.

You could also make sure it needs to be a lock and not just say a 
preempt off or irq section?

Regards,

Tvrtko

  reply	other threads:[~2023-11-03  9:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-23 10:33 [Intel-gfx] [PATCH v3] drm/i915: handle uncore spinlock when not available Luca Coelho
2023-10-24 18:55 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: handle uncore spinlock when not available (rev2) Patchwork
2023-10-25  9:50 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-10-25 10:52   ` Coelho, Luciano
2023-10-25 10:18 ` [Intel-gfx] [PATCH v3] drm/i915: handle uncore spinlock when not available Tvrtko Ursulin
2023-10-25 10:25   ` Tvrtko Ursulin
2023-10-25 10:32     ` Coelho, Luciano
2023-10-25 10:58       ` Tvrtko Ursulin
2023-11-03  3:31         ` Vivi, Rodrigo
2023-11-03  8:58           ` Coelho, Luciano
2023-11-03  9:47             ` Tvrtko Ursulin [this message]
2023-11-03 13:25               ` Vivi, Rodrigo

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=1b16d7ff-f61e-475f-bed4-2f287ecb32da@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=luciano.coelho@intel.com \
    --cc=rodrigo.vivi@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox