public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Remove pm park/unpark notifications
Date: Mon, 21 Oct 2019 20:10:16 +0100	[thread overview]
Message-ID: <3ff280da-a652-b990-136b-b5d98e6f20cb@linux.intel.com> (raw)
In-Reply-To: <20191021183236.21790-2-chris@chris-wilson.co.uk>


On 21/10/2019 19:32, Chris Wilson wrote:
> With the last user, i915_vma_parked(), retired, there are no more users
> of the per-gt pm notifications and we can remove the unused
> infrastructure.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>   drivers/gpu/drm/i915/gem/i915_gem_pm.c   | 25 ------------------------
>   drivers/gpu/drm/i915/gem/i915_gem_pm.h   |  2 --
>   drivers/gpu/drm/i915/gt/intel_gt_pm.c    | 10 ----------
>   drivers/gpu/drm/i915/gt/intel_gt_pm.h    |  5 -----
>   drivers/gpu/drm/i915/gt/intel_gt_types.h |  2 --
>   drivers/gpu/drm/i915/i915_gem.c          |  1 -
>   6 files changed, 45 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pm.c b/drivers/gpu/drm/i915/gem/i915_gem_pm.c
> index 2aa7e9be088f..ee3279c76566 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_pm.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_pm.c
> @@ -11,24 +11,6 @@
>   
>   #include "i915_drv.h"
>   
> -static int pm_notifier(struct notifier_block *nb,
> -		       unsigned long action,
> -		       void *data)
> -{
> -	struct drm_i915_private *i915 =
> -		container_of(nb, typeof(*i915), gem.pm_notifier);
> -
> -	switch (action) {
> -	case INTEL_GT_UNPARK:
> -		break;
> -
> -	case INTEL_GT_PARK:
> -		break;
> -	}
> -
> -	return NOTIFY_OK;
> -}
> -
>   static bool switch_to_kernel_context_sync(struct intel_gt *gt)
>   {
>   	bool result = !intel_gt_is_wedged(gt);
> @@ -206,10 +188,3 @@ void i915_gem_resume(struct drm_i915_private *i915)
>   	}
>   	goto out_unlock;
>   }
> -
> -void i915_gem_init__pm(struct drm_i915_private *i915)
> -{
> -	i915->gem.pm_notifier.notifier_call = pm_notifier;
> -	blocking_notifier_chain_register(&i915->gt.pm_notifications,
> -					 &i915->gem.pm_notifier);
> -}
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pm.h b/drivers/gpu/drm/i915/gem/i915_gem_pm.h
> index 6f7d5d11ac3b..a017572778d5 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_pm.h
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_pm.h
> @@ -12,8 +12,6 @@
>   struct drm_i915_private;
>   struct work_struct;
>   
> -void i915_gem_init__pm(struct drm_i915_private *i915);
> -
>   bool i915_gem_load_power_context(struct drm_i915_private *i915);
>   void i915_gem_resume(struct drm_i915_private *i915);
>   
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.c b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
> index fde5112b6650..427aded512f2 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_pm.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
> @@ -16,11 +16,6 @@
>   #include "intel_rc6.h"
>   #include "intel_wakeref.h"
>   
> -static void pm_notify(struct intel_gt *gt, int state)
> -{
> -	blocking_notifier_call_chain(&gt->pm_notifications, state, gt->i915);
> -}
> -
>   static int __gt_unpark(struct intel_wakeref *wf)
>   {
>   	struct intel_gt *gt = container_of(wf, typeof(*gt), wakeref);
> @@ -55,8 +50,6 @@ static int __gt_unpark(struct intel_wakeref *wf)
>   	intel_gt_queue_hangcheck(gt);
>   	intel_gt_unpark_requests(gt);
>   
> -	pm_notify(gt, INTEL_GT_UNPARK);
> -
>   	return 0;
>   }
>   
> @@ -68,7 +61,6 @@ static int __gt_park(struct intel_wakeref *wf)
>   
>   	GEM_TRACE("\n");
>   
> -	pm_notify(gt, INTEL_GT_PARK);
>   	intel_gt_park_requests(gt);
>   
>   	i915_vma_parked(gt);
> @@ -96,8 +88,6 @@ static const struct intel_wakeref_ops wf_ops = {
>   void intel_gt_pm_init_early(struct intel_gt *gt)
>   {
>   	intel_wakeref_init(&gt->wakeref, gt->uncore->rpm, &wf_ops);
> -
> -	BLOCKING_INIT_NOTIFIER_HEAD(&gt->pm_notifications);
>   }
>   
>   void intel_gt_pm_init(struct intel_gt *gt)
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.h b/drivers/gpu/drm/i915/gt/intel_gt_pm.h
> index 997770d3a968..0ed87da4bb68 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_pm.h
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.h
> @@ -12,11 +12,6 @@
>   #include "intel_gt_types.h"
>   #include "intel_wakeref.h"
>   
> -enum {
> -	INTEL_GT_UNPARK,
> -	INTEL_GT_PARK,
> -};
> -
>   static inline bool intel_gt_pm_is_awake(const struct intel_gt *gt)
>   {
>   	return intel_wakeref_is_active(&gt->wakeref);
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_types.h b/drivers/gpu/drm/i915/gt/intel_gt_types.h
> index ae4aaf75ac78..980973e66e7f 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_types.h
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_types.h
> @@ -83,8 +83,6 @@ struct intel_gt {
>   	struct intel_llc llc;
>   	struct intel_rc6 rc6;
>   
> -	struct blocking_notifier_head pm_notifications;
> -
>   	ktime_t last_init_time;
>   
>   	struct i915_vma *scratch;
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index a2ba123f7b31..39cb0e246a88 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -1435,7 +1435,6 @@ static void i915_gem_init__mm(struct drm_i915_private *i915)
>   void i915_gem_init_early(struct drm_i915_private *dev_priv)
>   {
>   	i915_gem_init__mm(dev_priv);
> -	i915_gem_init__pm(dev_priv);
>   
>   	spin_lock_init(&dev_priv->fb_tracking.lock);
>   }
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-10-21 19:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21 18:32 [PATCH 1/2] drm/i915: Lift i915_vma_parked() onto the gt Chris Wilson
2019-10-21 18:32 ` [PATCH 2/2] drm/i915: Remove pm park/unpark notifications Chris Wilson
2019-10-21 19:10   ` Tvrtko Ursulin [this message]
2019-10-21 19:09 ` [PATCH 1/2] drm/i915: Lift i915_vma_parked() onto the gt Tvrtko Ursulin
2019-10-21 20:06 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
2019-10-22  2:21 ` ✗ Fi.CI.IGT: 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=3ff280da-a652-b990-136b-b5d98e6f20cb@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /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