diff options
author | Michal Wajdeczko <michal.wajdeczko@intel.com> | 2018-03-26 19:48:22 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-03-28 20:35:13 +0100 |
commit | 769bfbf943235c8c54e189a0d12bf8d3195af0c5 (patch) | |
tree | 42938bf89f27a648dda23043c9ada056c78c065a /drivers/gpu/drm/i915/intel_guc.h | |
parent | f6a70b59705109edb935674d36a5065fe2a5b4ad (diff) | |
download | linux-stable-769bfbf943235c8c54e189a0d12bf8d3195af0c5.tar.gz linux-stable-769bfbf943235c8c54e189a0d12bf8d3195af0c5.tar.bz2 linux-stable-769bfbf943235c8c54e189a0d12bf8d3195af0c5.zip |
drm/i915/guc: Make event handler a virtual function
On platforms with CTB based GuC communications, we will handle
GuC events in a different way. Let's make event handler a virtual
function to allow easy switch between those variants.
Credits-to: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Oscar Mateo <oscar.mateo@intel.com>
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180326194829.58836-6-michal.wajdeczko@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_guc.h')
-rw-r--r-- | drivers/gpu/drm/i915/intel_guc.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_guc.h b/drivers/gpu/drm/i915/intel_guc.h index 7ee0732d8b79..6dc109ab61bc 100644 --- a/drivers/gpu/drm/i915/intel_guc.h +++ b/drivers/gpu/drm/i915/intel_guc.h @@ -91,6 +91,9 @@ struct intel_guc { int (*send)(struct intel_guc *guc, const u32 *data, u32 len, u32 *response_buf, u32 response_buf_size); + /* GuC's FW specific event handler function */ + void (*handler)(struct intel_guc *guc); + /* GuC's FW specific notify function */ void (*notify)(struct intel_guc *guc); }; @@ -113,6 +116,11 @@ static inline void intel_guc_notify(struct intel_guc *guc) guc->notify(guc); } +static inline void intel_guc_to_host_event_handler(struct intel_guc *guc) +{ + guc->handler(guc); +} + /* GuC addresses above GUC_GGTT_TOP also don't map through the GTT */ #define GUC_GGTT_TOP 0xFEE00000 @@ -153,6 +161,8 @@ int intel_guc_send_nop(struct intel_guc *guc, const u32 *action, u32 len, int intel_guc_send_mmio(struct intel_guc *guc, const u32 *action, u32 len, u32 *response_buf, u32 response_buf_size); void intel_guc_to_host_event_handler(struct intel_guc *guc); +void intel_guc_to_host_event_handler_nop(struct intel_guc *guc); +void intel_guc_to_host_event_handler_mmio(struct intel_guc *guc); int intel_guc_sample_forcewake(struct intel_guc *guc); int intel_guc_auth_huc(struct intel_guc *guc, u32 rsa_offset); int intel_guc_suspend(struct intel_guc *guc); |