disp: msm: dp: improve interop experience for fast hotplug scenarios

Current implementation waits for 10ms prior to sending the connection
notification to user mode. This delay is to check for any potential
IRQ HPD event from the sink which may require a link maintenance.
However, this delay may not be sufficient for certain use cases.
Increase this delay to 150ms and modify the implementation to exit
the wait whenever an IRQ HPD is received. This ensures that we can
process the IRQ HPD in a timely manner as per the specification. To
further improve debug ability, add the support to configure this delay
though debugfs:

   echo [delay_ms] > /sys/kernel/debug/drm_dp/connect_notification_delay_ms

Certain cables are unable to handle back-to-back HPD notifications and
may end up skipping some events. To improve interoperability, delay the
handling of disconnect notification. Sinks would typically issue an HPD
high following an HPD low only after they sense that the mainlink has
been torn down. Delaying the handling of HPD low would in turn delay the
issuing of the subsequent HPD high from the sink. Here again, make this
delay configurable through debugfs to improve debug ability of these
interop issues:

   echo [delay_ms] > /sys/kernel/debug/drm_dp/disconnect_delay_ms

Change-Id: Ie29198af4dcda6d392798a3a93ebb3ddaa6746c8
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
This commit is contained in:
Aravind Venkateswaran
2020-09-25 21:24:52 -07:00
والد 683bf52ce0
کامیت 7454e06259
3فایلهای تغییر یافته به همراه82 افزوده شده و 3 حذف شده

مشاهده پرونده

@@ -2275,6 +2275,37 @@ static int dp_debug_init_feature_toggle(struct dp_debug_private *debug,
return rc;
}
static int dp_debug_init_configs(struct dp_debug_private *debug,
struct dentry *dir)
{
int rc = 0;
struct dentry *file;
file = debugfs_create_ulong("connect_notification_delay_ms", 0644, dir,
&debug->dp_debug.connect_notification_delay_ms);
if (IS_ERR_OR_NULL(file)) {
rc = PTR_ERR(file);
DP_ERR("[%s] debugfs connect_notification_delay_ms failed, rc=%d\n",
DEBUG_NAME, rc);
return rc;
}
debug->dp_debug.connect_notification_delay_ms =
DEFAULT_CONNECT_NOTIFICATION_DELAY_MS;
file = debugfs_create_u32("disconnect_delay_ms", 0644, dir,
&debug->dp_debug.disconnect_delay_ms);
if (IS_ERR_OR_NULL(file)) {
rc = PTR_ERR(file);
DP_ERR("[%s] debugfs disconnect_delay_ms failed, rc=%d\n",
DEBUG_NAME, rc);
return rc;
}
debug->dp_debug.disconnect_delay_ms = DEFAULT_DISCONNECT_DELAY_MS;
return rc;
}
static int dp_debug_init(struct dp_debug *dp_debug)
{
int rc = 0;
@@ -2341,6 +2372,10 @@ static int dp_debug_init(struct dp_debug *dp_debug)
if (rc)
goto error_remove_dir;
rc = dp_debug_init_configs(debug, dir);
if (rc)
goto error_remove_dir;
return 0;
error_remove_dir: