search for: nouveau_job_args

Displaying 4 results from an estimated 4 matches for "nouveau_job_args".

2024 Jun 14
1
[PATCH] drm/nouveau: Constify struct nouveau_job_ops
"struct nouveau_job_ops" is not modified in these drivers. Constifying this structure moves some data to a read-only section, so increase overall security. In order to do it, "struct nouveau_job" and "struct nouveau_job_args" also need to be adjusted to this new const qualifier. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 5570 152 0 5722 165a drivers/gpu/drm/nouveau/nouveau_exec.o After: ===== text data bss dec hex filename...
2023 Aug 23
1
[PATCH drm-misc-next v2] drm/nouveau: uapi: don't pass NO_PREFETCH flag implicitly
...ool no_prefetch = p->flags & DRM_NOUVEAU_EXEC_PUSH_NO_PREFETCH; + + nv50_dma_push(chan, p->va, p->va_len, no_prefetch); } ret = nouveau_fence_emit(fence, chan); @@ -223,7 +225,18 @@ nouveau_exec_job_init(struct nouveau_exec_job **pjob, { struct nouveau_exec_job *job; struct nouveau_job_args args = {}; - int ret; + int i, ret; + + for (i = 0; i < __args->push.count; i++) { + struct drm_nouveau_exec_push *p = &__args->push.s[i]; + + if (unlikely(p->va_len > NV50_DMA_PUSH_MAX_LENGTH)) { + NV_PRINTK(err, nouveau_cli(__args->file_priv), + "pushbuf size e...
2023 Aug 23
1
[PATCH drm-misc-next] drm/nouveau: uapi: don't pass NO_PREFETCH flag implicitly
...> + nv50_dma_push(chan, p->va, p->va_len, prefetch); > } > > ret = nouveau_fence_emit(fence, chan); > @@ -223,7 +225,14 @@ nouveau_exec_job_init(struct nouveau_exec_job **pjob, > { > struct nouveau_exec_job *job; > struct nouveau_job_args args = {}; > - int ret; > + int i, ret; > + > + for (i = 0; i < __args->push.count; i++) { > + struct drm_nouveau_exec_push *p = &__args->push.s[i]; > + > + if (p->va_len > NV50_DMA_PUSH_MAX_LENGTH) > +...
2023 Aug 22
2
[PATCH drm-misc-next] drm/nouveau: uapi: don't pass NO_PREFETCH flag implicitly
...bool prefetch = !(p->flags & DRM_NOUVEAU_EXEC_PUSH_NO_PREFETCH); + + nv50_dma_push(chan, p->va, p->va_len, prefetch); } ret = nouveau_fence_emit(fence, chan); @@ -223,7 +225,14 @@ nouveau_exec_job_init(struct nouveau_exec_job **pjob, { struct nouveau_exec_job *job; struct nouveau_job_args args = {}; - int ret; + int i, ret; + + for (i = 0; i < __args->push.count; i++) { + struct drm_nouveau_exec_push *p = &__args->push.s[i]; + + if (p->va_len > NV50_DMA_PUSH_MAX_LENGTH) + return -EINVAL; + } job = *pjob = kzalloc(sizeof(*job), GFP_KERNEL); if (!job) diff...