From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/8] drm/i915/uc: Rename intel_?uc_init() to intel_?uc_fetch_fw()
Date: Thu, 23 Feb 2017 09:45:14 +0200 [thread overview]
Message-ID: <1487835914.3052.11.camel@linux.intel.com> (raw)
In-Reply-To: <20170222152957.GA11729@ahiler-desk.igk.intel.com>
On ke, 2017-02-22 at 16:29 +0100, Arkadiusz Hiler wrote:
> On Wed, Feb 22, 2017 at 03:59:01PM +0200, Joonas Lahtinen wrote:
> >
> > > + * @huc: intel_huc struct
> > > *
> > > * Called early during driver load, but after GEM is initialised. The loading
> > > * will continue only when driver explicitly specify firmware name and version.
> > > @@ -152,42 +152,41 @@ static int huc_ucode_xfer(struct drm_i915_private *dev_priv)
> > > *
> > > * The DMA-copying to HW is done later when intel_huc_init_hw() is called.
> > > */
> > > -void intel_huc_init(struct drm_i915_private *dev_priv)
> > > +void intel_huc_fetch_fw(struct intel_huc *huc)
> > > {
> > > > > > - struct intel_huc *huc = &dev_priv->huc;
> > > > > > - struct intel_uc_fw *huc_fw = &huc->fw;
> > > > > > + struct drm_i915_private *dev_priv = huc_to_i915(huc);
> > > > > > const char *fw_path = NULL;
> >
> > Similarly arrange to get rid of fw_path here.
>
> Patch 8 in the series addresses that issue as well. Maybe I should move
> them around?
Nah, it's fine, the intermediary steps need to be working (for
bisecting), but not necessarily 100% pretty. If it's addressed later,
it's good.
> > > @@ -30,6 +30,12 @@ void intel_uc_init_early(struct drm_i915_private *dev_priv)
> > > mutex_init(&dev_priv->guc.send_mutex);
> > > }
> > >
> > > +void intel_uc_fetch_fw(struct drm_i915_private *dev_priv)
> >
> > This function might be worth calling intel_uc_init (See above), if the
> > need comes to add other stuff. But either way.
>
> This is quite confusing now. I was fine it being named init, someone
> suggested to be more descriptive with the name, as it is not general
> enough to be "init". Seemed reasonable enough for me, so I incorporated
> that in the respin.
>
> This is turning into some heavy bikeshedding now...
That's why actual code in the mailing list is the only right way,
discussion in IRC can be misleading :)
>
> I agree that it's more than fetch, it actually selects + fetches +
> populates the structures.
>
> I'll gladly ignore previous feedback on being to vague with name and
> just go with init, but let give the _fw postfix one last chance:
>
>
> intel_guc_init_fw {
> intel_guc_select_fw
> if (NULL != guc.fw.path)
if (guc.fw.patch) to stick to coding style.
> intel_uc_prepare_fw
> }
>
> Where select does what the guc's fetch fw does sans the uc_fetch call.
Sounds good to me.
> Also intel_{g,h}uc_select_fw can be made part of the sanitize options,
> but I think it better belongs here.
>
> That's is basing on your suggestions for the other patch.
Thats, correct, select_fw should be here.
if (!HAS_GUC(dev_priv)) {
i915.enable_guc_loading = 0;
i915.enable_guc_submission = 0;
} else {
/* A negative value means "use platform default" */
if (i915.enable_guc_loading < 0)
i915.enable_guc_loading = HAS_GUC_UCODE(dev_priv);
if (i915.enable_guc_submission < 0)
i915.enable_guc_submission = HAS_GUC_SCHED(dev_priv);
}
This part is a perfect fit to the sanitize_options function, because
that's what it does, makes sure we don't try to enable something we
don't have.
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-23 7:45 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-22 12:41 [PATCH v4 0/8] GuC Scrub vol. 1 Arkadiusz Hiler
2017-02-22 12:41 ` [PATCH 1/8] drm/i915/uc: Rename intel_?uc_{setup, load}() to _init_hw() Arkadiusz Hiler
2017-02-22 12:41 ` [PATCH 2/8] drm/i915/uc: Drop superfluous externs in intel_uc.h Arkadiusz Hiler
2017-02-23 8:38 ` Joonas Lahtinen
2017-02-22 12:41 ` [PATCH 3/8] drm/i915/huc: Add huc_to_i915 Arkadiusz Hiler
2017-02-22 12:41 ` [PATCH 4/8] drm/i915/uc: Rename intel_?uc_init() to intel_?uc_fetch_fw() Arkadiusz Hiler
2017-02-22 13:59 ` Joonas Lahtinen
2017-02-22 15:29 ` Arkadiusz Hiler
2017-02-23 7:45 ` Joonas Lahtinen [this message]
2017-02-22 12:41 ` [PATCH 5/8] drm/i915/uc: Make intel_uc_fw_fetch() static Arkadiusz Hiler
2017-02-22 14:17 ` Joonas Lahtinen
2017-02-22 15:04 ` Arkadiusz Hiler
2017-02-22 12:41 ` [PATCH 6/8] drm/i915/guc: Extract param logic form guc_init Arkadiusz Hiler
2017-02-23 8:37 ` Joonas Lahtinen
2017-02-22 12:41 ` [PATCH 7/8] drm/i915/guc: Simplify intel_guc_init_hw() Arkadiusz Hiler
2017-02-23 8:32 ` Joonas Lahtinen
2017-02-22 12:41 ` [PATCH 8/8] drm/i915/uc: Simplify firmware path handling Arkadiusz Hiler
2017-02-22 12:53 ` Chris Wilson
2017-02-22 15:30 ` Arkadiusz Hiler
2017-02-22 15:52 ` Arkadiusz Hiler
2017-02-23 7:58 ` Joonas Lahtinen
2017-02-23 8:09 ` Joonas Lahtinen
2017-02-22 16:22 ` ✓ Fi.CI.BAT: success for GuC Scrub vol. 1 (rev4) Patchwork
-- strict thread matches above, loose matches on Subject: below --
2017-02-17 13:05 [PATCH v3 0/8] GuC Scrub vol. 1 Arkadiusz Hiler
2017-02-17 13:05 ` [PATCH 4/8] drm/i915/uc: Rename intel_?uc_init() to intel_?uc_fetch_fw() Arkadiusz Hiler
2017-02-17 13:31 ` Michal Wajdeczko
2017-02-21 11:37 ` Arkadiusz Hiler
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=1487835914.3052.11.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=arkadiusz.hiler@intel.com \
--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.