search for: nvif_log_shutdown

Displaying 8 results from an estimated 8 matches for "nvif_log_shutdown".

2024 Jul 31
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...; > > + > > > +#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 > > > > static inline void nvif_log_shutdown(struct nvif_log *logs) > > > > you can just call > > > > gsp_logs.shutdown(&gsp_logs); > > > > in nouveau_drm_exit(). >...
2024 Jul 31
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...hat 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 called > with a random l...
2024 Jul 30
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...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 > > static inline void nvif_log_shutdown(struct nvif_log *logs) > > you can just call > > gsp_logs.shutdown(&gsp_logs); > > in nouveau_drm_exit(). > > Admittedly, maybe a bit too sneaky though....
2024 Jul 30
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...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 imp...
2024 Jul 29
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...IBOS_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 improvements --- drivers/gpu/drm...
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 Jun 18
1
[PATCH 2/2] [v5] drm/nouveau: expose GSP-RM logging buffers via debugfs
...vif_log *log, *n; + + list_for_each_entry_safe(log, n, &gsp_logs, head) { + /* shutdown() should also delete the log entry */ + log->shutdown(log); + } + } +#endif Please move this to include/nvif/log.h as nvif_log_shutdown(). Sure, but I don't understand why. This code will only be called in nouveau_drm_exit(). +/** + * r535_gsp_msg_libos_print - capture log message from the PMU + * @priv: gsp pointer + * @fn: function number (ignored) + * @repv: pointer to libos print RPC + * @repc: message size + * +...
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