Re: [PATCH 8/8] tests/intel/xe_err_injection: add CRI GPU requirement check

Harish Chegondi <[email protected]>
Newsgroups org.freedesktop.lists.igt-dev
Message-ID <[email protected]>
On Wed, Jul 29, 2026 at 05:49:59PM +0530, Ravi Kishore Koppuravuri wrote:
> Add support to verify the CRI GPU and skips test gracefully
> on non-cri platforms
> 
> Signed-off-by: Ravi Kishore Koppuravuri <[email protected]>
> ---
>  tests/intel/xe_err_injection.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/tests/intel/xe_err_injection.c b/tests/intel/xe_err_injection.c
> index 0303f4a56..4df4589b3 100644
> --- a/tests/intel/xe_err_injection.c
> +++ b/tests/intel/xe_err_injection.c
> @@ -20,6 +20,7 @@
>  
>  #include "igt.h"
>  #include "lib/igt_drm_netlink.h"
> +#include "lib/intel_chipset.h"
>  #include "lib/intel_reg.h"
>  #include "lib/intel_compute.h"
>  
> @@ -508,6 +509,14 @@ static void l2_bank_single_corr_err_injection(struct xe_mmio *mmio, int fd)
>  	CLEANUP_ON_ERROR(ctx, fw_handle);
>  }
>  
> +static void igt_require_cri(int fd)
> +{
> +	uint16_t dev_id = xe_dev_id(fd);
> +
> +	igt_require_f(IS_CRESCENTISLAND(dev_id),
> +		      "This test requires CRI GPU, but found device ID 0x%04x\n", dev_id);
> +}
> +
>  static void inject_error(const char *injection, struct xe_mmio *mmio, int fd)
>  {
>  	igt_info("Starting Error Injection test: %s\n", injection);
> @@ -531,6 +540,11 @@ int igt_main()
>  	igt_fixture() {
>  		fd = drm_open_driver(DRIVER_XE);
>  		igt_require(igt_debugfs_exists(fd, "forcewake_all", O_RDONLY));
> +		igt_require_cri(fd);
Instead of a separate function, you can just use the igt_require_f(IS_CRESCENTISLAND(dev_id),..) here
> +		/*
> +		 * TODO: Add firmware query for error injection support.
> +		 * Should check: EOM (End of Manufacturing) status and error injection jumper state.
> +		 */
>  		xe_mmio_access_init(fd, &mmio);
>  		igt_require(xe_mmio_is_initialized(&mmio));
>  	}
> -- 
> 2.34.1
> 
I think this patch should be merged into the patch 5/8:
Add GT UC Unicast GAM Walker Command Parity Error Injection

Since, these error injection tests are run only on CRI as of now, this
patch can be squashed into 5/8
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.