omap4: how to obtain drm_connector in hdmi4_cec.c for cec_s_conn_info()?

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Aug 19 15:46:23 UTC 2019


Hi Hans,

On Mon, Aug 19, 2019 at 05:23:31PM +0200, Hans Verkuil wrote:
> Hi Tomi, Laurent,
> 
> For the CEC framework we (Dariusz and myself) are working on code to associate
> a drm_connector with a CEC adapter, making it easier for userspace to link the
> two.
> 
> In order to do that I need the drm_connector structure when creating the
> CEC adapter in hdmi4_cec.c. That's easy enough in the GPU drivers, except for
> the omap.
> 
> I need the drm_connector in hdmi4_cec_init(). Any idea how to obtain it
> through the seemingly endless layers of data structures?
> 
> The code itself that needs to be added to hdmi4_cec_init() is easy enough:
> 
> 	struct cec_connector_info conn_info;
> 
> 	cec_fill_conn_info_from_drm(&conn_info, connector);
> 	cec_s_conn_info(core->adap, &conn_info);
> 
> but getting the drm_connector is the hard bit.

Please have a look at "[PATCH 00/60] drm/omap: Replace custom display
drivers with drm_bridge and drm_panel", available in a new version at

	git://linuxtv.org/pinchartl/media.git omapdrm/bridge/devel

(I will post v2 soon)

The patches show the direction the omapdrm driver is taking. The goal is
to decouple connectors from bridges, which I'm afraid will have an
impact on associating drm_connector with a CEC adapter. This should be
implemented through new drm_bridge operations, as bridges, when created,
will not create drm_connector anymore.

I've solved a similar problem related to associating DRM connectors with
an I2C adapter for DDC. Please see the drm_bridge_connector_init()
function and how the DDC adapter is handled. Something similar could be
done for CEC.

> As an aside: I finally found some time to finish my work on the omap5 CEC support.
> Expect patches for this soon.

Could you please rebase that on the above patch series ?

-- 
Regards,

Laurent Pinchart


More information about the dri-devel mailing list