drm: report consistent errors when checking syncobj capibility
Subsystems (2)
PATCH 1/2 drm: report consistent errors when checking syncobj capibility
We've been somewhat inconsistent when adding the new ioctl and returned ENODEV instead of EOPNOTSUPPORTED upon failing the syncobj capibility.
--- drivers/gpu/drm/drm_syncobj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_syncobj.c +2 -2
@@ -756,7 +756,7 @@ drm_syncobj_transfer_ioctl(struct drm_device *dev, void *data,int ret;if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ )) -return -ENODEV ; +return -EOPNOTSUPP ;if (args->pad)return -EINVAL ;
@@ -1107,7 +1107,7 @@ drm_syncobj_timeline_wait_ioctl(struct drm_device *dev, void *data,int ret =0 ;if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ )) -return -ENODEV ; +return -EOPNOTSUPP ; if (args->flags & ~(DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL | DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT |
Signature · 6 lines
2.21.0.392.gf8f6787159e _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/2 drm: introduce a capability flag for syncobj timeline support
Unfortunately userspace users of this API cannot be publicly disclosed yet.
This commit effectively disables timeline syncobj ioctls for all drivers. Each driver wishing to support this feature will need to expose DRIVER_SYNCOBJ_TIMELINE.
--- drivers/gpu/drm/drm_syncobj.c | 10 +++++----- include/drm/drm_drv.h | 7 +++++++ 2 files changed, 12 insertions(+), 5 deletions(-)
drivers/gpu/drm/drm_syncobj.c +5 -5
@@ -755,7 +755,7 @@ drm_syncobj_transfer_ioctl(struct drm_device *dev, void *data,struct drm_syncobj_transfer *args = data;int ret; -if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ )) +if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ_TIMELINE ))return -EOPNOTSUPP ;if (args->pad)
@@ -1106,7 +1106,7 @@ drm_syncobj_timeline_wait_ioctl(struct drm_device *dev, void *data,struct drm_syncobj **syncobjs;int ret =0 ; -if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ )) +if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ_TIMELINE ))return -EOPNOTSUPP ; if (args->flags & ~(DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL |
@@ -1210,7 +1210,7 @@ drm_syncobj_timeline_signal_ioctl(struct drm_device *dev, void *data,uint32_t i, j;int ret; -if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ )) +if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ_TIMELINE ))return -EOPNOTSUPP ;if (args->pad !=0 )
@@ -1281,8 +1281,8 @@ int drm_syncobj_query_ioctl(struct drm_device *dev, void *data,uint32_t i;int ret; -if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ )) -return -ENODEV ; +if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ_TIMELINE )) +return -EOPNOTSUPP ;if (args->pad !=0 )return -EINVAL ;
include/drm/drm_drv.h +7 -0
@@ -91,6 +91,13 @@ enum drm_driver_feature {* submission. */ DRIVER_SYNCOBJ =BIT (5 ), +/** +* @DRIVER_SYNCOBJ_TIMELINE: +* +* Driver supports the timeline flavor of &drm_syncobj for explicit +* synchronization of command submission. +*/ + DRIVER_SYNCOBJ_TIMELINE = BIT(6),/* IMPORTANT: Below are all the legacy flags, add new ones above. */
Signature · 6 lines
2.21.0.392.gf8f6787159e _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 1/1 drm: introduce a capability flag for syncobj timeline support
Unfortunately userspace users of this API cannot be publicly disclosed yet.
This commit effectively disables timeline syncobj ioctls for all drivers. Each driver wishing to support this feature will need to expose DRIVER_SYNCOBJ_TIMELINE.
v2: Add uAPI capability check (Christian)
--- drivers/gpu/drm/drm_ioctl.c | 3 +++ drivers/gpu/drm/drm_syncobj.c | 10 +++++----- include/drm/drm_drv.h | 7 +++++++ include/uapi/drm/drm.h | 1 + 4 files changed, 16 insertions(+), 5 deletions(-)
drivers/gpu/drm/drm_ioctl.c +3 -0
@@ -245,6 +245,9 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_case DRM_CAP_SYNCOBJ : req->value =drm_core_check_feature (dev,DRIVER_SYNCOBJ );return 0 ; +case DRM_CAP_SYNCOBJ_TIMELINE : + req->value =drm_core_check_feature (dev,DRIVER_SYNCOBJ_TIMELINE ); +return 0 ; }/* Other caps only work with KMS drivers */
drivers/gpu/drm/drm_syncobj.c +5 -5
@@ -755,7 +755,7 @@ drm_syncobj_transfer_ioctl(struct drm_device *dev, void *data,struct drm_syncobj_transfer *args = data;int ret; -if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ )) +if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ_TIMELINE ))return -EOPNOTSUPP ;if (args->pad)
@@ -1106,7 +1106,7 @@ drm_syncobj_timeline_wait_ioctl(struct drm_device *dev, void *data,struct drm_syncobj **syncobjs;int ret =0 ; -if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ )) +if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ_TIMELINE ))return -EOPNOTSUPP ; if (args->flags & ~(DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL |
@@ -1210,7 +1210,7 @@ drm_syncobj_timeline_signal_ioctl(struct drm_device *dev, void *data,uint32_t i, j;int ret; -if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ )) +if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ_TIMELINE ))return -EOPNOTSUPP ;if (args->pad !=0 )
@@ -1281,8 +1281,8 @@ int drm_syncobj_query_ioctl(struct drm_device *dev, void *data,uint32_t i;int ret; -if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ )) -return -ENODEV ; +if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ_TIMELINE )) +return -EOPNOTSUPP ;if (args->pad !=0 )return -EINVAL ;
include/drm/drm_drv.h +7 -0
@@ -91,6 +91,13 @@ enum drm_driver_feature {* submission. */ DRIVER_SYNCOBJ =BIT (5 ), +/** +* @DRIVER_SYNCOBJ_TIMELINE: +* +* Driver supports the timeline flavor of &drm_syncobj for explicit +* synchronization of command submission. +*/ + DRIVER_SYNCOBJ_TIMELINE = BIT(6),/* IMPORTANT: Below are all the legacy flags, add new ones above. */
include/uapi/drm/drm.h +1 -0
@@ -649,6 +649,7 @@ struct drm_gem_open {#define DRM_CAP_PAGE_FLIP_TARGET 0x11#define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12#define DRM_CAP_SYNCOBJ 0x13 +#define DRM_CAP_SYNCOBJ_TIMELINE 0x14/** DRM_IOCTL_GET_CAP ioctl argument type */ struct drm_get_cap {
Signature · 6 lines
2.21.0.392.gf8f6787159e _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re:[PATCH v2] drm: introduce a capability flag for syncobj timeline support
-------- Original Message --------
Subject: [PATCH v2] drm: introduce a capability flag for syncobj timeline support
From: Lionel Landwerlin
To: [email protected]
CC: Lionel Landwerlin ,"Koenig, Christian" ,Dave Airlie ,Daniel Vetter ,"Zhou, David(ChunMing)"
Unfortunately userspace users of this API cannot be publicly disclosed yet.
This commit effectively disables timeline syncobj ioctls for all drivers. Each driver wishing to support this feature will need to expose DRIVER_SYNCOBJ_TIMELINE.
v2: Add uAPI capability check (Christian)
--- drivers/gpu/drm/drm_ioctl.c | 3 +++ drivers/gpu/drm/drm_syncobj.c | 10 +++++----- include/drm/drm_drv.h | 7 +++++++ include/uapi/drm/drm.h | 1 + 4 files changed, 16 insertions(+), 5 deletions(-)
drivers/gpu/drm/drm_ioctl.c +3 -0
@@ -245,6 +245,9 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_case DRM_CAP_SYNCOBJ : req->value =drm_core_check_feature (dev,DRIVER_SYNCOBJ );return 0 ; +case DRM_CAP_SYNCOBJ_TIMELINE : + req->value =drm_core_check_feature (dev,DRIVER_SYNCOBJ_TIMELINE ); +return 0 ; }/* Other caps only work with KMS drivers */
drivers/gpu/drm/drm_syncobj.c +5 -5
@@ -755,7 +755,7 @@ drm_syncobj_transfer_ioctl(struct drm_device *dev, void *data,struct drm_syncobj_transfer *args = data;int ret; -if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ )) +if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ_TIMELINE ))return -EOPNOTSUPP ;if (args->pad)
@@ -1106,7 +1106,7 @@ drm_syncobj_timeline_wait_ioctl(struct drm_device *dev, void *data,struct drm_syncobj **syncobjs;int ret =0 ; -if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ )) +if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ_TIMELINE ))return -EOPNOTSUPP ; if (args->flags & ~(DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL |
@@ -1210,7 +1210,7 @@ drm_syncobj_timeline_signal_ioctl(struct drm_device *dev, void *data,uint32_t i, j;int ret; -if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ )) +if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ_TIMELINE ))return -EOPNOTSUPP ;if (args->pad !=0 )
@@ -1281,8 +1281,8 @@ int drm_syncobj_query_ioctl(struct drm_device *dev, void *data,uint32_t i;int ret; -if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ )) -return -ENODEV ; +if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ_TIMELINE )) +return -EOPNOTSUPP ;if (args->pad !=0 )return -EINVAL ;
include/drm/drm_drv.h +7 -0
@@ -91,6 +91,13 @@ enum drm_driver_feature {* submission. */ DRIVER_SYNCOBJ =BIT (5 ), +/** +* @DRIVER_SYNCOBJ_TIMELINE: +* +* Driver supports the timeline flavor of &drm_syncobj for explicit +* synchronization of command submission. +*/ + DRIVER_SYNCOBJ_TIMELINE = BIT(6),/* IMPORTANT: Below are all the legacy flags, add new ones above. */
include/uapi/drm/drm.h +1 -0
@@ -649,6 +649,7 @@ struct drm_gem_open {#define DRM_CAP_PAGE_FLIP_TARGET 0x11#define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12#define DRM_CAP_SYNCOBJ 0x13 +#define DRM_CAP_SYNCOBJ_TIMELINE 0x14/** DRM_IOCTL_GET_CAP ioctl argument type */ struct drm_get_cap {
--
2.21.0.392.gf8f6787159e
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Christian König
Acked-byRe: [PATCH v2] drm: introduce a capability flag for syncobj timeline support
I can't judge if that UAPI is actually sufficient, but the rest still looks good to me.
Christian.
Am 16.04.19 um 15:15 schrieb Zhou, David(ChunMing):
Quoted 131 lines
Reviewed-by Chunming Zhou <[email protected]> for series.-------- Original Message --------
Subject: [PATCH v2] drm: introduce a capability flag for syncobj timeline support
From: Lionel Landwerlin
To: [email protected]
CC: Lionel Landwerlin ,"Koenig, Christian" ,Dave Airlie ,Daniel Vetter ,"Zhou, David(ChunMing)"Unfortunately userspace users of this API cannot be publicly disclosed yet.
This commit effectively disables timeline syncobj ioctls for all drivers. Each driver wishing to support this feature will need to expose
DRIVER_SYNCOBJ_TIMELINE.v2: Add uAPI capability check (Christian)
Signed-off-by Lionel Landwerlin <[email protected]>Reviewed-by Christian König <[email protected]> (v1)Cc Dave Airlie <[email protected]>Cc Daniel Vetter <[email protected]>Cc Christian König <[email protected]>Cc Chunming Zhou <[email protected]>---
drivers/gpu/drm/drm_ioctl.c | 3 +++
drivers/gpu/drm/drm_syncobj.c | 10 +++++-----
include/drm/drm_drv.h | 7 +++++++
include/uapi/drm/drm.h | 1 +4 files changed, 16 insertions(+), 5 deletions(-)drivers/gpu/drm/drm_ioctl.c +0
-0@@ -245,6 +245,9 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_case
DRM_CAP_SYNCOBJ:
req->value=drm_core_check_feature(dev, DRIVER_SYNCOBJ); return 0;
+ caseDRM_CAP_SYNCOBJ_TIMELINE:
+req->value=drm_core_check_feature(dev, DRIVER_SYNCOBJ_TIMELINE);
+ return 0;
}/* Other caps only work with KMS drivers */
drivers/gpu/drm/drm_syncobj.c +1
-1@@ -755,7 +755,7 @@ drm_syncobj_transfer_ioctl(struct drm_device *dev, void *data, struct drm_syncobj_transfer *args = data; int ret; - if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ)) + if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ_TIMELINE)) return -EOPNOTSUPP;if (
args->pad)drivers/gpu/drm/drm_syncobj.c +1
-1@@ -1106,7 +1106,7 @@ drm_syncobj_timeline_wait_ioctl(struct drm_device *dev, void *data, struct drm_syncobj **syncobjs; int ret = 0; - if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ)) + if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ_TIMELINE)) return -EOPNOTSUPP;if (
args->flags& ~(DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL |drivers/gpu/drm/drm_syncobj.c +1
-1@@ -1210,7 +1210,7 @@ drm_syncobj_timeline_signal_ioctl(struct drm_device *dev, void *data, uint32_t i, j; int ret; - if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ)) + if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ_TIMELINE)) return -EOPNOTSUPP;if (
args->pad!= 0)drivers/gpu/drm/drm_syncobj.c +2
-2@@ -1281,8 +1281,8 @@ int drm_syncobj_query_ioctl(struct drm_device *dev, void *data, uint32_t i; int ret; - if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ)) - return -ENODEV; + if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ_TIMELINE)) + return -EOPNOTSUPP; if (args->pad != 0)return
-EINVAL;include/drm/drm_drv.h +4
-0@@ -91,6 +91,13 @@ enum drm_driver_feature {* submission. */ DRIVER_SYNCOBJ = BIT(5), + /** +* @DRIVER_SYNCOBJ_TIMELINE: +* +* Driver supports the timeline flavor of &drm_syncobj for explicit
+ * synchronization of command submission.
+ */
+ DRIVER_SYNCOBJ_TIMELINE = BIT(6),/* IMPORTANT: Below are all the legacy flags, add new ones above. */
include/uapi/drm/drm.h +1
-0@@ -649,6 +649,7 @@ struct drm_gem_open { #define DRM_CAP_PAGE_FLIP_TARGET 0x11 #define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12 #define DRM_CAP_SYNCOBJ 0x13 +#define DRM_CAP_SYNCOBJ_TIMELINE 0x14 /** DRM_IOCTL_GET_CAP ioctl argument type */ struct drm_get_cap {Signature · 7 lines
2.21.0.392.gf8f6787159e _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2] drm: introduce a capability flag for syncobj timeline support
In reply to Lionel LandwerlinQuoted 8 lines · Lionel Landwerlin
Unfortunately userspace users of this API cannot be publicly disclosed yet.
This commit effectively disables timeline syncobj ioctls for all drivers. Each driver wishing to support this feature will need to expose
DRIVER_SYNCOBJ_TIMELINE.
Quoted 8 lines
v2: Add uAPI capability check (Christian)
Signed-off-by Lionel Landwerlin <[email protected]>Reviewed-by Christian König <[email protected]> (v1)Cc Dave Airlie <[email protected]>Cc Daniel Vetter <[email protected]>Cc Christian König <[email protected]>Cc Chunming Zhou <[email protected]>
LGTM,
Not sure if I'm due anymore misc-next pulls, if so would be good to have it go that way, but otherwise I can pull it into -next when I get some time.
Dave.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2] drm: introduce a capability flag for syncobj timeline support
Quoted 19 lines · Dave Airlie
Quoted 7 lines · Lionel Landwerlin
Unfortunately userspace users of this API cannot be publicly disclosed yet.
This commit effectively disables timeline syncobj ioctls for all drivers. Each driver wishing to support this feature will need to expose
DRIVER_SYNCOBJ_TIMELINE.Quoted 8 lines
v2: Add uAPI capability check (Christian)
Signed-off-by Lionel Landwerlin <[email protected]>Reviewed-by Christian König <[email protected]> (v1)Cc Dave Airlie <[email protected]>Cc Daniel Vetter <[email protected]>Cc Christian König <[email protected]>Cc Chunming Zhou <[email protected]>LGTM,
Quoted 8 lines
Reviewed-by Dave Airlie <[email protected]>Not sure if I'm due anymore misc-next pulls, if so would be good to have it go that way, but otherwise I can pull it into -next when I get some time.
Dave.
Christian, Dave,
Who should pull these patches in?
Thanks,
-Lionel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Am 16.04.19 um 14:30 schrieb Lionel Landwerlin:
Quoted 10 lines
We've been somewhat inconsistent when adding the new ioctl and returned ENODEV instead of EOPNOTSUPPORTED upon failing the syncobj capibility.
Signed-off-by Lionel Landwerlin <[email protected]>Fixes ea569910cbab98 ("drm/syncobj: add transition iotcls between binary and timeline v2")Fixes 01d6c357837918 ("drm/syncobj: add support for timeline point wait v8")Cc Dave Airlie <[email protected]>Cc Christian König <[email protected]>Cc Chunming Zhou <[email protected]>
How about also adding a DRM_CAP_TIMELINE_SYNCOBJ as Daniel suggested so that userspace can note that as well?
Thanks,
Christian.
Quoted 18 lines
--- drivers/gpu/drm/drm_syncobj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_syncobj.c +1
-1@@ -756,7 +756,7 @@ drm_syncobj_transfer_ioctl(struct drm_device *dev, void *data,int ret;if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ )) -return -ENODEV ; +return -EOPNOTSUPP ;if (args->pad)return -EINVAL ;
drivers/gpu/drm/drm_syncobj.c drm_syncobj_timeline_wait_ioctl(struct drm_device *dev, void *data, · line 1113
Quoted 8 lines
drivers/gpu/drm/drm_syncobj.c +1
-1@@ -1107,7 +1107,7 @@ drm_syncobj_timeline_wait_ioctl(struct drm_device *dev, void *data,int ret =0 ;if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ )) -return -ENODEV ; +return -EOPNOTSUPP ; if (args->flags & ~(DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL | DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT |
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 12 lines · Christian König
Am 16.04.19 um 14:30 schrieb Lionel Landwerlin:
Quoted 10 lines
We've been somewhat inconsistent when adding the new ioctl and returned ENODEV instead of EOPNOTSUPPORTED upon failing the syncobj capibility.
Signed-off-by Lionel Landwerlin <[email protected]>Fixes ea569910cbab98 ("drm/syncobj: add transition iotcls between binary and timeline v2")Fixes 01d6c357837918 ("drm/syncobj: add support for timeline point wait v8")Cc Dave Airlie <[email protected]>Cc Christian König <[email protected]>Cc Chunming Zhou <[email protected]>
Quoted 4 lines
How about also adding a
DRM_CAP_TIMELINE_SYNCOBJas Daniel suggested so that userspace can note that as well?
Attempting one of the ioctls and getting a EOPNOTSUPP should be good enough. In case that "Daniel" meant me ...
-Daniel
Quoted 31 lines
Thanks,
Christian.Quoted 16 lines
--- drivers/gpu/drm/drm_syncobj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_syncobj.c +1
-1@@ -756,7 +756,7 @@ drm_syncobj_transfer_ioctl(struct drm_device *dev, void *data,int ret;if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ )) -return -ENODEV ; +return -EOPNOTSUPP ;if (args->pad)return -EINVAL ;drivers/gpu/drm/drm_syncobj.c drm_syncobj_timeline_wait_ioctl(struct drm_device *dev, void *data, · line 1111
Quoted 6 lines
drivers/gpu/drm/drm_syncobj.c +1
-1@@ -1107,7 +1107,7 @@ drm_syncobj_timeline_wait_ioctl(struct drm_device *dev, void *data,int ret =0 ;if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ )) -return -ENODEV ; +return -EOPNOTSUPP ; if (args->flags & ~(DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL | DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT |_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Am 16.04.19 um 14:43 schrieb Daniel Vetter:
Quoted 12 lines · Christian König
Quoted 11 lines
Am 16.04.19 um 14:30 schrieb Lionel Landwerlin:
Quoted 10 lines
We've been somewhat inconsistent when adding the new ioctl and returned ENODEV instead of EOPNOTSUPPORTED upon failing the syncobj capibility.
Signed-off-by Lionel Landwerlin <[email protected]>Fixes ea569910cbab98 ("drm/syncobj: add transition iotcls between binary and timeline v2")Fixes 01d6c357837918 ("drm/syncobj: add support for timeline point wait v8")Cc Dave Airlie <[email protected]>Cc Christian König <[email protected]>Cc Chunming Zhou <[email protected]>
Quoted 6 lines
Quoted 4 lines
How about also adding a
DRM_CAP_TIMELINE_SYNCOBJas Daniel suggested so that userspace can note that as well?Attempting one of the ioctls and getting a EOPNOTSUPP should be good enough. In case that "Daniel" meant me ...
Oh, sorry my fault. It was actually Dave who suggested that...
Christian.
Quoted 31 lines
-Daniel
Quoted 29 lines
Thanks,
Christian.Quoted 16 lines
--- drivers/gpu/drm/drm_syncobj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_syncobj.c +1
-1@@ -756,7 +756,7 @@ drm_syncobj_transfer_ioctl(struct drm_device *dev, void *data,int ret;if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ )) -return -ENODEV ; +return -EOPNOTSUPP ;if (args->pad)return -EINVAL ;drivers/gpu/drm/drm_syncobj.c drm_syncobj_timeline_wait_ioctl(struct drm_device *dev, void *data, · line 1111
Quoted 6 lines
drivers/gpu/drm/drm_syncobj.c +1
-1@@ -1107,7 +1107,7 @@ drm_syncobj_timeline_wait_ioctl(struct drm_device *dev, void *data,int ret =0 ;if (!drm_core_check_feature (dev,DRIVER_SYNCOBJ )) -return -ENODEV ; +return -EOPNOTSUPP ; if (args->flags & ~(DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL | DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT |_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 12 lines · Christian König
Am 16.04.19 um 14:30 schrieb Lionel Landwerlin:
Quoted 10 lines
We've been somewhat inconsistent when adding the new ioctl and returned ENODEV instead of EOPNOTSUPPORTED upon failing the syncobj capibility.
Signed-off-by Lionel Landwerlin <[email protected]>Fixes ea569910cbab98 ("drm/syncobj: add transition iotcls between binary and timeline v2")Fixes 01d6c357837918 ("drm/syncobj: add support for timeline point wait v8")Cc Dave Airlie <[email protected]>Cc Christian König <[email protected]>Cc Chunming Zhou <[email protected]>
Quoted 6 lines
How about also adding a
DRM_CAP_TIMELINE_SYNCOBJas Daniel suggested so that userspace can note that as well?Thanks,
Christian.
Thanks Christian, I forgot about that...
Quoted 17 lines
Quoted 17 lines
---
drivers/gpu/drm/drm_syncobj.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_syncobj.c +1
-1@@ -756,7 +756,7 @@ drm_syncobj_transfer_ioctl(struct drm_device *dev, void *data, int ret; if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ)) - return -ENODEV; + return -EOPNOTSUPP; if (args->pad) return -EINVAL;
Quoted 10 lines
Quoted 8 lines
drivers/gpu/drm/drm_syncobj.c +1
-1@@ -1107,7 +1107,7 @@ drm_syncobj_timeline_wait_ioctl(struct drm_device *dev, void *data, int ret = 0; if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ)) - return -ENODEV; + return -EOPNOTSUPP;if (
args->flags& ~(DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL |DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT|
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel