Commit 3f5f6288 authored by Nirmoy Das's avatar Nirmoy Das

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: default avatarNirmoy Das <nirmoy.das@intel.com>
Reviewed-by: default avatarOak Zeng <oak.zeng@intel.com>
Reviewed-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230926083742.14740-5-nirmoy.das@intel.com
parent 0e514878
...@@ -1477,7 +1477,7 @@ static int engine_init_common(struct intel_engine_cs *engine) ...@@ -1477,7 +1477,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 * engines as well but BCS should be less busy engine so pick that for
* GGTT updates. * GGTT updates.
*/ */
if (engine->id == BCS0) { if (i915_ggtt_require_binder(engine->i915) && engine->id == BCS0) {
bce = create_ggtt_bind_context(engine); bce = create_ggtt_bind_context(engine);
if (IS_ERR(bce)) { if (IS_ERR(bce)) {
ret = PTR_ERR(bce); ret = PTR_ERR(bce);
......
...@@ -21,6 +21,10 @@ ...@@ -21,6 +21,10 @@
#include "intel_gt_regs.h" #include "intel_gt_regs.h"
#include "intel_gtt.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) static bool intel_ggtt_update_needs_vtd_wa(struct drm_i915_private *i915)
{ {
......
...@@ -691,4 +691,6 @@ static inline struct sgt_dma { ...@@ -691,4 +691,6 @@ static inline struct sgt_dma {
return (struct sgt_dma){ sg, addr, addr + sg_dma_len(sg) }; return (struct sgt_dma){ sg, addr, addr + sg_dma_len(sg) };
} }
bool i915_ggtt_require_binder(struct drm_i915_private *i915);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment