Re: [igt-dev] [PATCH i-g-t 7/9] lib/igt_fb: Add a stride-provisioned fashion of igt_fb_convert

Maxime Ripard
2018-12-06T14:33:06Z

[-- Attachment #1.1: Type: text/plain, Size: 1444 bytes --]

65;5402;1c
On Thu, Dec 06, 2018 at 03:11:30PM +0100, Paul Kocialkowski wrote:
> The current implementation of igt_fb_convert does not allow passing
> the destination stride, which is something we want to change for tests.
>
> Add a new fashion of this function that allocates the desintation buffer
> with a given stride. Since the current function does the same thing with
> an unspecified stride (set to zero, which will be filled later), make it
> call our new fashion with the stride set to zero to avoid duplication.
>
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> ---
> lib/igt_fb.c | 38 ++++++++++++++++++++++++++++++++------
> lib/igt_fb.h | 3 +++
> 2 files changed, 35 insertions(+), 6 deletions(-)
>
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index 61250b0e..1548bf4e 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -2253,14 +2253,15 @@ void igt_remove_fb(int fd, struct igt_fb *fb)
> }
>
> /**
> - * igt_fb_convert:
> + * igt_fb_convert_with_stride:
> * @dst: pointer to the #igt_fb structure that will store the conversion result
> * @src: pointer to the #igt_fb structure that stores the frame we convert
> * @dst_fourcc: DRM format specifier to convert to
> + * @dst_stride: DRM format specifier to convert to

I'm not sure that's what you meant :)

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]