Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
To: Bhanuprakash Modem <bhanuprakash.modem@intel.com>,
	igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [i-g-t] lib/igt_draw: Check for Rendercopy support
Date: Wed, 15 Nov 2023 16:00:29 +0200	[thread overview]
Message-ID: <63f3773b-c560-4fa9-8d93-19d1393741ec@gmail.com> (raw)
In-Reply-To: <20231115133923.1539402-1-bhanuprakash.modem@intel.com>

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@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@gmail.com>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@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;
>   }

  reply	other threads:[~2023-11-15 14:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-15 13:39 [igt-dev] [i-g-t] lib/igt_draw: Check for Rendercopy support Bhanuprakash Modem
2023-11-15 14:00 ` Juha-Pekka Heikkila [this message]
2023-11-15 16:20 ` Kamil Konieczny
2023-11-16  3:35   ` Modem, Bhanuprakash
2023-11-15 16:44 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-11-15 17:28 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-11-17  3:24 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63f3773b-c560-4fa9-8d93-19d1393741ec@gmail.com \
    --to=juhapekka.heikkila@gmail.com \
    --cc=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox