From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Intel graphics driver community testing & development
<intel-gfx@lists.freedesktop.org>
Subject: Re: [RFC/CI] drm/i915: Sanitize GuC client initialization
Date: Tue, 14 Feb 2017 15:24:34 +0200 [thread overview]
Message-ID: <1487078674.3057.37.camel@linux.intel.com> (raw)
In-Reply-To: <58ab1a75-5e42-5a3f-54d2-1cdc95341043@intel.com>
On pe, 2017-02-10 at 12:03 -0800, Daniele Ceraolo Spurio wrote:
> <snip>
> >
> > >
> > > +
> > > /*
> > > * Tell the GuC to allocate or deallocate a specific doorbell
> > > */
> > >
> > > -static int guc_allocate_doorbell(struct intel_guc *guc,
> > > - struct i915_guc_client *client)
> > > +static int __create_doorbell_hw(struct i915_guc_client *client)
> >
> > I would rather prefer to only change signature of this function into
> >
> > static int guc_allocate_doorbell(struct intel_guc *guc, u32 index)
> >
> > as a clean wrap around GUC_ACTION_ALLOCATE_DOORBELL. This way we also preserve
> > consistency between function name and the guc action name used inside.
> >
> > Based on the above we can still add
> >
> > static int __create_doorbell_hw(struct i915_guc_client *client)
> > {
> > return guc_allocate_doorbell(client->guc, client->ctx_index);
> > }
> >
> > Note that location of the ctx_index member may change in the future, and this
> > approach will minimize impact of these future changes.
> >
>
> +1.
> The client is a SW abstraction that we use to track our registrations
> with GuC, but it only works with our current mode of operation. If we
> plumb it too deep into the low-level functions it'll be more difficult
> to do any reworks in the future.
Indeed, the ctx_index should move. I'd like to keep it __ prefixed
function, because the client needs the desc updated for the function to
be meaningful.
So I'll make it __guc_{de}allocate_doorbell for now.
Might be good to have i915_guc_doorbell, i915_guc_context,
i915_guc_client in the future to reduce code entangelment.
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
next prev parent reply other threads:[~2017-02-14 13:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-10 13:30 [RFC/CI] drm/i915: Sanitize GuC client initialization Joonas Lahtinen
2017-02-10 13:52 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-02-10 14:36 ` [RFC/CI] " Chris Wilson
2017-02-14 13:54 ` Joonas Lahtinen
2017-02-10 15:11 ` Michal Wajdeczko
2017-02-10 20:03 ` Daniele Ceraolo Spurio
2017-02-14 13:24 ` Joonas Lahtinen [this message]
2017-02-14 13:51 ` Joonas Lahtinen
2017-02-10 19:55 ` Daniele Ceraolo Spurio
2017-02-14 13:21 ` 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=1487078674.3057.37.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=michal.wajdeczko@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.