summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/intel/drm
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/winsys/intel/drm
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/winsys/intel/drm')
-rw-r--r--src/gallium/winsys/intel/drm/intel_drm_winsys.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/winsys/intel/drm/intel_drm_winsys.c b/src/gallium/winsys/intel/drm/intel_drm_winsys.c
index 5cdf39fe32e..1dc9b1cfefc 100644
--- a/src/gallium/winsys/intel/drm/intel_drm_winsys.c
+++ b/src/gallium/winsys/intel/drm/intel_drm_winsys.c
@@ -139,6 +139,7 @@ init_info(struct intel_winsys *winsys)
get_param(winsys, I915_PARAM_HAS_LLC, &val);
info->has_llc = val;
+ info->has_address_swizzling = test_address_swizzling(winsys);
/* test TIMESTAMP read */
info->has_timestamp = test_reg_read(winsys, 0x2358);
@@ -146,8 +147,6 @@ init_info(struct intel_winsys *winsys)
get_param(winsys, I915_PARAM_HAS_GEN7_SOL_RESET, &val);
info->has_gen7_sol_reset = val;
- info->has_address_swizzling = test_address_swizzling(winsys);
-
return true;
}
@@ -380,21 +379,24 @@ intel_winsys_can_submit_bo(struct intel_winsys *winsys,
int
intel_winsys_submit_bo(struct intel_winsys *winsys,
+ enum intel_ring_type ring,
struct intel_bo *bo, int used,
struct intel_context *ctx,
unsigned long flags)
{
+ const unsigned long exec_flags = (unsigned long) ring | flags;
+
/* logical contexts are only available for the render ring */
- if ((flags & 0x7) > INTEL_EXEC_RENDER)
+ if (ring != INTEL_RING_RENDER)
ctx = NULL;
if (ctx) {
return drm_intel_gem_bo_context_exec(gem_bo(bo),
- (drm_intel_context *) ctx, used, flags);
+ (drm_intel_context *) ctx, used, exec_flags);
}
else {
return drm_intel_bo_mrb_exec(gem_bo(bo),
- used, NULL, 0, 0, flags);
+ used, NULL, 0, 0, exec_flags);
}
}