intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] drm: Return -EOPNOTSUPP in drm_setclientcap() when driver do not support KMS
@ 2018-09-18 17:48 José Roberto de Souza
  2018-09-18 18:02 ` Ville Syrjälä
  2018-09-18 18:20 ` ✗ Fi.CI.BAT: failure for drm: Return -EOPNOTSUPP in drm_setclientcap() when driver do not support KMS (rev2) Patchwork
  0 siblings, 2 replies; 4+ messages in thread
From: José Roberto de Souza @ 2018-09-18 17:48 UTC (permalink / raw)
  To: intel-gfx; +Cc: José Roberto de Souza, dri-devel

All DRM_CLIENT capabilities are tied to KMS support, so returning
-EOPNOTSUPP when KMS is not supported.

v2: returning -EOPNOTSUPP(same value as posix ENOTSUP and available
in uapi) instead of -ENOTSUPP

v3: adding comments about the feature requirement about capabilities

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/drm_ioctl.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index 60dfbfae6a02..94bd872d56c4 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -306,6 +306,12 @@ drm_setclientcap(struct drm_device *dev, void *data, struct drm_file *file_priv)
 {
 	struct drm_set_client_cap *req = data;
 
+	/* No render-only settable capabilities for now */
+
+	/* Below caps that only works with KMS drivers */
+	if (!drm_core_check_feature(dev, DRIVER_MODESET))
+		return -EOPNOTSUPP;
+
 	switch (req->capability) {
 	case DRM_CLIENT_CAP_STEREO_3D:
 		if (req->value > 1)
-- 
2.19.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] drm: Return -EOPNOTSUPP in drm_setclientcap() when driver do not support KMS
  2018-09-18 17:48 [PATCH v3] drm: Return -EOPNOTSUPP in drm_setclientcap() when driver do not support KMS José Roberto de Souza
@ 2018-09-18 18:02 ` Ville Syrjälä
  2018-09-21  9:21   ` Daniel Vetter
  2018-09-18 18:20 ` ✗ Fi.CI.BAT: failure for drm: Return -EOPNOTSUPP in drm_setclientcap() when driver do not support KMS (rev2) Patchwork
  1 sibling, 1 reply; 4+ messages in thread
From: Ville Syrjälä @ 2018-09-18 18:02 UTC (permalink / raw)
  To: José Roberto de Souza; +Cc: intel-gfx, dri-devel

On Tue, Sep 18, 2018 at 10:48:09AM -0700, José Roberto de Souza wrote:
> All DRM_CLIENT capabilities are tied to KMS support, so returning
> -EOPNOTSUPP when KMS is not supported.
> 
> v2: returning -EOPNOTSUPP(same value as posix ENOTSUP and available
> in uapi) instead of -ENOTSUPP
> 
> v3: adding comments about the feature requirement about capabilities
> 
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> ---
>  drivers/gpu/drm/drm_ioctl.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
> index 60dfbfae6a02..94bd872d56c4 100644
> --- a/drivers/gpu/drm/drm_ioctl.c
> +++ b/drivers/gpu/drm/drm_ioctl.c
> @@ -306,6 +306,12 @@ drm_setclientcap(struct drm_device *dev, void *data, struct drm_file *file_priv)
>  {
>  	struct drm_set_client_cap *req = data;
>  
> +	/* No render-only settable capabilities for now */
> +
> +	/* Below caps that only works with KMS drivers */

That doesn't seem quite English.

> +	if (!drm_core_check_feature(dev, DRIVER_MODESET))
> +		return -EOPNOTSUPP;
> +
>  	switch (req->capability) {
>  	case DRM_CLIENT_CAP_STEREO_3D:
>  		if (req->value > 1)
> -- 
> 2.19.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* ✗ Fi.CI.BAT: failure for drm: Return -EOPNOTSUPP in drm_setclientcap() when driver do not support KMS (rev2)
  2018-09-18 17:48 [PATCH v3] drm: Return -EOPNOTSUPP in drm_setclientcap() when driver do not support KMS José Roberto de Souza
  2018-09-18 18:02 ` Ville Syrjälä
@ 2018-09-18 18:20 ` Patchwork
  1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2018-09-18 18:20 UTC (permalink / raw)
  To: José Roberto de Souza; +Cc: intel-gfx

== Series Details ==

Series: drm: Return -EOPNOTSUPP in drm_setclientcap() when driver do not support KMS (rev2)
URL   : https://patchwork.freedesktop.org/series/49816/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4839 -> Patchwork_10215 =

== Summary - FAILURE ==

  Serious unknown changes coming with Patchwork_10215 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_10215, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/49816/revisions/2/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_10215:

  === IGT changes ===

    ==== Possible regressions ====

    igt@drv_selftest@live_contexts:
      fi-bsw-n3050:       PASS -> DMESG-WARN

    
== Known issues ==

  Here are the changes found in Patchwork_10215 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_suspend@basic-s3:
      fi-blb-e6850:       PASS -> INCOMPLETE (fdo#107718)

    igt@kms_flip@basic-flip-vs-modeset:
      fi-hsw-4770r:       PASS -> DMESG-WARN (fdo#105602)

    igt@kms_pipe_crc_basic@read-crc-pipe-b:
      fi-byt-clapper:     PASS -> FAIL (fdo#107362)

    
    ==== Possible fixes ====

    igt@kms_psr@primary_page_flip:
      fi-skl-6600u:       FAIL (fdo#107336) -> PASS

    
  fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
  fdo#107336 https://bugs.freedesktop.org/show_bug.cgi?id=107336
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718


== Participating hosts (51 -> 46) ==

  Missing    (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u 


== Build changes ==

    * Linux: CI_DRM_4839 -> Patchwork_10215

  CI_DRM_4839: d961d9f36347a91ae8f607cc8fe64ac1e5c3c349 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4646: d409cc6f234fbc0122c64be27ba85b5603658de5 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10215: 30ac40b51336e994f8b45f7d940e665c1ed33b29 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

30ac40b51336 drm: Return -EOPNOTSUPP in drm_setclientcap() when driver do not support KMS

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10215/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] drm: Return -EOPNOTSUPP in drm_setclientcap() when driver do not support KMS
  2018-09-18 18:02 ` Ville Syrjälä
@ 2018-09-21  9:21   ` Daniel Vetter
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2018-09-21  9:21 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx, dri-devel

On Tue, Sep 18, 2018 at 09:02:04PM +0300, Ville Syrjälä wrote:
> On Tue, Sep 18, 2018 at 10:48:09AM -0700, José Roberto de Souza wrote:
> > All DRM_CLIENT capabilities are tied to KMS support, so returning
> > -EOPNOTSUPP when KMS is not supported.
> > 
> > v2: returning -EOPNOTSUPP(same value as posix ENOTSUP and available
> > in uapi) instead of -ENOTSUPP
> > 
> > v3: adding comments about the feature requirement about capabilities
> > 
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> > ---
> >  drivers/gpu/drm/drm_ioctl.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
> > index 60dfbfae6a02..94bd872d56c4 100644
> > --- a/drivers/gpu/drm/drm_ioctl.c
> > +++ b/drivers/gpu/drm/drm_ioctl.c
> > @@ -306,6 +306,12 @@ drm_setclientcap(struct drm_device *dev, void *data, struct drm_file *file_priv)
> >  {
> >  	struct drm_set_client_cap *req = data;
> >  
> > +	/* No render-only settable capabilities for now */
> > +
> > +	/* Below caps that only works with KMS drivers */
> 
> That doesn't seem quite English.

Looks close enough to me, so applied. Ime if you want to polish English,
it's best to just suggest a different wording, but then we don't have a
whole lot of professional English editors around here :-)

Thanks for the patch.
-Daniel

> 
> > +	if (!drm_core_check_feature(dev, DRIVER_MODESET))
> > +		return -EOPNOTSUPP;
> > +
> >  	switch (req->capability) {
> >  	case DRM_CLIENT_CAP_STEREO_3D:
> >  		if (req->value > 1)
> > -- 
> > 2.19.0
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Ville Syrjälä
> Intel
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-21  9:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-18 17:48 [PATCH v3] drm: Return -EOPNOTSUPP in drm_setclientcap() when driver do not support KMS José Roberto de Souza
2018-09-18 18:02 ` Ville Syrjälä
2018-09-21  9:21   ` Daniel Vetter
2018-09-18 18:20 ` ✗ Fi.CI.BAT: failure for drm: Return -EOPNOTSUPP in drm_setclientcap() when driver do not support KMS (rev2) Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).