Re: [PATCH v3 08/10] drm/display: bridge-connector: handle CEC adapters

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

 



On 29/01/2025 00:44, Dmitry Baryshkov wrote:
On Tue, Jan 28, 2025 at 05:14:06PM +0100, Maxime Ripard wrote:
On Sun, Jan 26, 2025 at 03:29:13PM +0200, Dmitry Baryshkov wrote:
  /* -----------------------------------------------------------------------------
   * Bridge Connector Initialisation
   */
@@ -633,6 +711,21 @@ struct drm_connector *drm_bridge_connector_init(struct drm_device *drm,
  			if (ret)
  				return ERR_PTR(ret);
  		}
+
+		if (bridge->hdmi_cec_adapter_name) {
+			if (!bridge->funcs->hdmi_cec_enable ||
+			    !bridge->funcs->hdmi_cec_log_addr ||
+			    !bridge->funcs->hdmi_cec_transmit)
+				return ERR_PTR(-EINVAL);
+
+			ret = drm_connector_hdmi_cec_register(connector,
+							      &drm_bridge_connector_hdmi_cec_ops,
+							      bridge->hdmi_cec_adapter_name,
+							      bridge->hdmi_cec_available_las,
+							      bridge->hdmi_dev);
+			if (ret)
+				return ERR_PTR(ret);
+		}

Maybe we can use a different bridge feature flag to trigger the CEC code
support instead?

it is possible, but what is the possible usecase? DP drivers should be
using DP_AUX CEC instead. And I think there are no other kinds of
bridges which implement CEC support. Meson driver does something strange
by registering CEC notifier from meson_encoder_hdmi. I think instead
this should be moved to the DW HDMI bridge itself


It was done before bridge_connector has any support for CEC to keep the
functionnality, I'll be happy to switch to this.

Neil



[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