[PATCH i-g-t 04/37] tests/kms_frontbuffer_tracking: Use igt_create_fb()
Juha-Pekka Heikkila
juhapekka.heikkila at gmail.com
Tue Aug 27 15:17:07 UTC 2024
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
On 3.7.2024 2.27, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Calling igt_calc_fb_size() and igt_create_fb_with_bo_size() like
> this back to back is the same as just calling igt_create_fb().
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
> tests/intel/kms_frontbuffer_tracking.c | 11 ++---------
> 1 file changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/tests/intel/kms_frontbuffer_tracking.c b/tests/intel/kms_frontbuffer_tracking.c
> index e45d17dd692d..da593c3aacc7 100644
> --- a/tests/intel/kms_frontbuffer_tracking.c
> +++ b/tests/intel/kms_frontbuffer_tracking.c
> @@ -1630,8 +1630,7 @@ static void create_fb(enum pixel_format pformat, int width, int height,
> enum tiling_type tiling, int plane, struct igt_fb *fb)
> {
> uint32_t format;
> - uint64_t size, modifier;
> - unsigned int stride;
> + uint64_t modifier;
>
> switch (pformat) {
> case FORMAT_RGB888:
> @@ -1665,13 +1664,7 @@ static void create_fb(enum pixel_format pformat, int width, int height,
>
> igt_warn_on(plane == PLANE_CUR && tiling != TILING_LINEAR);
>
> - igt_calc_fb_size(drm.fd, width, height, format, modifier, &size,
> - &stride);
> -
> - igt_create_fb_with_bo_size(drm.fd, width, height, format, modifier,
> - IGT_COLOR_YCBCR_BT709,
> - IGT_COLOR_YCBCR_LIMITED_RANGE,
> - fb, size, stride);
> + igt_create_fb(drm.fd, width, height, format, modifier, fb);
> }
>
> static uint32_t pick_color(struct igt_fb *fb, enum color ecolor)
More information about the igt-dev
mailing list