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>,
	Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/guc: Assert that we switch between known ggtt->invalidate functions
Date: Thu, 01 Jun 2017 13:24:55 +0300	[thread overview]
Message-ID: <1496312695.3386.3.camel@linux.intel.com> (raw)
In-Reply-To: <20170601100318.GA24112@mwajdecz-MOBL1.ger.corp.intel.com>

On to, 2017-06-01 at 12:03 +0200, Michal Wajdeczko wrote:
> On Thu, Jun 01, 2017 at 10:04:46AM +0100, Chris Wilson wrote:
> >  
> >  void i915_ggtt_disable_guc(struct drm_i915_private *i915)
> >  {
> > -	if (i915->ggtt.invalidate == guc_ggtt_invalidate)
> > -		i915->ggtt.invalidate = gen6_ggtt_invalidate;
> > +	/* We should only be called after i915_ggtt_enable_guc() */
> > +	GEM_BUG_ON(i915->ggtt.invalidate != guc_ggtt_invalidate);
> > +
> > +	i915->ggtt.invalidate = gen6_ggtt_invalidate;
> >  }
> 
> While this looks correct today, it may not work in the future if we
> will need somethig other than gen6_ggtt_invalidate() as base invalidate
> function or guc_gtt_invalidate() as the one for the guc. Just a head up.

Currently the assignment is directly to gen6_ggtt_invalidate, no
questions asked. So I don't think the assert could be much more :)

Maybe GuC code should backup the invalidate function before overriding.

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

  parent reply	other threads:[~2017-06-01 10:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-01  9:04 [PATCH] drm/i915/guc: Assert that we switch between known ggtt->invalidate functions Chris Wilson
2017-06-01  9:36 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-06-01 13:20   ` Chris Wilson
2017-06-01 10:03 ` [PATCH] " Michal Wajdeczko
2017-06-01 10:09   ` Chris Wilson
2017-06-01 10:24   ` Joonas Lahtinen [this message]
2017-06-01 11:11     ` Chris Wilson
2017-06-01 10:44 ` Joonas Lahtinen
2017-06-01 11:01   ` Chris Wilson
2017-06-01 11:41     ` 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=1496312695.3386.3.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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.