[PATCH v6 06/10] drm/msm/dp: drop event data
From: Dmitry Baryshkov
Date: Sun May 24 2026 - 06:38:25 EST
With EV_USER_NOTIFICATION gone event's data is no longer useful. Drop
it, removing also the argument from event handlers.
Reviewed-by: Bjorn Andersson <andersson@xxxxxxxxxx>
Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
Tested-by: Val Packett <val@xxxxxxxxxxxx> # x1e80100-dell-latitude-7455
Tested-by: Yongxing Mou <yongxing.mou@xxxxxxxxxxxxxxxx> # Hamoa IOT EVK, QCS8300 Ride
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
---
drivers/gpu/drm/msm/dp/dp_display.c | 39 +++++++++++++++++--------------------
1 file changed, 18 insertions(+), 21 deletions(-)
diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index 6b76bff7c8d0..df79a6e84415 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -69,7 +69,6 @@ enum {
struct msm_dp_event {
u32 event_id;
- u32 data;
u32 delay;
};
@@ -219,7 +218,7 @@ static struct msm_dp_display_private *dev_get_dp_display_private(struct device *
}
static int msm_dp_add_event(struct msm_dp_display_private *msm_dp_priv, u32 event,
- u32 data, u32 delay)
+ u32 delay)
{
unsigned long flag;
struct msm_dp_event *todo;
@@ -237,7 +236,6 @@ static int msm_dp_add_event(struct msm_dp_display_private *msm_dp_priv, u32 even
todo = &msm_dp_priv->event_list[msm_dp_priv->event_pndx++];
msm_dp_priv->event_pndx %= DP_EVENT_Q_MAX;
todo->event_id = event;
- todo->data = data;
todo->delay = delay;
wake_up(&msm_dp_priv->event_q);
spin_unlock_irqrestore(&msm_dp_priv->event_lock, flag);
@@ -577,7 +575,7 @@ static int msm_dp_display_usbpd_attention_cb(struct device *dev)
return rc;
}
-static int msm_dp_hpd_plug_handle(struct msm_dp_display_private *dp, u32 data)
+static int msm_dp_hpd_plug_handle(struct msm_dp_display_private *dp)
{
u32 state;
int ret;
@@ -603,7 +601,7 @@ static int msm_dp_hpd_plug_handle(struct msm_dp_display_private *dp, u32 data)
if (state == ST_DISCONNECT_PENDING) {
/* wait until ST_DISCONNECTED */
- msm_dp_add_event(dp, EV_HPD_PLUG_INT, 0, 1); /* delay = 1 */
+ msm_dp_add_event(dp, EV_HPD_PLUG_INT, 1);
mutex_unlock(&dp->event_mutex);
return 0;
}
@@ -645,7 +643,7 @@ static void msm_dp_display_handle_plugged_change(struct msm_dp *msm_dp_display,
plugged);
}
-static int msm_dp_hpd_unplug_handle(struct msm_dp_display_private *dp, u32 data)
+static int msm_dp_hpd_unplug_handle(struct msm_dp_display_private *dp)
{
u32 state;
struct platform_device *pdev = dp->msm_dp_display.pdev;
@@ -707,7 +705,7 @@ static int msm_dp_hpd_unplug_handle(struct msm_dp_display_private *dp, u32 data)
return 0;
}
-static int msm_dp_irq_hpd_handle(struct msm_dp_display_private *dp, u32 data)
+static int msm_dp_irq_hpd_handle(struct msm_dp_display_private *dp)
{
u32 state;
@@ -725,7 +723,7 @@ static int msm_dp_irq_hpd_handle(struct msm_dp_display_private *dp, u32 data)
if (state == ST_MAINLINK_READY || state == ST_DISCONNECT_PENDING) {
/* wait until ST_CONNECTED */
- msm_dp_add_event(dp, EV_IRQ_HPD_INT, 0, 1); /* delay = 1 */
+ msm_dp_add_event(dp, EV_IRQ_HPD_INT, 1);
mutex_unlock(&dp->event_mutex);
return 0;
}
@@ -1080,7 +1078,6 @@ static int hpd_event_thread(void *data)
todo_next = &msm_dp_priv->event_list[msm_dp_priv->event_pndx++];
msm_dp_priv->event_pndx %= DP_EVENT_Q_MAX;
todo_next->event_id = todo->event_id;
- todo_next->data = todo->data;
todo_next->delay = todo->delay - 1;
/* clean up older event */
@@ -1106,13 +1103,13 @@ static int hpd_event_thread(void *data)
switch (todo->event_id) {
case EV_HPD_PLUG_INT:
- msm_dp_hpd_plug_handle(msm_dp_priv, todo->data);
+ msm_dp_hpd_plug_handle(msm_dp_priv);
break;
case EV_HPD_UNPLUG_INT:
- msm_dp_hpd_unplug_handle(msm_dp_priv, todo->data);
+ msm_dp_hpd_unplug_handle(msm_dp_priv);
break;
case EV_IRQ_HPD_INT:
- msm_dp_irq_hpd_handle(msm_dp_priv, todo->data);
+ msm_dp_irq_hpd_handle(msm_dp_priv);
break;
default:
break;
@@ -1216,19 +1213,19 @@ static irqreturn_t msm_dp_display_irq_handler(int irq, void *dev_id)
dp->msm_dp_display.connector_type, hpd_isr_status);
/* hpd related interrupts */
if (hpd_isr_status & DP_DP_HPD_PLUG_INT_MASK)
- msm_dp_add_event(dp, EV_HPD_PLUG_INT, 0, 0);
+ msm_dp_add_event(dp, EV_HPD_PLUG_INT, 0);
if (hpd_isr_status & DP_DP_IRQ_HPD_INT_MASK) {
- msm_dp_add_event(dp, EV_IRQ_HPD_INT, 0, 0);
+ msm_dp_add_event(dp, EV_IRQ_HPD_INT, 0);
}
if (hpd_isr_status & DP_DP_HPD_REPLUG_INT_MASK) {
- msm_dp_add_event(dp, EV_HPD_UNPLUG_INT, 0, 0);
- msm_dp_add_event(dp, EV_HPD_PLUG_INT, 0, 3);
+ msm_dp_add_event(dp, EV_HPD_UNPLUG_INT, 0);
+ msm_dp_add_event(dp, EV_HPD_PLUG_INT, 3);
}
if (hpd_isr_status & DP_DP_HPD_UNPLUG_INT_MASK)
- msm_dp_add_event(dp, EV_HPD_UNPLUG_INT, 0, 0);
+ msm_dp_add_event(dp, EV_HPD_UNPLUG_INT, 0);
ret = IRQ_HANDLED;
}
@@ -1653,7 +1650,7 @@ void msm_dp_bridge_atomic_enable(struct drm_bridge *drm_bridge,
}
if (dp->is_edp)
- msm_dp_hpd_plug_handle(msm_dp_display, 0);
+ msm_dp_hpd_plug_handle(msm_dp_display);
mutex_lock(&msm_dp_display->event_mutex);
if (pm_runtime_resume_and_get(&dp->pdev->dev)) {
@@ -1727,7 +1724,7 @@ void msm_dp_bridge_atomic_post_disable(struct drm_bridge *drm_bridge,
msm_dp_display = container_of(dp, struct msm_dp_display_private, msm_dp_display);
if (dp->is_edp)
- msm_dp_hpd_unplug_handle(msm_dp_display, 0);
+ msm_dp_hpd_unplug_handle(msm_dp_display);
mutex_lock(&msm_dp_display->event_mutex);
@@ -1849,7 +1846,7 @@ void msm_dp_bridge_hpd_notify(struct drm_bridge *bridge,
return;
if (!msm_dp_display->link_ready && status == connector_status_connected)
- msm_dp_add_event(dp, EV_HPD_PLUG_INT, 0, 0);
+ msm_dp_add_event(dp, EV_HPD_PLUG_INT, 0);
else if (msm_dp_display->link_ready && status == connector_status_disconnected)
- msm_dp_add_event(dp, EV_HPD_UNPLUG_INT, 0, 0);
+ msm_dp_add_event(dp, EV_HPD_UNPLUG_INT, 0);
}
--
2.47.3