Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 7/9] drm/i915/irq: convert intel_display_irq.[ch] interfaces to struct intel_display
Date: Wed, 12 Mar 2025 11:52:33 +0200	[thread overview]
Message-ID: <87r032fue6.fsf@intel.com> (raw)
In-Reply-To: <Z9CL3WH695G-j1w3@intel.com>

On Tue, 11 Mar 2025, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Tue, Mar 11, 2025 at 08:00:41PM +0200, Jani Nikula wrote:
>>  static void
>>  ivb_primary_enable_flip_done(struct intel_plane *plane)
>>  {
>> +	struct intel_display *display = to_intel_display(plane);
>>  	struct drm_i915_private *i915 = to_i915(plane->base.dev);
>>  
>>  	spin_lock_irq(&i915->irq_lock);
>> -	ilk_enable_display_irq(i915, DE_PLANE_FLIP_DONE_IVB(plane->i9xx_plane));
>> +	ilk_enable_display_irq(display, DE_PLANE_FLIP_DONE_IVB(plane->i9xx_plane));
>>  	spin_unlock_irq(&i915->irq_lock);
>
> I was pondering if we could just suck the lock into these
> guys. But at least the fifo underrun reporting code is using
> some of these things and there there the lock is taken
> further out. So sadly not as trivial as I was hoping.

The whole i915->irq_lock (*) is a looming problem for display separation
from i915/xe core.

How do you abstract a spin lock? Is it okay to pass a spinlock_t * from
i915 core code to display, which would then store this pointer and use
it locally?

Wrapping it in a pair of function calls certainly sucks in a lot of
ways.


BR,
Jani.



*) xe->irq.lock on xe, with an ugly #define irq_lock irq.lock

-- 
Jani Nikula, Intel

  reply	other threads:[~2025-03-12  9:52 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-11 18:00 [PATCH 0/9] drm/i915/display: conversions to struct intel_display Jani Nikula
2025-03-11 18:00 ` [PATCH 1/9] drm/i915/color: prefer display->platform.<platform> checks Jani Nikula
2025-03-12  5:01   ` Shankar, Uma
2025-03-11 18:00 ` [PATCH 2/9] drm/i915/connector: convert intel_connector.c to struct intel_display Jani Nikula
2025-03-12  5:06   ` Shankar, Uma
2025-03-11 18:00 ` [PATCH 3/9] drm/i915/hotplug: convert intel_hotplug.[ch] " Jani Nikula
2025-03-12  5:13   ` Shankar, Uma
2025-03-11 18:00 ` [PATCH 4/9] drm/i915/hotplug: convert hotplug debugfs " Jani Nikula
2025-03-12  5:17   ` Shankar, Uma
2025-03-11 18:00 ` [PATCH 5/9] drm/i915/hotplug: convert hotplug irq handling to intel_de_*() Jani Nikula
2025-03-12  5:23   ` Shankar, Uma
2025-03-11 18:00 ` [PATCH 6/9] drm/i915/hotplug: convert intel_hotplug_irq.[ch] to struct intel_display Jani Nikula
2025-03-12  5:33   ` Shankar, Uma
2025-03-11 18:00 ` [PATCH 7/9] drm/i915/irq: convert intel_display_irq.[ch] interfaces " Jani Nikula
2025-03-11 19:15   ` Ville Syrjälä
2025-03-12  9:52     ` Jani Nikula [this message]
2025-03-12 10:06       ` Ville Syrjälä
2025-03-12  5:47   ` Shankar, Uma
2025-03-11 18:00 ` [PATCH 8/9] drm/i915/irq: convert rest of intel_display_irq.[ch] " Jani Nikula
2025-03-12  5:53   ` Shankar, Uma
2025-03-11 18:00 ` [PATCH 9/9] drm/i915/display: rename I915_HAS_HOTPLUG() to HAS_HOTPLUG Jani Nikula
2025-03-12  6:39   ` Shankar, Uma
2025-03-11 19:13 ` [PATCH 0/9] drm/i915/display: conversions to struct intel_display Ville Syrjälä
2025-03-11 20:19 ` ✓ CI.Patch_applied: success for drm/i915/display: conversions to struct intel_display (rev2) Patchwork
2025-03-11 20:20 ` ✗ CI.checkpatch: warning " Patchwork
2025-03-11 20:21 ` ✓ CI.KUnit: success " Patchwork
2025-03-11 20:38 ` ✓ CI.Build: " Patchwork
2025-03-11 20:40 ` ✓ CI.Hooks: " Patchwork
2025-03-11 20:42 ` ✓ CI.checksparse: " Patchwork
2025-03-11 21:06 ` ✓ Xe.CI.BAT: " Patchwork
2025-03-12 12:03 ` ✗ Xe.CI.Full: failure " 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=87r032fue6.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=ville.syrjala@linux.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