* [Intel-gfx] [PATCHv3] drm/i915/dp: Change aux_ctl reg read to polling read
[not found] <20221124070925.3834910-1-arun.r.murthy@intel.comt>
@ 2022-12-09 7:02 ` Arun R Murthy
2022-12-09 7:06 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork
1 sibling, 0 replies; 2+ messages in thread
From: Arun R Murthy @ 2022-12-09 7:02 UTC (permalink / raw)
To: intel-gfx, ville.syrjala, jani.nikula, imre.deak
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
Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
---
drivers/gpu/drm/i915/display/intel_dp_aux.c | 24 ++++++++++++---------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux.c b/drivers/gpu/drm/i915/display/intel_dp_aux.c
index 664bebdecea7..878452e6e37f 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_aux.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_aux.c
@@ -40,21 +40,25 @@ intel_dp_aux_wait_done(struct intel_dp *intel_dp)
i915_reg_t ch_ctl = intel_dp->aux_ch_ctl_reg(intel_dp);
const unsigned int timeout_ms = 10;
u32 status;
- bool done;
+ int try;
-#define C (((status = intel_uncore_read_notrace(&i915->uncore, ch_ctl)) & DP_AUX_CH_CTL_SEND_BUSY) == 0)
- done = wait_event_timeout(i915->display.gmbus.wait_queue, C,
- msecs_to_jiffies_timeout(timeout_ms));
+ for (try = 0; try < 10; try++) {
+ status = intel_uncore_read_notrace(&i915->uncore, ch_ctl);
+ if ((status & DP_AUX_CH_CTL_SEND_BUSY) == 0)
+ break;
+ usleep_range(400, 500);
+ }
+ if (try == 3) {
+ status = intel_uncore_read_notrace(&i915->uncore, ch_ctl);
+ if ((status & DP_AUX_CH_CTL_SEND_BUSY) != 0)
+ drm_err(&i915->drm,
+ "%s: did not complete or timeout within %ums (status 0x%08x)\n",
+ intel_dp->aux.name, timeout_ms, status);
+ }
/* just trace the final value */
trace_i915_reg_rw(false, ch_ctl, status, sizeof(status), true);
- if (!done)
- drm_err(&i915->drm,
- "%s: did not complete or timeout within %ums (status 0x%08x)\n",
- intel_dp->aux.name, timeout_ms, status);
-#undef C
-
return status;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/dp: Change aux_ctl reg read to polling read
[not found] <20221124070925.3834910-1-arun.r.murthy@intel.comt>
2022-12-09 7:02 ` [Intel-gfx] [PATCHv3] drm/i915/dp: Change aux_ctl reg read to polling read Arun R Murthy
@ 2022-12-09 7:06 ` Patchwork
1 sibling, 0 replies; 2+ messages in thread
From: Patchwork @ 2022-12-09 7:06 UTC (permalink / raw)
To: Arun R Murthy; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/dp: Change aux_ctl reg read to polling read
URL : https://patchwork.freedesktop.org/series/111794/
State : failure
== Summary ==
Error: patch https://patchwork.freedesktop.org/api/1.0/series/111794/revisions/1/mbox/ not applied
Applying: drm/i915/dp: Change aux_ctl reg read to polling read
Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/display/intel_dp_aux.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/display/intel_dp_aux.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/display/intel_dp_aux.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 drm/i915/dp: Change aux_ctl reg read to polling read
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-09 7:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20221124070925.3834910-1-arun.r.murthy@intel.comt>
2022-12-09 7:02 ` [Intel-gfx] [PATCHv3] drm/i915/dp: Change aux_ctl reg read to polling read Arun R Murthy
2022-12-09 7:06 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox