intel-xe.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 1/4] drm/i915/gt: Nuke gen2_irq_{enable,disable}()
Date: Wed, 09 Oct 2024 14:12:28 +0300	[thread overview]
Message-ID: <87ldyxa5sz.fsf@intel.com> (raw)
In-Reply-To: <20241008214349.23331-2-ville.syrjala@linux.intel.com>

On Wed, 09 Oct 2024, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> We've determined that accessing the (supposedly) 16bit
> interrupt registers on gen2 as 32bit works just fine.
> We already dropped the special case from the main interrupt
> code, do so also for the gt interrupt stuff.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/gt/gen2_engine_cs.c        | 17 -----------------
>  drivers/gpu/drm/i915/gt/gen2_engine_cs.h        |  2 --
>  drivers/gpu/drm/i915/gt/intel_ring_submission.c |  5 +----
>  3 files changed, 1 insertion(+), 23 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/gen2_engine_cs.c b/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
> index 8fe0499308ff..54077cab8e16 100644
> --- a/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
> @@ -290,23 +290,6 @@ int gen4_emit_bb_start(struct i915_request *rq,
>  	return 0;
>  }
>  
> -void gen2_irq_enable(struct intel_engine_cs *engine)
> -{
> -	struct drm_i915_private *i915 = engine->i915;
> -
> -	i915->irq_mask &= ~engine->irq_enable_mask;
> -	intel_uncore_write16(&i915->uncore, GEN2_IMR, i915->irq_mask);
> -	ENGINE_POSTING_READ16(engine, RING_IMR);
> -}
> -
> -void gen2_irq_disable(struct intel_engine_cs *engine)
> -{
> -	struct drm_i915_private *i915 = engine->i915;
> -
> -	i915->irq_mask |= engine->irq_enable_mask;
> -	intel_uncore_write16(&i915->uncore, GEN2_IMR, i915->irq_mask);
> -}
> -
>  void gen3_irq_enable(struct intel_engine_cs *engine)
>  {
>  	engine->i915->irq_mask &= ~engine->irq_enable_mask;
> diff --git a/drivers/gpu/drm/i915/gt/gen2_engine_cs.h b/drivers/gpu/drm/i915/gt/gen2_engine_cs.h
> index a5cd64a65c9e..2f707620b3d4 100644
> --- a/drivers/gpu/drm/i915/gt/gen2_engine_cs.h
> +++ b/drivers/gpu/drm/i915/gt/gen2_engine_cs.h
> @@ -28,8 +28,6 @@ int gen4_emit_bb_start(struct i915_request *rq,
>  		       u64 offset, u32 length,
>  		       unsigned int dispatch_flags);
>  
> -void gen2_irq_enable(struct intel_engine_cs *engine);
> -void gen2_irq_disable(struct intel_engine_cs *engine);
>  void gen3_irq_enable(struct intel_engine_cs *engine);
>  void gen3_irq_disable(struct intel_engine_cs *engine);
>  void gen5_irq_enable(struct intel_engine_cs *engine);
> diff --git a/drivers/gpu/drm/i915/gt/intel_ring_submission.c b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
> index 72277bc8322e..694cb79d5452 100644
> --- a/drivers/gpu/drm/i915/gt/intel_ring_submission.c
> +++ b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
> @@ -1090,12 +1090,9 @@ static void setup_irq(struct intel_engine_cs *engine)
>  	} else if (GRAPHICS_VER(i915) >= 5) {
>  		engine->irq_enable = gen5_irq_enable;
>  		engine->irq_disable = gen5_irq_disable;
> -	} else if (GRAPHICS_VER(i915) >= 3) {
> +	} else {
>  		engine->irq_enable = gen3_irq_enable;
>  		engine->irq_disable = gen3_irq_disable;
> -	} else {
> -		engine->irq_enable = gen2_irq_enable;
> -		engine->irq_disable = gen2_irq_disable;
>  	}
>  }

-- 
Jani Nikula, Intel

  reply	other threads:[~2024-10-09 11:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-08 21:43 [PATCH 0/4] drm/i915: gen2 stuff Ville Syrjala
2024-10-08 21:43 ` [PATCH 1/4] drm/i915/gt: Nuke gen2_irq_{enable,disable}() Ville Syrjala
2024-10-09 11:12   ` Jani Nikula [this message]
2024-10-08 21:43 ` [PATCH 2/4] drm/i915/gt: s/gen3/gen2/ Ville Syrjala
2024-10-09 11:12   ` Jani Nikula
2024-10-08 21:43 ` [PATCH 3/4] drm/i915/irq: s/gen3/gen2/ Ville Syrjala
2024-10-09 10:20   ` Jani Nikula
2024-10-10 12:00     ` Ville Syrjälä
2024-10-10 12:22       ` Jani Nikula
2024-10-08 21:43 ` [PATCH 4/4] drm/i915/pmu: Add support for gen2 Ville Syrjala
2024-10-09 11:17   ` Jani Nikula
2024-10-08 21:49 ` ✓ CI.Patch_applied: success for drm/i915: gen2 stuff Patchwork
2024-10-08 21:49 ` ✓ CI.checkpatch: " Patchwork
2024-10-08 21:51 ` ✓ CI.KUnit: " Patchwork
2024-10-08 22:02 ` ✓ CI.Build: " Patchwork
2024-10-08 22:04 ` ✓ CI.Hooks: " Patchwork
2024-10-08 22:06 ` ✗ CI.checksparse: warning " Patchwork
2024-10-08 22:24 ` ✓ CI.BAT: success " Patchwork
2024-10-09  5:34 ` ✗ 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=87ldyxa5sz.fsf@intel.com \
    --to=jani.nikula@linux.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;
as well as URLs for NNTP newsgroup(s).