Lines Matching refs:dp_priv
190 static int dp_add_event(struct dp_display_private *dp_priv, u32 event, in dp_add_event() argument
197 spin_lock_irqsave(&dp_priv->event_lock, flag); in dp_add_event()
198 pndx = dp_priv->event_pndx + 1; in dp_add_event()
200 if (pndx == dp_priv->event_gndx) { in dp_add_event()
202 dp_priv->event_pndx, dp_priv->event_gndx); in dp_add_event()
203 spin_unlock_irqrestore(&dp_priv->event_lock, flag); in dp_add_event()
206 todo = &dp_priv->event_list[dp_priv->event_pndx++]; in dp_add_event()
207 dp_priv->event_pndx %= DP_EVENT_Q_MAX; in dp_add_event()
211 wake_up(&dp_priv->event_q); in dp_add_event()
212 spin_unlock_irqrestore(&dp_priv->event_lock, flag); in dp_add_event()
217 static int dp_del_event(struct dp_display_private *dp_priv, u32 event) in dp_del_event() argument
223 spin_lock_irqsave(&dp_priv->event_lock, flag); in dp_del_event()
224 if (dp_priv->event_pndx == dp_priv->event_gndx) { in dp_del_event()
225 spin_unlock_irqrestore(&dp_priv->event_lock, flag); in dp_del_event()
229 gndx = dp_priv->event_gndx; in dp_del_event()
230 while (dp_priv->event_pndx != gndx) { in dp_del_event()
231 todo = &dp_priv->event_list[gndx]; in dp_del_event()
239 spin_unlock_irqrestore(&dp_priv->event_lock, flag); in dp_del_event()
262 static int dp_hpd_event_thread_start(struct dp_display_private *dp_priv);
1097 struct dp_display_private *dp_priv; in hpd_event_thread() local
1102 dp_priv = (struct dp_display_private *)data; in hpd_event_thread()
1106 wait_event_timeout(dp_priv->event_q, in hpd_event_thread()
1107 (dp_priv->event_pndx == dp_priv->event_gndx) || in hpd_event_thread()
1110 wait_event_interruptible(dp_priv->event_q, in hpd_event_thread()
1111 (dp_priv->event_pndx != dp_priv->event_gndx) || in hpd_event_thread()
1118 spin_lock_irqsave(&dp_priv->event_lock, flag); in hpd_event_thread()
1119 todo = &dp_priv->event_list[dp_priv->event_gndx]; in hpd_event_thread()
1123 dp_priv->event_gndx++; in hpd_event_thread()
1124 dp_priv->event_gndx %= DP_EVENT_Q_MAX; in hpd_event_thread()
1127 todo_next = &dp_priv->event_list[dp_priv->event_pndx++]; in hpd_event_thread()
1128 dp_priv->event_pndx %= DP_EVENT_Q_MAX; in hpd_event_thread()
1139 spin_unlock_irqrestore(&dp_priv->event_lock, flag); in hpd_event_thread()
1144 if (dp_priv->event_pndx == dp_priv->event_gndx) { in hpd_event_thread()
1145 spin_unlock_irqrestore(&dp_priv->event_lock, flag); in hpd_event_thread()
1149 dp_priv->event_gndx++; in hpd_event_thread()
1150 dp_priv->event_gndx %= DP_EVENT_Q_MAX; in hpd_event_thread()
1152 spin_unlock_irqrestore(&dp_priv->event_lock, flag); in hpd_event_thread()
1156 dp_display_config_hpd(dp_priv); in hpd_event_thread()
1159 dp_hpd_plug_handle(dp_priv, todo->data); in hpd_event_thread()
1162 dp_hpd_unplug_handle(dp_priv, todo->data); in hpd_event_thread()
1165 dp_irq_hpd_handle(dp_priv, todo->data); in hpd_event_thread()
1168 dp_display_send_hpd_notification(dp_priv, in hpd_event_thread()
1179 static int dp_hpd_event_thread_start(struct dp_display_private *dp_priv) in dp_hpd_event_thread_start() argument
1182 dp_priv->event_gndx = 0; in dp_hpd_event_thread_start()
1183 dp_priv->event_pndx = 0; in dp_hpd_event_thread_start()
1185 dp_priv->ev_tsk = kthread_run(hpd_event_thread, dp_priv, "dp_hpd_handler"); in dp_hpd_event_thread_start()
1186 if (IS_ERR(dp_priv->ev_tsk)) in dp_hpd_event_thread_start()
1187 return PTR_ERR(dp_priv->ev_tsk); in dp_hpd_event_thread_start()
1539 struct dp_display_private *dp_priv; in dp_display_get_next_bridge() local
1543 dp_priv = container_of(dp, struct dp_display_private, dp_display); in dp_display_get_next_bridge()
1544 dev = &dp_priv->pdev->dev; in dp_display_get_next_bridge()
1548 dp_display_host_init(dp_priv); in dp_display_get_next_bridge()
1549 dp_catalog_ctrl_hpd_config(dp_priv->catalog); in dp_display_get_next_bridge()
1550 dp_display_host_phy_init(dp_priv); in dp_display_get_next_bridge()
1551 enable_irq(dp_priv->irq); in dp_display_get_next_bridge()
1560 rc = of_dp_aux_populate_bus(dp_priv->aux, NULL); in dp_display_get_next_bridge()
1567 dp_priv->aux); in dp_display_get_next_bridge()
1582 rc = devm_dp_parser_find_next_bridge(dp->drm_dev->dev, dp_priv->parser); in dp_display_get_next_bridge()
1587 dp->next_bridge = dp_priv->parser->next_bridge; in dp_display_get_next_bridge()
1593 disable_irq(dp_priv->irq); in dp_display_get_next_bridge()
1594 dp_display_host_phy_exit(dp_priv); in dp_display_get_next_bridge()
1595 dp_display_host_deinit(dp_priv); in dp_display_get_next_bridge()
1604 struct dp_display_private *dp_priv; in msm_dp_modeset_init() local
1619 dp_priv = container_of(dp_display, struct dp_display_private, dp_display); in msm_dp_modeset_init()
1651 dp_priv->panel->connector = dp_display->connector; in msm_dp_modeset_init()