drm/i915/guc: Allow preempt-client to be NULL
In the next patch, we may only conditionally allocate the preempt-client if there is a global preempt context and so we need to be prepared in case the preempt-client itself is NULL. v2: Grep for more preempt_client. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michal Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Michel Thierry <michel.thierry@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180207210544.26351-1-chris@chris-wilson.co.uk Reviewed-by: Michel Thierry <michel.thierry@intel.com>
This commit is contained in:
@@ -2338,7 +2338,6 @@ static int i915_guc_info(struct seq_file *m, void *data)
|
||||
return -ENODEV;
|
||||
|
||||
GEM_BUG_ON(!guc->execbuf_client);
|
||||
GEM_BUG_ON(!guc->preempt_client);
|
||||
|
||||
seq_printf(m, "Doorbell map:\n");
|
||||
seq_printf(m, "\t%*pb\n", GUC_NUM_DOORBELLS, guc->doorbell_bitmap);
|
||||
@@ -2346,8 +2345,11 @@ static int i915_guc_info(struct seq_file *m, void *data)
|
||||
|
||||
seq_printf(m, "\nGuC execbuf client @ %p:\n", guc->execbuf_client);
|
||||
i915_guc_client_info(m, dev_priv, guc->execbuf_client);
|
||||
seq_printf(m, "\nGuC preempt client @ %p:\n", guc->preempt_client);
|
||||
i915_guc_client_info(m, dev_priv, guc->preempt_client);
|
||||
if (guc->preempt_client) {
|
||||
seq_printf(m, "\nGuC preempt client @ %p:\n",
|
||||
guc->preempt_client);
|
||||
i915_guc_client_info(m, dev_priv, guc->preempt_client);
|
||||
}
|
||||
|
||||
i915_guc_log_info(m, dev_priv);
|
||||
|
||||
|
Fai riferimento in un nuovo problema
Block a user