Message ID | 20170403082720.13166-3-nhaehnle@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, Apr 3, 2017 at 10:27 AM, Nicolai Hähnle <nhaehnle@gmail.com> wrote: > From: Junwei Zhang <Jerry.Zhang@amd.com> > > v2: fix indent > > Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> > Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> > Reviewed-by: Christian König <christian.koenig@amd.com> > --- > amdgpu/amdgpu_bo.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c > index f725bfd..8bc1ebd 100644 > --- a/amdgpu/amdgpu_bo.c > +++ b/amdgpu/amdgpu_bo.c > @@ -696,21 +696,23 @@ int amdgpu_bo_va_op_raw(amdgpu_device_handle dev, > amdgpu_bo_handle bo, > uint64_t offset, > uint64_t size, > uint64_t addr, > uint64_t flags, > uint32_t ops) > { > struct drm_amdgpu_gem_va va; > int r; > > - if (ops != AMDGPU_VA_OP_MAP && ops != AMDGPU_VA_OP_UNMAP) > + if (ops != AMDGPU_VA_OP_MAP && ops != AMDGPU_VA_OP_UNMAP && > + ops != AMDGPU_VA_OP_REPLACE && ops != AMDGPU_VA_OP_CLEAR) > + Spurious empty line? Other than that, the series is: Reviewed-by: Marek Olšák <marek.olsak@amd.com> I don't know how Dave feels about pushing this into libdrm when it's not in Linus's tree. Marek
On 3 April 2017 at 11:54, Marek Olšák <maraeo@gmail.com> wrote: > On Mon, Apr 3, 2017 at 10:27 AM, Nicolai Hähnle <nhaehnle@gmail.com> wrote: >> From: Junwei Zhang <Jerry.Zhang@amd.com> >> >> v2: fix indent >> >> Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> >> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> >> Reviewed-by: Christian König <christian.koenig@amd.com> >> --- >> amdgpu/amdgpu_bo.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c >> index f725bfd..8bc1ebd 100644 >> --- a/amdgpu/amdgpu_bo.c >> +++ b/amdgpu/amdgpu_bo.c >> @@ -696,21 +696,23 @@ int amdgpu_bo_va_op_raw(amdgpu_device_handle dev, >> amdgpu_bo_handle bo, >> uint64_t offset, >> uint64_t size, >> uint64_t addr, >> uint64_t flags, >> uint32_t ops) >> { >> struct drm_amdgpu_gem_va va; >> int r; >> >> - if (ops != AMDGPU_VA_OP_MAP && ops != AMDGPU_VA_OP_UNMAP) >> + if (ops != AMDGPU_VA_OP_MAP && ops != AMDGPU_VA_OP_UNMAP && >> + ops != AMDGPU_VA_OP_REPLACE && ops != AMDGPU_VA_OP_CLEAR) >> + > > Spurious empty line? > > Other than that, the series is: > Reviewed-by: Marek Olšák <marek.olsak@amd.com> > > I don't know how Dave feels about pushing this into libdrm when it's > not in Linus's tree. > I'm not Dave, so pardon for dropping in. AFAICT the idea is that once the feature is within a non-rebase branch such as drm-next, it's part of the ABI. As such one can use it across the board - be that in here, Mesa or elsewhere. That said, the series looks great. Thanks for the updates gents. Acked-by: Emil Velikov <emil.velikov@collabora.com> Thanks Emil
diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c index f725bfd..8bc1ebd 100644 --- a/amdgpu/amdgpu_bo.c +++ b/amdgpu/amdgpu_bo.c @@ -696,21 +696,23 @@ int amdgpu_bo_va_op_raw(amdgpu_device_handle dev, amdgpu_bo_handle bo, uint64_t offset, uint64_t size, uint64_t addr, uint64_t flags, uint32_t ops) { struct drm_amdgpu_gem_va va; int r; - if (ops != AMDGPU_VA_OP_MAP && ops != AMDGPU_VA_OP_UNMAP) + if (ops != AMDGPU_VA_OP_MAP && ops != AMDGPU_VA_OP_UNMAP && + ops != AMDGPU_VA_OP_REPLACE && ops != AMDGPU_VA_OP_CLEAR) + return -EINVAL; memset(&va, 0, sizeof(va)); va.handle = bo ? bo->handle : 0; va.operation = ops; va.flags = flags; va.va_address = addr; va.offset_in_bo = offset; va.map_size = size;