Skip to contentSkip to conversation

lib: Pass format instead of bpp to create_bo_for_fb()

PATCH In review [email protected] 2 participants 3 messages Apr 20, 2016 – Apr 21, 2016 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib: Pass format instead of bpp to create_bo_for_fb()

From: Ville Syrjälä <[email protected]>

create_bo_for_fb() expects the drm format as a parameter since commit 8a1a38661f56 ("lib: Add igt_create_bo_with_dimensions") but not all callers were updated. Fix that up.

Cc Tomeu Vizoso <[email protected]>
Fixes 8a1a38661f56 ("lib: Add igt_create_bo_with_dimensions")

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93328

---
 lib/igt_fb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
lib/igt_fb.c +2 -3
index c4f87898e82e..3e53d3b8cd3d 100644
@@ -1006,7 +1006,7 @@ static void create_cairo_surface__blit(int fd, struct igt_fb *fb)
 	struct fb_blit_upload *blit;
 	cairo_format_t cairo_format;
 	unsigned int obj_tiling = fb_mod_to_obj_tiling(fb->tiling);
-	int bpp, ret;
+	int ret;
 
 	blit = malloc(sizeof(*blit));
 	igt_assert(blit);
@@ -1016,8 +1016,7 @@ static void create_cairo_surface__blit(int fd, struct igt_fb *fb)
 	 * cairo). This linear bo will be then blitted to its final
 	 * destination, tiling it at the same time.
 	 */
-	bpp = igt_drm_format_to_bpp(fb->drm_format);
-	ret = create_bo_for_fb(fd, fb->width, fb->height, bpp,
+	ret = create_bo_for_fb(fd, fb->width, fb->height, fb->drm_format,
 				LOCAL_DRM_FORMAT_MOD_NONE, 0, 0,
 				&blit->linear.handle,
 				&blit->linear.size,
Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · On 20 April 2016 at 20:16, <[email protected]> wrote:

From: Ville Syrjälä <[email protected]>

create_bo_for_fb() expects the drm format as a parameter since commit 8a1a38661f56 ("lib: Add igt_create_bo_with_dimensions") but not all callers were updated. Fix that up.

Cc Tomeu Vizoso <[email protected]>
Fixes 8a1a38661f56 ("lib: Add igt_create_bo_with_dimensions")

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93328

Sorry and thanks,

Tomeu

Quoted 30 lines
---
 lib/igt_fb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
lib/igt_fb.c +2 -4
index c4f87898e82e..3e53d3b8cd3d 100644
@@ -1006,7 +1006,7 @@ static void create_cairo_surface__blit(int fd, struct igt_fb *fb)
        struct fb_blit_upload *blit;
        cairo_format_t cairo_format;
        unsigned int obj_tiling = fb_mod_to_obj_tiling(fb->tiling);
-       int bpp, ret;
+       int ret;
 
        blit = malloc(sizeof(*blit));
        igt_assert(blit);
@@ -1016,8 +1016,7 @@ static void create_cairo_surface__blit(int fd, struct igt_fb *fb)
         * cairo). This linear bo will be then blitted to its final
         * destination, tiling it at the same time.
         */
-       bpp = igt_drm_format_to_bpp(fb->drm_format);
-       ret = create_bo_for_fb(fd, fb->width, fb->height, bpp,
+       ret = create_bo_for_fb(fd, fb->width, fb->height, fb->drm_format,
                                LOCAL_DRM_FORMAT_MOD_NONE, 0, 0,
                                &blit->linear.handle,
                                &blit->linear.size,
--

2.7.4

Quoted 4 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
Quoted 7 lines · Tomeu Vizoso
Quoted 6 lines · On 20 April 2016 at 20:16, <[email protected]> wrote:

From: Ville Syrjälä <[email protected]>

create_bo_for_fb() expects the drm format as a parameter since commit 8a1a38661f56 ("lib: Add igt_create_bo_with_dimensions") but not all callers were updated. Fix that up.

Quoted 6 lines
Quoted 4 lines
Cc Tomeu Vizoso <[email protected]>
Fixes 8a1a38661f56 ("lib: Add igt_create_bo_with_dimensions")

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93328

Thanks. Pushed.

Quoted 40 lines

Sorry and thanks,

Tomeu

Quoted 34 lines
---
 lib/igt_fb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
lib/igt_fb.c +2 -4
index c4f87898e82e..3e53d3b8cd3d 100644
@@ -1006,7 +1006,7 @@ static void create_cairo_surface__blit(int fd, struct igt_fb *fb)
        struct fb_blit_upload *blit;
        cairo_format_t cairo_format;
        unsigned int obj_tiling = fb_mod_to_obj_tiling(fb->tiling);
-       int bpp, ret;
+       int ret;
 
        blit = malloc(sizeof(*blit));
        igt_assert(blit);
@@ -1016,8 +1016,7 @@ static void create_cairo_surface__blit(int fd, struct igt_fb *fb)
         * cairo). This linear bo will be then blitted to its final
         * destination, tiling it at the same time.
         */
-       bpp = igt_drm_format_to_bpp(fb->drm_format);
-       ret = create_bo_for_fb(fd, fb->width, fb->height, bpp,
+       ret = create_bo_for_fb(fd, fb->width, fb->height, fb->drm_format,
                                LOCAL_DRM_FORMAT_MOD_NONE, 0, 0,
                                &blit->linear.handle,
                                &blit->linear.size,
--

2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx