* [PATCH] drm/i915: Convert a couple more INTEL_INFO-esque macros to be pointer agnostic
@ 2014-08-24 18:35 Chris Wilson
2014-10-10 15:08 ` Jani Nikula
0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2014-08-24 18:35 UTC (permalink / raw)
To: intel-gfx
Just a couple more macros that assume that they were being passed a
struct drm_device when they want a struct drm_i915_private. Use our
magic macro to ease transitioning over to using drm_i915_privates
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_drv.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 5cadfa511d81..d1678e2747b3 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2046,7 +2046,7 @@ struct drm_i915_cmd_table {
#define HAS_VEBOX(dev) (INTEL_INFO(dev)->ring_mask & VEBOX_RING)
#define HAS_LLC(dev) (INTEL_INFO(dev)->has_llc)
#define HAS_WT(dev) ((IS_HASWELL(dev) || IS_BROADWELL(dev)) && \
- to_i915(dev)->ellc_size)
+ __I915__(dev)->ellc_size)
#define I915_NEED_GFX_HWS(dev) (INTEL_INFO(dev)->need_gfx_hws)
#define HAS_HW_CONTEXTS(dev) (INTEL_INFO(dev)->gen >= 5)
@@ -2100,7 +2100,7 @@ struct drm_i915_cmd_table {
#define INTEL_PCH_LPT_DEVICE_ID_TYPE 0x8c00
#define INTEL_PCH_LPT_LP_DEVICE_ID_TYPE 0x9c00
-#define INTEL_PCH_TYPE(dev) (to_i915(dev)->pch_type)
+#define INTEL_PCH_TYPE(dev) (__I915__(dev)->pch_type)
#define HAS_PCH_LPT(dev) (INTEL_PCH_TYPE(dev) == PCH_LPT)
#define HAS_PCH_CPT(dev) (INTEL_PCH_TYPE(dev) == PCH_CPT)
#define HAS_PCH_IBX(dev) (INTEL_PCH_TYPE(dev) == PCH_IBX)
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Convert a couple more INTEL_INFO-esque macros to be pointer agnostic
2014-08-24 18:35 [PATCH] drm/i915: Convert a couple more INTEL_INFO-esque macros to be pointer agnostic Chris Wilson
@ 2014-10-10 15:08 ` Jani Nikula
2014-10-19 12:14 ` Daniel Vetter
0 siblings, 1 reply; 3+ messages in thread
From: Jani Nikula @ 2014-10-10 15:08 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On Sun, 24 Aug 2014, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Just a couple more macros that assume that they were being passed a
> struct drm_device when they want a struct drm_i915_private. Use our
> magic macro to ease transitioning over to using drm_i915_privates
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 5cadfa511d81..d1678e2747b3 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -2046,7 +2046,7 @@ struct drm_i915_cmd_table {
> #define HAS_VEBOX(dev) (INTEL_INFO(dev)->ring_mask & VEBOX_RING)
> #define HAS_LLC(dev) (INTEL_INFO(dev)->has_llc)
> #define HAS_WT(dev) ((IS_HASWELL(dev) || IS_BROADWELL(dev)) && \
> - to_i915(dev)->ellc_size)
> + __I915__(dev)->ellc_size)
> #define I915_NEED_GFX_HWS(dev) (INTEL_INFO(dev)->need_gfx_hws)
>
> #define HAS_HW_CONTEXTS(dev) (INTEL_INFO(dev)->gen >= 5)
> @@ -2100,7 +2100,7 @@ struct drm_i915_cmd_table {
> #define INTEL_PCH_LPT_DEVICE_ID_TYPE 0x8c00
> #define INTEL_PCH_LPT_LP_DEVICE_ID_TYPE 0x9c00
>
> -#define INTEL_PCH_TYPE(dev) (to_i915(dev)->pch_type)
> +#define INTEL_PCH_TYPE(dev) (__I915__(dev)->pch_type)
> #define HAS_PCH_LPT(dev) (INTEL_PCH_TYPE(dev) == PCH_LPT)
> #define HAS_PCH_CPT(dev) (INTEL_PCH_TYPE(dev) == PCH_CPT)
> #define HAS_PCH_IBX(dev) (INTEL_PCH_TYPE(dev) == PCH_IBX)
> --
> 2.1.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Convert a couple more INTEL_INFO-esque macros to be pointer agnostic
2014-10-10 15:08 ` Jani Nikula
@ 2014-10-19 12:14 ` Daniel Vetter
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2014-10-19 12:14 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
On Fri, Oct 10, 2014 at 06:08:21PM +0300, Jani Nikula wrote:
> On Sun, 24 Aug 2014, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > Just a couple more macros that assume that they were being passed a
> > struct drm_device when they want a struct drm_i915_private. Use our
> > magic macro to ease transitioning over to using drm_i915_privates
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Queued for -next, thanks for the patch.
-Daniel
>
> > ---
> > drivers/gpu/drm/i915/i915_drv.h | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > index 5cadfa511d81..d1678e2747b3 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -2046,7 +2046,7 @@ struct drm_i915_cmd_table {
> > #define HAS_VEBOX(dev) (INTEL_INFO(dev)->ring_mask & VEBOX_RING)
> > #define HAS_LLC(dev) (INTEL_INFO(dev)->has_llc)
> > #define HAS_WT(dev) ((IS_HASWELL(dev) || IS_BROADWELL(dev)) && \
> > - to_i915(dev)->ellc_size)
> > + __I915__(dev)->ellc_size)
> > #define I915_NEED_GFX_HWS(dev) (INTEL_INFO(dev)->need_gfx_hws)
> >
> > #define HAS_HW_CONTEXTS(dev) (INTEL_INFO(dev)->gen >= 5)
> > @@ -2100,7 +2100,7 @@ struct drm_i915_cmd_table {
> > #define INTEL_PCH_LPT_DEVICE_ID_TYPE 0x8c00
> > #define INTEL_PCH_LPT_LP_DEVICE_ID_TYPE 0x9c00
> >
> > -#define INTEL_PCH_TYPE(dev) (to_i915(dev)->pch_type)
> > +#define INTEL_PCH_TYPE(dev) (__I915__(dev)->pch_type)
> > #define HAS_PCH_LPT(dev) (INTEL_PCH_TYPE(dev) == PCH_LPT)
> > #define HAS_PCH_CPT(dev) (INTEL_PCH_TYPE(dev) == PCH_CPT)
> > #define HAS_PCH_IBX(dev) (INTEL_PCH_TYPE(dev) == PCH_IBX)
> > --
> > 2.1.0
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Jani Nikula, Intel Open Source Technology Center
> _______________________________________________
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-10-19 12:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-24 18:35 [PATCH] drm/i915: Convert a couple more INTEL_INFO-esque macros to be pointer agnostic Chris Wilson
2014-10-10 15:08 ` Jani Nikula
2014-10-19 12:14 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox