Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/nvidia expose HDMI from HDMI VSDB as physical-a...
details: https://anonhg.NetBSD.org/src/rev/ef65e63c65f5
branches: trunk
changeset: 811780:ef65e63c65f5
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Nov 14 23:16:41 2015 +0000
description:
expose HDMI from HDMI VSDB as physical-address device property when available
diffstat:
sys/arch/arm/nvidia/tegra_drm_mode.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diffs (51 lines):
diff -r 07c9cab9580a -r ef65e63c65f5 sys/arch/arm/nvidia/tegra_drm_mode.c
--- a/sys/arch/arm/nvidia/tegra_drm_mode.c Sat Nov 14 23:15:44 2015 +0000
+++ b/sys/arch/arm/nvidia/tegra_drm_mode.c Sat Nov 14 23:16:41 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_drm_mode.c,v 1.6 2015/11/14 11:55:36 jmcneill Exp $ */
+/* $NetBSD: tegra_drm_mode.c,v 1.7 2015/11/14 23:16:41 jmcneill Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_drm_mode.c,v 1.6 2015/11/14 11:55:36 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_drm_mode.c,v 1.7 2015/11/14 23:16:41 jmcneill Exp $");
#include <drm/drmP.h>
#include <drm/drm_crtc.h>
@@ -1111,6 +1111,8 @@
if (con) {
return connector_status_connected;
} else {
+ prop_dictionary_t prop = device_properties(connector->dev->dev);
+ prop_dictionary_remove(prop, "physical-address");
tegra_connector->has_hdmi_sink = false;
tegra_connector->has_audio = false;
return connector_status_disconnected;
@@ -1129,6 +1131,7 @@
{
struct tegra_connector *tegra_connector = to_tegra_connector(connector);
struct tegra_drm_softc * const sc = tegra_drm_private(connector->dev);
+ prop_dictionary_t prop = device_properties(connector->dev->dev);
char edid[EDID_LENGTH * 4];
struct edid *pedid = NULL;
int error, block;
@@ -1159,8 +1162,13 @@
drm_detect_monitor_audio(pedid);
}
drm_mode_connector_update_edid_property(connector, pedid);
- return drm_add_edid_modes(connector, pedid);
-
+ error = drm_add_edid_modes(connector, pedid);
+ drm_edid_to_eld(connector, pedid);
+ if (drm_detect_hdmi_monitor(pedid)) {
+ prop_dictionary_set_uint16(prop, "physical-address",
+ connector->physical_address);
+ }
+ return error;
} else {
drm_mode_connector_update_edid_property(connector, NULL);
return 0;
Home |
Main Index |
Thread Index |
Old Index