Displaying 13 results from an estimated 13 matches for "r535_gsp_retain_log".
2024 Jun 18
1
[PATCH 2/2] [v5] drm/nouveau: expose GSP-RM logging buffers via debugfs
....
void
r535_gsp_dtor(struct nvkm_gsp *gsp)
{
@@ -2514,6 +2864,14 @@ r535_gsp_dtor(struct nvkm_gsp *gsp)
nvkm_gsp_mem_dtor(&gsp->rmargs);
nvkm_gsp_mem_dtor(&gsp->wpr_meta);
nvkm_gsp_mem_dtor(&gsp->shm.mem);
+
+#ifdef CONFIG_DEBUG_FS
+ r535_gsp_retain_logging(gsp);
+
+ kfree(gsp->blob_pmu.data);
+ gsp->blob_pmu.data = NULL;
Please move this to r535_gsp_libos_debugfs_fini() to make it a bit more obvious
why this needs to be cleaned up here.
So first, I made a mistake, and the #ifdef is only supposed to be around the call to r...
2024 Jul 30
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...ose checks, please remove them.
Ok
> > + nvkm_debug(&gsp->subdev, "created debugfs GSP-RM logging entries\n");
> > +
> > + if (keep_gsp_logging) {
> > + nvkm_warn(&gsp->subdev,
>
> nvkm_info() is probably enough.
Ok.
> > +static void r535_gsp_retain_logging(struct nvkm_gsp *gsp)
> > +{
> > + struct device *dev = gsp->subdev.device->dev;
> > + struct dentry *root, *dir;
> > + struct r535_gsp_log *log;
> > + int ret;
> > +
> > + /* If we were told not to keep logs, then don't. */
> > + if (!k...
2024 Jul 31
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...> v01_00.
>
> So "previous RPC version (if it exists)" < "new RPC version" <= "current
> VGPU version" at the time the RPC was created/updated.
Pretty interesting, thanks for clarifying! (No need to document it though.)
> > > +static void r535_gsp_retain_logging(struct nvkm_gsp *gsp)
> > > +{
> > > + struct device *dev = gsp->subdev.device->dev;
> > > + struct dentry *root, *dir;
> > > + struct r535_gsp_log *log;
> > > + int ret;
> > > +
> > > + /* If we were told not to keep logs, th...
2024 Jul 30
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...size;
> + dir = debugfs_create_blob(name, 0444, parent, d);
> + if (IS_ERR(dir)) {
> + kfree(d->data);
> + memset(d, 0, sizeof(*d));
> + return PTR_ERR(dir);
> + }
> +
> + i_size_write(d_inode(dir), d->size);
> +
> + return 0;
> +}
> +
> +/**
> + * r535_gsp_retain_logging - copy logging buffers to new debugfs root
> + * @gsp: gsp pointer
> + *
> + * If keep_gsp_logging is enabled, then we want to preserve the GSP-RM logging
> + * buffers and their debugfs entries, but all those objects would normally
> + * deleted if GSP-RM fails to load. So we cr...
2024 Jul 31
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...is all about debugfs, and since I don't
want to blindly allocate buffers and linked lists that won't actually do
anything, I would prefer that the code bails early if the infrastructure is
not there.
> > I tested this, and if drm_core_init() fails to create the dentry, then
> > r535_gsp_retain_logging() will just keep going trying to create debugfs
> > entries, because a root of NULL is actually valid, and the entries are
> > created in /sys/kernel/debug/0000:65:00.0/ instead of
> > /sys/kernel/debug/dri/0000:65:00.0/
>
> This is because debugfs_lookup() doesn't...
2024 Jul 29
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...KERNEL);
+ if (!d->data)
+ return -ENOMEM;
+
+ d->size = s->size;
+ dir = debugfs_create_blob(name, 0444, parent, d);
+ if (IS_ERR(dir)) {
+ kfree(d->data);
+ memset(d, 0, sizeof(*d));
+ return PTR_ERR(dir);
+ }
+
+ i_size_write(d_inode(dir), d->size);
+
+ return 0;
+}
+
+/**
+ * r535_gsp_retain_logging - copy logging buffers to new debugfs root
+ * @gsp: gsp pointer
+ *
+ * If keep_gsp_logging is enabled, then we want to preserve the GSP-RM logging
+ * buffers and their debugfs entries, but all those objects would normally
+ * deleted if GSP-RM fails to load. So we create a new debugfs root,...
2024 Oct 30
2
[PATCH 2/2] [v9] drm/nouveau: expose GSP-RM logging buffers via debugfs
...);
+ if (!p)
+ return -ENOMEM;
+
+ t->data = p;
+ t->size = s->size;
+
+ dent = debugfs_create_blob(name, 0444, parent, t);
+ if (IS_ERR(dent)) {
+ kfree(p);
+ memset(t, 0, sizeof(*t));
+ return PTR_ERR(dent);
+ }
+
+ i_size_write(d_inode(dent), t->size);
+
+ return 0;
+}
+
+/**
+ * r535_gsp_retain_logging - copy logging buffers to new debugfs root
+ * @gsp: gsp pointer
+ *
+ * If keep_gsp_logging is enabled, then we want to preserve the GSP-RM logging
+ * buffers and their debugfs entries, but all those objects would normally
+ * deleted if GSP-RM fails to load.
+ *
+ * To preserve the logging b...
2024 Jun 12
2
[PATCH 1/2] [v2] drm/nouveau: retain device pointer in nvkm_gsp_mem object
Store the struct device pointer used to allocate the DMA buffer in
the nvkm_gsp_mem object. This allows nvkm_gsp_mem_dtor() to release
the buffer without needing the nvkm_gsp. This is needed so that
we can retain DMA buffers even after the nvkm_gsp object is deleted.
Signed-off-by: Timur Tabi <ttabi at nvidia.com>
---
v2: rebased to drm-misc-next
2024 Aug 02
1
[PATCH 1/2] [v2] drm/nouveau: retain device pointer in nvkm_gsp_mem object
Store the struct device pointer used to allocate the DMA buffer in
the nvkm_gsp_mem object. This allows nvkm_gsp_mem_dtor() to release
the buffer without needing the nvkm_gsp. This is needed so that
we can retain DMA buffers even after the nvkm_gsp object is deleted.
Signed-off-by: Timur Tabi <ttabi at nvidia.com>
---
Notes:
v2:
added get/put_device calls
2024 Jul 29
2
[PATCH 1/2] [v2] drm/nouveau: retain device pointer in nvkm_gsp_mem object
Store the struct device pointer used to allocate the DMA buffer in
the nvkm_gsp_mem object. This allows nvkm_gsp_mem_dtor() to release
the buffer without needing the nvkm_gsp. This is needed so that
we can retain DMA buffers even after the nvkm_gsp object is deleted.
Signed-off-by: Timur Tabi <ttabi at nvidia.com>
v2:
added get/put_device calls
---
2024 Sep 10
1
[PATCH 1/2] [v2] drm/nouveau: retain device pointer in nvkm_gsp_mem object
Store the struct device pointer used to allocate the DMA buffer in
the nvkm_gsp_mem object. This allows nvkm_gsp_mem_dtor() to release
the buffer without needing the nvkm_gsp. This is needed so that
we can retain DMA buffers even after the nvkm_gsp object is deleted.
Signed-off-by: Timur Tabi <ttabi at nvidia.com>
---
.../gpu/drm/nouveau/include/nvkm/subdev/gsp.h | 1 +
2024 Oct 30
2
[PATCH 1/2] [v2] drm/nouveau: retain device pointer in nvkm_gsp_mem object
Store the struct device pointer used to allocate the DMA buffer in
the nvkm_gsp_mem object. This allows nvkm_gsp_mem_dtor() to release
the buffer without needing the nvkm_gsp. This is needed so that
we can retain DMA buffers even after the nvkm_gsp object is deleted.
Signed-off-by: Timur Tabi <ttabi at nvidia.com>
---
.../gpu/drm/nouveau/include/nvkm/subdev/gsp.h | 1 +
2024 Oct 03
1
[PATCH 2/2] [v8] drm/nouveau: expose GSP-RM logging buffers via debugfs
...> +
> + t->data = p;
> + t->size = s->size;
> +
> + dir = debugfs_create_blob(name, 0444, parent, t);
> + if (IS_ERR(dir)) {
> + kfree(p);
> + memset(t, 0, sizeof(*t));
> + return PTR_ERR(dir);
> + }
> +
> + return 0;
> +}
> +
> +/**
> + * r535_gsp_retain_logging - copy logging buffers to new debugfs root
> + * @gsp: gsp pointer
> + *
> + * If keep_gsp_logging is enabled, then we want to preserve the GSP-RM logging
> + * buffers and their debugfs entries, but all those objects would normally
> + * deleted if GSP-RM fails to load.
> + *...