Displaying 7 results from an estimated 7 matches for "nv_mem_access_wo".
2017 May 02
0
drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c:124:: possible unintended fallthrough ?
Hello there,
drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c:124:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
Source code is
switch (dmaobj->base.access) {
case NV_MEM_ACCESS_RO:
dmaobj->flags0 |= 0x00004000;
break;
case NV_MEM_ACCESS_WO:
dmaobj->flags0 |= 0x00008000;
case NV_MEM_ACCESS_RW:
dmaobj->flags2 |= 0x00000002;
break;
default:
return -EINVAL;
}
Suggest either document the fallthrough or add the missing break.
Regards
David Binderman
2018 Oct 17
2
[PATCH] drm/nouveau/nvkm: mark expected switch fall-throughs
...ers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c
index 49ef7e5..7f1adab 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c
@@ -122,6 +122,7 @@ nv04_dmaobj_new(struct nvkm_dma *dma, const struct nvkm_oclass *oclass,
break;
case NV_MEM_ACCESS_WO:
dmaobj->flags0 |= 0x00008000;
+ /* fall through */
case NV_MEM_ACCESS_RW:
dmaobj->flags2 |= 0x00000002;
break;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c
index ad707ff..93493b3 100644
--- a/drivers/gpu/drm/nouvea...
2018 Jun 27
0
[PATCH] drm/nouveau/nvkm: mark expected switch fall-throughs
...ers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c
index 49ef7e5..7f1adab 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c
@@ -122,6 +122,7 @@ nv04_dmaobj_new(struct nvkm_dma *dma, const struct nvkm_oclass *oclass,
break;
case NV_MEM_ACCESS_WO:
dmaobj->flags0 |= 0x00008000;
+ /* fall through */
case NV_MEM_ACCESS_RW:
dmaobj->flags2 |= 0x00000002;
break;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c
index ad707ff..93493b3 100644
--- a/drivers/gpu/drm/nouvea...
2019 Jan 10
0
[PATCH] drm/nouveau/nvkm: mark expected switch fall-throughs
...dma/usernv04.c
> index 49ef7e5..7f1adab 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c
> @@ -122,6 +122,7 @@ nv04_dmaobj_new(struct nvkm_dma *dma, const struct nvkm_oclass *oclass,
> break;
> case NV_MEM_ACCESS_WO:
> dmaobj->flags0 |= 0x00008000;
> + /* fall through */
> case NV_MEM_ACCESS_RW:
> dmaobj->flags2 |= 0x00000002;
> break;
> diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c
> index ad707ff..9349...
2014 Apr 17
0
[PATCH] drm/nouveau: add some basic debugfs dumping for nouveau's clients and vm mappings
...ruct seq_file *m, void *data)
@@ -43,8 +51,204 @@ nouveau_debugfs_vbios_image(struct seq_file *m, void *data)
return 0;
}
+static void nouveau_get_access(char *ba, u32 access)
+{
+ if (access & NV_MEM_ACCESS_RO)
+ *ba++ = 'R';
+ else
+ *ba++ = '-';
+
+ if (access & NV_MEM_ACCESS_WO)
+ *ba++ = 'W';
+ else
+ *ba++ = '-';
+
+ if (access & NV_MEM_ACCESS_SYS)
+ *ba++ = 'S';
+
+ if (access & NV_MEM_ACCESS_NOSNOOP)
+ *ba++ = 'N';
+
+ *ba = 0;
+}
+
+static const char *nouveau_get_mapping(enum nouveau_vma_mapping mapping)
+{
+ switch (mappin...
2020 Jul 07
3
[PATCH][next] drm/nouveau: Use fallthrough pseudo-keyword
...m/nouveau/nvkm/engine/dma/usernv04.c
index 7f1adab21a5f..5159d5df20a2 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c
@@ -122,7 +122,7 @@ nv04_dmaobj_new(struct nvkm_dma *dma, const struct nvkm_oclass *oclass,
break;
case NV_MEM_ACCESS_WO:
dmaobj->flags0 |= 0x00008000;
- /* fall through */
+ fallthrough;
case NV_MEM_ACCESS_RW:
dmaobj->flags2 |= 0x00000002;
break;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c
index 93493b335d76..c1d1b1aa5bc6 100644
--...
2020 Jul 08
0
[PATCH][next] drm/nouveau: Use fallthrough pseudo-keyword
...f1adab21a5f..5159d5df20a2 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c
> @@ -122,7 +122,7 @@ nv04_dmaobj_new(struct nvkm_dma *dma, const struct nvkm_oclass *oclass,
> break;
> case NV_MEM_ACCESS_WO:
> dmaobj->flags0 |= 0x00008000;
> - /* fall through */
> + fallthrough;
> case NV_MEM_ACCESS_RW:
> dmaobj->flags2 |= 0x00000002;
> break;
> diff --git a/drivers/gpu/drm/nouveau/nvkm/engin...