Lines Matching refs:dp_display

104 	struct msm_dp dp_display;  member
197 return container_of(dp, struct dp_display_private, dp_display); in dev_get_dp_display_private()
254 void dp_display_signal_audio_start(struct msm_dp *dp_display) in dp_display_signal_audio_start() argument
258 dp = container_of(dp_display, struct dp_display_private, dp_display); in dp_display_signal_audio_start()
263 void dp_display_signal_audio_complete(struct msm_dp *dp_display) in dp_display_signal_audio_complete() argument
267 dp = container_of(dp_display, struct dp_display_private, dp_display); in dp_display_signal_audio_complete()
282 dp->dp_display.drm_dev = drm; in dp_display_bind()
283 priv->dp[dp->id] = &dp->dp_display; in dp_display_bind()
365 static void dp_display_send_hpd_event(struct msm_dp *dp_display) in dp_display_send_hpd_event() argument
370 dp = container_of(dp_display, struct dp_display_private, dp_display); in dp_display_send_hpd_event()
372 connector = dp->dp_display.connector; in dp_display_send_hpd_event()
380 if ((hpd && dp->dp_display.is_connected) || in dp_display_send_hpd_notification()
381 (!hpd && !dp->dp_display.is_connected)) { in dp_display_send_hpd_notification()
391 dp->dp_display.is_connected = hpd; in dp_display_send_hpd_notification()
394 dp->dp_display.connector_type, hpd); in dp_display_send_hpd_notification()
395 dp_display_send_hpd_event(&dp->dp_display); in dp_display_send_hpd_notification()
411 rc = dp_panel_read_sink_caps(dp->panel, dp->dp_display.connector); in dp_display_process_hpd_high()
419 dp->dp_display.psr_supported = dp->panel->psr_cap.version && psr_enabled; in dp_display_process_hpd_high()
424 dp->dp_display.max_dp_lanes = dp->parser->max_dp_lanes; in dp_display_process_hpd_high()
448 dp->dp_display.connector_type, dp->core_initialized, in dp_display_host_phy_init()
460 dp->dp_display.connector_type, dp->core_initialized, in dp_display_host_phy_exit()
472 dp->dp_display.connector_type, dp->core_initialized, in dp_display_host_init()
484 dp->dp_display.connector_type, dp->core_initialized, in dp_display_host_deinit()
595 dp->dp_display.connector_type, state); in dp_hpd_plug_handle()
622 dp->dp_display.connector_type, state); in dp_hpd_plug_handle()
629 static void dp_display_handle_plugged_change(struct msm_dp *dp_display, in dp_display_handle_plugged_change() argument
634 dp = container_of(dp_display, in dp_display_handle_plugged_change()
635 struct dp_display_private, dp_display); in dp_display_handle_plugged_change()
638 if (dp_display->plugged_cb && dp_display->codec_dev && in dp_display_handle_plugged_change()
640 dp_display->plugged_cb(dp_display->codec_dev, plugged); in dp_display_handle_plugged_change()
654 dp->dp_display.connector_type, state); in dp_hpd_unplug_handle()
692 dp_display_handle_plugged_change(&dp->dp_display, false); in dp_hpd_unplug_handle()
695 dp->dp_display.connector_type, state); in dp_hpd_unplug_handle()
711 dp->dp_display.connector_type, state); in dp_irq_hpd_handle()
728 dp->dp_display.connector_type, state); in dp_irq_hpd_handle()
775 dp->aux = dp_aux_get(dev, dp->catalog, dp->dp_display.is_edp); in dp_init_sub_modules()
834 static int dp_display_set_mode(struct msm_dp *dp_display, in dp_display_set_mode() argument
839 dp = container_of(dp_display, struct dp_display_private, dp_display); in dp_display_set_mode()
851 struct msm_dp *dp_display = &dp->dp_display; in dp_display_enable() local
854 if (dp_display->power_on) { in dp_display_enable()
861 dp_display->power_on = true; in dp_display_enable()
866 static int dp_display_post_enable(struct msm_dp *dp_display) in dp_display_post_enable() argument
871 dp = container_of(dp_display, struct dp_display_private, dp_display); in dp_display_post_enable()
881 dp_display_handle_plugged_change(dp_display, true); in dp_display_post_enable()
883 if (dp_display->psr_supported) in dp_display_post_enable()
891 struct msm_dp *dp_display = &dp->dp_display; in dp_display_disable() local
893 if (!dp_display->power_on) in dp_display_disable()
897 if (dp_display->audio_enabled) { in dp_display_disable()
899 dp_display_handle_plugged_change(dp_display, false); in dp_display_disable()
905 dp_display->audio_enabled = false; in dp_display_disable()
922 dp_display->power_on = false; in dp_display_disable()
928 int dp_display_set_plugged_cb(struct msm_dp *dp_display, in dp_display_set_plugged_cb() argument
933 dp_display->plugged_cb = fn; in dp_display_set_plugged_cb()
934 dp_display->codec_dev = codec_dev; in dp_display_set_plugged_cb()
935 plugged = dp_display->is_connected; in dp_display_set_plugged_cb()
936 dp_display_handle_plugged_change(dp_display, plugged); in dp_display_set_plugged_cb()
953 struct dp_display_private *dp_display; in dp_bridge_mode_valid() local
959 dp = to_dp_bridge(bridge)->dp_display; in dp_bridge_mode_valid()
969 dp_display = container_of(dp, struct dp_display_private, dp_display); in dp_bridge_mode_valid()
970 link_info = &dp_display->panel->link_info; in dp_bridge_mode_valid()
976 mode_bpp = dp_panel_get_mode_bpp(dp_display->panel, in dp_bridge_mode_valid()
990 struct dp_display_private *dp_display; in dp_display_get_modes() local
997 dp_display = container_of(dp, struct dp_display_private, dp_display); in dp_display_get_modes()
999 return dp_panel_get_modes(dp_display->panel, in dp_display_get_modes()
1005 struct dp_display_private *dp_display; in dp_display_check_video_test() local
1007 dp_display = container_of(dp, struct dp_display_private, dp_display); in dp_display_check_video_test()
1009 return dp_display->panel->video_test; in dp_display_check_video_test()
1014 struct dp_display_private *dp_display; in dp_display_get_test_bpp() local
1021 dp_display = container_of(dp, struct dp_display_private, dp_display); in dp_display_get_test_bpp()
1024 dp_display->link->test_video.test_bit_depth); in dp_display_get_test_bpp()
1029 struct dp_display_private *dp_display; in msm_dp_snapshot() local
1031 dp_display = container_of(dp, struct dp_display_private, dp_display); in msm_dp_snapshot()
1040 mutex_lock(&dp_display->event_mutex); in msm_dp_snapshot()
1043 mutex_unlock(&dp_display->event_mutex); in msm_dp_snapshot()
1047 dp_catalog_snapshot(dp_display->catalog, disp_state); in msm_dp_snapshot()
1049 mutex_unlock(&dp_display->event_mutex); in msm_dp_snapshot()
1052 void dp_display_set_psr(struct msm_dp *dp_display, bool enter) in dp_display_set_psr() argument
1056 if (!dp_display) { in dp_display_set_psr()
1061 dp = container_of(dp_display, struct dp_display_private, dp_display); in dp_display_set_psr()
1177 dp->dp_display.connector_type, hpd_isr_status); in dp_display_irq_handler()
1206 int dp_display_request_irq(struct msm_dp *dp_display) in dp_display_request_irq() argument
1211 if (!dp_display) { in dp_display_request_irq()
1216 dp = container_of(dp_display, struct dp_display_private, dp_display); in dp_display_request_irq()
1224 rc = devm_request_irq(dp_display->drm_dev->dev, dp->irq, in dp_display_request_irq()
1277 dp->dp_display.connector_type = desc->connector_type; in dp_display_probe()
1279 dp->dp_display.is_edp = in dp_display_probe()
1280 (dp->dp_display.connector_type == DRM_MODE_CONNECTOR_eDP); in dp_display_probe()
1294 dp->dp_display.dp_audio = dp->audio; in dp_display_probe()
1298 platform_set_drvdata(pdev, &dp->dp_display); in dp_display_probe()
1324 struct msm_dp *dp_display = platform_get_drvdata(pdev); in dp_pm_resume() local
1328 dp = container_of(dp_display, struct dp_display_private, dp_display); in dp_pm_resume()
1334 dp->dp_display.connector_type, dp->core_initialized, in dp_pm_resume()
1335 dp->phy_initialized, dp_display->power_on); in dp_pm_resume()
1343 if (dp_display->is_edp) in dp_pm_resume()
1368 dp->dp_display.is_connected = true; in dp_pm_resume()
1370 dp->dp_display.is_connected = false; in dp_pm_resume()
1371 dp_display_handle_plugged_change(dp_display, false); in dp_pm_resume()
1376 dp->dp_display.connector_type, dp->link->sink_count, in dp_pm_resume()
1377 dp->dp_display.is_connected, dp->core_initialized, in dp_pm_resume()
1378 dp->phy_initialized, dp_display->power_on); in dp_pm_resume()
1388 struct msm_dp *dp_display = platform_get_drvdata(pdev); in dp_pm_suspend() local
1391 dp = container_of(dp_display, struct dp_display_private, dp_display); in dp_pm_suspend()
1397 dp->dp_display.connector_type, dp->core_initialized, in dp_pm_suspend()
1398 dp->phy_initialized, dp_display->power_on); in dp_pm_suspend()
1413 dp->dp_display.connector_type, dp->core_initialized, in dp_pm_suspend()
1414 dp->phy_initialized, dp_display->power_on); in dp_pm_suspend()
1453 void msm_dp_irq_postinstall(struct msm_dp *dp_display) in msm_dp_irq_postinstall() argument
1457 if (!dp_display) in msm_dp_irq_postinstall()
1460 dp = container_of(dp_display, struct dp_display_private, dp_display); in msm_dp_irq_postinstall()
1462 if (!dp_display->is_edp) in msm_dp_irq_postinstall()
1466 bool msm_dp_wide_bus_available(const struct msm_dp *dp_display) in msm_dp_wide_bus_available() argument
1470 dp = container_of(dp_display, struct dp_display_private, dp_display); in msm_dp_wide_bus_available()
1475 void msm_dp_debugfs_init(struct msm_dp *dp_display, struct drm_minor *minor) in msm_dp_debugfs_init() argument
1481 dp = container_of(dp_display, struct dp_display_private, dp_display); in msm_dp_debugfs_init()
1485 dp->link, dp->dp_display.connector, in msm_dp_debugfs_init()
1501 dp_priv = container_of(dp, struct dp_display_private, dp_display); in dp_display_get_next_bridge()
1551 int msm_dp_modeset_init(struct msm_dp *dp_display, struct drm_device *dev, in msm_dp_modeset_init() argument
1558 dp_display->drm_dev = dev; in msm_dp_modeset_init()
1560 dp_priv = container_of(dp_display, struct dp_display_private, dp_display); in msm_dp_modeset_init()
1562 ret = dp_display_request_irq(dp_display); in msm_dp_modeset_init()
1568 ret = dp_display_get_next_bridge(dp_display); in msm_dp_modeset_init()
1572 dp_display->bridge = dp_bridge_init(dp_display, dev, encoder); in msm_dp_modeset_init()
1573 if (IS_ERR(dp_display->bridge)) { in msm_dp_modeset_init()
1574 ret = PTR_ERR(dp_display->bridge); in msm_dp_modeset_init()
1577 dp_display->bridge = NULL; in msm_dp_modeset_init()
1581 priv->bridges[priv->num_bridges++] = dp_display->bridge; in msm_dp_modeset_init()
1583 dp_display->connector = dp_drm_connector_init(dp_display, encoder); in msm_dp_modeset_init()
1584 if (IS_ERR(dp_display->connector)) { in msm_dp_modeset_init()
1585 ret = PTR_ERR(dp_display->connector); in msm_dp_modeset_init()
1588 dp_display->connector = NULL; in msm_dp_modeset_init()
1592 dp_priv->panel->connector = dp_display->connector; in msm_dp_modeset_init()
1601 struct msm_dp *dp = dp_bridge->dp_display; in dp_bridge_atomic_enable()
1603 struct dp_display_private *dp_display; in dp_bridge_atomic_enable() local
1607 dp_display = container_of(dp, struct dp_display_private, dp_display); in dp_bridge_atomic_enable()
1608 if (!dp_display->dp_mode.drm_mode.clock) { in dp_bridge_atomic_enable()
1614 dp_hpd_plug_handle(dp_display, 0); in dp_bridge_atomic_enable()
1616 mutex_lock(&dp_display->event_mutex); in dp_bridge_atomic_enable()
1618 state = dp_display->hpd_state; in dp_bridge_atomic_enable()
1620 mutex_unlock(&dp_display->event_mutex); in dp_bridge_atomic_enable()
1624 rc = dp_display_set_mode(dp, &dp_display->dp_mode); in dp_bridge_atomic_enable()
1627 mutex_unlock(&dp_display->event_mutex); in dp_bridge_atomic_enable()
1631 state = dp_display->hpd_state; in dp_bridge_atomic_enable()
1634 dp_display_host_phy_init(dp_display); in dp_bridge_atomic_enable()
1638 dp_display_enable(dp_display, force_link_train); in dp_bridge_atomic_enable()
1643 dp_display_disable(dp_display); in dp_bridge_atomic_enable()
1647 dp_display->hpd_state = ST_CONNECTED; in dp_bridge_atomic_enable()
1650 mutex_unlock(&dp_display->event_mutex); in dp_bridge_atomic_enable()
1657 struct msm_dp *dp = dp_bridge->dp_display; in dp_bridge_atomic_disable()
1658 struct dp_display_private *dp_display; in dp_bridge_atomic_disable() local
1660 dp_display = container_of(dp, struct dp_display_private, dp_display); in dp_bridge_atomic_disable()
1662 dp_ctrl_push_idle(dp_display->ctrl); in dp_bridge_atomic_disable()
1669 struct msm_dp *dp = dp_bridge->dp_display; in dp_bridge_atomic_post_disable()
1671 struct dp_display_private *dp_display; in dp_bridge_atomic_post_disable() local
1673 dp_display = container_of(dp, struct dp_display_private, dp_display); in dp_bridge_atomic_post_disable()
1676 dp_hpd_unplug_handle(dp_display, 0); in dp_bridge_atomic_post_disable()
1678 mutex_lock(&dp_display->event_mutex); in dp_bridge_atomic_post_disable()
1680 state = dp_display->hpd_state; in dp_bridge_atomic_post_disable()
1682 mutex_unlock(&dp_display->event_mutex); in dp_bridge_atomic_post_disable()
1686 dp_display_disable(dp_display); in dp_bridge_atomic_post_disable()
1688 state = dp_display->hpd_state; in dp_bridge_atomic_post_disable()
1691 dp_display->hpd_state = ST_DISCONNECTED; in dp_bridge_atomic_post_disable()
1693 dp_display->hpd_state = ST_DISPLAY_OFF; in dp_bridge_atomic_post_disable()
1697 mutex_unlock(&dp_display->event_mutex); in dp_bridge_atomic_post_disable()
1705 struct msm_dp *dp = dp_bridge->dp_display; in dp_bridge_mode_set()
1706 struct dp_display_private *dp_display; in dp_bridge_mode_set() local
1708 dp_display = container_of(dp, struct dp_display_private, dp_display); in dp_bridge_mode_set()
1710 memset(&dp_display->dp_mode, 0x0, sizeof(struct dp_display_mode)); in dp_bridge_mode_set()
1713 dp_display->dp_mode.bpp = dp_display_get_test_bpp(dp); in dp_bridge_mode_set()
1715 dp_display->dp_mode.bpp = dp->connector->display_info.bpc * 3; in dp_bridge_mode_set()
1717 if (!dp_display->dp_mode.bpp) in dp_bridge_mode_set()
1718 dp_display->dp_mode.bpp = 24; /* Default bpp */ in dp_bridge_mode_set()
1720 drm_mode_copy(&dp_display->dp_mode.drm_mode, adjusted_mode); in dp_bridge_mode_set()
1722 dp_display->dp_mode.v_active_low = in dp_bridge_mode_set()
1723 !!(dp_display->dp_mode.drm_mode.flags & DRM_MODE_FLAG_NVSYNC); in dp_bridge_mode_set()
1725 dp_display->dp_mode.h_active_low = in dp_bridge_mode_set()
1726 !!(dp_display->dp_mode.drm_mode.flags & DRM_MODE_FLAG_NHSYNC); in dp_bridge_mode_set()
1732 struct msm_dp *dp_display = dp_bridge->dp_display; in dp_bridge_hpd_enable() local
1733 struct dp_display_private *dp = container_of(dp_display, struct dp_display_private, dp_display); in dp_bridge_hpd_enable()
1741 dp_display->internal_hpd = true; in dp_bridge_hpd_enable()
1748 struct msm_dp *dp_display = dp_bridge->dp_display; in dp_bridge_hpd_disable() local
1749 struct dp_display_private *dp = container_of(dp_display, struct dp_display_private, dp_display); in dp_bridge_hpd_disable()
1756 dp_display->internal_hpd = false; in dp_bridge_hpd_disable()
1764 struct msm_dp *dp_display = dp_bridge->dp_display; in dp_bridge_hpd_notify() local
1765 struct dp_display_private *dp = container_of(dp_display, struct dp_display_private, dp_display); in dp_bridge_hpd_notify()
1768 if (dp_display->internal_hpd) in dp_bridge_hpd_notify()
1776 if (!dp_display->is_connected && status == connector_status_connected) in dp_bridge_hpd_notify()
1778 else if (dp_display->is_connected && status == connector_status_disconnected) in dp_bridge_hpd_notify()