summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/igt_fb.c15
-rw-r--r--lib/igt_fb.h2
2 files changed, 15 insertions, 2 deletions
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 93e21c17..c6291e62 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -74,8 +74,19 @@ static struct format_desc_struct {
#define for_each_format(f) \
for (f = format_desc; f - format_desc < ARRAY_SIZE(format_desc); f++)
-static void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
- unsigned *width_ret, unsigned *height_ret)
+/**
+ * igt_get_fb_tile_size:
+ * @fd: the DRM file descriptor
+ * @tiling: tiling layout of the framebuffer (as framebuffer modifier)
+ * @fb_bpp: bits per pixel of the framebuffer
+ * @width_ret: width of the tile in bytes
+ * @height_ret: height of the tile in lines
+ *
+ * This function returns width and height of a tile based on the given tiling
+ * format.
+ */
+void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
+ unsigned *width_ret, unsigned *height_ret)
{
switch (tiling) {
case LOCAL_DRM_FORMAT_MOD_NONE:
diff --git a/lib/igt_fb.h b/lib/igt_fb.h
index f8a845cc..df9ad1fc 100644
--- a/lib/igt_fb.h
+++ b/lib/igt_fb.h
@@ -95,6 +95,8 @@ enum igt_text_align {
align_hcenter = 0x08,
};
+void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
+ unsigned *width_ret, unsigned *height_ret);
void igt_calc_fb_size(int fd, int width, int height, int bpp, uint64_t tiling,
unsigned *size_ret, unsigned *stride_ret);
unsigned int