All of lore.kernel.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] drm/i915: Small display interrupt handlers tidy
Date: Fri, 6 May 2016 14:27:26 +0100	[thread overview]
Message-ID: <572C9BBE.4000805@linux.intel.com> (raw)
In-Reply-To: <20160506112755.GG7026@nuc-i3427.alporthouse.com>


On 06/05/16 12:27, Chris Wilson wrote:
> On Fri, May 06, 2016 at 12:07:04PM +0100, Tvrtko Ursulin wrote:
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> I have noticed some of our interrupt handlers use both dev and
>> dev_priv while they could get away with only dev_priv in the
>> huge majority of cases.
>>
>> Tidying that up had a cascading effect on changing functions
>> prototypes, so relatively big churn factor, but I think it is
>> for the better.
>>
>> For example even where changes cascade out of i915_irq.c, for
>> functions prefixed with intel_, genX_ or <plat>_, it makes more
>> sense to take dev_priv directly anyway.
>>
>> This allows us to eliminate local variables and intermixed usage
>> of dev and dev_priv where only one is good enough.
>>
>> End result is shrinkage of both source and the resulting binary.
>>
>> i915.ko:
>>
>>   - .text         000b0899
>>   + .text         000b0619
>>
>> Or if we look at the Gen8 display irq chain:
>>
>>   -00000000000006ad t gen8_irq_handler
>>   +0000000000000663 t gen8_irq_handler
>>     -0000000000000028 T intel_opregion_asle_intr
>>     +0000000000000024 T intel_opregion_asle_intr
>>     -000000000000008c t ilk_hpd_irq_handler
>>     +000000000000007f t ilk_hpd_irq_handler
>>     -0000000000000116 T intel_check_page_flip
>>     +0000000000000112 T intel_check_page_flip
>>     -000000000000011a T intel_prepare_page_flip
>>     +0000000000000119 T intel_prepare_page_flip
>>     -0000000000000014 T intel_finish_page_flip_plane
>>     +0000000000000013 T intel_finish_page_flip_plane
>>     -0000000000000053 t hsw_pipe_crc_irq_handler
>>     +000000000000004c t hsw_pipe_crc_irq_handler
>>     -000000000000022e t cpt_irq_handler
>>     +0000000000000213 t cpt_irq_handler
>>
>> So small shrinkage but it is all fast paths so doesn't harm.
>>
>> Situation is similar in other interrupt handlers as well.
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> ---
>>   drivers/gpu/drm/i915/i915_drv.c       |   2 +-
>>   drivers/gpu/drm/i915/i915_drv.h       |  13 +-
>>   drivers/gpu/drm/i915/i915_irq.c       | 386 ++++++++++++++++------------------
>>   drivers/gpu/drm/i915/intel_display.c  |  33 ++-
>>   drivers/gpu/drm/i915/intel_drv.h      |  12 +-
>>   drivers/gpu/drm/i915/intel_hotplug.c  |  13 +-
>>   drivers/gpu/drm/i915/intel_opregion.c |   4 +-
>>   drivers/gpu/drm/i915/intel_pm.c       |  33 ++-
>>   8 files changed, 232 insertions(+), 264 deletions(-)
>
> I have a similar series with almost identical impact, so from that
> perspective we should be close. I found we could measure an improvement
> in IRQ waiter wakeup latency (but only about ~2% so right on the noise
> level) for gen6/gen7.
>
> Patch looks good, spot checking against mine:
>
> @@ -1617,8 +1617,7 @@ void gen6_rps_idle(struct drm_i915_private *dev_priv);
>   void gen6_rps_boost(struct drm_i915_private *dev_priv,
>                      struct intel_rps_client *rps,
>                      unsigned long submitted);
> -void intel_queue_rps_boost_for_request(struct drm_device *dev,
> -                                      struct drm_i915_gem_request *req);
> +void intel_queue_rps_boost_for_request(struct drm_i915_gem_request *req);

Against your tree or your patch? If latter that would be quite amazing!

> Follow up whilst waiting for CI?

Sure.

> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Thanks!

Regards,

Tvrtko

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

  reply	other threads:[~2016-05-06 13:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-06 11:07 [PATCH] drm/i915: Small display interrupt handlers tidy Tvrtko Ursulin
2016-05-06 11:27 ` Chris Wilson
2016-05-06 13:27   ` Tvrtko Ursulin [this message]
2016-05-06 13:53     ` Dave Gordon
2016-05-09  8:05       ` Daniel Vetter
2016-05-09  8:21         ` Chris Wilson
2016-05-06 13:48   ` [PATCH v2] " Tvrtko Ursulin
2016-05-09 10:53 ` ✗ Fi.CI.BAT: failure for drm/i915: Small display interrupt handlers tidy (rev2) Patchwork
2016-05-09 12:38   ` Tvrtko Ursulin

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=572C9BBE.4000805@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=chris@chris-wilson.co.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.