|
@@ -340,7 +340,7 @@ static void guc_init_ctx_desc(struct intel_guc *guc,
|
|
desc.priority = client->priority;
|
|
desc.priority = client->priority;
|
|
desc.db_id = client->doorbell_id;
|
|
desc.db_id = client->doorbell_id;
|
|
|
|
|
|
- for_each_engine(engine, dev_priv) {
|
|
|
|
|
|
+ for_each_engine_masked(engine, dev_priv, client->engines) {
|
|
struct intel_context *ce = &ctx->engine[engine->id];
|
|
struct intel_context *ce = &ctx->engine[engine->id];
|
|
struct guc_execlist_context *lrc = &desc.lrc[engine->guc_id];
|
|
struct guc_execlist_context *lrc = &desc.lrc[engine->guc_id];
|
|
struct drm_i915_gem_object *obj;
|
|
struct drm_i915_gem_object *obj;
|
|
@@ -374,6 +374,8 @@ static void guc_init_ctx_desc(struct intel_guc *guc,
|
|
desc.engines_used |= (1 << engine->guc_id);
|
|
desc.engines_used |= (1 << engine->guc_id);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ DRM_DEBUG_DRIVER("Host engines 0x%x => GuC engines used 0x%x\n",
|
|
|
|
+ client->engines, desc.engines_used);
|
|
WARN_ON(desc.engines_used == 0);
|
|
WARN_ON(desc.engines_used == 0);
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -764,6 +766,7 @@ static void guc_init_doorbell_hw(struct intel_guc *guc)
|
|
*/
|
|
*/
|
|
static struct i915_guc_client *
|
|
static struct i915_guc_client *
|
|
guc_client_alloc(struct drm_i915_private *dev_priv,
|
|
guc_client_alloc(struct drm_i915_private *dev_priv,
|
|
|
|
+ uint32_t engines,
|
|
uint32_t priority,
|
|
uint32_t priority,
|
|
struct i915_gem_context *ctx)
|
|
struct i915_gem_context *ctx)
|
|
{
|
|
{
|
|
@@ -776,10 +779,11 @@ guc_client_alloc(struct drm_i915_private *dev_priv,
|
|
if (!client)
|
|
if (!client)
|
|
return NULL;
|
|
return NULL;
|
|
|
|
|
|
- client->doorbell_id = GUC_INVALID_DOORBELL_ID;
|
|
|
|
- client->priority = priority;
|
|
|
|
client->owner = ctx;
|
|
client->owner = ctx;
|
|
client->guc = guc;
|
|
client->guc = guc;
|
|
|
|
+ client->engines = engines;
|
|
|
|
+ client->priority = priority;
|
|
|
|
+ client->doorbell_id = GUC_INVALID_DOORBELL_ID;
|
|
|
|
|
|
client->ctx_index = (uint32_t)ida_simple_get(&guc->ctx_ids, 0,
|
|
client->ctx_index = (uint32_t)ida_simple_get(&guc->ctx_ids, 0,
|
|
GUC_MAX_GPU_CONTEXTS, GFP_KERNEL);
|
|
GUC_MAX_GPU_CONTEXTS, GFP_KERNEL);
|
|
@@ -821,8 +825,8 @@ guc_client_alloc(struct drm_i915_private *dev_priv,
|
|
if (guc_init_doorbell(guc, client, db_id))
|
|
if (guc_init_doorbell(guc, client, db_id))
|
|
goto err;
|
|
goto err;
|
|
|
|
|
|
- DRM_DEBUG_DRIVER("new priority %u client %p: ctx_index %u\n",
|
|
|
|
- priority, client, client->ctx_index);
|
|
|
|
|
|
+ DRM_DEBUG_DRIVER("new priority %u client %p for engine(s) 0x%x: ctx_index %u\n",
|
|
|
|
+ priority, client, client->engines, client->ctx_index);
|
|
DRM_DEBUG_DRIVER("doorbell id %u, cacheline offset 0x%x\n",
|
|
DRM_DEBUG_DRIVER("doorbell id %u, cacheline offset 0x%x\n",
|
|
client->doorbell_id, client->doorbell_offset);
|
|
client->doorbell_id, client->doorbell_offset);
|
|
|
|
|
|
@@ -1006,6 +1010,7 @@ int i915_guc_submission_enable(struct drm_i915_private *dev_priv)
|
|
|
|
|
|
/* client for execbuf submission */
|
|
/* client for execbuf submission */
|
|
client = guc_client_alloc(dev_priv,
|
|
client = guc_client_alloc(dev_priv,
|
|
|
|
+ INTEL_INFO(dev_priv)->ring_mask,
|
|
GUC_CTX_PRIORITY_KMD_NORMAL,
|
|
GUC_CTX_PRIORITY_KMD_NORMAL,
|
|
dev_priv->kernel_context);
|
|
dev_priv->kernel_context);
|
|
if (!client) {
|
|
if (!client) {
|