drm/i915/guc: Always copy CT message to new allocation
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 3 Jun 2021 05:16:28 +0000 (22:16 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 4 Jun 2021 08:42:15 +0000 (10:42 +0200)
commit8d99e09c5d1c20a3763e84d5f09619fa33e33186
tree2007b0a684d7dd73b9f636dec09fc25a2b029b93
parent65dd4ed0f4e1ce2ccf8ddc66a6ee026b20f0c24c
drm/i915/guc: Always copy CT message to new allocation

Since most of future CT traffic will be based on G2H requests,
instead of copying incoming CT message to static buffer and then
create new allocation for such request, always copy incoming CT
message to new allocation. Also by doing it while reading CT
header, we can safely fallback if that atomic allocation fails.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Cc: Piotr PiĆ³rkowski <piotr.piorkowski@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210603051630.2635-19-matthew.brost@intel.com
drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c