aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2013-10-15 13:02:57 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-10-16 05:08:39 -0400
commit73ae478cdf6ab886b107f39269cbbf6d33ad2abe (patch)
tree71bbb196608fa076b6738b089e6b095a0dd0f05e /drivers/gpu/drm/i915/i915_drv.h
parent71b76d004f48b4b217a3895bfe058e2e5eefed39 (diff)
drm/i915: Replace has_bsd/blt/vebox with a mask
I've sent this patch several times for various reasons. It essentially cleans up a lot of code where we need to do something per ring, and want to query whether or not the ring exists on that hardware. It has various uses coming up, but for now it shouldn't be too offensive. v2: Big conflict resolution on Damien's DEV_INFO_FOR_EACH stuff v3: Resolved vebox addition v4: Rebased after months of disuse. Also made failed ringbuffer init cleaner. v5: Remove the init cleaner from v4. There is a better way to do it. (Chris) Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 6106d3d710c5..3d374aa1a2b0 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -448,9 +448,6 @@ struct intel_uncore {
448 func(has_overlay) sep \ 448 func(has_overlay) sep \
449 func(overlay_needs_physical) sep \ 449 func(overlay_needs_physical) sep \
450 func(supports_tv) sep \ 450 func(supports_tv) sep \
451 func(has_bsd_ring) sep \
452 func(has_blt_ring) sep \
453 func(has_vebox_ring) sep \
454 func(has_llc) sep \ 451 func(has_llc) sep \
455 func(has_ddi) sep \ 452 func(has_ddi) sep \
456 func(has_fpga_dbg) 453 func(has_fpga_dbg)
@@ -462,6 +459,7 @@ struct intel_device_info {
462 u32 display_mmio_offset; 459 u32 display_mmio_offset;
463 u8 num_pipes:3; 460 u8 num_pipes:3;
464 u8 gen; 461 u8 gen;
462 u8 ring_mask; /* Rings supported by the HW */
465 DEV_INFO_FOR_EACH_FLAG(DEFINE_FLAG, SEP_SEMICOLON); 463 DEV_INFO_FOR_EACH_FLAG(DEFINE_FLAG, SEP_SEMICOLON);
466}; 464};
467 465
@@ -1691,9 +1689,13 @@ struct drm_i915_file_private {
1691#define IS_GEN6(dev) (INTEL_INFO(dev)->gen == 6) 1689#define IS_GEN6(dev) (INTEL_INFO(dev)->gen == 6)
1692#define IS_GEN7(dev) (INTEL_INFO(dev)->gen == 7) 1690#define IS_GEN7(dev) (INTEL_INFO(dev)->gen == 7)
1693 1691
1694#define HAS_BSD(dev) (INTEL_INFO(dev)->has_bsd_ring) 1692#define RENDER_RING (1<<RCS)
1695#define HAS_BLT(dev) (INTEL_INFO(dev)->has_blt_ring) 1693#define BSD_RING (1<<VCS)
1696#define HAS_VEBOX(dev) (INTEL_INFO(dev)->has_vebox_ring) 1694#define BLT_RING (1<<BCS)
1695#define VEBOX_RING (1<<VECS)
1696#define HAS_BSD(dev) (INTEL_INFO(dev)->ring_mask & BSD_RING)
1697#define HAS_BLT(dev) (INTEL_INFO(dev)->ring_mask & BLT_RING)
1698#define HAS_VEBOX(dev) (INTEL_INFO(dev)->ring_mask & VEBOX_RING)
1697#define HAS_LLC(dev) (INTEL_INFO(dev)->has_llc) 1699#define HAS_LLC(dev) (INTEL_INFO(dev)->has_llc)
1698#define HAS_WT(dev) (IS_HASWELL(dev) && to_i915(dev)->ellc_size) 1700#define HAS_WT(dev) (IS_HASWELL(dev) && to_i915(dev)->ellc_size)
1699#define I915_NEED_GFX_HWS(dev) (INTEL_INFO(dev)->need_gfx_hws) 1701#define I915_NEED_GFX_HWS(dev) (INTEL_INFO(dev)->need_gfx_hws)