Lines Matching refs:dp_display

103 	struct msm_dp dp_display;  member
187 return container_of(dp, struct dp_display_private, dp_display); in dev_get_dp_display_private()
244 void dp_display_signal_audio_start(struct msm_dp *dp_display) in dp_display_signal_audio_start() argument
248 dp = container_of(dp_display, struct dp_display_private, dp_display); in dp_display_signal_audio_start()
253 void dp_display_signal_audio_complete(struct msm_dp *dp_display) in dp_display_signal_audio_complete() argument
257 dp = container_of(dp_display, struct dp_display_private, dp_display); in dp_display_signal_audio_complete()
272 dp->dp_display.drm_dev = drm; in dp_display_bind()
273 priv->dp[dp->id] = &dp->dp_display; in dp_display_bind()
352 static void dp_display_send_hpd_event(struct msm_dp *dp_display) in dp_display_send_hpd_event() argument
357 dp = container_of(dp_display, struct dp_display_private, dp_display); in dp_display_send_hpd_event()
359 connector = dp->dp_display.connector; in dp_display_send_hpd_event()
367 if ((hpd && dp->dp_display.is_connected) || in dp_display_send_hpd_notification()
368 (!hpd && !dp->dp_display.is_connected)) { in dp_display_send_hpd_notification()
378 dp->dp_display.is_connected = hpd; in dp_display_send_hpd_notification()
381 dp->dp_display.connector_type, hpd); in dp_display_send_hpd_notification()
382 dp_display_send_hpd_event(&dp->dp_display); in dp_display_send_hpd_notification()
394 rc = dp_panel_read_sink_caps(dp->panel, dp->dp_display.connector); in dp_display_process_hpd_high()
405 dp->dp_display.max_dp_lanes = dp->parser->max_dp_lanes; in dp_display_process_hpd_high()
429 dp->dp_display.connector_type, dp->core_initialized, in dp_display_host_phy_init()
441 dp->dp_display.connector_type, dp->core_initialized, in dp_display_host_phy_exit()
453 dp->dp_display.connector_type, dp->core_initialized, in dp_display_host_init()
465 dp->dp_display.connector_type, dp->core_initialized, in dp_display_host_deinit()
583 dp->dp_display.connector_type, state); in dp_hpd_plug_handle()
614 dp->dp_display.connector_type, state); in dp_hpd_plug_handle()
621 static void dp_display_handle_plugged_change(struct msm_dp *dp_display, in dp_display_handle_plugged_change() argument
626 dp = container_of(dp_display, in dp_display_handle_plugged_change()
627 struct dp_display_private, dp_display); in dp_display_handle_plugged_change()
630 if (dp_display->plugged_cb && dp_display->codec_dev && in dp_display_handle_plugged_change()
632 dp_display->plugged_cb(dp_display->codec_dev, plugged); in dp_display_handle_plugged_change()
648 dp->dp_display.connector_type, state); in dp_hpd_unplug_handle()
693 dp_display_handle_plugged_change(&dp->dp_display, false); in dp_hpd_unplug_handle()
696 if (!dp->dp_display.is_edp) in dp_hpd_unplug_handle()
700 dp->dp_display.connector_type, state); in dp_hpd_unplug_handle()
716 dp->dp_display.connector_type, state); in dp_irq_hpd_handle()
733 dp->dp_display.connector_type, state); in dp_irq_hpd_handle()
794 dp->aux = dp_aux_get(dev, dp->catalog, dp->dp_display.is_edp); in dp_init_sub_modules()
853 static int dp_display_set_mode(struct msm_dp *dp_display, in dp_display_set_mode() argument
858 dp = container_of(dp_display, struct dp_display_private, dp_display); in dp_display_set_mode()
870 struct msm_dp *dp_display = &dp->dp_display; in dp_display_enable() local
873 if (dp_display->power_on) { in dp_display_enable()
880 dp_display->power_on = true; in dp_display_enable()
885 static int dp_display_post_enable(struct msm_dp *dp_display) in dp_display_post_enable() argument
890 dp = container_of(dp_display, struct dp_display_private, dp_display); in dp_display_post_enable()
900 dp_display_handle_plugged_change(dp_display, true); in dp_display_post_enable()
906 struct msm_dp *dp_display = &dp->dp_display; in dp_display_disable() local
908 if (!dp_display->power_on) in dp_display_disable()
912 if (dp_display->audio_enabled) { in dp_display_disable()
914 dp_display_handle_plugged_change(dp_display, false); in dp_display_disable()
920 dp_display->audio_enabled = false; in dp_display_disable()
937 dp_display->power_on = false; in dp_display_disable()
943 int dp_display_set_plugged_cb(struct msm_dp *dp_display, in dp_display_set_plugged_cb() argument
948 dp_display->plugged_cb = fn; in dp_display_set_plugged_cb()
949 dp_display->codec_dev = codec_dev; in dp_display_set_plugged_cb()
950 plugged = dp_display->is_connected; in dp_display_set_plugged_cb()
951 dp_display_handle_plugged_change(dp_display, plugged); in dp_display_set_plugged_cb()
968 struct dp_display_private *dp_display; in dp_bridge_mode_valid() local
974 dp = to_dp_bridge(bridge)->dp_display; in dp_bridge_mode_valid()
992 dp_display = container_of(dp, struct dp_display_private, dp_display); in dp_bridge_mode_valid()
993 link_info = &dp_display->panel->link_info; in dp_bridge_mode_valid()
999 mode_bpp = dp_panel_get_mode_bpp(dp_display->panel, in dp_bridge_mode_valid()
1013 struct dp_display_private *dp_display; in dp_display_get_modes() local
1020 dp_display = container_of(dp, struct dp_display_private, dp_display); in dp_display_get_modes()
1022 return dp_panel_get_modes(dp_display->panel, in dp_display_get_modes()
1028 struct dp_display_private *dp_display; in dp_display_check_video_test() local
1030 dp_display = container_of(dp, struct dp_display_private, dp_display); in dp_display_check_video_test()
1032 return dp_display->panel->video_test; in dp_display_check_video_test()
1037 struct dp_display_private *dp_display; in dp_display_get_test_bpp() local
1044 dp_display = container_of(dp, struct dp_display_private, dp_display); in dp_display_get_test_bpp()
1047 dp_display->link->test_video.test_bit_depth); in dp_display_get_test_bpp()
1052 struct dp_display_private *dp_display; in msm_dp_snapshot() local
1054 dp_display = container_of(dp, struct dp_display_private, dp_display); in msm_dp_snapshot()
1063 mutex_lock(&dp_display->event_mutex); in msm_dp_snapshot()
1066 mutex_unlock(&dp_display->event_mutex); in msm_dp_snapshot()
1070 dp_catalog_snapshot(dp_display->catalog, disp_state); in msm_dp_snapshot()
1072 mutex_unlock(&dp_display->event_mutex); in msm_dp_snapshot()
1082 if (!dp->dp_display.is_edp) in dp_display_config_hpd()
1207 dp->dp_display.connector_type, hpd_isr_status); in dp_display_irq_handler()
1234 int dp_display_request_irq(struct msm_dp *dp_display) in dp_display_request_irq() argument
1239 if (!dp_display) { in dp_display_request_irq()
1244 dp = container_of(dp_display, struct dp_display_private, dp_display); in dp_display_request_irq()
1252 rc = devm_request_irq(dp_display->drm_dev->dev, dp->irq, in dp_display_request_irq()
1308 dp->dp_display.connector_type = desc->connector_type; in dp_display_probe()
1310 dp->dp_display.is_edp = in dp_display_probe()
1311 (dp->dp_display.connector_type == DRM_MODE_CONNECTOR_eDP); in dp_display_probe()
1325 dp->dp_display.dp_audio = dp->audio; in dp_display_probe()
1329 platform_set_drvdata(pdev, &dp->dp_display); in dp_display_probe()
1355 struct msm_dp *dp_display = platform_get_drvdata(pdev); in dp_pm_resume() local
1359 dp = container_of(dp_display, struct dp_display_private, dp_display); in dp_pm_resume()
1365 dp->dp_display.connector_type, dp->core_initialized, in dp_pm_resume()
1366 dp->phy_initialized, dp_display->power_on); in dp_pm_resume()
1377 if (!dp->dp_display.is_edp) in dp_pm_resume()
1405 dp->dp_display.is_connected = true; in dp_pm_resume()
1407 dp->dp_display.is_connected = false; in dp_pm_resume()
1408 dp_display_handle_plugged_change(dp_display, false); in dp_pm_resume()
1413 dp->dp_display.connector_type, dp->link->sink_count, in dp_pm_resume()
1414 dp->dp_display.is_connected, dp->core_initialized, in dp_pm_resume()
1415 dp->phy_initialized, dp_display->power_on); in dp_pm_resume()
1425 struct msm_dp *dp_display = platform_get_drvdata(pdev); in dp_pm_suspend() local
1428 dp = container_of(dp_display, struct dp_display_private, dp_display); in dp_pm_suspend()
1434 dp->dp_display.connector_type, dp->core_initialized, in dp_pm_suspend()
1435 dp->phy_initialized, dp_display->power_on); in dp_pm_suspend()
1450 dp->dp_display.connector_type, dp->core_initialized, in dp_pm_suspend()
1451 dp->phy_initialized, dp_display->power_on); in dp_pm_suspend()
1490 void msm_dp_irq_postinstall(struct msm_dp *dp_display) in msm_dp_irq_postinstall() argument
1494 if (!dp_display) in msm_dp_irq_postinstall()
1497 dp = container_of(dp_display, struct dp_display_private, dp_display); in msm_dp_irq_postinstall()
1499 if (!dp_display->is_edp) in msm_dp_irq_postinstall()
1503 bool msm_dp_wide_bus_available(const struct msm_dp *dp_display) in msm_dp_wide_bus_available() argument
1507 dp = container_of(dp_display, struct dp_display_private, dp_display); in msm_dp_wide_bus_available()
1512 void msm_dp_debugfs_init(struct msm_dp *dp_display, struct drm_minor *minor) in msm_dp_debugfs_init() argument
1518 dp = container_of(dp_display, struct dp_display_private, dp_display); in msm_dp_debugfs_init()
1522 dp->link, dp->dp_display.connector, in msm_dp_debugfs_init()
1543 dp_priv = container_of(dp, struct dp_display_private, dp_display); in dp_display_get_next_bridge()
1600 int msm_dp_modeset_init(struct msm_dp *dp_display, struct drm_device *dev, in msm_dp_modeset_init() argument
1607 if (WARN_ON(!encoder) || WARN_ON(!dp_display) || WARN_ON(!dev)) in msm_dp_modeset_init()
1617 dp_display->drm_dev = dev; in msm_dp_modeset_init()
1619 dp_priv = container_of(dp_display, struct dp_display_private, dp_display); in msm_dp_modeset_init()
1621 ret = dp_display_request_irq(dp_display); in msm_dp_modeset_init()
1627 ret = dp_display_get_next_bridge(dp_display); in msm_dp_modeset_init()
1631 dp_display->bridge = dp_bridge_init(dp_display, dev, encoder); in msm_dp_modeset_init()
1632 if (IS_ERR(dp_display->bridge)) { in msm_dp_modeset_init()
1633 ret = PTR_ERR(dp_display->bridge); in msm_dp_modeset_init()
1636 dp_display->bridge = NULL; in msm_dp_modeset_init()
1640 priv->bridges[priv->num_bridges++] = dp_display->bridge; in msm_dp_modeset_init()
1642 dp_display->connector = dp_drm_connector_init(dp_display, encoder); in msm_dp_modeset_init()
1643 if (IS_ERR(dp_display->connector)) { in msm_dp_modeset_init()
1644 ret = PTR_ERR(dp_display->connector); in msm_dp_modeset_init()
1647 dp_display->connector = NULL; in msm_dp_modeset_init()
1651 dp_priv->panel->connector = dp_display->connector; in msm_dp_modeset_init()
1659 struct msm_dp *dp = dp_bridge->dp_display; in dp_bridge_enable()
1661 struct dp_display_private *dp_display; in dp_bridge_enable() local
1665 dp_display = container_of(dp, struct dp_display_private, dp_display); in dp_bridge_enable()
1666 if (!dp_display->dp_mode.drm_mode.clock) { in dp_bridge_enable()
1672 dp_hpd_plug_handle(dp_display, 0); in dp_bridge_enable()
1674 mutex_lock(&dp_display->event_mutex); in dp_bridge_enable()
1676 state = dp_display->hpd_state; in dp_bridge_enable()
1678 mutex_unlock(&dp_display->event_mutex); in dp_bridge_enable()
1682 rc = dp_display_set_mode(dp, &dp_display->dp_mode); in dp_bridge_enable()
1685 mutex_unlock(&dp_display->event_mutex); in dp_bridge_enable()
1689 state = dp_display->hpd_state; in dp_bridge_enable()
1692 dp_display_host_phy_init(dp_display); in dp_bridge_enable()
1696 dp_display_enable(dp_display, force_link_train); in dp_bridge_enable()
1701 dp_display_disable(dp_display); in dp_bridge_enable()
1705 dp_display->hpd_state = ST_CONNECTED; in dp_bridge_enable()
1708 mutex_unlock(&dp_display->event_mutex); in dp_bridge_enable()
1714 struct msm_dp *dp = dp_bridge->dp_display; in dp_bridge_disable()
1715 struct dp_display_private *dp_display; in dp_bridge_disable() local
1717 dp_display = container_of(dp, struct dp_display_private, dp_display); in dp_bridge_disable()
1719 dp_ctrl_push_idle(dp_display->ctrl); in dp_bridge_disable()
1725 struct msm_dp *dp = dp_bridge->dp_display; in dp_bridge_post_disable()
1727 struct dp_display_private *dp_display; in dp_bridge_post_disable() local
1729 dp_display = container_of(dp, struct dp_display_private, dp_display); in dp_bridge_post_disable()
1732 dp_hpd_unplug_handle(dp_display, 0); in dp_bridge_post_disable()
1734 mutex_lock(&dp_display->event_mutex); in dp_bridge_post_disable()
1736 state = dp_display->hpd_state; in dp_bridge_post_disable()
1738 mutex_unlock(&dp_display->event_mutex); in dp_bridge_post_disable()
1742 dp_display_disable(dp_display); in dp_bridge_post_disable()
1744 state = dp_display->hpd_state; in dp_bridge_post_disable()
1747 dp_display->hpd_state = ST_DISCONNECTED; in dp_bridge_post_disable()
1749 dp_display->hpd_state = ST_DISPLAY_OFF; in dp_bridge_post_disable()
1753 mutex_unlock(&dp_display->event_mutex); in dp_bridge_post_disable()
1761 struct msm_dp *dp = dp_bridge->dp_display; in dp_bridge_mode_set()
1762 struct dp_display_private *dp_display; in dp_bridge_mode_set() local
1764 dp_display = container_of(dp, struct dp_display_private, dp_display); in dp_bridge_mode_set()
1766 memset(&dp_display->dp_mode, 0x0, sizeof(struct dp_display_mode)); in dp_bridge_mode_set()
1769 dp_display->dp_mode.bpp = dp_display_get_test_bpp(dp); in dp_bridge_mode_set()
1771 dp_display->dp_mode.bpp = dp->connector->display_info.bpc * 3; in dp_bridge_mode_set()
1773 if (!dp_display->dp_mode.bpp) in dp_bridge_mode_set()
1774 dp_display->dp_mode.bpp = 24; /* Default bpp */ in dp_bridge_mode_set()
1776 drm_mode_copy(&dp_display->dp_mode.drm_mode, adjusted_mode); in dp_bridge_mode_set()
1778 dp_display->dp_mode.v_active_low = in dp_bridge_mode_set()
1779 !!(dp_display->dp_mode.drm_mode.flags & DRM_MODE_FLAG_NVSYNC); in dp_bridge_mode_set()
1781 dp_display->dp_mode.h_active_low = in dp_bridge_mode_set()
1782 !!(dp_display->dp_mode.drm_mode.flags & DRM_MODE_FLAG_NHSYNC); in dp_bridge_mode_set()