mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
drm/rockchip: find connector by device node
Change-Id: I3851e296669c5c67ada47b472a3f7294ca25c796 Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
This commit is contained in:
@@ -997,6 +997,7 @@ static int analogix_dp_bridge_attach(struct drm_bridge *bridge)
|
||||
}
|
||||
|
||||
connector->polled = DRM_CONNECTOR_POLL_HPD;
|
||||
connector->port = dp->dev->of_node;
|
||||
|
||||
ret = drm_connector_init(dp->drm_dev, connector,
|
||||
&analogix_dp_connector_funcs,
|
||||
|
||||
@@ -1759,6 +1759,7 @@ static int dw_hdmi_register(struct drm_device *drm, struct dw_hdmi *hdmi)
|
||||
|
||||
encoder->bridge = bridge;
|
||||
hdmi->connector.polled = DRM_CONNECTOR_POLL_HPD;
|
||||
hdmi->connector.port = hdmi->dev->of_node;
|
||||
|
||||
drm_connector_helper_add(&hdmi->connector,
|
||||
&dw_hdmi_connector_helper_funcs);
|
||||
|
||||
@@ -1089,6 +1089,7 @@ static int dw_mipi_dsi_register(struct drm_device *drm,
|
||||
&dw_mipi_dsi_atomic_connector_funcs,
|
||||
DRM_MODE_CONNECTOR_DSI);
|
||||
|
||||
dsi->connector.port = dev->of_node;
|
||||
drm_mode_connector_attach_encoder(connector, encoder);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -869,6 +869,7 @@ static int inno_hdmi_register(struct drm_device *drm, struct inno_hdmi *hdmi)
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
|
||||
hdmi->connector.polled = DRM_CONNECTOR_POLL_HPD;
|
||||
hdmi->connector.port = dev->of_node;
|
||||
|
||||
drm_connector_helper_add(&hdmi->connector,
|
||||
&inno_hdmi_connector_helper_funcs);
|
||||
|
||||
@@ -610,6 +610,7 @@ struct drm_encoder {
|
||||
/**
|
||||
* struct drm_connector - central DRM connector control structure
|
||||
* @dev: parent DRM device
|
||||
* @port: OF node used by find connector by node.
|
||||
* @kdev: kernel device for sysfs attributes
|
||||
* @attr: sysfs attributes
|
||||
* @head: list management
|
||||
@@ -664,6 +665,7 @@ struct drm_encoder {
|
||||
*/
|
||||
struct drm_connector {
|
||||
struct drm_device *dev;
|
||||
struct device_node *port;
|
||||
struct device *kdev;
|
||||
struct device_attribute *attr;
|
||||
struct list_head head;
|
||||
|
||||
Reference in New Issue
Block a user