drm/i915/gsc: take a wakeref for the proxy-init-completion check
authorAlan Previn <alan.previn.teres.alexis@intel.com>
Thu, 8 Jun 2023 23:07:16 +0000 (16:07 -0700)
committerDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Mon, 12 Jun 2023 15:24:28 +0000 (08:24 -0700)
commit8c33c3755b75c98d8eb490df345b4187a295a1a8
tree7c0f45794f867310e63f1d22fb96ff65044a2968
parentf56fe3e91787dc29c2a3e7ec8b7bc3b80f65fbbc
drm/i915/gsc: take a wakeref for the proxy-init-completion check

Ensure intel_gsc_uc_fw_init_done and intel_gsc_uc_fw_proxy_init
takes a wakeref before reading GSC Shim registers.

NOTE: another patch in review also adds a call from selftest to
this same function. (https://patchwork.freedesktop.org/series/117713/)
which is why i am adding the wakeref inside the callee, not the
caller.

v2: - add a helper, 'gsc_uc_get_fw_status' for both callers
      (Daniele Ceraolo)

Fixes: 99afb7cc8c44 ("drm/i915/pxp: Add ARB session creation and cleanup")
Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230608230716.3079594-1-alan.previn.teres.alexis@intel.com
drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c