drm/prime: fix up handle_to_fd ioctl return value
Subsystems (2)
PATCH 1/1 drm/prime: fix up handle_to_fd ioctl return value
In
commit da34242e5e0638312130f5bd5d2d277afbc6f806
Author: YoungJun Cho <[email protected]> Date: Wed Jun 26 10:21:42 2013 +0900
drm/prime: add return check for dma_buf_fd
the failure case handling was fixed up. But in the case when we already had the buffer exported it changed the return value:
Previously we've return 0 on success, now we return the fd.
This ABI change has been caught by i-g-t/prime_self_import/with_one_bo.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66436
--- drivers/gpu/drm/drm_prime.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_prime.c +5 -2
@@ -347,10 +347,13 @@ int drm_gem_prime_handle_to_fd(struct drm_device *dev, out_have_obj:get_dma_buf (dmabuf); ret =dma_buf_fd (dmabuf, flags); -if (ret <0 ) +if (ret <0 ) {dma_buf_put (dmabuf); -else + }else { *prime_fd = ret; + ret =0 ; + } + goto out; fail_rm_handle:
Signature · 1 line
1.7.10.4
Dear Daniel,
drivers/gpu/drm/drm_prime.c int drm_gem_prime_handle_to_fd(struct drm_device
Quoted 30 lines · Daniel Vetter
In
commit
da34242e5e0638312130f5bd5d2d277afbc6f806Author: YoungJun Cho <[email protected]> Date: Wed Jun 26 10:21:42 2013 +0900drm/prime: add return check for
dma_buf_fdthe failure case handling was fixed up. But in the case when we already had the buffer exported it changed the return value:
Previously we've return 0 on success, now we return the fd.This ABI change has been caught by i-g-t/prime_self_import/with_one_bo.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66436
Cc YoungJun Cho <[email protected]>Cc Seung-Woo Kim <[email protected]>Cc Kyungmin Park <[email protected]>Tested-by lu hua <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_prime.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_prime.c +0
-0@@ -347,10 +347,13 @@ int drm_gem_prime_handle_to_fd(struct drm_device
*dev,
Quoted 16 lines
drivers/gpu/drm/drm_prime.c +5
-3out_have_obj:get_dma_buf (dmabuf); ret =dma_buf_fd (dmabuf, flags); -if (ret <0 ) +if (ret <0 ) {dma_buf_put (dmabuf); -else + }else { *prime_fd = ret; + ret =0 ; + } + goto out; fail_rm_handle: --
Quoted 3 lines
1.7.10.4
Right, that's my mistake.
I'll pay attention from now on!
Thank you & best regards YJ
_______________________________________________
Quoted 3 lines
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 54 lines · YoungJun Cho
Dear Daniel,
drivers/gpu/drm/drm_prime.c int drm_gem_prime_handle_to_fd(struct drm_device
Quoted 30 lines · Daniel Vetter
In
commit
da34242e5e0638312130f5bd5d2d277afbc6f806Author: YoungJun Cho <[email protected]> Date: Wed Jun 26 10:21:42 2013 +0900drm/prime: add return check for
dma_buf_fdthe failure case handling was fixed up. But in the case when we already had the buffer exported it changed the return value:
Previously we've return 0 on success, now we return the fd.This ABI change has been caught by i-g-t/prime_self_import/with_one_bo.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66436
Cc YoungJun Cho <[email protected]>Cc Seung-Woo Kim <[email protected]>Cc Kyungmin Park <[email protected]>Tested-by lu hua <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_prime.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_prime.c +0
-0@@ -347,10 +347,13 @@ int drm_gem_prime_handle_to_fd(struct drm_device*dev,
Quoted 16 lines
drivers/gpu/drm/drm_prime.c +5
-3out_have_obj:get_dma_buf (dmabuf); ret =dma_buf_fd (dmabuf, flags); -if (ret <0 ) +if (ret <0 ) {dma_buf_put (dmabuf); -else + }else { *prime_fd = ret; + ret =0 ; + } + goto out; fail_rm_handle: --Quoted 3 lines
1.7.10.4
Quoted 4 lines
Right, that's my mistake.
I'll pay attention from now on!Thank you & best regards YJ
Reviewed-by ?
Cheers, Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
YoungJun Cho
Reviewed-byDear Daniel,
Quoted 12 lines · Daniel Vetter
Quoted 10 lines · YoungJun Cho
Dear Daniel,
Quoted 7 lines · Daniel Vetter
In
commit
da34242e5e0638312130f5bd5d2d277afbc6f806Author: YoungJun Cho <[email protected]> Date: Wed Jun 26 10:21:42 2013 +0900
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drm/prime: add return check for
dma_buf_fdthe failure case handling was fixed up. But in the case when we already had the buffer exported it changed the return value:
Previously we've return 0 on success, now we return the fd.This ABI change has been caught by
i-g-t/prime_self_import/with_one_bo.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66436
Cc YoungJun Cho <[email protected]>Cc Seung-Woo Kim <[email protected]>Cc Kyungmin Park <[email protected]>Tested-by lu hua <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Thank you and best regards YJ
Quoted 37 lines
Quoted 30 lines
drivers/gpu/drm/drm_prime.c int drm_gem_prime_handle_to_fd(struct drm_device
Quoted 9 lines
--- drivers/gpu/drm/drm_prime.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_prime.c +0
-0@@ -347,10 +347,13 @@ int drm_gem_prime_handle_to_fd(struct drm_device*dev,
Quoted 16 lines
drivers/gpu/drm/drm_prime.c +5
-3out_have_obj:get_dma_buf (dmabuf); ret =dma_buf_fd (dmabuf, flags); -if (ret <0 ) +if (ret <0 ) {dma_buf_put (dmabuf); -else + }else { *prime_fd = ret; + ret =0 ; + } + goto out; fail_rm_handle: --Quoted 3 lines
1.7.10.4
Quoted 4 lines
Right, that's my mistake.
I'll pay attention from now on!Thank you & best regards YJ
Reviewed-by ?
Quoted 9 lines
Cheers, Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel