All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 2/6] drm/i915/uc: Move uC fw helper code into dedicated files
Date: Tue, 03 Oct 2017 10:48:39 +0300	[thread overview]
Message-ID: <1507016919.4728.12.camel@linux.intel.com> (raw)
In-Reply-To: <20171002140109.52844-3-michal.wajdeczko@intel.com>

On Mon, 2017-10-02 at 14:01 +0000, Michal Wajdeczko wrote:
> This is a prerequisite to unblock next steps.

This is not a very good commit message when somebody is looking at this
patch individually. Something along lines "To improve code separation,
move uC firmware helper code into dedicated files."

> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
> Reviewed-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>

<SNIP>

>  void intel_uc_init_fw(struct drm_i915_private *dev_priv)
>  {
> -	fetch_uc_fw(dev_priv, &dev_priv->huc.fw);
> -	fetch_uc_fw(dev_priv, &dev_priv->guc.fw);
> +	i915_fetch_uc_fw(dev_priv, &dev_priv->huc.fw);
> +	i915_fetch_uc_fw(dev_priv, &dev_priv->guc.fw);
>  }

The microcontroller firmware most definitely is not a driver only
construct, so just call the function intel_uc_fw_init for less
confusion. We also validate and place in GTT the FW in addition to
fetching it.

>  void intel_uc_fini_fw(struct drm_i915_private *dev_priv)
>  {
> -	__intel_uc_fw_fini(&dev_priv->guc.fw);
> -	__intel_uc_fw_fini(&dev_priv->huc.fw);
> +	intel_uc_fw_fini(&dev_priv->guc.fw);
> +	intel_uc_fw_fini(&dev_priv->huc.fw);
>  }

And then this looks more symmetric, too.

When we have 'intel_uc_fw.h' for 'intel_uc_fw' object, I pretty much
assume to only see intel_uc_fw_* functions in there. Also, please
reoder the .h and .c so that init is first, and fini is after.

With those changes, this is;

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

  reply	other threads:[~2017-10-03  7:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-02 14:01 [PATCH v2 0/6] drm/i915: Guc code reorg Michal Wajdeczko
2017-10-02 14:01 ` [PATCH v2 1/6] drm/i915/uc: Drop unnecessary forward declaration Michal Wajdeczko
2017-10-02 14:01 ` [PATCH v2 2/6] drm/i915/uc: Move uC fw helper code into dedicated files Michal Wajdeczko
2017-10-03  7:48   ` Joonas Lahtinen [this message]
2017-10-02 14:01 ` [PATCH v2 3/6] drm/i915/uc: Create intel_uc_init_mmio Michal Wajdeczko
2017-10-03  5:58   ` Sagar Arun Kamble
2017-10-03  8:05     ` Joonas Lahtinen
2017-10-03  7:57   ` Joonas Lahtinen
2017-10-02 14:01 ` [PATCH v2 4/6] drm/i915/huc: Move HuC declarations into dedicated header Michal Wajdeczko
2017-10-03  8:10   ` Joonas Lahtinen
2017-10-02 14:01 ` [PATCH v2 5/6] drm/i915/guc: Move Guc early init into own function Michal Wajdeczko
2017-10-03  6:26   ` Sagar Arun Kamble
2017-10-02 14:01 ` [PATCH v2 6/6] drm/i915/guc: Move GuC declarations and functions into dedicated files Michal Wajdeczko
2017-10-03  6:35   ` Sagar Arun Kamble
2017-10-03  8:29   ` Joonas Lahtinen
2017-10-02 14:39 ` ✗ Fi.CI.BAT: failure for drm/i915: Guc code reorg Patchwork

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