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
This commit is contained in:

committed by
Chris Wilson

parent
f6a70b5970
commit
769bfbf943
@@ -233,6 +233,7 @@ static int guc_enable_communication(struct intel_guc *guc)
|
||||
return intel_guc_ct_enable(&guc->ct);
|
||||
|
||||
guc->send = intel_guc_send_mmio;
|
||||
guc->handler = intel_guc_to_host_event_handler_mmio;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -246,6 +247,7 @@ static void guc_disable_communication(struct intel_guc *guc)
|
||||
gen9_disable_guc_interrupts(dev_priv);
|
||||
|
||||
guc->send = intel_guc_send_nop;
|
||||
guc->handler = intel_guc_to_host_event_handler_nop;
|
||||
}
|
||||
|
||||
int intel_uc_init_misc(struct drm_i915_private *dev_priv)
|
||||
|
Reference in New Issue
Block a user