public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests: Open DRM_MASTER for display operations
@ 2019-12-18 11:20 Chris Wilson
  2019-12-18 11:31 ` Saarinen, Jani
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Chris Wilson @ 2019-12-18 11:20 UTC (permalink / raw)
  To: igt-dev

To configure the display, one is required to be the DRM_MASTER.

Closes: https://gitlab.freedesktop.org/drm/intel/issues/855
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/kms_content_protection.c | 2 +-
 tests/kms_panel_fitting.c      | 2 +-
 tests/kms_plane_alpha_blend.c  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index 8b361fdef..3b9cedcb4 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -654,7 +654,7 @@ static void test_content_protection_cleanup(void)
 igt_main
 {
 	igt_fixture {
-		data.drm_fd = drm_open_driver(DRIVER_ANY);
+		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
 
 		igt_display_require(&data.display, data.drm_fd);
 	}
diff --git a/tests/kms_panel_fitting.c b/tests/kms_panel_fitting.c
index ac24730f8..065fc2df8 100644
--- a/tests/kms_panel_fitting.c
+++ b/tests/kms_panel_fitting.c
@@ -252,7 +252,7 @@ igt_main
 	data_t data = {};
 
 	igt_fixture {
-		data.drm_fd = drm_open_driver(DRIVER_ANY);
+		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
 		igt_display_require(&data.display, data.drm_fd);
 		igt_display_require_output(&data.display);
 	}
diff --git a/tests/kms_plane_alpha_blend.c b/tests/kms_plane_alpha_blend.c
index d7dc44ab9..085099f81 100644
--- a/tests/kms_plane_alpha_blend.c
+++ b/tests/kms_plane_alpha_blend.c
@@ -565,7 +565,7 @@ igt_main
 	enum pipe pipe;
 
 	igt_fixture {
-		data.gfx_fd = drm_open_driver(DRIVER_ANY);
+		data.gfx_fd = drm_open_driver_master(DRIVER_ANY);
 		igt_require_pipe_crc(data.gfx_fd);
 		igt_display_require(&data.display, data.gfx_fd);
 		igt_require(data.display.is_atomic);
-- 
2.24.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] tests: Open DRM_MASTER for display operations
  2019-12-18 11:20 [igt-dev] [PATCH i-g-t] tests: Open DRM_MASTER for display operations Chris Wilson
@ 2019-12-18 11:31 ` Saarinen, Jani
  2019-12-18 11:35   ` Chris Wilson
  2019-12-18 11:36 ` Petri Latvala
  2019-12-18 16:32 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  2 siblings, 1 reply; 10+ messages in thread
From: Saarinen, Jani @ 2019-12-18 11:31 UTC (permalink / raw)
  To: Chris Wilson, igt-dev@lists.freedesktop.org

Hi,
> -----Original Message-----
> From: igt-dev <igt-dev-bounces@lists.freedesktop.org> On Behalf Of Chris
> Wilson
> Sent: keskiviikko 18. joulukuuta 2019 13.20
> To: igt-dev@lists.freedesktop.org
> Subject: [igt-dev] [PATCH i-g-t] tests: Open DRM_MASTER for display operations
> 
> To configure the display, one is required to be the DRM_MASTER.
> 
> Closes: https://gitlab.freedesktop.org/drm/intel/issues/855
Is this change also for : https://gitlab.freedesktop.org/drm/intel/issues/844 ?

> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  tests/kms_content_protection.c | 2 +-
>  tests/kms_panel_fitting.c      | 2 +-
>  tests/kms_plane_alpha_blend.c  | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> index 8b361fdef..3b9cedcb4 100644
> --- a/tests/kms_content_protection.c
> +++ b/tests/kms_content_protection.c
> @@ -654,7 +654,7 @@ static void test_content_protection_cleanup(void)
>  igt_main
>  {
>  	igt_fixture {
> -		data.drm_fd = drm_open_driver(DRIVER_ANY);
> +		data.drm_fd =
> drm_open_driver_master(DRIVER_ANY);
> 
>  		igt_display_require(&data.display, data.drm_fd);
>  	}
> diff --git a/tests/kms_panel_fitting.c b/tests/kms_panel_fitting.c index
> ac24730f8..065fc2df8 100644
> --- a/tests/kms_panel_fitting.c
> +++ b/tests/kms_panel_fitting.c
> @@ -252,7 +252,7 @@ igt_main
>  	data_t data = {};
> 
>  	igt_fixture {
> -		data.drm_fd = drm_open_driver(DRIVER_ANY);
> +		data.drm_fd =
> drm_open_driver_master(DRIVER_ANY);
>  		igt_display_require(&data.display, data.drm_fd);
>  		igt_display_require_output(&data.display);
>  	}
> diff --git a/tests/kms_plane_alpha_blend.c b/tests/kms_plane_alpha_blend.c
> index d7dc44ab9..085099f81 100644
> --- a/tests/kms_plane_alpha_blend.c
> +++ b/tests/kms_plane_alpha_blend.c
> @@ -565,7 +565,7 @@ igt_main
>  	enum pipe pipe;
> 
>  	igt_fixture {
> -		data.gfx_fd = drm_open_driver(DRIVER_ANY);
> +		data.gfx_fd =
> drm_open_driver_master(DRIVER_ANY);
>  		igt_require_pipe_crc(data.gfx_fd);
>  		igt_display_require(&data.display, data.gfx_fd);
>  		igt_require(data.display.is_atomic);
> --
> 2.24.1
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] tests: Open DRM_MASTER for display operations
  2019-12-18 11:31 ` Saarinen, Jani
@ 2019-12-18 11:35   ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2019-12-18 11:35 UTC (permalink / raw)
  To: Saarinen, Jani, igt-dev@lists.freedesktop.org

Quoting Saarinen, Jani (2019-12-18 11:31:38)
> Hi,
> > -----Original Message-----
> > From: igt-dev <igt-dev-bounces@lists.freedesktop.org> On Behalf Of Chris
> > Wilson
> > Sent: keskiviikko 18. joulukuuta 2019 13.20
> > To: igt-dev@lists.freedesktop.org
> > Subject: [igt-dev] [PATCH i-g-t] tests: Open DRM_MASTER for display operations
> > 
> > To configure the display, one is required to be the DRM_MASTER.
> > 
> > Closes: https://gitlab.freedesktop.org/drm/intel/issues/855
> Is this change also for : https://gitlab.freedesktop.org/drm/intel/issues/844 ?

No. That is caused by a zombie test keeping hold of DRM_MASTER. It just
happens to be the same tests, but more likely an oops that is was
triggered by the earlier tests. igt_runner should be requesting a reboot
if it encounters a test it cannot kill.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] tests: Open DRM_MASTER for display operations
  2019-12-18 11:20 [igt-dev] [PATCH i-g-t] tests: Open DRM_MASTER for display operations Chris Wilson
  2019-12-18 11:31 ` Saarinen, Jani
@ 2019-12-18 11:36 ` Petri Latvala
  2019-12-18 11:38   ` Chris Wilson
  2019-12-18 16:32 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  2 siblings, 1 reply; 10+ messages in thread
From: Petri Latvala @ 2019-12-18 11:36 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

On Wed, Dec 18, 2019 at 11:20:12AM +0000, Chris Wilson wrote:
> To configure the display, one is required to be the DRM_MASTER.
> 
> Closes: https://gitlab.freedesktop.org/drm/intel/issues/855
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  tests/kms_content_protection.c | 2 +-
>  tests/kms_panel_fitting.c      | 2 +-
>  tests/kms_plane_alpha_blend.c  | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> index 8b361fdef..3b9cedcb4 100644
> --- a/tests/kms_content_protection.c
> +++ b/tests/kms_content_protection.c
> @@ -654,7 +654,7 @@ static void test_content_protection_cleanup(void)
>  igt_main
>  {
>  	igt_fixture {
> -		data.drm_fd = drm_open_driver(DRIVER_ANY);
> +		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
>  
>  		igt_display_require(&data.display, data.drm_fd);
>  	}
> diff --git a/tests/kms_panel_fitting.c b/tests/kms_panel_fitting.c
> index ac24730f8..065fc2df8 100644
> --- a/tests/kms_panel_fitting.c
> +++ b/tests/kms_panel_fitting.c
> @@ -252,7 +252,7 @@ igt_main
>  	data_t data = {};
>  
>  	igt_fixture {
> -		data.drm_fd = drm_open_driver(DRIVER_ANY);
> +		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
>  		igt_display_require(&data.display, data.drm_fd);
>  		igt_display_require_output(&data.display);
>  	}
> diff --git a/tests/kms_plane_alpha_blend.c b/tests/kms_plane_alpha_blend.c
> index d7dc44ab9..085099f81 100644
> --- a/tests/kms_plane_alpha_blend.c
> +++ b/tests/kms_plane_alpha_blend.c
> @@ -565,7 +565,7 @@ igt_main
>  	enum pipe pipe;
>  
>  	igt_fixture {
> -		data.gfx_fd = drm_open_driver(DRIVER_ANY);
> +		data.gfx_fd = drm_open_driver_master(DRIVER_ANY);
>  		igt_require_pipe_crc(data.gfx_fd);
>  		igt_display_require(&data.display, data.gfx_fd);
>  		igt_require(data.display.is_atomic);


Don't they implicitly become masters if that's the first-and-only
open() on the dev? Did that change?


-- 
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] tests: Open DRM_MASTER for display operations
  2019-12-18 11:36 ` Petri Latvala
@ 2019-12-18 11:38   ` Chris Wilson
  2019-12-18 11:49     ` Petri Latvala
  0 siblings, 1 reply; 10+ messages in thread
From: Chris Wilson @ 2019-12-18 11:38 UTC (permalink / raw)
  To: Petri Latvala; +Cc: igt-dev

Quoting Petri Latvala (2019-12-18 11:36:02)
> On Wed, Dec 18, 2019 at 11:20:12AM +0000, Chris Wilson wrote:
> > To configure the display, one is required to be the DRM_MASTER.
> > 
> > Closes: https://gitlab.freedesktop.org/drm/intel/issues/855
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> >  tests/kms_content_protection.c | 2 +-
> >  tests/kms_panel_fitting.c      | 2 +-
> >  tests/kms_plane_alpha_blend.c  | 2 +-
> >  3 files changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> > index 8b361fdef..3b9cedcb4 100644
> > --- a/tests/kms_content_protection.c
> > +++ b/tests/kms_content_protection.c
> > @@ -654,7 +654,7 @@ static void test_content_protection_cleanup(void)
> >  igt_main
> >  {
> >       igt_fixture {
> > -             data.drm_fd = drm_open_driver(DRIVER_ANY);
> > +             data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> >  
> >               igt_display_require(&data.display, data.drm_fd);
> >       }
> > diff --git a/tests/kms_panel_fitting.c b/tests/kms_panel_fitting.c
> > index ac24730f8..065fc2df8 100644
> > --- a/tests/kms_panel_fitting.c
> > +++ b/tests/kms_panel_fitting.c
> > @@ -252,7 +252,7 @@ igt_main
> >       data_t data = {};
> >  
> >       igt_fixture {
> > -             data.drm_fd = drm_open_driver(DRIVER_ANY);
> > +             data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> >               igt_display_require(&data.display, data.drm_fd);
> >               igt_display_require_output(&data.display);
> >       }
> > diff --git a/tests/kms_plane_alpha_blend.c b/tests/kms_plane_alpha_blend.c
> > index d7dc44ab9..085099f81 100644
> > --- a/tests/kms_plane_alpha_blend.c
> > +++ b/tests/kms_plane_alpha_blend.c
> > @@ -565,7 +565,7 @@ igt_main
> >       enum pipe pipe;
> >  
> >       igt_fixture {
> > -             data.gfx_fd = drm_open_driver(DRIVER_ANY);
> > +             data.gfx_fd = drm_open_driver_master(DRIVER_ANY);
> >               igt_require_pipe_crc(data.gfx_fd);
> >               igt_display_require(&data.display, data.gfx_fd);
> >               igt_require(data.display.is_atomic);
> 
> 
> Don't they implicitly become masters if that's the first-and-only
> open() on the dev? Did that change?

That is the still the case. They aren't the only things running :)

By requesting master up front, we will get a complaint about what is
still running that prevents us acquiring master, rather than a belated
EACCES.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] tests: Open DRM_MASTER for display operations
  2019-12-18 11:38   ` Chris Wilson
@ 2019-12-18 11:49     ` Petri Latvala
  2019-12-18 11:58       ` Chris Wilson
  0 siblings, 1 reply; 10+ messages in thread
From: Petri Latvala @ 2019-12-18 11:49 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

On Wed, Dec 18, 2019 at 11:38:22AM +0000, Chris Wilson wrote:
> Quoting Petri Latvala (2019-12-18 11:36:02)
> > On Wed, Dec 18, 2019 at 11:20:12AM +0000, Chris Wilson wrote:
> > > To configure the display, one is required to be the DRM_MASTER.
> > > 
> > > Closes: https://gitlab.freedesktop.org/drm/intel/issues/855
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > ---
> > >  tests/kms_content_protection.c | 2 +-
> > >  tests/kms_panel_fitting.c      | 2 +-
> > >  tests/kms_plane_alpha_blend.c  | 2 +-
> > >  3 files changed, 3 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> > > index 8b361fdef..3b9cedcb4 100644
> > > --- a/tests/kms_content_protection.c
> > > +++ b/tests/kms_content_protection.c
> > > @@ -654,7 +654,7 @@ static void test_content_protection_cleanup(void)
> > >  igt_main
> > >  {
> > >       igt_fixture {
> > > -             data.drm_fd = drm_open_driver(DRIVER_ANY);
> > > +             data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> > >  
> > >               igt_display_require(&data.display, data.drm_fd);
> > >       }
> > > diff --git a/tests/kms_panel_fitting.c b/tests/kms_panel_fitting.c
> > > index ac24730f8..065fc2df8 100644
> > > --- a/tests/kms_panel_fitting.c
> > > +++ b/tests/kms_panel_fitting.c
> > > @@ -252,7 +252,7 @@ igt_main
> > >       data_t data = {};
> > >  
> > >       igt_fixture {
> > > -             data.drm_fd = drm_open_driver(DRIVER_ANY);
> > > +             data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> > >               igt_display_require(&data.display, data.drm_fd);
> > >               igt_display_require_output(&data.display);
> > >       }
> > > diff --git a/tests/kms_plane_alpha_blend.c b/tests/kms_plane_alpha_blend.c
> > > index d7dc44ab9..085099f81 100644
> > > --- a/tests/kms_plane_alpha_blend.c
> > > +++ b/tests/kms_plane_alpha_blend.c
> > > @@ -565,7 +565,7 @@ igt_main
> > >       enum pipe pipe;
> > >  
> > >       igt_fixture {
> > > -             data.gfx_fd = drm_open_driver(DRIVER_ANY);
> > > +             data.gfx_fd = drm_open_driver_master(DRIVER_ANY);
> > >               igt_require_pipe_crc(data.gfx_fd);
> > >               igt_display_require(&data.display, data.gfx_fd);
> > >               igt_require(data.display.is_atomic);
> > 
> > 
> > Don't they implicitly become masters if that's the first-and-only
> > open() on the dev? Did that change?
> 
> That is the still the case. They aren't the only things running :)
> 
> By requesting master up front, we will get a complaint about what is
> still running that prevents us acquiring master, rather than a belated
> EACCES.

I see. Then claiming that this closes drm/intel#855 is a bit of a
stretch.

Getting the error happening earlier is good. However, surely these
aren't the only tests that do master-requiring things (modeset? or any
kind of commit?) on an fd opened with drm_open_driver()? Are there any
tests that do igt_display_require and don't require master-y access?

Is checking for master in igt_display_require overkill?


-- 
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] tests: Open DRM_MASTER for display operations
  2019-12-18 11:49     ` Petri Latvala
@ 2019-12-18 11:58       ` Chris Wilson
  2019-12-18 12:05         ` Petri Latvala
  0 siblings, 1 reply; 10+ messages in thread
From: Chris Wilson @ 2019-12-18 11:58 UTC (permalink / raw)
  To: Petri Latvala; +Cc: igt-dev

Quoting Petri Latvala (2019-12-18 11:49:40)
> On Wed, Dec 18, 2019 at 11:38:22AM +0000, Chris Wilson wrote:
> > Quoting Petri Latvala (2019-12-18 11:36:02)
> > > On Wed, Dec 18, 2019 at 11:20:12AM +0000, Chris Wilson wrote:
> > > > To configure the display, one is required to be the DRM_MASTER.
> > > > 
> > > > Closes: https://gitlab.freedesktop.org/drm/intel/issues/855
> > > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > > ---
> > > >  tests/kms_content_protection.c | 2 +-
> > > >  tests/kms_panel_fitting.c      | 2 +-
> > > >  tests/kms_plane_alpha_blend.c  | 2 +-
> > > >  3 files changed, 3 insertions(+), 3 deletions(-)
> > > > 
> > > > diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> > > > index 8b361fdef..3b9cedcb4 100644
> > > > --- a/tests/kms_content_protection.c
> > > > +++ b/tests/kms_content_protection.c
> > > > @@ -654,7 +654,7 @@ static void test_content_protection_cleanup(void)
> > > >  igt_main
> > > >  {
> > > >       igt_fixture {
> > > > -             data.drm_fd = drm_open_driver(DRIVER_ANY);
> > > > +             data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> > > >  
> > > >               igt_display_require(&data.display, data.drm_fd);
> > > >       }
> > > > diff --git a/tests/kms_panel_fitting.c b/tests/kms_panel_fitting.c
> > > > index ac24730f8..065fc2df8 100644
> > > > --- a/tests/kms_panel_fitting.c
> > > > +++ b/tests/kms_panel_fitting.c
> > > > @@ -252,7 +252,7 @@ igt_main
> > > >       data_t data = {};
> > > >  
> > > >       igt_fixture {
> > > > -             data.drm_fd = drm_open_driver(DRIVER_ANY);
> > > > +             data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> > > >               igt_display_require(&data.display, data.drm_fd);
> > > >               igt_display_require_output(&data.display);
> > > >       }
> > > > diff --git a/tests/kms_plane_alpha_blend.c b/tests/kms_plane_alpha_blend.c
> > > > index d7dc44ab9..085099f81 100644
> > > > --- a/tests/kms_plane_alpha_blend.c
> > > > +++ b/tests/kms_plane_alpha_blend.c
> > > > @@ -565,7 +565,7 @@ igt_main
> > > >       enum pipe pipe;
> > > >  
> > > >       igt_fixture {
> > > > -             data.gfx_fd = drm_open_driver(DRIVER_ANY);
> > > > +             data.gfx_fd = drm_open_driver_master(DRIVER_ANY);
> > > >               igt_require_pipe_crc(data.gfx_fd);
> > > >               igt_display_require(&data.display, data.gfx_fd);
> > > >               igt_require(data.display.is_atomic);
> > > 
> > > 
> > > Don't they implicitly become masters if that's the first-and-only
> > > open() on the dev? Did that change?
> > 
> > That is the still the case. They aren't the only things running :)
> > 
> > By requesting master up front, we will get a complaint about what is
> > still running that prevents us acquiring master, rather than a belated
> > EACCES.
> 
> I see. Then claiming that this closes drm/intel#855 is a bit of a
> stretch.

It closes the EACESS. That stuff is still running is that not this
test's fault (not requiring the permission it needs is) and already
known, most recently #844.
 
> Getting the error happening earlier is good. However, surely these
> aren't the only tests that do master-requiring things (modeset? or any
> kind of commit?) on an fd opened with drm_open_driver()? Are there any
> tests that do igt_display_require and don't require master-y access?

I did a git grep and these 3 were the one's that I could identify that
did not request the privilege they required.
 
> Is checking for master in igt_display_require overkill?

Maybe, or maybe you want to allow readonly access and only require there
be display HW :)
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] tests: Open DRM_MASTER for display operations
  2019-12-18 11:58       ` Chris Wilson
@ 2019-12-18 12:05         ` Petri Latvala
  2019-12-18 12:17           ` Kahola, Mika
  0 siblings, 1 reply; 10+ messages in thread
From: Petri Latvala @ 2019-12-18 12:05 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

On Wed, Dec 18, 2019 at 11:58:17AM +0000, Chris Wilson wrote:
> Quoting Petri Latvala (2019-12-18 11:49:40)
> > On Wed, Dec 18, 2019 at 11:38:22AM +0000, Chris Wilson wrote:
> > > Quoting Petri Latvala (2019-12-18 11:36:02)
> > > > On Wed, Dec 18, 2019 at 11:20:12AM +0000, Chris Wilson wrote:
> > > > > To configure the display, one is required to be the DRM_MASTER.
> > > > > 
> > > > > Closes: https://gitlab.freedesktop.org/drm/intel/issues/855
> > > > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > > > ---
> > > > >  tests/kms_content_protection.c | 2 +-
> > > > >  tests/kms_panel_fitting.c      | 2 +-
> > > > >  tests/kms_plane_alpha_blend.c  | 2 +-
> > > > >  3 files changed, 3 insertions(+), 3 deletions(-)
> > > > > 
> > > > > diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> > > > > index 8b361fdef..3b9cedcb4 100644
> > > > > --- a/tests/kms_content_protection.c
> > > > > +++ b/tests/kms_content_protection.c
> > > > > @@ -654,7 +654,7 @@ static void test_content_protection_cleanup(void)
> > > > >  igt_main
> > > > >  {
> > > > >       igt_fixture {
> > > > > -             data.drm_fd = drm_open_driver(DRIVER_ANY);
> > > > > +             data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> > > > >  
> > > > >               igt_display_require(&data.display, data.drm_fd);
> > > > >       }
> > > > > diff --git a/tests/kms_panel_fitting.c b/tests/kms_panel_fitting.c
> > > > > index ac24730f8..065fc2df8 100644
> > > > > --- a/tests/kms_panel_fitting.c
> > > > > +++ b/tests/kms_panel_fitting.c
> > > > > @@ -252,7 +252,7 @@ igt_main
> > > > >       data_t data = {};
> > > > >  
> > > > >       igt_fixture {
> > > > > -             data.drm_fd = drm_open_driver(DRIVER_ANY);
> > > > > +             data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> > > > >               igt_display_require(&data.display, data.drm_fd);
> > > > >               igt_display_require_output(&data.display);
> > > > >       }
> > > > > diff --git a/tests/kms_plane_alpha_blend.c b/tests/kms_plane_alpha_blend.c
> > > > > index d7dc44ab9..085099f81 100644
> > > > > --- a/tests/kms_plane_alpha_blend.c
> > > > > +++ b/tests/kms_plane_alpha_blend.c
> > > > > @@ -565,7 +565,7 @@ igt_main
> > > > >       enum pipe pipe;
> > > > >  
> > > > >       igt_fixture {
> > > > > -             data.gfx_fd = drm_open_driver(DRIVER_ANY);
> > > > > +             data.gfx_fd = drm_open_driver_master(DRIVER_ANY);
> > > > >               igt_require_pipe_crc(data.gfx_fd);
> > > > >               igt_display_require(&data.display, data.gfx_fd);
> > > > >               igt_require(data.display.is_atomic);
> > > > 
> > > > 
> > > > Don't they implicitly become masters if that's the first-and-only
> > > > open() on the dev? Did that change?
> > > 
> > > That is the still the case. They aren't the only things running :)
> > > 
> > > By requesting master up front, we will get a complaint about what is
> > > still running that prevents us acquiring master, rather than a belated
> > > EACCES.
> > 
> > I see. Then claiming that this closes drm/intel#855 is a bit of a
> > stretch.
> 
> It closes the EACESS. That stuff is still running is that not this
> test's fault (not requiring the permission it needs is) and already
> known, most recently #844.
>  
> > Getting the error happening earlier is good. However, surely these
> > aren't the only tests that do master-requiring things (modeset? or any
> > kind of commit?) on an fd opened with drm_open_driver()? Are there any
> > tests that do igt_display_require and don't require master-y access?
> 
> I did a git grep and these 3 were the one's that I could identify that
> did not request the privilege they required.


Ok, I'm sold.


Acked-by: Petri Latvala <petri.latvala@intel.com>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] tests: Open DRM_MASTER for display operations
  2019-12-18 12:05         ` Petri Latvala
@ 2019-12-18 12:17           ` Kahola, Mika
  0 siblings, 0 replies; 10+ messages in thread
From: Kahola, Mika @ 2019-12-18 12:17 UTC (permalink / raw)
  To: chris@chris-wilson.co.uk, Latvala, Petri; +Cc: igt-dev@lists.freedesktop.org

On Wed, 2019-12-18 at 14:05 +0200, Petri Latvala wrote:
> On Wed, Dec 18, 2019 at 11:58:17AM +0000, Chris Wilson wrote:
> > Quoting Petri Latvala (2019-12-18 11:49:40)
> > > On Wed, Dec 18, 2019 at 11:38:22AM +0000, Chris Wilson wrote:
> > > > Quoting Petri Latvala (2019-12-18 11:36:02)
> > > > > On Wed, Dec 18, 2019 at 11:20:12AM +0000, Chris Wilson wrote:
> > > > > > To configure the display, one is required to be the
> > > > > > DRM_MASTER.
> > > > > > 
> > > > > > Closes: https://gitlab.freedesktop.org/drm/intel/issues/855
> > > > > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > > > > ---
> > > > > >  tests/kms_content_protection.c | 2 +-
> > > > > >  tests/kms_panel_fitting.c      | 2 +-
> > > > > >  tests/kms_plane_alpha_blend.c  | 2 +-
> > > > > >  3 files changed, 3 insertions(+), 3 deletions(-)
> > > > > > 
> > > > > > diff --git a/tests/kms_content_protection.c
> > > > > > b/tests/kms_content_protection.c
> > > > > > index 8b361fdef..3b9cedcb4 100644
> > > > > > --- a/tests/kms_content_protection.c
> > > > > > +++ b/tests/kms_content_protection.c
> > > > > > @@ -654,7 +654,7 @@ static void
> > > > > > test_content_protection_cleanup(void)
> > > > > >  igt_main
> > > > > >  {
> > > > > >       igt_fixture {
> > > > > > -             data.drm_fd = drm_open_driver(DRIVER_ANY);
> > > > > > +             data.drm_fd =
> > > > > > drm_open_driver_master(DRIVER_ANY);
> > > > > >  
> > > > > >               igt_display_require(&data.display,
> > > > > > data.drm_fd);
> > > > > >       }
> > > > > > diff --git a/tests/kms_panel_fitting.c
> > > > > > b/tests/kms_panel_fitting.c
> > > > > > index ac24730f8..065fc2df8 100644
> > > > > > --- a/tests/kms_panel_fitting.c
> > > > > > +++ b/tests/kms_panel_fitting.c
> > > > > > @@ -252,7 +252,7 @@ igt_main
> > > > > >       data_t data = {};
> > > > > >  
> > > > > >       igt_fixture {
> > > > > > -             data.drm_fd = drm_open_driver(DRIVER_ANY);
> > > > > > +             data.drm_fd =
> > > > > > drm_open_driver_master(DRIVER_ANY);
> > > > > >               igt_display_require(&data.display,
> > > > > > data.drm_fd);
> > > > > >               igt_display_require_output(&data.display);
> > > > > >       }
> > > > > > diff --git a/tests/kms_plane_alpha_blend.c
> > > > > > b/tests/kms_plane_alpha_blend.c
> > > > > > index d7dc44ab9..085099f81 100644
> > > > > > --- a/tests/kms_plane_alpha_blend.c
> > > > > > +++ b/tests/kms_plane_alpha_blend.c
> > > > > > @@ -565,7 +565,7 @@ igt_main
> > > > > >       enum pipe pipe;
> > > > > >  
> > > > > >       igt_fixture {
> > > > > > -             data.gfx_fd = drm_open_driver(DRIVER_ANY);
> > > > > > +             data.gfx_fd =
> > > > > > drm_open_driver_master(DRIVER_ANY);
> > > > > >               igt_require_pipe_crc(data.gfx_fd);
> > > > > >               igt_display_require(&data.display,
> > > > > > data.gfx_fd);
> > > > > >               igt_require(data.display.is_atomic);
> > > > > 
> > > > > 
> > > > > Don't they implicitly become masters if that's the first-and-
> > > > > only
> > > > > open() on the dev? Did that change?
> > > > 
> > > > That is the still the case. They aren't the only things running
> > > > :)
> > > > 
> > > > By requesting master up front, we will get a complaint about
> > > > what is
> > > > still running that prevents us acquiring master, rather than a
> > > > belated
> > > > EACCES.
> > > 
> > > I see. Then claiming that this closes drm/intel#855 is a bit of a
> > > stretch.
> > 
> > It closes the EACESS. That stuff is still running is that not this
> > test's fault (not requiring the permission it needs is) and already
> > known, most recently #844.
> >  
> > > Getting the error happening earlier is good. However, surely
> > > these
> > > aren't the only tests that do master-requiring things (modeset?
> > > or any
> > > kind of commit?) on an fd opened with drm_open_driver()? Are
> > > there any
> > > tests that do igt_display_require and don't require master-y
> > > access?
> > 
> > I did a git grep and these 3 were the one's that I could identify
> > that
> > did not request the privilege they required.
That's true. All other kms tests are opened with a request of master
priviledges.

Reviewed-by: Mika Kahola <mika.kahola@intel.com>

> 
> 
> Ok, I'm sold.
> 
> 
> Acked-by: Petri Latvala <petri.latvala@intel.com>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✗ Fi.CI.BAT: failure for tests: Open DRM_MASTER for display operations
  2019-12-18 11:20 [igt-dev] [PATCH i-g-t] tests: Open DRM_MASTER for display operations Chris Wilson
  2019-12-18 11:31 ` Saarinen, Jani
  2019-12-18 11:36 ` Petri Latvala
@ 2019-12-18 16:32 ` Patchwork
  2 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2019-12-18 16:32 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: tests: Open DRM_MASTER for display operations
URL   : https://patchwork.freedesktop.org/series/71110/
State : failure

== Summary ==

Series 71110 revision 1 was fully merged or fully failed: no git log

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2019-12-18 16:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-18 11:20 [igt-dev] [PATCH i-g-t] tests: Open DRM_MASTER for display operations Chris Wilson
2019-12-18 11:31 ` Saarinen, Jani
2019-12-18 11:35   ` Chris Wilson
2019-12-18 11:36 ` Petri Latvala
2019-12-18 11:38   ` Chris Wilson
2019-12-18 11:49     ` Petri Latvala
2019-12-18 11:58       ` Chris Wilson
2019-12-18 12:05         ` Petri Latvala
2019-12-18 12:17           ` Kahola, Mika
2019-12-18 16:32 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox