diff mbox

[4/5] drm/i915/guc: add engine mask to GuC client & pass to GuC

Message ID 1468933157-22412-4-git-send-email-david.s.gordon@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dave Gordon July 19, 2016, 12:59 p.m. UTC
The Context Descriptor passed by the kernel to the GuC contains a field
specifying which engine(s) the context will use. Historically, this was
always set to "all of them", but now that we have one client per engine,
we can be more precise, and set only the single bit for the engine that
the client is associated with.

Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
---
 drivers/gpu/drm/i915/i915_guc_submission.c | 15 ++++++++++-----
 drivers/gpu/drm/i915/intel_guc.h           |  3 ++-
 2 files changed, 12 insertions(+), 6 deletions(-)

Comments

Tvrtko Ursulin July 19, 2016, 3:06 p.m. UTC | #1
On 19/07/16 13:59, Dave Gordon wrote:
> The Context Descriptor passed by the kernel to the GuC contains a field
> specifying which engine(s) the context will use. Historically, this was
> always set to "all of them", but now that we have one client per engine,
> we can be more precise, and set only the single bit for the engine that
> the client is associated with.
>
> Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
> ---
>   drivers/gpu/drm/i915/i915_guc_submission.c | 15 ++++++++++-----
>   drivers/gpu/drm/i915/intel_guc.h           |  3 ++-
>   2 files changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
> index b0f9945..4daba77 100644
> --- a/drivers/gpu/drm/i915/i915_guc_submission.c
> +++ b/drivers/gpu/drm/i915/i915_guc_submission.c
> @@ -340,7 +340,7 @@ static void guc_init_ctx_desc(struct intel_guc *guc,
>   	desc.priority = client->priority;
>   	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 guc_execlist_context *lrc = &desc.lrc[engine->guc_id];
>   		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);
>   	}
>
> +	DRM_DEBUG_DRIVER("Host engines 0x%x => GuC engines used 0x%x\n",
> +			client->engines, desc.engines_used);
>   	WARN_ON(desc.engines_used == 0);
>
>   	/*
> @@ -768,6 +770,7 @@ static void guc_init_doorbell_hw(struct intel_guc *guc)
>    */
>   static struct i915_guc_client *
>   guc_client_alloc(struct drm_i915_private *dev_priv,
> +		 uint32_t engines,
>   		 uint32_t priority,
>   		 struct i915_gem_context *ctx)
>   {
> @@ -780,10 +783,11 @@ static void guc_init_doorbell_hw(struct intel_guc *guc)
>   	if (!client)
>   		return NULL;
>
> -	client->doorbell_id = GUC_INVALID_DOORBELL_ID;
> -	client->priority = priority;
>   	client->owner = ctx;
>   	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,
>   			GUC_MAX_GPU_CONTEXTS, GFP_KERNEL);
> @@ -825,8 +829,8 @@ static void guc_init_doorbell_hw(struct intel_guc *guc)
>   	if (guc_init_doorbell(guc, client, db_id))
>   		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",
>   		client->doorbell_id, client->doorbell_offset);
>
> @@ -1011,6 +1015,7 @@ int i915_guc_submission_enable(struct drm_i915_private *dev_priv)
>   	for_each_engine(engine, dev_priv) {
>   		/* client for execbuf submission */
>   		client = guc_client_alloc(dev_priv,
> +					  intel_engine_flag(engine),
>   					  GUC_CTX_PRIORITY_KMD_NORMAL,
>   					  dev_priv->kernel_context);
>   		if (!client) {
> diff --git a/drivers/gpu/drm/i915/intel_guc.h b/drivers/gpu/drm/i915/intel_guc.h
> index 7b4cc4d..53d41b5 100644
> --- a/drivers/gpu/drm/i915/intel_guc.h
> +++ b/drivers/gpu/drm/i915/intel_guc.h
> @@ -67,6 +67,8 @@ struct i915_guc_client {
>   	void *client_base;		/* first page (only) of above	*/
>   	struct i915_gem_context *owner;
>   	struct intel_guc *guc;
> +
> +	uint32_t engines;		/* bitmap of (host) engine ids	*/
>   	uint32_t priority;
>   	uint32_t ctx_index;
>
> @@ -79,7 +81,6 @@ struct i915_guc_client {
>   	uint32_t wq_offset;
>   	uint32_t wq_size;
>   	uint32_t wq_tail;
> -	uint32_t unused;		/* Was 'wq_head'		*/
>
>   	uint32_t no_wq_space;
>   	uint32_t q_fail;		/* No longer used		*/
>

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
kernel test robot July 27, 2016, 8:06 p.m. UTC | #2
Hi,

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on next-20160727]
[cannot apply to v4.7]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Dave-Gordon/drm-i915-guc-doorbell-reset-should-avoid-used-doorbells/20160725-094456
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
reproduce: make htmldocs

All warnings (new ones prefixed by >>):

   Warning: The Sphinx 'sphinx_rtd_theme' HTML theme was not found. Make sure you have the theme installed to produce pretty HTML output. Falling back to the default theme.
   include/drm/drm_fourcc.h:1: warning: no structured comments found
   include/drm/drm_crtc.h:848: warning: No description found for parameter 'index'
   include/drm/drm_crtc.h:1223: warning: No description found for parameter 'index'
   include/drm/drm_crtc.h:1720: warning: No description found for parameter 'index'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'connector_ida'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'edid_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'dpms_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'path_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tile_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'plane_type_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'rotation_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_src_x'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_src_y'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_src_w'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_src_h'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_crtc_x'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_crtc_y'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_crtc_w'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_crtc_h'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_fb_id'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_crtc_id'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_active'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_mode_id'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'dvi_i_subconnector_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'dvi_i_select_subconnector_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_subconnector_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_select_subconnector_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_mode_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_left_margin_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_right_margin_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_top_margin_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_bottom_margin_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_brightness_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_contrast_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_flicker_reduction_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_overscan_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_saturation_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_hue_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'scaling_mode_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'aspect_ratio_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'dirty_info_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'suggested_x_property'
   include/drm/drm_crtc.h:2505: warning: No description found for parameter 'suggested_y_property'
   include/drm/drmP.h:172: warning: No description found for parameter 'fmt'
   include/drm/drmP.h:188: warning: No description found for parameter 'fmt'
   include/drm/drmP.h:206: warning: No description found for parameter 'fmt'
   include/drm/drmP.h:251: warning: No description found for parameter 'dev'
   include/drm/drmP.h:251: warning: No description found for parameter 'data'
   include/drm/drmP.h:251: warning: No description found for parameter 'file_priv'
   include/drm/drmP.h:284: warning: No description found for parameter 'ioctl'
   include/drm/drmP.h:284: warning: No description found for parameter '_func'
   include/drm/drmP.h:284: warning: No description found for parameter '_flags'
   include/drm/drmP.h:365: warning: cannot understand function prototype: 'struct drm_lock_data '
   include/drm/drmP.h:392: warning: cannot understand function prototype: 'struct drm_driver '
   include/drm/drmP.h:655: warning: cannot understand function prototype: 'struct drm_info_list '
   include/drm/drmP.h:665: warning: cannot understand function prototype: 'struct drm_info_node '
   include/drm/drmP.h:675: warning: cannot understand function prototype: 'struct drm_minor '
   include/drm/drmP.h:720: warning: cannot understand function prototype: 'struct drm_device '
   include/drm/drm_dp_helper.h:752: warning: No description found for parameter 'i2c_nack_count'
   include/drm/drm_dp_helper.h:752: warning: No description found for parameter 'i2c_defer_count'
   drivers/gpu/drm/drm_dp_mst_topology.c:2383: warning: No description found for parameter 'connector'
   include/drm/drm_dp_mst_helper.h:93: warning: No description found for parameter 'cached_edid'
   include/drm/drm_dp_mst_helper.h:93: warning: No description found for parameter 'has_audio'
   include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'max_dpcd_transaction_bytes'
   include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'sink_count'
   include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'total_slots'
   include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'avail_slots'
   include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'total_pbn'
   include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'qlock'
   include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'tx_msg_downq'
   include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'tx_down_in_progress'
   include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'payload_lock'
   include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'proposed_vcpis'
   include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'payloads'
   include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'payload_mask'
   include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'vcpi_mask'
   include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'tx_waitq'
   include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'work'
   include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'tx_work'
   include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'destroy_connector_list'
   include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'destroy_connector_lock'
   include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'destroy_connector_work'
   drivers/gpu/drm/drm_dp_mst_topology.c:2384: warning: No description found for parameter 'connector'
   drivers/gpu/drm/i915/i915_vgpu.c:105: warning: No description found for parameter 'dev_priv'
   drivers/gpu/drm/i915/i915_vgpu.c:184: warning: No description found for parameter 'dev_priv'
   drivers/gpu/drm/i915/i915_vgpu.c:184: warning: Excess function parameter 'dev' description in 'intel_vgt_balloon'
   drivers/gpu/drm/i915/i915_vgpu.c:106: warning: No description found for parameter 'dev_priv'
   drivers/gpu/drm/i915/i915_vgpu.c:185: warning: No description found for parameter 'dev_priv'
   drivers/gpu/drm/i915/i915_vgpu.c:185: warning: Excess function parameter 'dev' description in 'intel_vgt_balloon'
   drivers/gpu/drm/i915/i915_gem.c:929: warning: No description found for parameter 'i915'
   drivers/gpu/drm/i915/i915_gem.c:929: warning: Excess function parameter 'dev' description in 'i915_gem_gtt_pwrite_fast'
   drivers/gpu/drm/i915/intel_hotplug.c:543: warning: Excess function parameter 'enabled' description in 'intel_hpd_poll_init'
   drivers/gpu/drm/i915/intel_hotplug.c:544: warning: Excess function parameter 'enabled' description in 'intel_hpd_poll_init'
   drivers/gpu/drm/i915/intel_fbc.c:1087: warning: No description found for parameter 'crtc_state'
   drivers/gpu/drm/i915/intel_fbc.c:1087: warning: No description found for parameter 'plane_state'
   drivers/gpu/drm/i915/intel_fbc.c:1088: warning: No description found for parameter 'crtc_state'
   drivers/gpu/drm/i915/intel_fbc.c:1088: warning: No description found for parameter 'plane_state'
>> drivers/gpu/drm/i915/i915_guc_submission.c:776: warning: No description found for parameter 'engines'
   drivers/gpu/drm/i915/i915_guc_submission.c:777: warning: No description found for parameter 'engines'
   Documentation/gpu/drm-internals.rst:249: ERROR: Unexpected indentation.
   Documentation/gpu/drm-internals.rst:188: ERROR: Unknown target name: "devm".
   Documentation/gpu/drm-kms.rst:929: WARNING: Inline literal start-string without end-string.
   Documentation/gpu/drm-kms.rst:971: WARNING: Inline literal start-string without end-string.
   Documentation/gpu/drm-kms.rst:1451: WARNING: Inline literal start-string without end-string.
   Documentation/gpu/drm-kms.rst:1565: WARNING: Inline literal start-string without end-string.
   Documentation/gpu/drm-kms.rst:1615: WARNING: Inline literal start-string without end-string.
   Documentation/gpu/drm-kms.rst:1627: WARNING: Inline literal start-string without end-string.
   Documentation/gpu/drm-kms.rst:836: WARNING: Option list ends without a blank line; unexpected unindent.
   Documentation/gpu/drm-kms-helpers.rst:647: WARNING: Inline emphasis start-string without end-string.
   Documentation/gpu/drm-kms-helpers.rst:275: WARNING: Inline literal start-string without end-string.
   Documentation/gpu/drm-mm.rst:505: WARNING: Inline emphasis start-string without end-string.
   drivers/gpu/drm/i915/intel_uncore.c:1622: ERROR: Unexpected indentation.
   Documentation/gpu/i915.rst:156: WARNING: Block quote ends without a blank line; unexpected unindent.
   drivers/gpu/drm/i915/intel_uncore.c:1656: ERROR: Unexpected indentation.
   Documentation/gpu/i915.rst:192: WARNING: Block quote ends without a blank line; unexpected unindent.
   Documentation/gpu/i915.rst:129: WARNING: Literal block ends without a blank line; unexpected unindent.
   Documentation/gpu/i915.rst:148: WARNING: Inline emphasis start-string without end-string.
   Documentation/gpu/i915.rst:148: WARNING: Inline emphasis start-string without end-string.
   drivers/gpu/drm/i915/intel_lrc.c:1165: ERROR: Unexpected indentation.
   Documentation/gpu/i915.rst:339: WARNING: Block quote ends without a blank line; unexpected unindent.
   Documentation/gpu/i915.rst:329: WARNING: Block quote ends without a blank line; unexpected unindent.
   Documentation/gpu/i915.rst:348: WARNING: Enumerated list ends without a blank line; unexpected unindent.
   Documentation/gpu/drm-kms.rst:499: WARNING: Could not lex literal_block as "C". Highlighting skipped.
   Documentation/gpu/drm-kms-helpers.rst:125: WARNING: Could not lex literal_block as "C". Highlighting skipped.
   Documentation/gpu/i915.rst:109: WARNING: Could not lex literal_block as "C". Highlighting skipped.

vim +/engines +776 drivers/gpu/drm/i915/i915_guc_submission.c

44a28b1d Dave Gordon  2015-08-12  760   * guc_client_alloc() - Allocate an i915_guc_client
0daf556c Dave Gordon  2016-06-10  761   * @dev_priv:	driver private data structure
44a28b1d Dave Gordon  2015-08-12  762   * @priority:	four levels priority _CRITICAL, _HIGH, _NORMAL and _LOW
44a28b1d Dave Gordon  2015-08-12  763   * 		The kernel client to replace ExecList submission is created with
44a28b1d Dave Gordon  2015-08-12  764   * 		NORMAL priority. Priority of a client for scheduler can be HIGH,
44a28b1d Dave Gordon  2015-08-12  765   * 		while a preemption context can use CRITICAL.
feda33ef Alex Dai     2015-10-19  766   * @ctx:	the context that owns the client (we use the default render
feda33ef Alex Dai     2015-10-19  767   * 		context)
44a28b1d Dave Gordon  2015-08-12  768   *
0d92a6a4 Dave Gordon  2016-04-19  769   * Return:	An i915_guc_client object if success, else NULL.
44a28b1d Dave Gordon  2015-08-12  770   */
0daf556c Dave Gordon  2016-06-10  771  static struct i915_guc_client *
0daf556c Dave Gordon  2016-06-10  772  guc_client_alloc(struct drm_i915_private *dev_priv,
e5601222 Dave Gordon  2016-07-19  773  		 uint32_t engines,
d1675198 Alex Dai     2015-08-12  774  		 uint32_t priority,
e2efd130 Chris Wilson 2016-05-24  775  		 struct i915_gem_context *ctx)
44a28b1d Dave Gordon  2015-08-12 @776  {
44a28b1d Dave Gordon  2015-08-12  777  	struct i915_guc_client *client;
44a28b1d Dave Gordon  2015-08-12  778  	struct intel_guc *guc = &dev_priv->guc;
44a28b1d Dave Gordon  2015-08-12  779  	struct drm_i915_gem_object *obj;
a667429b Dave Gordon  2016-06-13  780  	uint16_t db_id;
44a28b1d Dave Gordon  2015-08-12  781  
44a28b1d Dave Gordon  2015-08-12  782  	client = kzalloc(sizeof(*client), GFP_KERNEL);
44a28b1d Dave Gordon  2015-08-12  783  	if (!client)
44a28b1d Dave Gordon  2015-08-12  784  		return NULL;

:::::: The code at line 776 was first introduced by commit
:::::: 44a28b1d36762499de6fd701fcce6814eefe31d7 drm/i915: Implementation of GuC submission client

:::::: TO: Dave Gordon <david.s.gordon@intel.com>
:::::: CC: Daniel Vetter <daniel.vetter@ffwll.ch>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index b0f9945..4daba77 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -340,7 +340,7 @@  static void guc_init_ctx_desc(struct intel_guc *guc,
 	desc.priority = client->priority;
 	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 guc_execlist_context *lrc = &desc.lrc[engine->guc_id];
 		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);
 	}
 
+	DRM_DEBUG_DRIVER("Host engines 0x%x => GuC engines used 0x%x\n",
+			client->engines, desc.engines_used);
 	WARN_ON(desc.engines_used == 0);
 
 	/*
@@ -768,6 +770,7 @@  static void guc_init_doorbell_hw(struct intel_guc *guc)
  */
 static struct i915_guc_client *
 guc_client_alloc(struct drm_i915_private *dev_priv,
+		 uint32_t engines,
 		 uint32_t priority,
 		 struct i915_gem_context *ctx)
 {
@@ -780,10 +783,11 @@  static void guc_init_doorbell_hw(struct intel_guc *guc)
 	if (!client)
 		return NULL;
 
-	client->doorbell_id = GUC_INVALID_DOORBELL_ID;
-	client->priority = priority;
 	client->owner = ctx;
 	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,
 			GUC_MAX_GPU_CONTEXTS, GFP_KERNEL);
@@ -825,8 +829,8 @@  static void guc_init_doorbell_hw(struct intel_guc *guc)
 	if (guc_init_doorbell(guc, client, db_id))
 		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",
 		client->doorbell_id, client->doorbell_offset);
 
@@ -1011,6 +1015,7 @@  int i915_guc_submission_enable(struct drm_i915_private *dev_priv)
 	for_each_engine(engine, dev_priv) {
 		/* client for execbuf submission */
 		client = guc_client_alloc(dev_priv,
+					  intel_engine_flag(engine),
 					  GUC_CTX_PRIORITY_KMD_NORMAL,
 					  dev_priv->kernel_context);
 		if (!client) {
diff --git a/drivers/gpu/drm/i915/intel_guc.h b/drivers/gpu/drm/i915/intel_guc.h
index 7b4cc4d..53d41b5 100644
--- a/drivers/gpu/drm/i915/intel_guc.h
+++ b/drivers/gpu/drm/i915/intel_guc.h
@@ -67,6 +67,8 @@  struct i915_guc_client {
 	void *client_base;		/* first page (only) of above	*/
 	struct i915_gem_context *owner;
 	struct intel_guc *guc;
+
+	uint32_t engines;		/* bitmap of (host) engine ids	*/
 	uint32_t priority;
 	uint32_t ctx_index;
 
@@ -79,7 +81,6 @@  struct i915_guc_client {
 	uint32_t wq_offset;
 	uint32_t wq_size;
 	uint32_t wq_tail;
-	uint32_t unused;		/* Was 'wq_head'		*/
 
 	uint32_t no_wq_space;
 	uint32_t q_fail;		/* No longer used		*/