[PATCH 3/7] drm: Add bmc_attached flag to connector

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add the bmc_attached flag to struct drm_connector to signal the
presence of a virtual BMC output. The connector reports to be in
status connected even without a physically connected display. Fbcon
or userspace compositors would otherwise stop displaying to the
BMC.

Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx>
---
 drivers/gpu/drm/drm_probe_helper.c | 6 +++++-
 include/drm/drm_connector.h        | 8 ++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index df44be128e72..83c3f2d42d49 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -605,7 +605,11 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
 			ret = connector_status_unknown;
 
 		connector->physical_status = ret;
-		connector->status = connector->physical_status;
+
+		if (connector->bmc_attached)
+			connector->status = connector_status_connected;
+		else
+			connector->status = connector->physical_status;
 	}
 
 	/*
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index 37e951f04ae8..ed360ae35f21 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -1802,6 +1802,14 @@ struct drm_connector {
 	 */
 	bool ycbcr_420_allowed;
 
+	/**
+	 * @ bmc_attached:
+	 * The connector has a BMC transparently attached to it. It has to
+	 * report a connected status, even without a physically connected
+	 * display.
+	 */
+	bool bmc_attached;
+
 	/**
 	 * @registration_state: Is this connector initializing, exposed
 	 * (registered) with userspace, or unregistered?
-- 
2.46.0




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux