diff options
author | Dave Airlie <airlied@redhat.com> | 2019-02-11 13:32:38 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2019-02-11 13:32:49 +1000 |
commit | 38f070eb125a9253ec1acd641e7159555f57132a (patch) | |
tree | a5e146cc0f8dbf5486ef8ae14a77e50164ee1ac0 /drivers/gpu/host1x/bus.c | |
parent | 0ad7fb7c7b973ca4cea341282a60d056393d8034 (diff) | |
parent | 79930bafe2802c3a67a70ad4904032d9154bf3fa (diff) |
Merge tag 'drm/tegra/for-5.1-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next
drm/tegra: Changes for v5.1-rc1
This set of changes starts of with some refactoring of the CEC support
to make it reusable on Tegra210 and later. Following are a couple of
fixes for HDMI audio support (via HDA).
The bulk here is a set of preparatory patches working towards enabling
Tegra186 support for host1x and VIC. Additional patches will be needed
to fully enable this, but they're not quite ready yet.
To round things off, this also adds support for configuring the SOR
crossbar using device tree, and fixes a couple of job-related issues in
the host1x code.
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Thierry Reding <thierry.reding@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190208144721.25830-1-thierry.reding@gmail.com
Diffstat (limited to 'drivers/gpu/host1x/bus.c')
-rw-r--r-- | drivers/gpu/host1x/bus.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/bus.c b/drivers/gpu/host1x/bus.c index b4c385d4a6af..103fffc1904b 100644 --- a/drivers/gpu/host1x/bus.c +++ b/drivers/gpu/host1x/bus.c @@ -15,8 +15,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <linux/debugfs.h> #include <linux/host1x.h> #include <linux/of.h> +#include <linux/seq_file.h> #include <linux/slab.h> #include <linux/of_device.h> @@ -500,6 +502,36 @@ static void host1x_detach_driver(struct host1x *host1x, mutex_unlock(&host1x->devices_lock); } +static int host1x_devices_show(struct seq_file *s, void *data) +{ + struct host1x *host1x = s->private; + struct host1x_device *device; + + mutex_lock(&host1x->devices_lock); + + list_for_each_entry(device, &host1x->devices, list) { + struct host1x_subdev *subdev; + + seq_printf(s, "%s\n", dev_name(&device->dev)); + + mutex_lock(&device->subdevs_lock); + + list_for_each_entry(subdev, &device->active, list) + seq_printf(s, " %pOFf: %s\n", subdev->np, + dev_name(subdev->client->dev)); + + list_for_each_entry(subdev, &device->subdevs, list) + seq_printf(s, " %pOFf:\n", subdev->np); + + mutex_unlock(&device->subdevs_lock); + } + + mutex_unlock(&host1x->devices_lock); + + return 0; +} +DEFINE_SHOW_ATTRIBUTE(host1x_devices); + /** * host1x_register() - register a host1x controller * @host1x: host1x controller @@ -523,6 +555,9 @@ int host1x_register(struct host1x *host1x) mutex_unlock(&drivers_lock); + debugfs_create_file("devices", S_IRUGO, host1x->debugfs, host1x, + &host1x_devices_fops); + return 0; } |