[Intel-gfx] [PATCH 02/10] drm/i915: ring w/a gen 9 revision definitions
Damien Lespiau
damien.lespiau at intel.com
Thu Feb 5 09:46:01 PST 2015
On Thu, Feb 05, 2015 at 10:47:17AM +0000, Nick Hoath wrote:
> From: "Hoath, Nicholas" <nicholas.hoath at intel.com>
>
> Add Skylake stepping Revision IDs definitions.
>
> v1: Use existing revision id.
>
> Signed-off-by: Nick Hoath <nicholas.hoath at intel.com>
Namespacing is usually NAMESPACE_VALUE, so I guess it'd be SKL_REVID_A0,
but meh.
Also:
#define INTEL_INFO(p) (&__I915__(p)->info)
#define INTEL_DEVID(p) (INTEL_INFO(p)->device_id)
#define INTEL_REVID(p) (p->pdev->revision)
We use 'p' as it can either be a struct drm_device pointer or a struct
drm_i915_private pointer thanks to the magic __I915__ macro. Your define
doesn't support that and so having a 'p' argument is misleading. So I'd
either make the INTEL_REVID() magic as well or use 'dev' as argument.
I'd be happy to go ahead though, so we can make some progress. Others
may be of a different opinion :)
Reviewed-by: Damien Lespiau <damien.lespiau at intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index ca64b99..39e8b07 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -2339,6 +2339,7 @@ struct drm_i915_cmd_table {
> })
> #define INTEL_INFO(p) (&__I915__(p)->info)
> #define INTEL_DEVID(p) (INTEL_INFO(p)->device_id)
> +#define INTEL_REVID(p) (p->pdev->revision)
>
> #define IS_I830(dev) (INTEL_DEVID(dev) == 0x3577)
> #define IS_845G(dev) (INTEL_DEVID(dev) == 0x2562)
> @@ -2386,6 +2387,11 @@ struct drm_i915_cmd_table {
> INTEL_DEVID(dev) == 0x0A1E)
> #define IS_PRELIMINARY_HW(intel_info) ((intel_info)->is_preliminary)
>
> +#define SKL_A0_REVID (0x0)
> +#define SKL_B0_REVID (0x1)
> +#define SKL_C0_REVID (0x2)
> +#define SKL_D0_REVID (0x3)
> +
> /*
> * The genX designation typically refers to the render engine, so render
> * capability related checks should use IS_GEN, while display and other checks
> --
> 2.1.1
>
More information about the Intel-gfx
mailing list