summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/dss/dss-of.c
AgeCommit message (Collapse)AuthorFilesLines
2018-09-03drm/omap: dss: Extend omapdss_of_find_source_for_first_ep() to sinksLaurent Pinchart1-7/+7
The omapdss_of_find_source_for_first_ep() function locates the source corresponding to the first endpoint of the first port of a device node. We can easily extend it to locate sinks as well by passing the port number as a parameter. This will be useful to find sinks in encoders drivers. Extend the function and rename it to omapdss_of_find_connected_device() to reflect its new extended purpose. Additionally, it is useful to differentiate between failures to return the connected device because no link exists in the device tree for the requested port, or because the connected device as described in the device tree is invalid or not probed yet. Return NULL in the first case and an error code in the second case, and update the callers accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2018-09-03drm/omap: dss: Allow looking up any device by portLaurent Pinchart1-1/+1
The omap_dss_find_output_by_port() function looks up an omap_dss_device by port from the list of devices registered as outputs. In preparation for looking up sinks in addition to sources, allow the function to look up any registered device. Rename it to omap_dss_find_device_by_port() to match its new purpose. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2018-09-03drm/omap: dss: Rework output lookup by port nodeLaurent Pinchart1-21/+18
The omap_dss_find_output_by_port_node() function defined in output.c looks up an output from its port node. To do so it needs to call helper functions from dss-of.c to lookup the port parent and the port number. As omap_dss_find_output_by_port_node() is only called by omapdss_of_find_source_for_first_ep() from dss-of.c this goes back and forth between the to source files and isn't very clear. Simplify the code by passing both the parent and the port number to omap_dss_find_output_by_port_node() instead of the port node, and rename the function to omap_dss_find_output_by_port(). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2018-03-01drm: omapdrm: dss: Don't export functions internal to omapdss-baseLaurent Pinchart1-2/+0
A few functions defined in omapdss-base are internal to the module. Don't export them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-12-19drm: omapdrm: Remove filename from header and fix copyright tagAndrew F. Davis1-1/+1
Having the filename in the header serves little purpose and is often wrong after renames as it is here in several places, just drop it from all omapdrm files. While we are here unify the copyright tags to the TI recommended style. Signed-off-by: Andrew F. Davis <afd@ti.com>
2017-04-07drm: omap: use common OF graph helpersRob Herring1-99/+3
The OMAP driver has its own OF graph helpers that are similar to the common helpers. This commit replaces most of the calls with the common helpers. There's still a couple of custom helpers left, but the driver needs more extensive changes to get rid of them. In dss_init_ports, we invert the loop, looping through the known ports and matching them to DT nodes rather than looping thru DT nodes and matching them to the ports. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Sean Paul <seanpaul@chromium.org>
2017-04-03drm/omap: move display, dss-of, output to omapdss-baseTomi Valkeinen1-1/+2
This patch moves the common parts of omapdss to omapdss-base so that both the current omapdss driver and the new omapdss6 driver can use them. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-08-12Revert "gpu: drm: omapdrm: dss-of: add missing of_node_put after calling ↵Peter Chen1-4/+3
of_parse_phandle" This reverts commit 2ab9f5879162499e1c4e48613287e3f59e593c4f Author: Peter Chen <peter.chen@nxp.com> Date: Fri Jul 15 11:17:03 2016 +0800 gpu: drm: omapdrm: dss-of: add missing of_node_put after calling of_parse_phandle The of_get_next_parent will drop refcount on the passed node, so the reverted patch is wrong, thanks for Tomi Valkeinen points it. Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Peter Chen <peter.chen@nxp.com> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/1470908694-16362-1-git-send-email-peter.chen@nxp.com
2016-07-15gpu: drm: omapdrm: dss-of: add missing of_node_put after calling ↵Peter Chen1-3/+4
of_parse_phandle of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Sean Paul <seanpaul@chromium.org>
2016-06-03drm/omap: Do not include video/omapdss.h directly in driversPeter Ujfalusi1-2/+1
All drivers to include the omapdrm/dss/omapdss.h header file. This header includes the <video/omapdss.h> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
2015-12-29drm/omap: move omapdss & displays under omapdrmTomi Valkeinen1-0/+183
Now that omapfb has its own copy of omapdss and display drivers, we can move omapdss and display drivers which omapdrm uses to omapdrm's directory. We also need to change the main drm Makefile so that omapdrm directory is always entered, because omapdss has a file that can't be built as a module. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Dave Airlie <airlied@gmail.com> Acked-by: Rob Clark <robdclark@gmail.com>