drm/i915/wopcm: Try to use already locked WOPCM layout
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Fri, 16 Aug 2019 10:54:59 +0000 (10:54 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 16 Aug 2019 15:49:58 +0000 (16:49 +0100)
commit311482651d5e7bd6e8ad4e4b42e078ed3a866b4a
tree937f8fccab416a4631247039a301920498c9cefa
parent851dfec946b6cb4265c207541d84c84334acfa9d
drm/i915/wopcm: Try to use already locked WOPCM layout

If WOPCM layout is already locked in HW we shouldn't continue
with our own partitioning as it could be likely different and
we will be unable to enforce it and fail. Instead we should try
to reuse what is already programmed, maybe there will be a fit.

This should enable us to reload driver with slightly different
HuC firmware (or even without HuC) without need to reboot.

v2: reordered/rebased

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Reviewed-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/20190816105501.31020-4-michal.wajdeczko@intel.com
drivers/gpu/drm/i915/intel_wopcm.c