[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260115-hpd-refactor-v3-6-08e2f3bcd2e0@oss.qualcomm.com>
Date: Thu, 15 Jan 2026 09:29:11 +0200
From: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
To: Rob Clark <robin.clark@....qualcomm.com>,
Dmitry Baryshkov <lumag@...nel.org>,
Abhinav Kumar <abhinav.kumar@...ux.dev>,
Jessica Zhang <jesszhan0024@...il.com>, Sean Paul <sean@...rly.run>,
Marijn Suijten <marijn.suijten@...ainline.org>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Kuogee Hsieh <quic_khsieh@...cinc.com>
Cc: linux-arm-msm@...r.kernel.org, dri-devel@...ts.freedesktop.org,
freedreno@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: [PATCH v3 6/8] drm/msm/dp: drop event data
With EV_USER_NOTIFICATION gone event's data is no longer useful. Drop
it, removing also the argument from event handlers.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
---
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 e0b424ac861a..e93de362dd39 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;
};
@@ -218,7 +217,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;
@@ -236,7 +235,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);
@@ -576,7 +574,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;
@@ -602,7 +600,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;
}
@@ -644,7 +642,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;
@@ -706,7 +704,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;
@@ -724,7 +722,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;
}
@@ -1079,7 +1077,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 */
@@ -1105,13 +1102,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;
@@ -1212,19 +1209,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;
}
@@ -1649,7 +1646,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)) {
@@ -1722,7 +1719,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);
@@ -1844,7 +1841,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
Powered by blists - more mailing lists