* [PATCH i-g-t 1/2] igt/pm_rpm: Close local fd before trying to unload module
@ 2018-08-15 20:59 ` Chris Wilson
0 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2018-08-15 20:59 UTC (permalink / raw)
To: igt-dev; +Cc: intel-gfx
Make sure everything we open in setup_environment() is paired to
teardown_environment().
Fixes: d8e78990aa2b ("igt/pm_rpm: Test reaquisition of runtime-pm after module reload")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/pm_rpm.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index 65489bcdb..c0212ed70 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -717,21 +717,23 @@ out:
return wait_for_suspended();
}
-static void restore_environment(void)
+static void teardown_environment(void)
{
+ close(msr_fd);
+ if (has_pc8)
+ close(pc8_status_fd);
+
+ igt_restore_runtime_pm();
+
igt_pm_restore_sata_link_power_management(pm_data);
free(pm_data);
-}
-static void teardown_environment(void)
-{
- restore_environment();
fini_mode_set_data(&ms_data);
+
close(debugfs);
- drmClose(drm_fd);
- close(msr_fd);
- if (has_pc8)
- close(pc8_status_fd);
+ close(drm_fd);
+
+ has_runtime_pm = false;
}
static void basic_subtest(void)
--
2.18.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [igt-dev] [PATCH i-g-t 1/2] igt/pm_rpm: Close local fd before trying to unload module
@ 2018-08-15 20:59 ` Chris Wilson
0 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2018-08-15 20:59 UTC (permalink / raw)
To: igt-dev; +Cc: intel-gfx
Make sure everything we open in setup_environment() is paired to
teardown_environment().
Fixes: d8e78990aa2b ("igt/pm_rpm: Test reaquisition of runtime-pm after module reload")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/pm_rpm.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index 65489bcdb..c0212ed70 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -717,21 +717,23 @@ out:
return wait_for_suspended();
}
-static void restore_environment(void)
+static void teardown_environment(void)
{
+ close(msr_fd);
+ if (has_pc8)
+ close(pc8_status_fd);
+
+ igt_restore_runtime_pm();
+
igt_pm_restore_sata_link_power_management(pm_data);
free(pm_data);
-}
-static void teardown_environment(void)
-{
- restore_environment();
fini_mode_set_data(&ms_data);
+
close(debugfs);
- drmClose(drm_fd);
- close(msr_fd);
- if (has_pc8)
- close(pc8_status_fd);
+ close(drm_fd);
+
+ has_runtime_pm = false;
}
static void basic_subtest(void)
--
2.18.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH i-g-t 2/2] igt/pm_rpm: Avoid at_exit_drm_fd
2018-08-15 20:59 ` [igt-dev] " Chris Wilson
@ 2018-08-15 20:59 ` Chris Wilson
-1 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2018-08-15 20:59 UTC (permalink / raw)
To: igt-dev; +Cc: intel-gfx
Keep the drm_fd owned by pm_rpm as we need to relinquish all ownership
of the device in order to unload the module.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/pm_rpm.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index c0212ed70..f0781617c 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -697,7 +697,10 @@ static bool setup_environment(void)
if (has_runtime_pm)
goto out;
- drm_fd = drm_open_driver_master(DRIVER_INTEL);
+ drm_fd = __drm_open_driver(DRIVER_INTEL);
+ igt_require(drm_fd != -1);
+ igt_device_set_master(drm_fd);
+
debugfs = igt_debugfs_dir(drm_fd);
igt_require(debugfs != -1);
--
2.18.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Intel-gfx] [PATCH i-g-t 2/2] igt/pm_rpm: Avoid at_exit_drm_fd
@ 2018-08-15 20:59 ` Chris Wilson
0 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2018-08-15 20:59 UTC (permalink / raw)
To: igt-dev; +Cc: intel-gfx
Keep the drm_fd owned by pm_rpm as we need to relinquish all ownership
of the device in order to unload the module.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/pm_rpm.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index c0212ed70..f0781617c 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -697,7 +697,10 @@ static bool setup_environment(void)
if (has_runtime_pm)
goto out;
- drm_fd = drm_open_driver_master(DRIVER_INTEL);
+ drm_fd = __drm_open_driver(DRIVER_INTEL);
+ igt_require(drm_fd != -1);
+ igt_device_set_master(drm_fd);
+
debugfs = igt_debugfs_dir(drm_fd);
igt_require(debugfs != -1);
--
2.18.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] igt/pm_rpm: Close local fd before trying to unload module
2018-08-15 20:59 ` [igt-dev] " Chris Wilson
(?)
(?)
@ 2018-08-15 22:24 ` Patchwork
-1 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2018-08-15 22:24 UTC (permalink / raw)
To: Chris Wilson; +Cc: igt-dev
== Series Details ==
Series: series starting with [i-g-t,1/2] igt/pm_rpm: Close local fd before trying to unload module
URL : https://patchwork.freedesktop.org/series/48286/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4672 -> IGTPW_1719 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/48286/revisions/1/mbox/
== Known issues ==
Here are the changes found in IGTPW_1719 that come from known issues:
=== IGT changes ===
==== Issues hit ====
{igt@amdgpu/amd_prime@amd-to-i915}:
{fi-kbl-8809g}: NOTRUN -> FAIL (fdo#107341)
igt@drv_selftest@live_coherency:
fi-gdg-551: PASS -> DMESG-FAIL (fdo#107164)
==== Possible fixes ====
{igt@amdgpu/amd_basic@userptr}:
{fi-kbl-8809g}: INCOMPLETE (fdo#107402) -> PASS
igt@kms_frontbuffer_tracking@basic:
{fi-byt-clapper}: FAIL (fdo#103167) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
{fi-cfl-8109u}: INCOMPLETE (fdo#106070) -> PASS
==== Warnings ====
{igt@kms_psr@primary_page_flip}:
fi-cnl-psr: DMESG-FAIL (fdo#107372) -> DMESG-WARN (fdo#107372)
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#106070 https://bugs.freedesktop.org/show_bug.cgi?id=106070
fdo#107164 https://bugs.freedesktop.org/show_bug.cgi?id=107164
fdo#107341 https://bugs.freedesktop.org/show_bug.cgi?id=107341
fdo#107372 https://bugs.freedesktop.org/show_bug.cgi?id=107372
fdo#107402 https://bugs.freedesktop.org/show_bug.cgi?id=107402
== Participating hosts (53 -> 47) ==
Missing (6): fi-ilk-m540 fi-hsw-4200u fi-byt-j1900 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600
== Build changes ==
* IGT: IGT_4598 -> IGTPW_1719
CI_DRM_4672: 2a55ea192b780b798b8c5bf2e458694ba54a312d @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1719: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1719/
IGT_4598: 9c0f04355107a8693650b16756b6343a78501138 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1719/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 9+ messages in thread
* [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/2] igt/pm_rpm: Close local fd before trying to unload module
2018-08-15 20:59 ` [igt-dev] " Chris Wilson
` (2 preceding siblings ...)
(?)
@ 2018-08-16 3:56 ` Patchwork
2018-08-16 4:32 ` Chris Wilson
-1 siblings, 1 reply; 9+ messages in thread
From: Patchwork @ 2018-08-16 3:56 UTC (permalink / raw)
To: Chris Wilson; +Cc: igt-dev
== Series Details ==
Series: series starting with [i-g-t,1/2] igt/pm_rpm: Close local fd before trying to unload module
URL : https://patchwork.freedesktop.org/series/48286/
State : failure
== Summary ==
= CI Bug Log - changes from IGT_4598_full -> IGTPW_1719_full =
== Summary - FAILURE ==
Serious unknown changes coming with IGTPW_1719_full absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_1719_full, 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/48286/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in IGTPW_1719_full:
=== IGT changes ===
==== Possible regressions ====
igt@kms_addfb_basic@invalid-set-prop-any:
shard-kbl: PASS -> FAIL
shard-apl: PASS -> FAIL
shard-glk: PASS -> FAIL
shard-hsw: PASS -> FAIL
==== Warnings ====
igt@kms_chv_cursor_fail@pipe-a-64x64-right-edge:
shard-glk: PASS -> SKIP +5
shard-apl: PASS -> SKIP +6
igt@kms_frontbuffer_tracking@fbc-farfromfence:
shard-kbl: PASS -> SKIP +6
shard-hsw: PASS -> SKIP +5
igt@perf_pmu@rc6:
shard-kbl: SKIP -> PASS
== Known issues ==
Here are the changes found in IGTPW_1719_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_suspend@shrink:
shard-snb: NOTRUN -> INCOMPLETE (fdo#106886, fdo#105411)
igt@gem_ctx_isolation@vcs0-s3:
shard-kbl: PASS -> INCOMPLETE (fdo#103665, fdo#107556)
igt@gem_softpin@noreloc-s3:
shard-snb: PASS -> DMESG-WARN (fdo#102365)
igt@kms_busy@basic-flip-c:
shard-snb: SKIP -> INCOMPLETE (fdo#105411)
igt@kms_flip@2x-flip-vs-expired-vblank:
shard-glk: PASS -> FAIL (fdo#105363)
igt@kms_setmode@basic:
shard-apl: PASS -> FAIL (fdo#99912)
==== Possible fixes ====
igt@gem_wait@await-default:
shard-snb: INCOMPLETE (fdo#105411) -> PASS
igt@kms_plane@pixel-format-pipe-a-planes:
shard-snb: FAIL (fdo#107161) -> PASS
fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
fdo#107161 https://bugs.freedesktop.org/show_bug.cgi?id=107161
fdo#107556 https://bugs.freedesktop.org/show_bug.cgi?id=107556
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* IGT: IGT_4598 -> IGTPW_1719
* Linux: CI_DRM_4669 -> CI_DRM_4672
CI_DRM_4669: aea12ded40860145c23f1c1a28a386fb97ae6e4e @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4672: 2a55ea192b780b798b8c5bf2e458694ba54a312d @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1719: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1719/
IGT_4598: 9c0f04355107a8693650b16756b6343a78501138 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1719/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/2] igt/pm_rpm: Close local fd before trying to unload module
2018-08-16 3:56 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
@ 2018-08-16 4:32 ` Chris Wilson
0 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2018-08-16 4:32 UTC (permalink / raw)
To: Patchwork, igt-dev
Quoting Patchwork (2018-08-16 04:56:24)
> == Series Details ==
>
> Series: series starting with [i-g-t,1/2] igt/pm_rpm: Close local fd before trying to unload module
> URL : https://patchwork.freedesktop.org/series/48286/
> State : failure
>
> == Summary ==
>
> = CI Bug Log - changes from IGT_4598_full -> IGTPW_1719_full =
>
> == Summary - FAILURE ==
>
> Serious unknown changes coming with IGTPW_1719_full absolutely need to be
> verified manually.
>
> If you think the reported changes have nothing to do with the changes
> introduced in IGTPW_1719_full, 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/48286/revisions/1/mbox/
>
> == Possible new issues ==
>
> Here are the unknown changes that may have been introduced in IGTPW_1719_full:
>
> === IGT changes ===
>
> ==== Possible regressions ====
>
> igt@kms_addfb_basic@invalid-set-prop-any:
> shard-kbl: PASS -> FAIL
> shard-apl: PASS -> FAIL
> shard-glk: PASS -> FAIL
> shard-hsw: PASS -> FAIL
Now that's the rpm wakeref leak we were searching for. module unloads
/successfully/ now!
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 2/2] igt/pm_rpm: Avoid at_exit_drm_fd
2018-08-15 20:59 ` [Intel-gfx] " Chris Wilson
@ 2018-08-17 17:42 ` Antonio Argenziano
-1 siblings, 0 replies; 9+ messages in thread
From: Antonio Argenziano @ 2018-08-17 17:42 UTC (permalink / raw)
To: Chris Wilson, igt-dev; +Cc: intel-gfx
On 15/08/18 13:59, Chris Wilson wrote:
> Keep the drm_fd owned by pm_rpm as we need to relinquish all ownership
> of the device in order to unload the module.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
LGTM.
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
> ---
> tests/pm_rpm.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
> index c0212ed70..f0781617c 100644
> --- a/tests/pm_rpm.c
> +++ b/tests/pm_rpm.c
> @@ -697,7 +697,10 @@ static bool setup_environment(void)
> if (has_runtime_pm)
> goto out;
>
> - drm_fd = drm_open_driver_master(DRIVER_INTEL);
> + drm_fd = __drm_open_driver(DRIVER_INTEL);
> + igt_require(drm_fd != -1);
> + igt_device_set_master(drm_fd);
> +
> debugfs = igt_debugfs_dir(drm_fd);
> igt_require(debugfs != -1);
>
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 2/2] igt/pm_rpm: Avoid at_exit_drm_fd
@ 2018-08-17 17:42 ` Antonio Argenziano
0 siblings, 0 replies; 9+ messages in thread
From: Antonio Argenziano @ 2018-08-17 17:42 UTC (permalink / raw)
To: Chris Wilson, igt-dev; +Cc: intel-gfx
On 15/08/18 13:59, Chris Wilson wrote:
> Keep the drm_fd owned by pm_rpm as we need to relinquish all ownership
> of the device in order to unload the module.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
LGTM.
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
> ---
> tests/pm_rpm.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
> index c0212ed70..f0781617c 100644
> --- a/tests/pm_rpm.c
> +++ b/tests/pm_rpm.c
> @@ -697,7 +697,10 @@ static bool setup_environment(void)
> if (has_runtime_pm)
> goto out;
>
> - drm_fd = drm_open_driver_master(DRIVER_INTEL);
> + drm_fd = __drm_open_driver(DRIVER_INTEL);
> + igt_require(drm_fd != -1);
> + igt_device_set_master(drm_fd);
> +
> debugfs = igt_debugfs_dir(drm_fd);
> igt_require(debugfs != -1);
>
>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-08-17 17:42 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-15 20:59 [PATCH i-g-t 1/2] igt/pm_rpm: Close local fd before trying to unload module Chris Wilson
2018-08-15 20:59 ` [igt-dev] " Chris Wilson
2018-08-15 20:59 ` [PATCH i-g-t 2/2] igt/pm_rpm: Avoid at_exit_drm_fd Chris Wilson
2018-08-15 20:59 ` [Intel-gfx] " Chris Wilson
2018-08-17 17:42 ` [igt-dev] " Antonio Argenziano
2018-08-17 17:42 ` Antonio Argenziano
2018-08-15 22:24 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] igt/pm_rpm: Close local fd before trying to unload module Patchwork
2018-08-16 3:56 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2018-08-16 4:32 ` Chris Wilson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.