public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Dave Gordon <david.s.gordon@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v4 2/7] drm/i915/guc: distinguish HAS_GUC() from HAS_GUC_UCODE/HAS_GUC_SCHED
Date: Fri, 13 May 2016 16:34:13 +0100	[thread overview]
Message-ID: <5735F3F5.1090104@linux.intel.com> (raw)
In-Reply-To: <1463150195-28805-3-git-send-email-david.s.gordon@intel.com>


On 13/05/16 15:36, Dave Gordon wrote:
> For now, anything with a GuC requires uCode loading, and then supports
> command submission once loaded. But these are logically distinct from
> simply "having a GuC", so we need a separate macro for the latter. Then,
> various tests should use this new macro rather than HAS_GUC_UCODE() or
> testing enable_guc_submission.
>
> v4:
>      Added a couple more uses of the new macro.
>
> Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
> ---
>   drivers/gpu/drm/i915/i915_drv.h     | 10 ++++++++--
>   drivers/gpu/drm/i915/i915_gem.c     |  2 +-
>   drivers/gpu/drm/i915/intel_pm.c     |  2 +-
>   drivers/gpu/drm/i915/intel_uncore.c |  2 +-
>   4 files changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index d9d07b7..3b9ee51 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -2726,8 +2726,14 @@ struct drm_i915_cmd_table {
>
>   #define HAS_CSR(dev)	(IS_GEN9(dev))
>
> -#define HAS_GUC_UCODE(dev)	(IS_GEN9(dev) && !IS_KABYLAKE(dev))
> -#define HAS_GUC_SCHED(dev)	(IS_GEN9(dev) && !IS_KABYLAKE(dev))
> +/*
> + * For now, anything with a GuC requires uCode loading, and then supports
> + * command submission once loaded. But these are logically independent
> + * properties, so we have separate macros to test them.
> + */
> +#define HAS_GUC(dev)		(IS_GEN9(dev) && !IS_KABYLAKE(dev))
> +#define HAS_GUC_UCODE(dev)	(HAS_GUC(dev))
> +#define HAS_GUC_SCHED(dev)	(HAS_GUC(dev))
>
>   #define HAS_RESOURCE_STREAMER(dev) (IS_HASWELL(dev) || \
>   				    INTEL_INFO(dev)->gen >= 8)
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 43e45b7..2a7be71 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4866,7 +4866,7 @@ int i915_gem_init_engines(struct drm_device *dev)
>   	intel_mocs_init_l3cc_table(dev);
>
>   	/* We can't enable contexts until all firmware is loaded */
> -	if (HAS_GUC_UCODE(dev)) {
> +	if (HAS_GUC(dev)) {
>   		ret = intel_guc_setup(dev);
>   		if (ret) {
>   			DRM_ERROR("Failed to initialize GuC, error %d\n", ret);
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 1bb0f9a..c584282 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -4844,7 +4844,7 @@ static void gen9_enable_rc6(struct drm_i915_private *dev_priv)
>   	for_each_engine(engine, dev_priv)
>   		I915_WRITE(RING_MAX_IDLE(engine->mmio_base), 10);
>
> -	if (HAS_GUC_UCODE(dev_priv))
> +	if (HAS_GUC(dev_priv))
>   		I915_WRITE(GUC_MAX_IDLE_COUNT, 0xA);
>
>   	I915_WRITE(GEN6_RC_SLEEP, 0);
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index 385114b..c1ca458 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -1715,7 +1715,7 @@ int intel_guc_reset(struct drm_i915_private *dev_priv)
>   	int ret;
>   	unsigned long irqflags;
>
> -	if (!i915.enable_guc_submission)
> +	if (!HAS_GUC(dev_priv))
>   		return -EINVAL;
>
>   	intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL);
>

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

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

  reply	other threads:[~2016-05-13 15:34 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-13 14:36 [PATCH v4 0/7] Enable GuC submission Dave Gordon
2016-05-13 14:36 ` [PATCH v4 1/7] drm/i915/guc: rename loader entry points Dave Gordon
2016-05-13 15:11   ` Tvrtko Ursulin
2016-05-13 14:36 ` [PATCH v4 2/7] drm/i915/guc: distinguish HAS_GUC() from HAS_GUC_UCODE/HAS_GUC_SCHED Dave Gordon
2016-05-13 15:34   ` Tvrtko Ursulin [this message]
2016-05-13 14:36 ` [PATCH v4 3/7] drm/i915/guc: add enable_guc_loading parameter Dave Gordon
2016-05-13 15:31   ` Tvrtko Ursulin
2016-05-16 19:07     ` Dave Gordon
2016-05-16 19:12     ` [PATCH v5 " Dave Gordon
2016-05-17  9:08       ` Tvrtko Ursulin
2016-05-20 11:40         ` Fiedorowicz, Lukasz
2016-05-20 10:42       ` [PATCH v6 " Tvrtko Ursulin
2016-05-20 14:04         ` Fiedorowicz, Lukasz
2016-05-23 13:17         ` Nick Hoath
2016-05-13 14:36 ` [PATCH v4 4/7] drm/i915/guc: pass request (not client) to i915_guc_{wq_check_space, submit}() Dave Gordon
2016-05-13 14:36 ` [PATCH v4 5/7] drm/i915/guc: don't spinwait if the GuC's workqueue is full Dave Gordon
2016-05-13 15:32   ` Tvrtko Ursulin
2016-05-13 14:36 ` [PATCH v4 6/7] drm/i915/guc: rework guc_add_workqueue_item() Dave Gordon
2016-05-13 14:36 ` [PATCH v4 7/7] drm/i915/guc: change default to using GuC submission if possible Dave Gordon
2016-05-14  8:32   ` Chris Wilson
2016-05-13 16:34 ` ✗ Ro.CI.BAT: failure for Enable GuC submission Patchwork
2016-05-17  5:24 ` ✗ Ro.CI.BAT: failure for Enable GuC submission (rev2) Patchwork
2016-05-20 11:15 ` ✗ Ro.CI.BAT: failure for Enable GuC submission (rev3) Patchwork
2016-05-23 13:24   ` Tvrtko Ursulin

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=5735F3F5.1090104@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=david.s.gordon@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox