Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Oscar Mateo <oscar.mateo@intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 2/5] drm/i915: Use the same vfunc for BSD2 ring init
Date: Thu, 6 Apr 2017 04:14:42 -0700	[thread overview]
Message-ID: <489575cf-e4d4-88b3-3705-0cfe6b7a2f69@intel.com> (raw)
In-Reply-To: <05a81ecf-f7c9-a257-71b9-5a4de744cca2@linux.intel.com>



On 04/06/2017 10:48 AM, Tvrtko Ursulin wrote:
>
> On 05/04/2017 10:30, Oscar Mateo wrote:
>> If we needed to do something different for the init functions, we could
>> always look at the instance number to make the distinction.But, in any
>> case, the two functions are virtually identical already (please notice
>> that BSD2_RING is only used from gen8 onwards).
>>
>> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>> Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_engine_cs.c  |  2 +-
>>  drivers/gpu/drm/i915/intel_ringbuffer.c | 14 --------------
>>  drivers/gpu/drm/i915/intel_ringbuffer.h |  1 -
>>  3 files changed, 1 insertion(+), 16 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c 
>> b/drivers/gpu/drm/i915/intel_engine_cs.c
>> index b3d575a..abc0a9c 100644
>> --- a/drivers/gpu/drm/i915/intel_engine_cs.c
>> +++ b/drivers/gpu/drm/i915/intel_engine_cs.c
>> @@ -79,7 +79,7 @@
>>          .mmio_base = GEN8_BSD2_RING_BASE,
>>          .irq_shift = GEN8_VCS2_IRQ_SHIFT,
>>          .init_execlists = logical_xcs_ring_init,
>> -        .init_legacy = intel_init_bsd2_ring_buffer,
>> +        .init_legacy = intel_init_bsd_ring_buffer,
>>      },
>>      [VECS] = {
>>          .name = "vecs",
>> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c 
>> b/drivers/gpu/drm/i915/intel_ringbuffer.c
>> index c98acc2..81eee42 100644
>> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
>> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
>> @@ -2175,20 +2175,6 @@ int intel_init_bsd_ring_buffer(struct 
>> intel_engine_cs *engine)
>>      return intel_init_ring_buffer(engine);
>>  }
>>
>> -/**
>> - * Initialize the second BSD ring (eg. Broadwell GT3, Skylake GT3)
>> - */
>> -int intel_init_bsd2_ring_buffer(struct intel_engine_cs *engine)
>> -{
>> -    struct drm_i915_private *dev_priv = engine->i915;
>> -
>> -    intel_ring_default_vfuncs(dev_priv, engine);
>> -
>> -    engine->emit_flush = gen6_bsd_ring_flush;
>> -
>> -    return intel_init_ring_buffer(engine);
>> -}
>> -
>>  int intel_init_blt_ring_buffer(struct intel_engine_cs *engine)
>>  {
>>      struct drm_i915_private *dev_priv = engine->i915;
>> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h 
>> b/drivers/gpu/drm/i915/intel_ringbuffer.h
>> index 4ab590b..5c1a27f 100644
>> --- a/drivers/gpu/drm/i915/intel_ringbuffer.h
>> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
>> @@ -561,7 +561,6 @@ int intel_ring_pin(struct intel_ring *ring,
>>
>>  int intel_init_render_ring_buffer(struct intel_engine_cs *engine);
>>  int intel_init_bsd_ring_buffer(struct intel_engine_cs *engine);
>> -int intel_init_bsd2_ring_buffer(struct intel_engine_cs *engine);
>>  int intel_init_blt_ring_buffer(struct intel_engine_cs *engine);
>>  int intel_init_vebox_ring_buffer(struct intel_engine_cs *engine);
>>
>>
>
> Job is not done until there is nothing left to remove! :)
>
> Doesn't depend on anything so could have been first in the series, or 
> separate, but doesn't matter.
>
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> Regards,
>
> Tvrtko

Every program can be simplified by at least one line of code, and every 
program contains at least one bug; so every program can be simplified to 
one line of code that doesn't work :)

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

  reply	other threads:[~2017-04-06 18:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-05  9:30 [PATCH 0/5] Classify the engines in class + instance Oscar Mateo
2017-04-05  9:30 ` [PATCH 1/5] drm/i915: " Oscar Mateo
2017-04-06 17:45   ` Tvrtko Ursulin
2017-04-05  9:30 ` [PATCH 2/5] drm/i915: Use the same vfunc for BSD2 ring init Oscar Mateo
2017-04-06 17:48   ` Tvrtko Ursulin
2017-04-06 11:14     ` Oscar Mateo [this message]
2017-04-05  9:30 ` [PATCH 3/5] drm/i915: Generate the engine name based on the instance number Oscar Mateo
2017-04-06 18:02   ` Tvrtko Ursulin
2017-04-06 11:22     ` Oscar Mateo
2017-04-06 18:37       ` Tvrtko Ursulin
2017-04-06 18:44         ` Chris Wilson
2017-04-06 18:10     ` Chris Wilson
2017-04-05  9:30 ` [PATCH 4/5] drm/i915: Split the engine info table in two levels, using class + instance Oscar Mateo
2017-04-06 18:09   ` Tvrtko Ursulin
2017-04-05  9:30 ` [PATCH 5/5] drm/i915: Use the engine class to get the context size Oscar Mateo
2017-04-06 18:19   ` Tvrtko Ursulin
2017-04-05 16:58 ` ✓ Fi.CI.BAT: success for Classify the engines in class + instance Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2017-04-06 12:55 [PATCH 0/5] Classify the engines in class + instance (v2) Oscar Mateo
2017-04-06 12:55 ` [PATCH 2/5] drm/i915: Use the same vfunc for BSD2 ring init Oscar Mateo
2017-04-06 15:00 [PATCH 0/5] Classify the engines in class + instance (v3) Oscar Mateo
2017-04-06 15:00 ` [PATCH 2/5] drm/i915: Use the same vfunc for BSD2 ring init Oscar Mateo
2017-04-07  9:15 [PATCH 0/5] Classify the engines in class + instance (v4) Oscar Mateo
2017-04-07  9:15 ` [PATCH 2/5] drm/i915: Use the same vfunc for BSD2 ring init Oscar Mateo
2017-04-10 14:34 [PATCH 0/5] Classify the engines in class + instance (v5) Oscar Mateo
2017-04-10 14:34 ` [PATCH 2/5] drm/i915: Use the same vfunc for BSD2 ring init Oscar Mateo

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=489575cf-e4d4-88b3-3705-0cfe6b7a2f69@intel.com \
    --to=oscar.mateo@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=tvrtko.ursulin@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