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 v2 3/3] drm/{i915,xe}/display: move irq calls to parent interface
Date: Wed, 12 Nov 2025 16:19:10 +0200 [thread overview]
Message-ID: <30fdcb1be4b9046453a2ba00d5fd99478948538a@intel.com> (raw)
In-Reply-To: <13b044a043667b1247f6d12df01014bcb8edf708@intel.com>
On Wed, 12 Nov 2025, Jani Nikula <jani.nikula@intel.com> wrote:
> On Tue, 11 Nov 2025, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
>> On Tue, Nov 11, 2025 at 09:34:04AM +0200, Jani Nikula wrote:
>>> Add an irq parent driver interface for the .enabled and .synchronize
>>> calls. This lets us drop the dependency on i915_drv.h and i915_irq.h in
>>> multiple places, and subsequently remove the compat i915_irq.h and
>>> i915_irq.c files along with the display/ext directory from xe
>>> altogether.
>>>
>>> Use intel_irqs_enabled() and intel_synchronize_irq() static wrappers for
>>> parent interface calls in intel_display_irq.c while chasing the function
>>> pointers everywhere else. It's still a bit uncertain if we should
>>> universally have wrappers for the parent interface calls or not.
>>
>> Why would we want those ugly pointer chains anywhere (except perhaps
>> for single use cases)?
>
> I guess my main point is, I'm not yet sure how those wrappers should be
> organized, and I'm simply postponing the decision. But let's discuss.
>
> I'm leaning towards putting them in files that are separate from the
> implementation, i.e. intel_irqs_enabled() and intel_synchronize_irq()
> would *not* be in intel_display_irq.[ch] but rather in
> something_parent_something.[ch]. Because it's not so much about the
> functionality, it's all about calling the parent interface.
>
> Maybe just one file grouping *all* parent interface access, similar to
> how include/drm/intel/display_parent_interface.h defines the interface.
>
> And then should the naming indicate it's calling the parent? I think
> there's value in knowing where the call ends up when reading the
> code. But then do the function names end up being unweildy?
>
> If you simply translate display->parent->irq->enabled to a function
> name, it would be display_parent_irq_enabled(). Or perhaps
> intel_parent_irq_enabled(). And you'd have the naming scheme right
> there, always 1:1 without further thinking.
>
> intel_display_rpm.[ch] has it all in a dedicated file now. But there's
> really nothing runtime pm specific there anymore, it's just mechanical
> calling of the interface and relaying parameters and return values.
>
> I think we have too much "intel_display_something_something.[ch]" so
> maybe intel_parent.[ch] and intel_parent_<SUBSTRUCT>_<FUNCTION>()?
Typed it up, I like it, sent as v3.
BR,
Jani.
--
Jani Nikula, Intel
next prev parent reply other threads:[~2025-11-12 14:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-11 7:34 [PATCH v2 0/3] drm/{i915, xe}/irq: clarify display and parent driver interfaces Jani Nikula
2025-11-11 7:34 ` [PATCH v2 1/3] drm/{i915, xe}/display: duplicate gen2 irq/error init/reset in display irq Jani Nikula
2025-11-11 15:48 ` [PATCH v2 1/3] drm/{i915,xe}/display: " Ville Syrjälä
2025-11-11 7:34 ` [PATCH v2 2/3] drm/i915/display: convert the display irq interfaces to struct intel_display Jani Nikula
2025-11-11 15:48 ` Ville Syrjälä
2025-11-11 7:34 ` [PATCH v2 3/3] drm/{i915, xe}/display: move irq calls to parent interface Jani Nikula
2025-11-11 15:50 ` [PATCH v2 3/3] drm/{i915,xe}/display: " Ville Syrjälä
2025-11-12 9:50 ` Jani Nikula
2025-11-12 14:19 ` Jani Nikula [this message]
2025-11-12 14:18 ` [PATCH v3] " Jani Nikula
2025-11-11 8:56 ` ✓ i915.CI.BAT: success for drm/{i915, xe}/irq: clarify display and parent driver interfaces (rev2) Patchwork
2025-11-11 13:31 ` ✗ i915.CI.Full: failure " Patchwork
2025-11-12 19:34 ` ✗ i915.CI.BAT: failure for drm/{i915, xe}/irq: clarify display and parent driver interfaces (rev3) 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=30fdcb1be4b9046453a2ba00d5fd99478948538a@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