summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/intel_guc.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-06-09 12:11:29 +1000
committerDave Airlie <airlied@redhat.com>2016-06-09 12:11:29 +1000
commit5b735940aa11113abd369e8b3a144c68b0ff5ffa (patch)
tree9c237cd5136165efe6efd026cca7adab17dd5d08 /drivers/gpu/drm/i915/intel_guc.h
parent2cca45574007b4a77fa5f63ea45d664510cec22a (diff)
parent1750d59dfa3caf1fc5354a2217f0e83d717c9b22 (diff)
Merge tag 'drm-intel-next-2016-06-06' of git://anongit.freedesktop.org/drm-intel into drm-next
- some polish for the guc code (Dave Gordon) - big refactoring of gen9 display clock handling code (Ville) - refactoring work in the context code (Chris Wilson) - give encoder/crtc/planes useful names for debug output (Ville) - improvements to skl/kbl wm computation code (Mahesh Kumar) - bunch of smaller improvements all over as usual * tag 'drm-intel-next-2016-06-06' of git://anongit.freedesktop.org/drm-intel: (64 commits) drm/i915: Update DRIVER_DATE to 20160606 drm/i915: Extract physical display dimensions from VBT drm/i915: Silence "unexpected child device config size" for VBT on 845g drm/i915/skl+: Use scaling amount for plane data rate calculation (v4) drm/i915/skl+: calculate plane pixel rate (v4) drm/i915/skl+: calculate ddb minimum allocation (v6) drm/i915: Don't try to calculate relative data rates during hw readout drm/i915: Only ignore eDP ports that are connected drm/i915: Update GEN6_PMINTRMSK setup with GuC enabled drm/i915: kill STANDARD/CURSOR plane screams drm/i915: Give encoders useful names drm/i915: Give meaningful names to all the planes drm/i915: Don't leak primary/cursor planes on crtc init failure drm/i915: Set crtc->name to "pipe A", "pipe B", etc. drm/i915: Use plane->name in debug prints drm/i915: Use crtc->name in debug messages drm/i915: Reject modeset if the dotclock is too high drm/i915: Fix NULL pointer deference when out of PLLs in IVB drm/i915/ilk: Don't disable SSC source if it's in use drm/i915/bxt: Sanitize CDCLK to fix breakage during S4 resume ...
Diffstat (limited to 'drivers/gpu/drm/i915/intel_guc.h')
-rw-r--r--drivers/gpu/drm/i915/intel_guc.h37
1 files changed, 23 insertions, 14 deletions
diff --git a/drivers/gpu/drm/i915/intel_guc.h b/drivers/gpu/drm/i915/intel_guc.h
index 9d79c4c3e256..41601c71f529 100644
--- a/drivers/gpu/drm/i915/intel_guc.h
+++ b/drivers/gpu/drm/i915/intel_guc.h
@@ -48,14 +48,23 @@ struct drm_i915_gem_request;
* queue (a circular array of work items), again described in the process
* descriptor. Work queue pages are mapped momentarily as required.
*
- * Finally, we also keep a few statistics here, including the number of
- * submissions to each engine, and a record of the last submission failure
- * (if any).
+ * We also keep a few statistics on failures. Ideally, these should all
+ * be zero!
+ * no_wq_space: times that the submission pre-check found no space was
+ * available in the work queue (note, the queue is shared,
+ * not per-engine). It is OK for this to be nonzero, but
+ * it should not be huge!
+ * q_fail: failed to enqueue a work item. This should never happen,
+ * because we check for space beforehand.
+ * b_fail: failed to ring the doorbell. This should never happen, unless
+ * somehow the hardware misbehaves, or maybe if the GuC firmware
+ * crashes? We probably need to reset the GPU to recover.
+ * retcode: errno from last guc_submit()
*/
struct i915_guc_client {
struct drm_i915_gem_object *client_obj;
void *client_base; /* first page (only) of above */
- struct intel_context *owner;
+ struct i915_gem_context *owner;
struct intel_guc *guc;
uint32_t priority;
uint32_t ctx_index;
@@ -71,12 +80,13 @@ struct i915_guc_client {
uint32_t wq_tail;
uint32_t unused; /* Was 'wq_head' */
- /* GuC submission statistics & status */
- uint64_t submissions[GUC_MAX_ENGINES_NUM];
- uint32_t q_fail;
+ uint32_t no_wq_space;
+ uint32_t q_fail; /* No longer used */
uint32_t b_fail;
int retcode;
- int spare; /* pad to 32 DWords */
+
+ /* Per-engine counts of GuC submissions */
+ uint64_t submissions[GUC_MAX_ENGINES_NUM];
};
enum intel_guc_fw_status {
@@ -138,9 +148,9 @@ struct intel_guc {
};
/* intel_guc_loader.c */
-extern void intel_guc_ucode_init(struct drm_device *dev);
-extern int intel_guc_ucode_load(struct drm_device *dev);
-extern void intel_guc_ucode_fini(struct drm_device *dev);
+extern void intel_guc_init(struct drm_device *dev);
+extern int intel_guc_setup(struct drm_device *dev);
+extern void intel_guc_fini(struct drm_device *dev);
extern const char *intel_guc_fw_status_repr(enum intel_guc_fw_status status);
extern int intel_guc_suspend(struct drm_device *dev);
extern int intel_guc_resume(struct drm_device *dev);
@@ -148,10 +158,9 @@ extern int intel_guc_resume(struct drm_device *dev);
/* i915_guc_submission.c */
int i915_guc_submission_init(struct drm_device *dev);
int i915_guc_submission_enable(struct drm_device *dev);
-int i915_guc_submit(struct i915_guc_client *client,
- struct drm_i915_gem_request *rq);
+int i915_guc_wq_check_space(struct drm_i915_gem_request *rq);
+int i915_guc_submit(struct drm_i915_gem_request *rq);
void i915_guc_submission_disable(struct drm_device *dev);
void i915_guc_submission_fini(struct drm_device *dev);
-int i915_guc_wq_check_space(struct i915_guc_client *client);
#endif