[igt-dev] [i-g-t] lib/igt_draw: Check for Rendercopy support

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Wed Nov 15 14:00:29 UTC 2023


Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>

On 15.11.2023 15.39, Bhanuprakash Modem wrote:
> igt_draw_supports_method() is initially designed to identify
> that the given driver (i915/xe) supports the slected draw
> method.
> 
> Even though Rendercopy support in IGT is not present for few
> latest platforms, this api assums that Rendercopy is present.
> Add a check if Rendercopy supports on given platform or not.
> 
> Cc: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
> ---
>   lib/igt_draw.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/lib/igt_draw.c b/lib/igt_draw.c
> index 9a7664a37..498c69a56 100644
> --- a/lib/igt_draw.c
> +++ b/lib/igt_draw.c
> @@ -950,5 +950,8 @@ bool igt_draw_supports_method(int fd, enum igt_draw_method method)
>   	if (method == IGT_DRAW_MMAP_CPU || method == IGT_DRAW_PWRITE)
>   		return is_i915_device(fd);
>   
> +	if (method == IGT_DRAW_RENDER)
> +		return !!igt_get_render_copyfunc(intel_get_drm_devid(fd));
> +
>   	return true;
>   }



More information about the igt-dev mailing list