Displaying 11 results from an estimated 11 matches for "nvif_logs_declare".
2024 Jul 30
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...here.
I replaced 'driver' with 'module'.
>
> > + * backing resources, such as logging buffers.
> > + */
> > +struct nvif_log {
> > + struct list_head entry;
> > + void (*shutdown)(struct nvif_log *log);
> > +};
> > +
> > +#define NVIF_LOGS_DECLARE(_log) \
> > + struct nvif_log _log = { LIST_HEAD_INIT(_log.entry) }
>
> If you declare this as
>
> #define NVIF_LOGS_DECLARE(_log) \
> struct nvif_log _log = { LIST_HEAD_INIT(_log.entry), nvif_log_shutdown }
>
> and change the signature of nvif_log_shutdown() to
>...
2024 Jul 31
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...er it in module_exit().
> > > + * backing resources, such as logging buffers.
> > > + */
> > > +struct nvif_log {
> > > + struct list_head entry;
> > > + void (*shutdown)(struct nvif_log *log);
> > > +};
> > > +
> > > +#define NVIF_LOGS_DECLARE(_log) \
> > > + struct nvif_log _log = { LIST_HEAD_INIT(_log.entry) }
> >
> > If you declare this as
> >
> > #define NVIF_LOGS_DECLARE(_log) \
> > struct nvif_log _log = { LIST_HEAD_INIT(_log.entry), nvif_log_shutdown }
> >
> > and change the...
2024 Jun 18
1
[PATCH 2/2] [v5] drm/nouveau: expose GSP-RM logging buffers via debugfs
...M_LAYOUT_ONCE() and NVKM_LAYOUT_INST(). This is where I get lost, because I don't see how I make sure only the GSP constructor tries to initialize gsp_logs.
+#ifdef CONFIG_DEBUG_FS
+/**
+ * gsp_logs - list of GSP debugfs logging buffers
+ */
+LIST_HEAD(gsp_logs);
Better wrap this in a NVIF_LOGS_DECLARE() macro.
Like this?
#define NVIF_LOGS_DECLARE(x) LIST_HEAD(x)
Do you want a macro to replace this as well?
extern struct list_head gsp_logs;
+#endif
+
static u64
nouveau_pci_name(struct pci_dev *pdev)
{
@@ -1446,6 +1454,17 @@ nouveau_drm_exit(void)
#endif
if (IS_ENABLED(CO...
2024 Jul 30
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...t;
> A simple way to test the buffer migration feature is to have
> nvkm_gsp_init() return an error code.
>
> Signed-off-by: Timur Tabi <ttabi at nvidia.com>
>
> v6:
> rebased onto drm-misc-next
> renamed nvif_log.head to entry
> only one space after .
> added NVIF_LOGS_DECLARE
> added nvif_log_shutdown
> documented NV_GSP_MSG_EVENT_UCODE_LIBOS_CLASS_PMU
> removed the "See xxx" comments
> replaced camelcase with lowercase in r535_gsp_msg_libos_print
> replaced 0x100c with NV_VGPU_MSG_EVENT_UCODE_LIBOS_PRINT
> added r535_gsp_libos_debugfs_fini
&...
2024 Jul 29
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...V_VGPU_MSG_EVENT_UCODE_LIBOS_PRINT RPCs are ignored.
A simple way to test the buffer migration feature is to have
nvkm_gsp_init() return an error code.
Signed-off-by: Timur Tabi <ttabi at nvidia.com>
v6:
rebased onto drm-misc-next
renamed nvif_log.head to entry
only one space after .
added NVIF_LOGS_DECLARE
added nvif_log_shutdown
documented NV_GSP_MSG_EVENT_UCODE_LIBOS_CLASS_PMU
removed the "See xxx" comments
replaced camelcase with lowercase in r535_gsp_msg_libos_print
replaced 0x100c with NV_VGPU_MSG_EVENT_UCODE_LIBOS_PRINT
added r535_gsp_libos_debugfs_fini
miscellaneous comment improveme...
2024 Jul 31
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...:)
>
> I think what I asked for originally in one of the last versions of this patch
> is having both, struct nvif_log (exactly the way you have it) and a separate
> struct nvif_logs:
>
> struct nvif_logs {
> struct list_head head;
> };
>
> Then you use this in NVIF_LOGS_DECLARE() and nvif_log_shutdown()
>
> static inline void nvif_log_shutdown(struct nvif_logs *logs)
>
> and in nouveau_drm_exit() you just pass &gsp_logs.
>
> nvif_log_shutdown(&gsp_logs);
>
> This way things are more type safe, i.e. nvif_log_shutdown() can't be cal...
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 Oct 30
1
[PATCH 2/2] [v9] drm/nouveau: expose GSP-RM logging buffers via debugfs
...he module exits. It should free all
+ * backing resources, such as logging buffers.
+ */
+struct nvif_log {
+ struct list_head entry;
+ void (*shutdown)(struct nvif_log *log);
+};
+
+/**
+ * nvif_logs - linked list of nvif_log objects
+ */
+struct nvif_logs {
+ struct list_head head;
+};
+
+#define NVIF_LOGS_DECLARE(logs) \
+ struct nvif_logs logs = { LIST_HEAD_INIT(logs.head) }
+
+static inline void nvif_log_shutdown(struct nvif_logs *logs)
+{
+ if (!list_empty(&logs->head)) {
+ struct nvif_log *log, *n;
+
+ list_for_each_entry_safe(log, n, &logs->head, entry) {
+ /* shutdown() should also d...
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 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 03
1
[PATCH 2/2] [v8] drm/nouveau: expose GSP-RM logging buffers via debugfs
...ging buffers.
> + */
> +struct nvif_log {
> + struct list_head entry;
> + void (*shutdown)(struct nvif_log *log);
> +};
> +
> +/**
> + * nvif_logs - linked list of nvif_log objects
> + */
> +struct nvif_logs {
> + struct list_head head;
> +};
> +
> +#define NVIF_LOGS_DECLARE(logs) \
> + struct nvif_logs logs = { LIST_HEAD_INIT(logs.head) }
> +
> +static inline void nvif_log_shutdown(struct nvif_logs *logs)
> +{
> + if (!list_empty(&logs->head)) {
> + struct nvif_log *log, *n;
> +
> + list_for_each_entry_safe(log, n, &logs->head,...