summaryrefslogtreecommitdiffstats
path: root/include/video/omapdss.h
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2014-04-22 08:13:48 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-11-12 06:40:06 -0500
commitef691ff48bc838e9fca54b58dccac0a7c36a3130 (patch)
tree16e1ae1aa6e6ff0bce886be42e1ce1a17c926d55 /include/video/omapdss.h
parent387ce9f2f2bd78436538deab9ece94512e362deb (diff)
OMAPDSS: DT: Get source endpoint by matching reg-id
In omapdss_of_find_source_for_first_ep, we retrieve a source endpoint's DT node, and then see what omapdss output has the matching device_node pointer in omap_dss_find_output_by_node. For all DPI and SDI outputs, the device_node pointer is set as the parent's DSS device_node pointer. If the source is one of these outputs, the above method won't work. To get the correct output for ports within DSS(and in other cases in the future, where multiple ports might be under one device), we require additional information which is exclusive to the output port. We create a new field in omap_dss_device called 'port_num', this provides port number of the output port corresponding to this device. When searching for the source endpoint in DT, we extract the 'reg' property from the port corresponding to the endpoint source. From the list of registered outputs, we pick out that output which has both dev->of_node and port_num matching with the device_node pointer and 'reg' of the source endpoint node from DT. For encoder blocks(the ones which have both an input and output port), we need to set the port_num as the 'reg' property for the output port as defined in the DT bindings. We set port_num to 1 in the tfp410 and tpd12s015 encoder drivers. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'include/video/omapdss.h')
-rw-r--r--include/video/omapdss.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 069dfca9549a..1db32023396e 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -795,6 +795,9 @@ struct omap_dss_device {
795 /* output instance */ 795 /* output instance */
796 enum omap_dss_output_id id; 796 enum omap_dss_output_id id;
797 797
798 /* the port number in the DT node */
799 int port_num;
800
798 /* dynamic fields */ 801 /* dynamic fields */
799 struct omap_overlay_manager *manager; 802 struct omap_overlay_manager *manager;
800 803
@@ -918,7 +921,7 @@ int omapdss_register_output(struct omap_dss_device *output);
918void omapdss_unregister_output(struct omap_dss_device *output); 921void omapdss_unregister_output(struct omap_dss_device *output);
919struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id); 922struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id);
920struct omap_dss_device *omap_dss_find_output(const char *name); 923struct omap_dss_device *omap_dss_find_output(const char *name);
921struct omap_dss_device *omap_dss_find_output_by_node(struct device_node *node); 924struct omap_dss_device *omap_dss_find_output_by_port_node(struct device_node *port);
922int omapdss_output_set_device(struct omap_dss_device *out, 925int omapdss_output_set_device(struct omap_dss_device *out,
923 struct omap_dss_device *dssdev); 926 struct omap_dss_device *dssdev);
924int omapdss_output_unset_device(struct omap_dss_device *out); 927int omapdss_output_unset_device(struct omap_dss_device *out);