summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2024-08-12 23:44:40 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2024-08-12 23:44:40 +0000
commitf2c36907730f9be02ebf3ce62b606df750aa5094 (patch)
tree0630d84a9b493cbe34bbbe921f1d4a89d8f4dd8e /sys
parent5e8c52f729bf99753b2c5e0be99d389e05b4e3bf (diff)
drm/i915: Parameterize binder context creation
From Nirmoy Das 3f5f62883631a987964102bc5044f7bf62c26323 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/i915/gt/intel_engine_cs.c2
-rw-r--r--sys/dev/pci/drm/i915/gt/intel_gtt.c4
-rw-r--r--sys/dev/pci/drm/i915/gt/intel_gtt.h2
3 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/i915/gt/intel_engine_cs.c b/sys/dev/pci/drm/i915/gt/intel_engine_cs.c
index 2a9f6b1f35d..eacfe846112 100644
--- a/sys/dev/pci/drm/i915/gt/intel_engine_cs.c
+++ b/sys/dev/pci/drm/i915/gt/intel_engine_cs.c
@@ -1504,7 +1504,7 @@ static int engine_init_common(struct intel_engine_cs *engine)
* engines as well but BCS should be less busy engine so pick that for
* GGTT updates.
*/
- if (engine->id == BCS0) {
+ if (i915_ggtt_require_binder(engine->i915) && engine->id == BCS0) {
bce = create_ggtt_bind_context(engine);
if (IS_ERR(bce)) {
ret = PTR_ERR(bce);
diff --git a/sys/dev/pci/drm/i915/gt/intel_gtt.c b/sys/dev/pci/drm/i915/gt/intel_gtt.c
index a24ddf0d1d9..12a594d18db 100644
--- a/sys/dev/pci/drm/i915/gt/intel_gtt.c
+++ b/sys/dev/pci/drm/i915/gt/intel_gtt.c
@@ -21,6 +21,10 @@
#include "intel_gt_regs.h"
#include "intel_gtt.h"
+bool i915_ggtt_require_binder(struct drm_i915_private *i915)
+{
+ return false;
+}
static bool intel_ggtt_update_needs_vtd_wa(struct drm_i915_private *i915)
{
diff --git a/sys/dev/pci/drm/i915/gt/intel_gtt.h b/sys/dev/pci/drm/i915/gt/intel_gtt.h
index b8e5a5fd5af..23f1d5a86cf 100644
--- a/sys/dev/pci/drm/i915/gt/intel_gtt.h
+++ b/sys/dev/pci/drm/i915/gt/intel_gtt.h
@@ -693,4 +693,6 @@ static inline struct sgt_dma {
return (struct sgt_dma){ sg, addr, addr + sg_dma_len(sg) };
}
+bool i915_ggtt_require_binder(struct drm_i915_private *i915);
+
#endif