commit 9f356a6

Devin J. Pohly  ·  2017-10-31 02:02:39 +0000 UTC
parent fa55403
intel: add GEN macro for device_info->gen check

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2 files changed,  +4, -2
+2, -2
 1@@ -91,8 +91,8 @@ void intel_batch_flush(struct intel_batch * batch)
 2     drm_intel_bo_subdata(batch->bo, 0, batch->command_count << 2,
 3                          batch->commands);
 4     drm_intel_bo_mrb_exec(batch->bo, batch->command_count << 2, NULL, 0, 0,
 5-                          batch->device_info->gen >= 6 ? I915_EXEC_BLT
 6-                                                       : I915_EXEC_DEFAULT);
 7+                          GEN(batch, 6) ? I915_EXEC_BLT
 8+                                        : I915_EXEC_DEFAULT);
 9     drm_intel_gem_bo_clear_relocs(batch->bo, 0);
10     batch->command_count = 0;
11 }
+2, -0
1@@ -44,6 +44,8 @@ struct intel_device_info
2     int gen;
3 };
4 
5+#define GEN(b, m) ((b)->device_info->gen >= (m))
6+
7 struct intel_batch
8 {
9     const struct intel_device_info * device_info;