All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Gordon <david.s.gordon@intel.com>
To: "Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Mika Kuoppala" <mika.kuoppala@linux.intel.com>,
	"Chris Wilson" <chris@chris-wilson.co.uk>
Cc: Intel graphics driver community testing & development
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/i915: Rename GGTT init functions
Date: Thu, 24 Mar 2016 16:01:53 +0000	[thread overview]
Message-ID: <56F40F71.30709@intel.com> (raw)
In-Reply-To: <1458805203.4391.2.camel@linux.intel.com>

On 24/03/16 07:40, Joonas Lahtinen wrote:
> On ke, 2016-03-23 at 18:02 +0200, Ville Syrjälä wrote:
>> On Wed, Mar 23, 2016 at 05:54:09PM +0200, Mika Kuoppala wrote:
>>>
>>> Ville Syrjälä <ville.syrjala@linux.intel.com> writes:
>>>
>>>>
>>>> [ text/plain ]
>>>> On Wed, Mar 23, 2016 at 03:00:22PM +0200, Joonas Lahtinen wrote:
>>>>>
>>>>> Rename and document the GGTT init functions to give a better
>>>>> idea of the context where they are called from.
>>>>>
>>>>> i915_gem_gtt_init => i915_init_ggtt_hw
>>>> Seems to me i915_ggtt_init_hw would match existing practices better.
>>>>
>>> There is also some gravity towards putting the verb first. In gem
>>> side atleast.
>> At least in this case ggtt_init_hw would match ppgtt_init_hw, which
>> seems like a nice thing.
>>
>
> Right, I have changed the order quite a few times already. If it's
> i915_init_* (like i915_init_userptr), will be easier to grep.
>
> Adding Chris here as we discussed this yesterday. His idea is that
> logic should be action_feature and object_verb, init_some_thingamagic,
> vs object_destroy.

Reasonable enough, as long as we can tell what's a feature and what's an 
object. A totally RPN scheme would be even clearer, since we would then 
treat features as objects (and actions are verbs), yielding:

i915_userptr_init()
i915_engine_setup()
i915_object_destroy()

and the like. That would require:

i915_gem_init_global_gtt => i915_gem_ggtt_init
i915_gem_gtt_init        => i915_ggtt_hw_init
i915_global_gtt_cleanup  => i915_ggtt_hw_cleanup

and

i915_pggtt_init()
i915_pggtt_hw_init()

and perhaps

i915_context_allocate()
i915_hw_ctx_init()
i915_hw_ctx_pin_and_map()
i915_context_free()

What do people think counts as "features" in Chris' scheme?

> Whatever we decide on, we should drop a small note at kerneldoc.
>
> Regards, Joonas

And perhaps we should have a list of preferred verbs with sensible 
meaning, e.g. "allocate" or "create", "init" or "setup", "free" or 
"release" or "destroy", etc?

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

  reply	other threads:[~2016-03-24 16:05 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23 13:00 [PATCH 1/2] drm/i915: Rename GGTT init functions Joonas Lahtinen
2016-03-23 13:00 ` [PATCH 2/2] drm/i915: Refer to GGTT VM consistently Joonas Lahtinen
2016-03-23 13:18   ` [PATCH v2] " Joonas Lahtinen
2016-03-23 13:25   ` [PATCH 2/2] " Chris Wilson
2016-03-24 14:37     ` Joonas Lahtinen
2016-03-30 12:13     ` [PATCH v3] " Joonas Lahtinen
2016-03-30 13:57     ` [PATCH v4] drm/i915: Refer to GGTT {,VM} consistently Joonas Lahtinen
2016-03-30 14:17       ` [PATCH v4] drm/i915: Refer to GGTT {, VM} consistently Chris Wilson
2016-03-23 13:04 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915: Rename GGTT init functions Patchwork
2016-03-23 13:35 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Rename GGTT init functions (rev2) Patchwork
2016-03-23 15:25 ` [PATCH 1/2] drm/i915: Rename GGTT init functions Mika Kuoppala
2016-03-23 15:41 ` Ville Syrjälä
2016-03-23 15:54   ` Mika Kuoppala
2016-03-23 16:02     ` Ville Syrjälä
2016-03-23 16:06       ` Chris Wilson
2016-03-24  7:40       ` Joonas Lahtinen
2016-03-24 16:01         ` Dave Gordon [this message]
2016-03-24 16:22           ` Chris Wilson
2016-03-24 14:40     ` Joonas Lahtinen
2016-03-24 14:47     ` [PATCH v2] " Joonas Lahtinen
2016-03-29 13:15       ` Joonas Lahtinen
2016-03-29 14:25         ` Chris Wilson
2016-03-30  9:12           ` Chris Wilson
2016-03-30 10:54             ` Joonas Lahtinen
2016-03-24 17:02 ` ✗ Fi.CI.BAT: warning for series starting with [v2] drm/i915: Rename GGTT init functions (rev3) Patchwork
2016-03-30 11:12   ` Joonas Lahtinen
2016-03-31 13:44 ` ✗ Fi.CI.BAT: warning for series starting with [v2] drm/i915: Rename GGTT init functions (rev5) Patchwork
2016-03-31 14:32   ` Joonas Lahtinen

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=56F40F71.30709@intel.com \
    --to=david.s.gordon@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=mika.kuoppala@linux.intel.com \
    --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 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.