Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Daniele Ceraolo Spurio and committed by
Chris Wilson
bfeabcc8 6f1312e6

+4 -4
+4 -4
drivers/gpu/drm/i915/intel_guc_submission.c
··· 955 955 } 956 956 client->vaddr = vaddr; 957 957 958 + ret = reserve_doorbell(client); 959 + if (ret) 960 + goto err_vaddr; 961 + 958 962 client->doorbell_offset = __select_cacheline(guc); 959 963 960 964 /* ··· 970 966 client->proc_desc_offset = 0; 971 967 else 972 968 client->proc_desc_offset = (GUC_DB_SIZE / 2); 973 - 974 - ret = reserve_doorbell(client); 975 - if (ret) 976 - goto err_vaddr; 977 969 978 970 DRM_DEBUG_DRIVER("new priority %u client %p for engine(s) 0x%x: stage_id %u\n", 979 971 priority, client, client->engines, client->stage_id);