[igt-dev] [i-g-t] lib/igt_draw: Check for Rendercopy support
Modem, Bhanuprakash
bhanuprakash.modem at intel.com
Thu Nov 16 03:35:29 UTC 2023
Hi Kamil,
On Wed-15-11-2023 09:50 pm, Kamil Konieczny wrote:
> 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>
>
Thanks for the review, I'll fix these typos while merging.
>> 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.
Yep, we need a cleanup as there are many other intel specific helpers
are in main lib.
I'll try to work on this activity.
- Bhanu
>
> 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