Skip to content

Commit 6376eb8

Browse files
committed
drm/dp: Clarify that wait_hpd_asserted() is not optional for panels
In response to my patch removing the "wait for HPD" logic at the beginning of the MSM DP transfer() callback [1], we had some debate about what the "This is an optional function" meant in the documentation of the wait_hpd_asserted() callback. Let's clarify. As talked about in the MSM DP patch [1], before wait_hpd_asserted() was introduced there was no great way for panel drivers to wait for HPD in the case that the "built-in" HPD signal was used. Panel drivers could only wait for HPD if a GPIO was used. At the time, we ended up just saying that if we were using the "built-in" HPD signal that DP AUX controllers needed to wait for HPD themselves at the beginning of their transfer() callback. The fact that the wait for HPD at the beginning of transfer() was awkward/problematic was the whole reason wait_hpd_asserted() was added. Let's make it obvious that if a DP AUX controller implements wait_hpd_asserted() that they don't need a loop waiting for HPD at the start of their transfer() function. We'll still allow DP controllers to work the old way but mark it as deprecated. [1] https://lore.kernel.org/r/20240315143621.v2.3.I535606f6d4f7e3e5588bb75c55996f61980183cd@changeid Reviewed-by: Abhinav Kumar <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20240319135836.v2.1.I521dad0693cc24fe4dd14cba0c7048d94f5b6b41@changeid
1 parent 9d18487 commit 6376eb8

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

include/drm/display/drm_dp_helper.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,18 @@ struct drm_dp_aux {
422422
* @wait_hpd_asserted: wait for HPD to be asserted
423423
*
424424
* This is mainly useful for eDP panels drivers to wait for an eDP
425-
* panel to finish powering on. This is an optional function.
425+
* panel to finish powering on. It is optional for DP AUX controllers
426+
* to implement this function. It is required for DP AUX endpoints
427+
* (panel drivers) to call this function after powering up but before
428+
* doing AUX transfers unless the DP AUX endpoint driver knows that
429+
* we're not using the AUX controller's HPD. One example of the panel
430+
* driver not needing to call this is if HPD is hooked up to a GPIO
431+
* that the panel driver can read directly.
432+
*
433+
* If a DP AUX controller does not implement this function then it
434+
* may still support eDP panels that use the AUX controller's built-in
435+
* HPD signal by implementing a long wait for HPD in the transfer()
436+
* callback, though this is deprecated.
426437
*
427438
* This function will efficiently wait for the HPD signal to be
428439
* asserted. The `wait_us` parameter that is passed in says that we

0 commit comments

Comments
 (0)