[igt-dev] [i-g-t] lib/igt_draw: Check for Rendercopy support
Kamil Konieczny
kamil.konieczny at linux.intel.com
Wed Nov 15 16:20:58 UTC 2023
Hi Bhanuprakash,
On 2023-11-15 at 19:09:23 +0530, Bhanuprakash Modem wrote:
> igt_draw_supports_method() is initially designed to identify
> that the given driver (i915/xe) supports the slected draw
----------------------------------------------- ^
s/slected/selected/
> method.
>
> Even though Rendercopy support in IGT is not present for few
> latest platforms, this api assums that Rendercopy is present.
--------------------------------- ^
s/assums/assumes/
With that
Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> 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 +++
Btw this sits in main lib/ but is intel-centric.
Regards,
Kamil
> 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;
> }
> --
> 2.40.0
>
More information about the igt-dev
mailing list