[igt-dev] [PATCH i-g-t 09/25] lib/igt_fb: Pass fb_blit_upload to free_linear_mapping()
Ville Syrjala
ville.syrjala at linux.intel.com
Thu Jul 19 15:03:59 UTC 2018
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
With fb_blit_upload now being the base class of fb_convert_blit_upload
we can pass the entire structure down to free_linear_mapping().
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
lib/igt_fb.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index b5eef1a23576..c89a2c9e170d 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -1208,8 +1208,11 @@ struct fb_blit_upload {
struct fb_blit_linear linear;
};
-static void free_linear_mapping(int fd, struct igt_fb *fb, struct fb_blit_linear *linear)
+static void free_linear_mapping(struct fb_blit_upload *blit)
{
+ int fd = blit->fd;
+ struct igt_fb *fb = blit->fb;
+ struct fb_blit_linear *linear = &blit->linear;
unsigned int obj_tiling = igt_fb_mod_to_tiling(fb->tiling);
int i;
@@ -1242,7 +1245,7 @@ static void destroy_cairo_surface__blit(void *arg)
blit->fb->cairo_surface = NULL;
- free_linear_mapping(blit->fd, blit->fb, &blit->linear);
+ free_linear_mapping(blit);
free(blit);
}
@@ -1768,7 +1771,7 @@ static void destroy_cairo_surface__convert(void *arg)
munmap(blit->rgb24.map, blit->rgb24.size);
if (blit->base.linear.handle)
- free_linear_mapping(blit->base.fd, blit->base.fb, &blit->base.linear);
+ free_linear_mapping(&blit->base);
else
gem_munmap(blit->base.linear.map, fb->size);
--
2.16.4
More information about the igt-dev
mailing list