mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
gpu: host1x: Update to Linux v5.19-rc1
Update the host1x driver to align with the latest upstream host1x driver from Linux v5.19-rc1. Please note that the context bus support is not included, because this needs to be built into the kernel. Bug 3724727 Change-Id: Ic6fbe001462d160d1bb24f76038dd755c5550690 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2739538 Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com>
This commit is contained in:
committed by
Laxman Dewangan
parent
0955b8b8a5
commit
9edef092b1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
@@ -52,6 +53,11 @@ static int show_channel(struct host1x_channel *ch, void *data, bool show_fifo)
|
||||
{
|
||||
struct host1x *m = dev_get_drvdata(ch->dev->parent);
|
||||
struct output *o = data;
|
||||
int err;
|
||||
|
||||
err = pm_runtime_resume_and_get(m->dev);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
mutex_lock(&ch->cdma.lock);
|
||||
mutex_lock(&debug_lock);
|
||||
@@ -64,16 +70,23 @@ static int show_channel(struct host1x_channel *ch, void *data, bool show_fifo)
|
||||
mutex_unlock(&debug_lock);
|
||||
mutex_unlock(&ch->cdma.lock);
|
||||
|
||||
pm_runtime_put(m->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void show_syncpts(struct host1x *m, struct output *o)
|
||||
static void show_syncpts(struct host1x *m, struct output *o, bool show_all)
|
||||
{
|
||||
struct list_head *pos;
|
||||
unsigned int i;
|
||||
int err;
|
||||
|
||||
host1x_debug_output(o, "---- syncpts ----\n");
|
||||
|
||||
err = pm_runtime_resume_and_get(m->dev);
|
||||
if (err < 0)
|
||||
return;
|
||||
|
||||
for (i = 0; i < host1x_syncpt_nb_pts(m); i++) {
|
||||
u32 max = host1x_syncpt_read_max(m->syncpt + i);
|
||||
u32 min = host1x_syncpt_load(m->syncpt + i);
|
||||
@@ -84,7 +97,10 @@ static void show_syncpts(struct host1x *m, struct output *o)
|
||||
waiters++;
|
||||
spin_unlock(&m->syncpt[i].intr.lock);
|
||||
|
||||
if (!min && !max && !waiters)
|
||||
if (!kref_read(&m->syncpt[i].ref))
|
||||
continue;
|
||||
|
||||
if (!show_all && !min && !max && !waiters)
|
||||
continue;
|
||||
|
||||
host1x_debug_output(o,
|
||||
@@ -101,6 +117,8 @@ static void show_syncpts(struct host1x *m, struct output *o)
|
||||
base_val);
|
||||
}
|
||||
|
||||
pm_runtime_put(m->dev);
|
||||
|
||||
host1x_debug_output(o, "\n");
|
||||
}
|
||||
|
||||
@@ -109,7 +127,7 @@ static void show_all(struct host1x *m, struct output *o, bool show_fifo)
|
||||
unsigned int i;
|
||||
|
||||
host1x_hw_show_mlocks(m, o);
|
||||
show_syncpts(m, o);
|
||||
show_syncpts(m, o, true);
|
||||
host1x_debug_output(o, "---- channels ----\n");
|
||||
|
||||
for (i = 0; i < m->info->nb_channels; ++i) {
|
||||
@@ -226,5 +244,5 @@ void host1x_debug_dump_syncpts(struct host1x *host1x)
|
||||
.fn = write_to_printk
|
||||
};
|
||||
|
||||
show_syncpts(host1x, &o);
|
||||
show_syncpts(host1x, &o, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user