public inbox for intel-gfx@lists.freedesktop.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 15/15] drm/i915/irq: add intel_display_irq_handler() to irq funcs
Date: Thu, 30 Apr 2026 10:59:11 +0300	[thread overview]
Message-ID: <0edc69cd1ad8c7b510622ffb8b51f436992395dc@intel.com> (raw)
In-Reply-To: <afHx7st1NYZulnQM@intel.com>

On Wed, 29 Apr 2026, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Wed, Apr 29, 2026 at 01:24:55PM +0300, Jani Nikula wrote:
>> @@ -2088,6 +2123,28 @@ static void vlv_display_irq_ack(struct intel_display *display,
>>  	i9xx_pipestat_irq_ack(display, state->iir, state->pipe_stats);
>>  }
>>  
>> +static bool vlv_display_irq_handler(struct intel_display *display,
>> +				    const struct intel_display_irq_state *state)
>> +{
>> +	u32 lpe_mask = I915_LPE_PIPE_A_INTERRUPT | I915_LPE_PIPE_B_INTERRUPT;
>> +
>> +	if (display->platform.cherryview)
>> +		lpe_mask |= I915_LPE_PIPE_C_INTERRUPT;
>
> I would prefer a function rather than the extra variable. The other
> option is to just use the CHV mask always. There is nothing on the
> extra bit on VLV so we never unmask it.

Hmm. reset and postinstall also have slight variations for VLV vs. CHV,
but only very slight. I think they're overall close enough that
splitting out a funcs struct and separate funcs for CHV is more
distracting and duplication than helpful.

Or would something like this be satisfactory? Just a couple of small
wrapper functions around intel_lpe_audio_irq_handler() here that the
compiler would just inline:

	if (display->platform.cherryview)
		chv_lpe_audio_irq_handler(display, state->iir);		
	else
		vlv_lpe_audio_irq_handler(display, state->iir);		

Of course this would need to move to the ack part per your other review
comment.


>> @@ -51,14 +51,12 @@ void bdw_disable_vblank(struct drm_crtc *crtc);
>>  
>>  void ilk_display_irq_master_disable(struct intel_display *display, u32 *de_ier, u32 *sde_ier);
>>  void ilk_display_irq_master_enable(struct intel_display *display, u32 de_ier, u32 sde_ier);
>> -bool ilk_display_irq_handler(struct intel_display *display);
>> -void gen8_de_irq_handler(struct intel_display *display, u32 master_ctl);
>> -void gen11_display_irq_handler(struct intel_display *display);
>>  
>>  u32 gen11_gu_misc_irq_ack(struct intel_display *display, const u32 master_ctl);
>>  void gen11_gu_misc_irq_handler(struct intel_display *display, const u32 iir);
>>  
>>  struct intel_display_irq_state {
>> +	u32 master_ctl;
>
> Ideally I'd like a separate structs for different platforms,
> but until I resurrect my old ack vs. handle split for all
> platforms I guess we don't need anything else here for
> ilk+. So good enough for now I suppose.

You mean per-platform substructs/unions within struct
intel_display_irq_state? I can do that.

BR,
Jani.



-- 
Jani Nikula, Intel

  reply	other threads:[~2026-04-30  7:59 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-29 10:24 [PATCH 00/15] drm/i915: refactor display funcs, add display irq hooks Jani Nikula
2026-04-29 10:24 ` [PATCH 01/15] drm/i915/display: move audio funcs under audio sub-struct Jani Nikula
2026-04-29 10:24 ` [PATCH 02/15] drm/i915/display: move color funcs under color sub-struct Jani Nikula
2026-04-29 10:24 ` [PATCH 03/15] drm/i915/display: move fdi funcs under fdi sub-struct Jani Nikula
2026-04-29 10:24 ` [PATCH 04/15] drm/i915/display: move watermark funcs under wm sub-struct Jani Nikula
2026-04-29 10:24 ` [PATCH 05/15] drm/i915/display: move hotplug irq funcs under hotplug sub-struct Jani Nikula
2026-04-29 10:24 ` [PATCH 06/15] drm/i915/display: move dpll funcs under dpll sub-struct Jani Nikula
2026-04-29 10:24 ` [PATCH 07/15] drm/i915/display: move cdclk funcs under cdclk sub-struct Jani Nikula
2026-04-29 10:24 ` [PATCH 08/15] drm/i915/display: move display funcs under modeset sub-struct Jani Nikula
2026-04-29 10:24 ` [PATCH 09/15] drm/i915/irq: deduplicate dg1_de_irq_postinstall() and gen11_de_irq_postinstall() Jani Nikula
2026-04-29 10:24 ` [PATCH 10/15] drm/i915/irq: move VLV/CHV LPE irq handler call after irq acks Jani Nikula
2026-04-29 11:12   ` Ville Syrjälä
2026-04-30  7:49     ` Jani Nikula
2026-04-29 10:24 ` [PATCH 11/15] drm/i915/irq: constify pipe stats parameters Jani Nikula
2026-04-29 10:24 ` [PATCH 12/15] drm/i915/irq: add display irq funcs, start with intel_display_irq_reset() Jani Nikula
2026-04-29 10:24 ` [PATCH 13/15] drm/i915/irq: add intel_display_irq_postinstall() to irq funcs Jani Nikula
2026-04-29 10:24 ` [PATCH 14/15] drm/i915/irq: add intel_display_irq_ack() " Jani Nikula
2026-04-29 10:24 ` [PATCH 15/15] drm/i915/irq: add intel_display_irq_handler() " Jani Nikula
2026-04-29 11:56   ` Ville Syrjälä
2026-04-30  7:59     ` Jani Nikula [this message]
2026-04-30 10:28       ` Ville Syrjälä
2026-04-29 11:37 ` ✗ i915.CI.BAT: failure for drm/i915: refactor display funcs, add display irq hooks 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=0edc69cd1ad8c7b510622ffb8b51f436992395dc@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