diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-01-14 23:34:22 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-01-15 03:50:28 +0300 |
commit | 3d0482ec28ebc506b9a720be9ff146e9bf343042 (patch) | |
tree | 9938f8bd3b335f6cafcaee5a645d388cce715e43 /drivers/gpu/drm/nouveau/include | |
parent | af696a61a22118dd12250c9dbc0ffcee8eb0d2a9 (diff) | |
download | linux-3d0482ec28ebc506b9a720be9ff146e9bf343042.tar.xz |
drm/nouveau/flcn: add printk macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/include')
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/core/falcon.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/falcon.h b/drivers/gpu/drm/nouveau/include/nvkm/core/falcon.h index 269814e06e93..7bef0e666bd4 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/falcon.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/falcon.h @@ -20,4 +20,13 @@ void nvkm_falcon_v1_disable(struct nvkm_falcon *); void gp102_sec2_flcn_bind_context(struct nvkm_falcon *, struct nvkm_memory *); int gp102_sec2_flcn_enable(struct nvkm_falcon *); + +#define FLCN_PRINTK(t,f,fmt,a...) do { \ + if (nvkm_subdev_name[(f)->owner->index] != (f)->name) \ + nvkm_##t((f)->owner, "%s: "fmt"\n", (f)->name, ##a); \ + else \ + nvkm_##t((f)->owner, fmt"\n", ##a); \ +} while(0) +#define FLCN_DBG(f,fmt,a...) FLCN_PRINTK(debug, (f), fmt, ##a) +#define FLCN_ERR(f,fmt,a...) FLCN_PRINTK(error, (f), fmt, ##a) #endif |