Skip to content

Commit

Permalink
drm/i915: Notify GuC rc6 state
Browse files Browse the repository at this point in the history
If rc6 is enabled, notify GuC so it can do proper forcewake before
command submission.

Signed-off-by: Alex Dai <yu.dai@intel.com>
Reviewed-by: Tom O'Rourke <Tom.O'Rourke@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Alex Dai authored and Daniel Vetter committed Sep 2, 2015
1 parent aa557ab commit f5d3c3e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions drivers/gpu/drm/i915/i915_guc_submission.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,18 @@ static int host2guc_release_doorbell(struct intel_guc *guc,
return host2guc_action(guc, data, 2);
}

static int host2guc_sample_forcewake(struct intel_guc *guc,
struct i915_guc_client *client)
{
struct drm_i915_private *dev_priv = guc_to_i915(guc);
u32 data[2];

data[0] = HOST2GUC_ACTION_SAMPLE_FORCEWAKE;
data[1] = (intel_enable_rc6(dev_priv->dev)) ? 1 : 0;

return host2guc_action(guc, data, 2);
}

/*
* Initialise, update, or clear doorbell data shared with the GuC
*
Expand Down Expand Up @@ -874,6 +886,9 @@ int i915_guc_submission_enable(struct drm_device *dev)
}

guc->execbuf_client = client;

host2guc_sample_forcewake(guc, client);

return 0;
}

Expand Down

0 comments on commit f5d3c3e

Please sign in to comment.