diff options
| author | Jeremy Ho <jeremyh@nvidia.com> | 2019-10-01 09:27:13 -0400 |
|---|---|---|
| committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2019-10-22 16:40:18 -0400 |
| commit | aa2b199a23e452ee8fec5d418e04973275083339 (patch) | |
| tree | bc6abf6854ba9a2f2888400a769ea9101650d10f /drivers/gpu | |
| parent | 497adc48e837ec5531cefa8b7a0c18437106701a (diff) | |
DRM: tegra_udrm: support dual hdmi hotplug
Bug 200549422
Change-Id: I0c073509e097db6de8706fb59bd67ec2e92fe4d4
Signed-off-by: Jeremy Ho <jeremyh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2209472
Reviewed-by: Ken Chang <kenc@nvidia.com>
Reviewed-by: Yogish Kulkarni <yogishk@nvidia.com>
Reviewed-by: Naveen Kumar S <nkumars@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/tegra_udrm/tegra_udrm_drv.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tegra_udrm/tegra_udrm_drv.c b/drivers/gpu/drm/tegra_udrm/tegra_udrm_drv.c index 14c1e2845..28effb97c 100644 --- a/drivers/gpu/drm/tegra_udrm/tegra_udrm_drv.c +++ b/drivers/gpu/drm/tegra_udrm/tegra_udrm_drv.c | |||
| @@ -41,7 +41,7 @@ static bool tegra_udrm_modeset_module_param; | |||
| 41 | module_param_named(modeset, tegra_udrm_modeset_module_param, bool, 0400); | 41 | module_param_named(modeset, tegra_udrm_modeset_module_param, bool, 0400); |
| 42 | 42 | ||
| 43 | static const unsigned int cable_ids[] = { | 43 | static const unsigned int cable_ids[] = { |
| 44 | EXTCON_DISP_HDMI, EXTCON_DISP_DP, EXTCON_DISP_DSIHPD}; | 44 | EXTCON_DISP_HDMI, EXTCON_DISP_DP, EXTCON_DISP_DSIHPD, EXTCON_DISP_HDMI2}; |
| 45 | struct tegra_udrm_private { | 45 | struct tegra_udrm_private { |
| 46 | struct drm_device *drm; | 46 | struct drm_device *drm; |
| 47 | struct notifier_block hpd_nb[ARRAY_SIZE(cable_ids)]; | 47 | struct notifier_block hpd_nb[ARRAY_SIZE(cable_ids)]; |
| @@ -501,6 +501,17 @@ static int tegra_udrm_dsi_notifier(struct notifier_block *nb, | |||
| 501 | return NOTIFY_DONE; | 501 | return NOTIFY_DONE; |
| 502 | } | 502 | } |
| 503 | 503 | ||
| 504 | static int tegra_udrm_hdmi2_notifier(struct notifier_block *nb, | ||
| 505 | unsigned long event, void *unused) | ||
| 506 | { | ||
| 507 | struct tegra_udrm_private *priv = container_of(nb, | ||
| 508 | struct tegra_udrm_private, hpd_nb[3]); | ||
| 509 | |||
| 510 | drm_sysfs_hotplug_event(priv->drm); | ||
| 511 | |||
| 512 | return NOTIFY_DONE; | ||
| 513 | } | ||
| 514 | |||
| 504 | static int tegra_udrm_probe(struct platform_device *pdev) | 515 | static int tegra_udrm_probe(struct platform_device *pdev) |
| 505 | { | 516 | { |
| 506 | struct drm_driver *driver = &tegra_udrm_driver; | 517 | struct drm_driver *driver = &tegra_udrm_driver; |
| @@ -537,6 +548,7 @@ static int tegra_udrm_probe(struct platform_device *pdev) | |||
| 537 | priv->hpd_nb[0].notifier_call = tegra_udrm_hdmi_notifier; | 548 | priv->hpd_nb[0].notifier_call = tegra_udrm_hdmi_notifier; |
| 538 | priv->hpd_nb[1].notifier_call = tegra_udrm_dp_notifier; | 549 | priv->hpd_nb[1].notifier_call = tegra_udrm_dp_notifier; |
| 539 | priv->hpd_nb[2].notifier_call = tegra_udrm_dsi_notifier; | 550 | priv->hpd_nb[2].notifier_call = tegra_udrm_dsi_notifier; |
| 551 | priv->hpd_nb[3].notifier_call = tegra_udrm_hdmi2_notifier; | ||
| 540 | for (i = 0; i < ARRAY_SIZE(cable_ids); i++) { | 552 | for (i = 0; i < ARRAY_SIZE(cable_ids); i++) { |
| 541 | ret = devm_extcon_register_notifier(drm->dev, edev, | 553 | ret = devm_extcon_register_notifier(drm->dev, edev, |
| 542 | cable_ids[i], &priv->hpd_nb[i]); | 554 | cable_ids[i], &priv->hpd_nb[i]); |
