summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2014-03-09 21:55:23 +0800
committerChia-I Wu <[email protected]>2014-03-10 16:42:42 +0800
commit0b462d3ab13af9bba9c9b21bf67de6d2b1857786 (patch)
treefcdca028f1308b5ec8418623de1c8e0c3f1e59a1 /src/gallium/drivers
parent42c1ce4c03c0c5f4fb61b981143cf2638d87c834 (diff)
ilo: move ring types to winsys
It results in less code despite that i915_drm.h specifies the ring type as part of the execution flags.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/ilo/ilo_3d.c4
-rw-r--r--src/gallium/drivers/ilo/ilo_blitter_blt.c2
-rw-r--r--src/gallium/drivers/ilo/ilo_common.h2
-rw-r--r--src/gallium/drivers/ilo/ilo_cp.c22
-rw-r--r--src/gallium/drivers/ilo/ilo_cp.h13
-rw-r--r--src/gallium/drivers/ilo/ilo_screen.c2
6 files changed, 11 insertions, 34 deletions
diff --git a/src/gallium/drivers/ilo/ilo_3d.c b/src/gallium/drivers/ilo/ilo_3d.c
index 218849a20d9..1e5ebbcabd8 100644
--- a/src/gallium/drivers/ilo/ilo_3d.c
+++ b/src/gallium/drivers/ilo/ilo_3d.c
@@ -157,7 +157,7 @@ ilo_3d_release_render_ring(struct ilo_cp *cp, void *data)
void
ilo_3d_own_render_ring(struct ilo_3d *hw3d)
{
- ilo_cp_set_ring(hw3d->cp, ILO_CP_RING_RENDER);
+ ilo_cp_set_ring(hw3d->cp, INTEL_RING_RENDER);
if (ilo_cp_set_owner(hw3d->cp, &hw3d->owner, hw3d->owner_reserve))
ilo_3d_resume_queries(hw3d);
@@ -775,7 +775,7 @@ ilo_texture_barrier(struct pipe_context *pipe)
struct ilo_context *ilo = ilo_context(pipe);
struct ilo_3d *hw3d = ilo->hw3d;
- if (ilo->cp->ring != ILO_CP_RING_RENDER)
+ if (ilo->cp->ring != INTEL_RING_RENDER)
return;
ilo_3d_pipeline_emit_flush(hw3d->pipeline);
diff --git a/src/gallium/drivers/ilo/ilo_blitter_blt.c b/src/gallium/drivers/ilo/ilo_blitter_blt.c
index a230cb79228..d383b58d0bd 100644
--- a/src/gallium/drivers/ilo/ilo_blitter_blt.c
+++ b/src/gallium/drivers/ilo/ilo_blitter_blt.c
@@ -336,7 +336,7 @@ ilo_blitter_blt_begin(struct ilo_blitter *blitter, int max_cmd_size,
uint32_t swctrl;
/* change ring */
- ilo_cp_set_ring(ilo->cp, ILO_CP_RING_BLT);
+ ilo_cp_set_ring(ilo->cp, INTEL_RING_BLT);
ilo_cp_set_owner(ilo->cp, NULL, 0);
/* check aperture space */
diff --git a/src/gallium/drivers/ilo/ilo_common.h b/src/gallium/drivers/ilo/ilo_common.h
index ae7896efc27..6a2649b354f 100644
--- a/src/gallium/drivers/ilo/ilo_common.h
+++ b/src/gallium/drivers/ilo/ilo_common.h
@@ -70,9 +70,9 @@ struct ilo_dev_info {
int devid;
int max_batch_size;
bool has_llc;
- bool has_gen7_sol_reset;
bool has_address_swizzling;
bool has_timestamp;
+ bool has_gen7_sol_reset;
int gen;
int gt;
diff --git a/src/gallium/drivers/ilo/ilo_cp.c b/src/gallium/drivers/ilo/ilo_cp.c
index cd94eec0fe5..49dc237d72f 100644
--- a/src/gallium/drivers/ilo/ilo_cp.c
+++ b/src/gallium/drivers/ilo/ilo_cp.c
@@ -182,27 +182,11 @@ static int
ilo_cp_exec_bo(struct ilo_cp *cp)
{
const bool do_exec = !(ilo_debug & ILO_DEBUG_NOHW);
- unsigned long flags;
int err;
- switch (cp->ring) {
- case ILO_CP_RING_RENDER:
- flags = INTEL_EXEC_RENDER;
- break;
- case ILO_CP_RING_BLT:
- flags = INTEL_EXEC_BLT;
- break;
- default:
- assert(!"unknown cp ring");
- flags = 0;
- break;
- }
-
- flags |= cp->one_off_flags;
-
if (likely(do_exec)) {
- err = intel_winsys_submit_bo(cp->winsys,
- cp->bo, cp->used * 4, cp->render_ctx, flags);
+ err = intel_winsys_submit_bo(cp->winsys, cp->ring,
+ cp->bo, cp->used * 4, cp->render_ctx, cp->one_off_flags);
}
else {
err = 0;
@@ -283,7 +267,7 @@ ilo_cp_create(struct intel_winsys *winsys, int size, bool direct_map)
cp->winsys = winsys;
cp->render_ctx = intel_winsys_create_context(winsys);
- cp->ring = ILO_CP_RING_RENDER;
+ cp->ring = INTEL_RING_RENDER;
cp->no_implicit_flush = false;
cp->bo_size = size;
diff --git a/src/gallium/drivers/ilo/ilo_cp.h b/src/gallium/drivers/ilo/ilo_cp.h
index 1dcfab81cdf..15b66040f6e 100644
--- a/src/gallium/drivers/ilo/ilo_cp.h
+++ b/src/gallium/drivers/ilo/ilo_cp.h
@@ -34,13 +34,6 @@
struct ilo_cp;
-enum ilo_cp_ring {
- ILO_CP_RING_RENDER,
- ILO_CP_RING_BLT,
-
- ILO_CP_RING_COUNT,
-};
-
typedef void (*ilo_cp_callback)(struct ilo_cp *cp, void *data);
struct ilo_cp_owner {
@@ -61,7 +54,7 @@ struct ilo_cp {
const struct ilo_cp_owner *owner;
int owner_reserve;
- enum ilo_cp_ring ring;
+ enum intel_ring_type ring;
bool no_implicit_flush;
unsigned one_off_flags;
@@ -98,7 +91,7 @@ ilo_cp_flush(struct ilo_cp *cp, const char *reason)
{
if (ilo_debug & ILO_DEBUG_FLUSH) {
ilo_printf("cp flushed for %s with %d+%d DWords (%.1f%%) because of %s\n",
- (cp->ring == ILO_CP_RING_RENDER) ? "render" : "blt",
+ (cp->ring == INTEL_RING_RENDER) ? "render" : "other",
cp->used, cp->stolen,
(float) (100 * (cp->used + cp->stolen)) / cp->bo_size,
reason);
@@ -153,7 +146,7 @@ ilo_cp_implicit_flush(struct ilo_cp *cp)
* Set the ring buffer.
*/
static inline void
-ilo_cp_set_ring(struct ilo_cp *cp, enum ilo_cp_ring ring)
+ilo_cp_set_ring(struct ilo_cp *cp, enum intel_ring_type ring)
{
if (cp->ring != ring) {
ilo_cp_implicit_flush(cp);
diff --git a/src/gallium/drivers/ilo/ilo_screen.c b/src/gallium/drivers/ilo/ilo_screen.c
index 11a5be2ebf1..8656d18806f 100644
--- a/src/gallium/drivers/ilo/ilo_screen.c
+++ b/src/gallium/drivers/ilo/ilo_screen.c
@@ -650,9 +650,9 @@ init_dev(struct ilo_dev_info *dev, const struct intel_winsys_info *info)
dev->devid = info->devid;
dev->max_batch_size = info->max_batch_size;
dev->has_llc = info->has_llc;
- dev->has_gen7_sol_reset = info->has_gen7_sol_reset;
dev->has_address_swizzling = info->has_address_swizzling;
dev->has_timestamp = info->has_timestamp;
+ dev->has_gen7_sol_reset = info->has_gen7_sol_reset;
/*
* From the Sandy Bridge PRM, volume 4 part 2, page 18: