drm/i915/dp: change aux_ctl reg read to polling read
authorArun R Murthy <arun.r.murthy@intel.com>
Wed, 21 Dec 2022 03:32:09 +0000 (09:02 +0530)
committerJani Nikula <jani.nikula@intel.com>
Wed, 4 Jan 2023 12:51:26 +0000 (14:51 +0200)
commit5a9b0c7418448ed3766f61ba0a71d08f259c3181
treefc375ac724d8cc999c53794c37014cb871999371
parentacb041b3f951afe67b782a5fd5441d3668765bdd
drm/i915/dp: change aux_ctl reg read to polling read

The busy timeout logic checks for the AUX BUSY, then waits for the
timeout period and then after timeout reads the register for BUSY or
Success.
Instead replace interrupt with polling so as to read the AUX CTL
register often before the timeout period. Looks like there might be some
issue with interrupt-on-read. Hence changing the logic to polling read.

v2: replace interrupt with polling read
v3: use usleep_rang instead of msleep, updated commit msg
v4: use intel_wait_for_regiter internal function
v5: use __intel_de_wait_for_register with 500us slow and 10ms fast timeout
v6: check return value of __intel_de_wait_for_register
v7: using default 2us for intel_de_wait_for_register

Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221221033209.1284435-1-arun.r.murthy@intel.com
drivers/gpu/drm/i915/display/intel_dp_aux.c