[igt-dev] [PATCH i-g-t] i915/perf: Make sure i915 loaded properly

Das, Nirmoy nirmoy.das at intel.com
Wed Jul 13 18:21:24 UTC 2022


This is hard to reproduce only happened once where driver was loaded but 
there was

no /dev/dri device.

Check 
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6580/shard-rkl-5/igt@perf@blocking.html

http://gfx-ci.fi.intel.com/cibuglog-ng/issue/6250?query_key=4b617f9678297ad95b32b7bd3c2700214fa5cb76

for more details


Regards,

Nirmoy

On 7/13/2022 8:16 PM, Nirmoy Das wrote:
> Previous test may leave incomplete i915 state.
> make this more resilient my unload and reloading i915.
>
> Reference: https://gitlab.freedesktop.org/drm/intel/-/issues/5608
> Signed-off-by: Nirmoy Das <nirmoy.das at intel.com>
> ---
>   tests/i915/perf.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tests/i915/perf.c b/tests/i915/perf.c
> index e641d5d2d..9c36aac34 100644
> --- a/tests/i915/perf.c
> +++ b/tests/i915/perf.c
> @@ -41,8 +41,8 @@
>   #include "i915/gem.h"
>   #include "i915/perf.h"
>   #include "igt.h"
> +#include "igt_kmod.h"
>   #include "igt_sysfs.h"
> -#include "drm.h"
>   
>   IGT_TEST_DESCRIPTION("Test the i915 perf metrics streaming interface");
>   
> @@ -4916,7 +4916,8 @@ igt_main
>   		 * loading/unloading i915. Load i915 here before we stat the
>   		 * files.
>   		 */
> -		drm_load_module(DRIVER_INTEL);
> +		igt_i915_driver_unload();
> +		igt_assert_eq(igt_i915_driver_load(NULL), 0);
>   
>   		igt_require(stat("/proc/sys/dev/i915/perf_stream_paranoid", &sb)
>   			    == 0);
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


More information about the igt-dev mailing list