diff mbox

[i-g-t] lib/igt_debugfs: Open DRM driver without master for hpd storm exit

Message ID 20170829125342.19760-1-paul.kocialkowski@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Paul Kocialkowki Aug. 29, 2017, 12:53 p.m. UTC
When running the full chamelium test binary, it occurs that the hpd
storm exit handler (that restores its initial value) will fail when
trying to acquire DRM master.

This happens even though the previously-held DRM file descriptor was
closed already.

Since there is no need to get DRM master for debugfs access purposes,
open the DRM node without requesting master to fix the issue.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
---
 lib/igt_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lyude Paul Aug. 30, 2017, 6:36 p.m. UTC | #1
R-B'd and pushed, thanks!

On Tue, 2017-08-29 at 15:53 +0300, Paul Kocialkowski wrote:
> When running the full chamelium test binary, it occurs that the hpd
> storm exit handler (that restores its initial value) will fail when
> trying to acquire DRM master.
> 
> This happens even though the previously-held DRM file descriptor was
> closed already.
> 
> Since there is no need to get DRM master for debugfs access purposes,
> open the DRM node without requesting master to fix the issue.
> 
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
> ---
>  lib/igt_debugfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
> index ee1f0f54..090b56e0 100644
> --- a/lib/igt_debugfs.c
> +++ b/lib/igt_debugfs.c
> @@ -579,7 +579,7 @@ void igt_require_pipe_crc(int fd)
>  
>  static void igt_hpd_storm_exit_handler(int sig)
>  {
> -	int fd = drm_open_driver_master(DRIVER_INTEL);
> +	int fd = drm_open_driver(DRIVER_INTEL);
>  
>  	/* Here we assume that only one i915 device will be ever
> present */
>  	igt_hpd_storm_reset(fd);
diff mbox

Patch

diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index ee1f0f54..090b56e0 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -579,7 +579,7 @@  void igt_require_pipe_crc(int fd)
 
 static void igt_hpd_storm_exit_handler(int sig)
 {
-	int fd = drm_open_driver_master(DRIVER_INTEL);
+	int fd = drm_open_driver(DRIVER_INTEL);
 
 	/* Here we assume that only one i915 device will be ever present */
 	igt_hpd_storm_reset(fd);