Skip to content

Commit 3f5f628

Browse files
committed
drm/i915: Parameterize binder context creation
Add i915_ggtt_require_binder() to indicate that i915 needs to create binder context which will be used by subsequent patch to enable i915_address_space vfuncs that will use GPU commands to update GGTT. Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Oak Zeng <oak.zeng@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230926083742.14740-5-nirmoy.das@intel.com
1 parent 0e51487 commit 3f5f628

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

drivers/gpu/drm/i915/gt/intel_engine_cs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1477,7 +1477,7 @@ static int engine_init_common(struct intel_engine_cs *engine)
14771477
* engines as well but BCS should be less busy engine so pick that for
14781478
* GGTT updates.
14791479
*/
1480-
if (engine->id == BCS0) {
1480+
if (i915_ggtt_require_binder(engine->i915) && engine->id == BCS0) {
14811481
bce = create_ggtt_bind_context(engine);
14821482
if (IS_ERR(bce)) {
14831483
ret = PTR_ERR(bce);

drivers/gpu/drm/i915/gt/intel_gtt.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
#include "intel_gt_regs.h"
2222
#include "intel_gtt.h"
2323

24+
bool i915_ggtt_require_binder(struct drm_i915_private *i915)
25+
{
26+
return false;
27+
}
2428

2529
static bool intel_ggtt_update_needs_vtd_wa(struct drm_i915_private *i915)
2630
{

drivers/gpu/drm/i915/gt/intel_gtt.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,4 +691,6 @@ static inline struct sgt_dma {
691691
return (struct sgt_dma){ sg, addr, addr + sg_dma_len(sg) };
692692
}
693693

694+
bool i915_ggtt_require_binder(struct drm_i915_private *i915);
695+
694696
#endif

0 commit comments

Comments
 (0)