Re: [Intel-gfx] [PATCH 1/8] drm/i915/skl: Added new macros

2015-03-05 Thread Chris Wilson
On Thu, Mar 05, 2015 at 02:12:07PM +0530, Akash Goel wrote:
 On Thu, 2015-02-26 at 12:50 +, Chris Wilson wrote:
  On Thu, Feb 26, 2015 at 06:19:37PM +0530, akash.g...@intel.com wrote:
   +#define GT_INTERVAL_FROM_US(us) (IS_GEN9(dev_priv-dev) ? \
   + INTERVAL_1_33_US(us) : \
   + INTERVAL_1_28_US(us))
  
  Just use IS_GEN9(dev_priv)
 Fine, will use 'dev_priv', actually missed the definition of '__I915__'
 macro.
 Is implicit use of 'dev_priv' fine ?. Actually saw several such
 instances in i915_reg.h file, that's why used like this.

I am trying to wean i915 away from using the implicit arg as it is
making our code larger by the extra pointer dancing it forces upon us.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 1/8] drm/i915/skl: Added new macros

2015-03-05 Thread Akash Goel
On Thu, 2015-02-26 at 12:50 +, Chris Wilson wrote:
 On Thu, Feb 26, 2015 at 06:19:37PM +0530, akash.g...@intel.com wrote:
  +#define GT_INTERVAL_FROM_US(us) (IS_GEN9(dev_priv-dev) ? \
  +   INTERVAL_1_33_US(us) : \
  +   INTERVAL_1_28_US(us))
 
 Just use IS_GEN9(dev_priv)
Fine, will use 'dev_priv', actually missed the definition of '__I915__'
macro.
Is implicit use of 'dev_priv' fine ?. Actually saw several such
instances in i915_reg.h file, that's why used like this.

Best regards
Akash
 -Chris
 


___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 1/8] drm/i915/skl: Added new macros

2015-02-26 Thread Chris Wilson
On Thu, Feb 26, 2015 at 06:19:37PM +0530, akash.g...@intel.com wrote:
 +#define GT_INTERVAL_FROM_US(us) (IS_GEN9(dev_priv-dev) ? \
 + INTERVAL_1_33_US(us) : \
 + INTERVAL_1_28_US(us))

Just use IS_GEN9(dev_priv)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 1/8] drm/i915/skl: Added new macros

2015-02-26 Thread Chris Wilson
On Thu, Feb 26, 2015 at 12:50:16PM +, Chris Wilson wrote:
 On Thu, Feb 26, 2015 at 06:19:37PM +0530, akash.g...@intel.com wrote:
  +#define GT_INTERVAL_FROM_US(us) (IS_GEN9(dev_priv-dev) ? \
  +   INTERVAL_1_33_US(us) : \
  +   INTERVAL_1_28_US(us))
 
 Just use IS_GEN9(dev_priv)

Oh, and implicit paraemters to a macro are evil.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx