public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>,
	Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/5] drm/i915/guc: Extract param logic form guc_init
Date: Wed, 15 Feb 2017 14:48:59 +0200	[thread overview]
Message-ID: <1487162939.8490.24.camel@linux.intel.com> (raw)
In-Reply-To: <20170214193710.GB82076@mwajdecz-MOBL1.ger.corp.intel.com>

On ti, 2017-02-14 at 20:37 +0100, Michal Wajdeczko wrote:
> On Tue, Feb 14, 2017 at 05:15:39PM +0100, Arkadiusz Hiler wrote:
> > 
> > Let intel_guc_init() focus on determining and fetching the correct
> > firmware.
> > 
> > This patch introduces intel_sanitize_uc_params() that is called from
> > intel_uc_init().
> > 
> > Then, if we have GuC, we can call intel_guc_init() conditionally and we
> > do not have to do internal checks.
> > 
> > Cc: Michal Winiarski <michal.winiarski@intel.com>
> > Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> > Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> > Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>

<SNIP>

> > @@ -726,7 +726,7 @@ void intel_uc_fw_fetch(struct drm_i915_private *dev_priv,
> >  }
> >  
> >  /**
> > - * intel_guc_init() - define parameters and fetch firmware
> > + * intel_guc_init() - determine and fetch firmware
> 
> Again, can we have function name that corresponds to its purpose.
> Comment alone is not sufficient

I second Michal here, the naming of the functions is rather poor.
Something like intel_guc_fetch_firmware would be more descriptive.

Making it overly generic when we don't have other use yet, will cause
more churn when we get more use (because fortune telling was never our
thing). I'd rather see rather standalone functions, which are then be
called from central point where more can be added, without changing the
existing ones. So this applies to intel_uc_init, too.

It'll be easier to add these generic functions iff we start repeating
calls to a bunch of functions, and we can then see patterns emerging.

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-02-15 12:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14 16:15 [PATCH v2 0/5] GuC Scrub vol. 1 Arkadiusz Hiler
2017-02-14 16:15 ` [PATCH 1/5] drm/i915/uc: Rename intel_?uc_{setup, load}() to _init_hw() Arkadiusz Hiler
2017-02-14 19:14   ` Michal Wajdeczko
2017-02-14 21:58   ` Chris Wilson
2017-02-15 12:41   ` Joonas Lahtinen
2017-02-14 16:15 ` [PATCH 2/5] drm/i915/uc: Introduce intel_uc_init() Arkadiusz Hiler
2017-02-14 16:15 ` [PATCH 3/5] drm/i915/guc: Extract param logic form guc_init Arkadiusz Hiler
2017-02-14 19:37   ` Michal Wajdeczko
2017-02-15 12:48     ` Joonas Lahtinen [this message]
2017-02-15 15:10       ` Arkadiusz Hiler
2017-02-14 16:15 ` [PATCH 4/5] drm/i915/guc: Simplify intel_guc_init_hw() Arkadiusz Hiler
2017-02-14 20:07   ` Michal Wajdeczko
2017-02-14 16:15 ` [PATCH 5/5] drm/i915/uc: Simplify fw_path Arkadiusz Hiler
2017-02-14 20:23   ` Michal Wajdeczko
2017-02-15 14:12     ` Arkadiusz Hiler
2017-02-14 20:52 ` ✓ Fi.CI.BAT: success for GuC Scrub vol. 1 (rev2) 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=1487162939.8490.24.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=arkadiusz.hiler@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox