mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-18 00:24:58 +08:00
drm/i915/guc: reserve the doorbell before selecting the cacheline
Cacheline selection is only needed if we actually manage to reserve a doorbell. Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20181022230427.5616-2-daniele.ceraolospurio@intel.com
This commit is contained in:
parent
6f1312e6e0
commit
bfeabcc87a
@ -955,6 +955,10 @@ guc_client_alloc(struct drm_i915_private *dev_priv,
|
||||
}
|
||||
client->vaddr = vaddr;
|
||||
|
||||
ret = reserve_doorbell(client);
|
||||
if (ret)
|
||||
goto err_vaddr;
|
||||
|
||||
client->doorbell_offset = __select_cacheline(guc);
|
||||
|
||||
/*
|
||||
@ -967,10 +971,6 @@ guc_client_alloc(struct drm_i915_private *dev_priv,
|
||||
else
|
||||
client->proc_desc_offset = (GUC_DB_SIZE / 2);
|
||||
|
||||
ret = reserve_doorbell(client);
|
||||
if (ret)
|
||||
goto err_vaddr;
|
||||
|
||||
DRM_DEBUG_DRIVER("new priority %u client %p for engine(s) 0x%x: stage_id %u\n",
|
||||
priority, client, client->engines, client->stage_id);
|
||||
DRM_DEBUG_DRIVER("doorbell id %u, cacheline offset 0x%lx\n",
|
||||
|
Loading…
Reference in New Issue
Block a user