All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: intel_ring.engine is unused
Date: Mon, 03 Apr 2017 11:27:31 +0300	[thread overview]
Message-ID: <1491208051.3247.3.camel@linux.intel.com> (raw)
In-Reply-To: <20170401100139.21860-1-chris@chris-wilson.co.uk>

On la, 2017-04-01 at 11:01 +0100, Chris Wilson wrote:
> Or rather it is used only by intel_ring_pin() to extract the
> drm_i915_private which we can easily pass in. As this is a relatively
> rare operation, save the space in the struct, and as such it is even
> break even in the extra code for passing around the parameter:
> 
> add/remove: 0/0 grow/shrink: 2/3 up/down: 15/-15 (0)
> function                                     old     new   delta
> intel_init_ring_buffer                       906     918     +12
> execlists_context_pin                       1308    1311      +3
> mock_engine                                  407     403      -4
> intel_engine_create_ring                     367     363      -4
> intel_ring_pin                               326     319      -7
> Total: Before=1261794, After=1261794, chg +0.00%
> 
> v2: Reorder intel_init_ring_buffer to keep the ring setup together:
> 
> add/remove: 0/0 grow/shrink: 2/3 up/down: 9/-15 (-6)
> function                                     old     new   delta
> intel_init_ring_buffer                       906     912      +6
> execlists_context_pin                       1308    1311      +3
> mock_engine                                  407     403      -4
> intel_engine_create_ring                     367     363      -4
> intel_ring_pin                               326     319      -7
> Total: Before=1261794, After=1261788, chg -0.00%
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

<SNIP>
 
> @@ -1493,13 +1491,7 @@ static int intel_init_ring_buffer(struct intel_engine_cs *engine)
>  	if (ret)
>  		goto error;
>  
> -	ring = intel_engine_create_ring(engine, 32 * PAGE_SIZE);
> -	if (IS_ERR(ring)) {
> -		ret = PTR_ERR(ring);
> -		goto error;
> -	}
> -
> -	if (HWS_NEEDS_PHYSICAL(dev_priv)) {
> +	if (HWS_NEEDS_PHYSICAL(engine->i915)) {
>  		WARN_ON(engine->id != RCS);
>  		ret = init_phys_status_page(engine);
>  		if (ret)

Onion teardown would be great while you move the code around.

With that,

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      parent reply	other threads:[~2017-04-03  8:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-01 10:01 [PATCH] drm/i915: intel_ring.engine is unused Chris Wilson
2017-04-01 10:19 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-04-03  8:27 ` Joonas Lahtinen [this message]

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=1491208051.3247.3.camel@linux.intel.com \
    --to=joonas.lahtinen@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 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.