drm/amdgpu: fix 'ISO C90 forbids mixed declarations'
Subsystems (2)
PATCH 1/2 drm/amdgpu: fix 'ISO C90 forbids mixed declarations'
--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +3 -3
@@ -657,12 +657,12 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, p->bytes_moved_vis);if (p->bo_list) { - gds = p->bo_list->gds_obj; - gws = p->bo_list->gws_obj; - oa = p->bo_list->oa_obj;struct amdgpu_vm *vm = &fpriv->vm;unsigned i; + gds = p->bo_list->gds_obj; + gws = p->bo_list->gws_obj; + oa = p->bo_list->oa_obj;for (i =0 ; i < p->bo_list->num_entries; i++) {struct amdgpu_bo *bo = p->bo_list->array[i].robj;
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/2 drm/amdgpu: gds bo must not be per-vm-bo
In per-vm-bo case, there could be no bo list.
But gds bo created from user space must be passed to bo list. So adding a check to prevent creat per-vm gds bo.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +7 -0
@@ -236,6 +236,13 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,/* create a gem object to contain this object in */ if (args->in.domains & (AMDGPU_GEM_DOMAIN_GDS |AMDGPU_GEM_DOMAIN_GWS |AMDGPU_GEM_DOMAIN_OA )) { +if (flags &AMDGPU_GEM_CREATE_VM_ALWAYS_VALID ) { +/* if gds bo is created from user space, it must be +* passed to bo list +*/ +DRM_ERROR ("GDS bo cannot be per-vm-bo\n" ); +return -EINVAL ; + } flags |=AMDGPU_GEM_CREATE_NO_CPU_ACCESS ;if (args->in.domains ==AMDGPU_GEM_DOMAIN_GDS ) size = size <<AMDGPU_GDS_SHIFT ;
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Deng, Emily
Reviewed-by Emily DengQuoted 40 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Chunming Zhou
Sent: Wednesday, May 30, 2018 11:15 AM
To: [email protected]; [email protected]
Cc: Deng, Emily <[email protected]>; Zhou, David(ChunMing) <[email protected]>
Subject: [PATCH 1/2] drm/amdgpu: fix 'ISO C90 forbids mixed declarations'Change-Id I412f5783e2839c53841e6ab665f939236bdc5bf1Signed-off-by Chunming Zhou <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +3
-4@@ -657,12 +657,12 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, p->bytes_moved_vis);if (p->bo_list) { - gds = p->bo_list->gds_obj; - gws = p->bo_list->gws_obj; - oa = p->bo_list->oa_obj;struct amdgpu_vm *vm = &fpriv->vm;unsigned i; + gds = p->bo_list->gds_obj; + gws = p->bo_list->gws_obj; + oa = p->bo_list->oa_obj;for (i =0 ; i < p->bo_list->num_entries; i++) {struct amdgpu_bo *bo = p->bo_list->array[i].robj; --2.14.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Please add something like "Fixing a compiler warning." as commit message.
With that done the series is Reviewed-by: Christian König <[email protected]>.
Thanks,
Christian.
Am 30.05.2018 um 05:14 schrieb Chunming Zhou:
Quoted 16 lines
Change-Id I412f5783e2839c53841e6ab665f939236bdc5bf1Signed-off-by Chunming Zhou <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +0
-2@@ -657,12 +657,12 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, p->bytes_moved_vis);if (p->bo_list) { - gds = p->bo_list->gds_obj; - gws = p->bo_list->gws_obj;
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, · line 668
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +3
-1- oa = p->bo_list->oa_obj;struct amdgpu_vm *vm = &fpriv->vm;unsigned i; + gds = p->bo_list->gds_obj; + gws = p->bo_list->gws_obj; + oa = p->bo_list->oa_obj;for (i =0 ; i < p->bo_list->num_entries; i++) {struct amdgpu_bo *bo = p->bo_list->array[i].robj;
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel