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)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Tue, 20 Jun 2023 07:54:36 +0000 (08:54 +0100)
commit21f773515902d8b303df650674ad1c5243beb245
tree1edb9acb95db9067a4a2795a8a789aa4f7d8c617
parent2222dcb0775d36de28992f56455ab3967b30d380
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
(cherry picked from commit 8c33c3755b75c98d8eb490df345b4187a295a1a8)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c