drm/i915: dgfx cards need to wait on pcode's uncore init done
authorBadal Nilawar <badal.nilawar@intel.com>
Tue, 27 Jul 2021 17:33:38 +0000 (23:03 +0530)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 28 Jul 2021 16:35:29 +0000 (12:35 -0400)
commit41c791fcd61a45cf06accf68384699deb7cad6ad
tree148c1855272f17718a0ded548f814116f7579875
parent573d7ce4f69a85010fe2a40f4976326ee347f584
drm/i915: dgfx cards need to wait on pcode's uncore init done

In discrete cards, the graphics driver shouldn't proceed with the probe
or resume unless PCODE indicated everything is done, including memory
training and gt bring up.

For this reason, the driver probe and resume paths needs to be blocked
until PCODE indicates it is done. Also, it needs to aborted if the
notification never arrives.

In general, the few miliseconds would be enough and the regular PCODE
recommendation for the timeout was 10 seconds. However there are some
rare cases where this initialization can take up to 1 minute. So,
PCODE has increased the recommendation to 3 minutes so we don't fully
block the device utilization when something just got delayed for
whatever reason. To be on the safest side, let's accept this
recommendation, since on the regular case it won't delay or block the
driver initialization and resume flows

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210727173338.901264-1-badal.nilawar@intel.com
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/intel_sideband.c
drivers/gpu/drm/i915/intel_sideband.h