Lines Matching refs:dp_priv

186 static int dp_add_event(struct dp_display_private *dp_priv, u32 event,  in dp_add_event()  argument
193 spin_lock_irqsave(&dp_priv->event_lock, flag); in dp_add_event()
194 pndx = dp_priv->event_pndx + 1; in dp_add_event()
196 if (pndx == dp_priv->event_gndx) { in dp_add_event()
198 dp_priv->event_pndx, dp_priv->event_gndx); in dp_add_event()
199 spin_unlock_irqrestore(&dp_priv->event_lock, flag); in dp_add_event()
202 todo = &dp_priv->event_list[dp_priv->event_pndx++]; in dp_add_event()
203 dp_priv->event_pndx %= DP_EVENT_Q_MAX; in dp_add_event()
207 wake_up(&dp_priv->event_q); in dp_add_event()
208 spin_unlock_irqrestore(&dp_priv->event_lock, flag); in dp_add_event()
213 static int dp_del_event(struct dp_display_private *dp_priv, u32 event) in dp_del_event() argument
219 spin_lock_irqsave(&dp_priv->event_lock, flag); in dp_del_event()
220 if (dp_priv->event_pndx == dp_priv->event_gndx) { in dp_del_event()
221 spin_unlock_irqrestore(&dp_priv->event_lock, flag); in dp_del_event()
225 gndx = dp_priv->event_gndx; in dp_del_event()
226 while (dp_priv->event_pndx != gndx) { in dp_del_event()
227 todo = &dp_priv->event_list[gndx]; in dp_del_event()
235 spin_unlock_irqrestore(&dp_priv->event_lock, flag); in dp_del_event()
258 static int dp_hpd_event_thread_start(struct dp_display_private *dp_priv);
1036 struct dp_display_private *dp_priv; in hpd_event_thread() local
1041 dp_priv = (struct dp_display_private *)data; in hpd_event_thread()
1045 wait_event_timeout(dp_priv->event_q, in hpd_event_thread()
1046 (dp_priv->event_pndx == dp_priv->event_gndx) || in hpd_event_thread()
1049 wait_event_interruptible(dp_priv->event_q, in hpd_event_thread()
1050 (dp_priv->event_pndx != dp_priv->event_gndx) || in hpd_event_thread()
1057 spin_lock_irqsave(&dp_priv->event_lock, flag); in hpd_event_thread()
1058 todo = &dp_priv->event_list[dp_priv->event_gndx]; in hpd_event_thread()
1062 dp_priv->event_gndx++; in hpd_event_thread()
1063 dp_priv->event_gndx %= DP_EVENT_Q_MAX; in hpd_event_thread()
1066 todo_next = &dp_priv->event_list[dp_priv->event_pndx++]; in hpd_event_thread()
1067 dp_priv->event_pndx %= DP_EVENT_Q_MAX; in hpd_event_thread()
1078 spin_unlock_irqrestore(&dp_priv->event_lock, flag); in hpd_event_thread()
1083 if (dp_priv->event_pndx == dp_priv->event_gndx) { in hpd_event_thread()
1084 spin_unlock_irqrestore(&dp_priv->event_lock, flag); in hpd_event_thread()
1088 dp_priv->event_gndx++; in hpd_event_thread()
1089 dp_priv->event_gndx %= DP_EVENT_Q_MAX; in hpd_event_thread()
1091 spin_unlock_irqrestore(&dp_priv->event_lock, flag); in hpd_event_thread()
1095 dp_hpd_plug_handle(dp_priv, todo->data); in hpd_event_thread()
1098 dp_hpd_unplug_handle(dp_priv, todo->data); in hpd_event_thread()
1101 dp_irq_hpd_handle(dp_priv, todo->data); in hpd_event_thread()
1104 dp_display_send_hpd_notification(dp_priv, in hpd_event_thread()
1115 static int dp_hpd_event_thread_start(struct dp_display_private *dp_priv) in dp_hpd_event_thread_start() argument
1118 dp_priv->event_gndx = 0; in dp_hpd_event_thread_start()
1119 dp_priv->event_pndx = 0; in dp_hpd_event_thread_start()
1121 dp_priv->ev_tsk = kthread_run(hpd_event_thread, dp_priv, "dp_hpd_handler"); in dp_hpd_event_thread_start()
1122 if (IS_ERR(dp_priv->ev_tsk)) in dp_hpd_event_thread_start()
1123 return PTR_ERR(dp_priv->ev_tsk); in dp_hpd_event_thread_start()
1463 struct dp_display_private *dp_priv; in msm_dp_modeset_init() local
1468 dp_priv = container_of(dp_display, struct dp_display_private, dp_display); in msm_dp_modeset_init()
1486 dp_priv->panel->connector = dp_display->connector; in msm_dp_modeset_init()