From: Daniel Vetter Subject: Re: [PATCH 3/5] drm/i915: Create a USES_PPGTT macro Date: Sat, 25 Jan 2014 21:41:22 +0100 Message-ID: <20140125204122.GO9772@phenom.ffwll.local> References: <1390616265-4329-1-git-send-email-benjamin.widawsky@intel.com> <1390616265-4329-3-git-send-email-benjamin.widawsky@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f44.google.com (mail-ee0-f44.google.com [74.125.83.44]) by gabe.freedesktop.org (Postfix) with ESMTP id 5877BFA918 for ; Sat, 25 Jan 2014 12:41:27 -0800 (PST) Received: by mail-ee0-f44.google.com with SMTP id c13so1561726eek.3 for ; Sat, 25 Jan 2014 12:41:26 -0800 (PST) Content-Disposition: inline In-Reply-To: <1390616265-4329-3-git-send-email-benjamin.widawsky@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Ben Widawsky Cc: Intel GFX , Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org 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 > --- > 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 > > #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