[Intel-gfx] [PATCH v1] drm/i915/gsc: take a wakeref for the proxy-init-completion check

Teres Alexis, Alan Previn alan.previn.teres.alexis at intel.com
Thu Jun 8 22:48:53 UTC 2023


On Thu, 2023-06-08 at 11:19 -0700, Ceraolo Spurio, Daniele wrote:
> On 6/8/2023 11:04 AM, Alan Previn wrote:
> > Ensure intel_gsc_uc_fw_init_done and intel_gsc_uc_fw_proxy_init
> > takes a wakeref before reading GSC Shim registers.
alan:snip
> 
> >   bool intel_gsc_uc_fw_proxy_init_done(struct intel_gsc_uc *gsc)
> >   {
> >   	struct intel_uncore *uncore = gsc_uc_to_gt(gsc)->uncore;
> > -	u32 fw_status = intel_uncore_read(uncore, GSC_FW_STATUS_REG);
> > +	intel_wakeref_t wakeref;
> > +	u32 fw_status;
> > +
> > +	with_intel_runtime_pm(uncore->rpm, wakeref)
> > +		fw_status = intel_uncore_read(uncore, GSC_FW_STATUS_REG);
> 
> I think this could be moved to an helper (gsc_uc_get_fw_status?), so we 
> don't have to re-do the wakeref in all the callers.
alan: thanks - will fix.



More information about the Intel-gfx mailing list