public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Ben Widawsky <benjamin.widawsky@intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Intel GFX <intel-gfx@lists.freedesktop.org>,
	Ben Widawsky <ben@bwidawsk.net>
Subject: Re: [PATCH 3/5] drm/i915: Create a USES_PPGTT macro
Date: Sat, 25 Jan 2014 21:45:27 -0800	[thread overview]
Message-ID: <20140126054527.GB1597@intel.com> (raw)
In-Reply-To: <20140125204122.GO9772@phenom.ffwll.local>

On Sat, Jan 25, 2014 at 09:41:22PM +0100, Daniel Vetter wrote:
> On Fri, Jan 24, 2014 at 06:17:43PM -0800, Ben Widawsky wrote:
> > There are cases where we want to know if there is a full, or aliased
> > ppgtt. Having to always to the || is annoying. This shorthand will keep
> > the code a bit cleaner/easier to read.
> > 
> > Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.h | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > index e851a82..6f68515 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -1844,6 +1844,7 @@ struct drm_i915_file_private {
> >  #define HAS_PPGTT(dev)		(INTEL_INFO(dev)->gen >= 7 && !IS_VALLEYVIEW(dev) && !IS_BROADWELL(dev))
> >  #define USES_ALIASING_PPGTT(dev) intel_enable_ppgtt(dev, false)
> >  #define USES_FULL_PPGTT(dev)	intel_enable_ppgtt(dev, true)
> > +#define USES_PPGTT(dev)		(USES_ALIASING_PPGTT(dev) || USES_FULL_PPGTT(dev))
> 
> Just do an s/ALIASING/HW/ and we get to the same point with overall
> clearer code.
> -Daniel

I had plans to make USES_ALIASING actually mean it's using aliasing, and
NOT full PPGTT. However, at this point, they are indeed logically
equivalent. Let me go over the code again and see if we actually want an
USES_ALIASING_PPGTT(), and if not, I'll do it your way. First, let's
figure out if the series will get merged at all.

> 
> >  
> >  #define HAS_OVERLAY(dev)		(INTEL_INFO(dev)->has_overlay)
> >  #define OVERLAY_NEEDS_PHYSICAL(dev)	(INTEL_INFO(dev)->overlay_needs_physical)
> > -- 
> > 1.8.5.3
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch

-- 
Ben Widawsky, Intel Open Source Technology Center

  reply	other threads:[~2014-01-26  5:45 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-25  2:17 [PATCH 1/5] drm/i915: Place the Global GTT VM first in the list of VM Ben Widawsky
2014-01-25  2:17 ` [PATCH 2/5] drm/i915: Print captured bo for all VM in error state Ben Widawsky
2014-01-25  2:17 ` [PATCH 3/5] drm/i915: Create a USES_PPGTT macro Ben Widawsky
2014-01-25 20:41   ` Daniel Vetter
2014-01-26  5:45     ` Ben Widawsky [this message]
2014-01-26  9:24       ` Daniel Vetter
2014-01-25  2:17 ` [PATCH 4/5] drm/i915: Capture PPGTT info on error capture Ben Widawsky
2014-01-26 11:42   ` Chris Wilson
2014-01-26 19:06     ` Ben Widawsky
2014-01-26 19:51       ` Chris Wilson
2014-01-25  2:17 ` [PATCH 5/5] drm/i915: Fix error capture on BYT/BDW Ben Widawsky
2014-01-26 11:47   ` Chris Wilson
2014-01-26 19:05     ` Ben Widawsky
2014-01-26 19:55       ` Chris Wilson
2014-01-26 21:47         ` Ben Widawsky
2014-01-27 13:45           ` Chris Wilson
2014-01-27 18:24             ` Ben Widawsky
2014-01-27 20:31             ` Ben Widawsky
2014-01-27 21:31               ` Chris Wilson
2014-01-27 21:54                 ` Ben Widawsky
2014-01-25  8:32 ` [PATCH 1/5] drm/i915: Place the Global GTT VM first in the list of VM Kenneth Graunke
2014-01-25 20:48   ` Daniel Vetter
2014-01-25 21:31     ` Kenneth Graunke
2014-01-26  5:09       ` Ben Widawsky
2014-01-26  9:26         ` Daniel Vetter
2014-01-26 11:10           ` Daniel Vetter

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=20140126054527.GB1597@intel.com \
    --to=benjamin.widawsky@intel.com \
    --cc=ben@bwidawsk.net \
    --cc=daniel@ffwll.ch \
    --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