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

Kamil Konieczny kamil.konieczny at linux.intel.com
Thu Jul 14 08:07:26 UTC 2022


Hi Nirmoy,

On 2022-07-13 at 20:16:37 +0200, Nirmoy Das wrote:
> Previous test may leave incomplete i915 state.
> make this more resilient my unload and reloading i915.
-------------------------- ^
s/my/by/

> 
> 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);
> -- 
> 2.35.1
>

See below.
 
> 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
> 

Please do not send this in patches,

Regards,
Kamil


More information about the igt-dev mailing list