[Intel-gfx] [PATCH 01/26] drm/i915: move NEEDS_FORCE_WAKE to i915_drv.c
Ben Widawsky
ben at bwidawsk.net
Thu Mar 22 23:20:51 CET 2012
On Thu, Mar 22, 2012 at 02:38:43PM -0700, Jesse Barnes wrote:
> It's only used by the main read/write functions, so we can keep it with
> them.
>
> Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
> ---
> drivers/gpu/drm/i915/i915_drv.c | 6 ++++++
> drivers/gpu/drm/i915/i915_drv.h | 6 ------
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 0694e17..06533cb 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -979,6 +979,12 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
> MODULE_DESCRIPTION(DRIVER_DESC);
> MODULE_LICENSE("GPL and additional rights");
>
> +/* We give fast paths for the really cool registers */
> +#define NEEDS_FORCE_WAKE(dev_priv, reg) \
> + (((dev_priv)->info->gen >= 6) && \
> + ((reg) < 0x40000) && \
> + ((reg) != FORCEWAKE))
> +
> #define __i915_read(x, y) \
> u##x i915_read##x(struct drm_i915_private *dev_priv, u32 reg) { \
> u##x val = 0; \
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index c0f19f5..83ace70 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1429,12 +1429,6 @@ void gen6_gt_force_wake_get(struct drm_i915_private *dev_priv);
> void gen6_gt_force_wake_put(struct drm_i915_private *dev_priv);
> int __gen6_gt_wait_for_fifo(struct drm_i915_private *dev_priv);
>
> -/* We give fast paths for the really cool registers */
> -#define NEEDS_FORCE_WAKE(dev_priv, reg) \
> - (((dev_priv)->info->gen >= 6) && \
> - ((reg) < 0x40000) && \
> - ((reg) != FORCEWAKE))
> -
> #define __i915_read(x, y) \
> u##x i915_read##x(struct drm_i915_private *dev_priv, u32 reg);
>
> --
Any reason why you changed tabs to spaces on the macro? Also, you may as
well line the macro up a bit better if you end up redoing the patch. The
earlier macro had more stuff which could fit within 80 characters, but
now it should fit.
either way,
Acked-by: Ben Widawsky <ben at bwidawsk.net>
More information about the Intel-gfx
mailing list