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:
@@ -41,6 +41,11 @@
|
||||
pr_err("[drm:%s][msm-dp-err][%-4d]"fmt, __func__, \
|
||||
current->pid, ##__VA_ARGS__)
|
||||
|
||||
#define DEFAULT_DISCONNECT_DELAY_MS 0
|
||||
#define MAX_DISCONNECT_DELAY_MS 10000
|
||||
#define DEFAULT_CONNECT_NOTIFICATION_DELAY_MS 150
|
||||
#define MAX_CONNECT_NOTIFICATION_DELAY_MS 5000
|
||||
|
||||
/**
|
||||
* struct dp_debug
|
||||
* @debug_en: specifies whether debug mode enabled
|
||||
@@ -63,6 +68,10 @@
|
||||
* @mst_sim_remove_con: specifies whether sim connector is to be removed
|
||||
* @mst_sim_remove_con_id: specifies id of sim connector to be removed
|
||||
* @mst_port_cnt: number of mst ports to be added during hpd
|
||||
* @connect_notification_delay_ms: time (in ms) to wait for any attention
|
||||
* messages before sending the connect notification uevent
|
||||
* @disconnect_delay_ms: time (in ms) to wait before turning off the mainlink
|
||||
* in response to HPD low of cable disconnect event
|
||||
*/
|
||||
struct dp_debug {
|
||||
bool debug_en;
|
||||
@@ -85,6 +94,9 @@ struct dp_debug {
|
||||
bool mst_sim_remove_con;
|
||||
int mst_sim_remove_con_id;
|
||||
u32 mst_port_cnt;
|
||||
unsigned long connect_notification_delay_ms;
|
||||
u32 disconnect_delay_ms;
|
||||
|
||||
struct dp_mst_connector mst_connector_cache;
|
||||
u8 *(*get_edid)(struct dp_debug *dp_debug);
|
||||
void (*abort)(struct dp_debug *dp_debug);
|
||||
|
Reference in New Issue
Block a user