mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
drm/i915: Don't use enums for hardware engine id
Generally we are using macros for any hardware identifiers as these may change between Gens. Do the same with hardware engine ids. v2: move hw engine defs to i915_reg.h (Chris) Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Link: http://patchwork.freedesktop.org/patch/msgid/20170301202615.118632-1-michal.wajdeczko@intel.com Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
61d3dc7080
commit
237ae7c79e
3 changed files with 24 additions and 18 deletions
|
@ -77,7 +77,13 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)
|
||||||
#define _MASKED_BIT_ENABLE(a) ({ typeof(a) _a = (a); _MASKED_FIELD(_a, _a); })
|
#define _MASKED_BIT_ENABLE(a) ({ typeof(a) _a = (a); _MASKED_FIELD(_a, _a); })
|
||||||
#define _MASKED_BIT_DISABLE(a) (_MASKED_FIELD((a), 0))
|
#define _MASKED_BIT_DISABLE(a) (_MASKED_FIELD((a), 0))
|
||||||
|
|
||||||
|
/* Engine ID */
|
||||||
|
|
||||||
|
#define RCS_HW 0
|
||||||
|
#define VCS_HW 1
|
||||||
|
#define BCS_HW 2
|
||||||
|
#define VECS_HW 3
|
||||||
|
#define VCS2_HW 4
|
||||||
|
|
||||||
/* PCI config space */
|
/* PCI config space */
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
|
|
||||||
static const struct engine_info {
|
static const struct engine_info {
|
||||||
const char *name;
|
const char *name;
|
||||||
unsigned exec_id;
|
unsigned int exec_id;
|
||||||
enum intel_engine_hw_id hw_id;
|
unsigned int hw_id;
|
||||||
u32 mmio_base;
|
u32 mmio_base;
|
||||||
unsigned irq_shift;
|
unsigned irq_shift;
|
||||||
int (*init_legacy)(struct intel_engine_cs *engine);
|
int (*init_legacy)(struct intel_engine_cs *engine);
|
||||||
|
|
|
@ -186,26 +186,26 @@ struct i915_ctx_workarounds {
|
||||||
struct drm_i915_gem_request;
|
struct drm_i915_gem_request;
|
||||||
struct intel_render_state;
|
struct intel_render_state;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Engine IDs definitions.
|
||||||
|
* Keep instances of the same type engine together.
|
||||||
|
*/
|
||||||
|
enum intel_engine_id {
|
||||||
|
RCS = 0,
|
||||||
|
BCS,
|
||||||
|
VCS,
|
||||||
|
VCS2,
|
||||||
|
#define _VCS(n) (VCS + (n))
|
||||||
|
VECS
|
||||||
|
};
|
||||||
|
|
||||||
struct intel_engine_cs {
|
struct intel_engine_cs {
|
||||||
struct drm_i915_private *i915;
|
struct drm_i915_private *i915;
|
||||||
const char *name;
|
const char *name;
|
||||||
enum intel_engine_id {
|
enum intel_engine_id id;
|
||||||
RCS = 0,
|
|
||||||
BCS,
|
|
||||||
VCS,
|
|
||||||
VCS2, /* Keep instances of the same type engine together. */
|
|
||||||
VECS
|
|
||||||
} id;
|
|
||||||
#define _VCS(n) (VCS + (n))
|
|
||||||
unsigned int exec_id;
|
unsigned int exec_id;
|
||||||
enum intel_engine_hw_id {
|
unsigned int hw_id;
|
||||||
RCS_HW = 0,
|
unsigned int guc_id;
|
||||||
VCS_HW,
|
|
||||||
BCS_HW,
|
|
||||||
VECS_HW,
|
|
||||||
VCS2_HW
|
|
||||||
} hw_id;
|
|
||||||
enum intel_engine_hw_id guc_id; /* XXX same as hw_id? */
|
|
||||||
u32 mmio_base;
|
u32 mmio_base;
|
||||||
unsigned int irq_shift;
|
unsigned int irq_shift;
|
||||||
struct intel_ring *buffer;
|
struct intel_ring *buffer;
|
||||||
|
|
Loading…
Reference in a new issue