summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/host1x/bus.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'drm/tegra/for-4.6-rc1' of ↵Dave Airlie2016-03-171-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://anongit.freedesktop.org/git/tegra/linux into drm-next drm/tegra: Changes for v4.6-rc1 Only two cleanups this time around. One fixes reference counting of device tree nodes, the other changes the return value of a function from an unsigned int to an int to reflect that it will return error codes. * tag 'drm/tegra/for-4.6-rc1' of http://anongit.freedesktop.org/git/tegra/linux: gpu: host1x: Use a signed return type for do_relocs() gpu: host1x: bus: Add missing of_node_put()
| * gpu: host1x: bus: Add missing of_node_put()Amitoj Kaur Chawla2016-03-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for_each_child_of_node() performs an of_node_get() on each iteration, so to break out of the loop an of_node_put() is required. Found using Coccinelle. The semantic patch used for this is as follows: // <smpl> @@ expression e; local idexpression n; @@ for_each_child_of_node(..., n) { ... when != of_node_put(n) when != e = n ( return n; | + of_node_put(n); ? return ...; ) ... } // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
* | gpu: host1x: Set DMA ops on device creationAlexandre Courbot2016-03-041-0/+2
|/ | | | | | | | | | | | | Currently host1x-instanciated devices have their dma_ops left to NULL, which makes any DMA operation (like buffer import) on ARM64 fallback to the dummy_dma_ops and fail with an error. This patch calls of_dma_configure() with the host1x node when creating such a device, so the proper DMA operations are set. Suggested-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
* gpu: host1x: Remove core driver on unregisterThierry Reding2015-12-141-0/+2
| | | | | | | | When unregistering a host1x driver, make sure to unregister the core driver as well to prevent it from sticking around and oppose reloading of the driver. Signed-off-by: Thierry Reding <treding@nvidia.com>
* gpu: host1x: Provide a proper struct bus_typeThierry Reding2015-01-271-35/+76
| | | | | | | | | | | | | | | | | | | | | Previously the struct bus_type exported by the host1x infrastructure was only a very basic skeleton. Turn that implementation into a more full- fledged bus to support proper probe ordering and power management. Note that the bus infrastructure needs to be available before any of the drivers can be registered. This is automatically ensured if all drivers are built as loadable modules (via symbol dependencies). If all drivers are built-in there are no such guarantees and the link order determines the initcall ordering. Adjust drivers/gpu/Makefile to make sure that the host1x bus infrastructure is initialized prior to any of its users (only drm/tegra currently). v2: Fix building host1x and tegra-drm as modules Reported-by: Dave Airlie <airlied@gmail.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> Reviewed-by: Mark Zhang <markz@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
* gpu: host1x: Factor out __host1x_device_del()Thierry Reding2015-01-231-44/+49
| | | | | | This function is needed in several places, so factor it out. Signed-off-by: Thierry Reding <treding@nvidia.com>
* gpu: host1x: Call host1x_device_add() under lockThierry Reding2015-01-231-4/+2
| | | | | | | Instead of locking within host1x_device_add(), call it under the lock to make the locking more consistent. Signed-off-by: Thierry Reding <treding@nvidia.com>
* gpu: host1x: Call ->remove() only when a device is boundThierry Reding2015-01-231-2/+7
| | | | | | | | When a driver's ->probe() function fails, the host1x bus must not call its ->remove() function because the driver will already have cleaned up in the error handling path in ->probe(). Signed-off-by: Thierry Reding <treding@nvidia.com>
* gpu: host1x: Rename internal functions for clarityThierry Reding2014-06-051-6/+6
| | | | | | | | | | The internal host1x_{,un}register_client() functions can potentially be confused with public the host1x_client_{,un}register() functions. Rename them to host1x_{add,del}_client() to remove some of the possible confusion. Signed-off-by: Thierry Reding <treding@nvidia.com>
* gpu: host1x: Export public APIThierry Reding2013-12-191-0/+2
| | | | | | | Make the public API symbols visible so that depending drivers can be built as a module. Signed-off-by: Thierry Reding <treding@nvidia.com>
* gpu: host1x: Fix a few sparse warningsThierry Reding2013-12-031-2/+3
| | | | | | | | | | | | | Include the bus.h header, so that various function declarations are visible in the source file that implements those functions. This keeps sparse from suggesting that they should be made static. Make the host1x_bus_type variable static since it isn't used globally. Finally replace the slightly unsafe dev_set_name(dev, name) by the more secure dev_set_name(dev, "%s", name). Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: Move subdevice infrastructure to host1xThierry Reding2013-10-311-0/+550
The Tegra DRM driver currently uses some infrastructure to defer the DRM core initialization until all required devices have registered. The same infrastructure can potentially be used by any other driver that requires more than a single sub-device of the host1x module. Make the infrastructure more generic and keep only the DRM specific code in the DRM part of the driver. Eventually this will make it easy to move the DRM driver part back to the DRM subsystem. Signed-off-by: Thierry Reding <treding@nvidia.com>
OpenPOWER on IntegriCloud