summaryrefslogtreecommitdiff
path: root/lib/igt_fb.h
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2015-11-27 12:13:41 -0200
committerPaulo Zanoni <paulo.r.zanoni@intel.com>2016-01-29 16:28:11 -0200
commitbe6f3fadaf2c45972f7a9830baa6fd35f4d755a6 (patch)
treeafe553ecd8b23eb8c125cef176eb7f20a82c2fde /lib/igt_fb.h
parentd63e72f0ad281f295b058a572741b995a5a0f64a (diff)
lib/igt_fb: make the automatic buffer sizes/strides smaller
The big motivation behind this patch is that the current power-of-two granularity from igt_fb is way too big. There was more than one occasion where I had to work around this problem on kms_frontbuffer_tracking, and during my last workaround I was requested to just make igt_fb use more minimal buffers. I also need to export the size computation function so I won't need to reimplement it inside kms_frontbuffer_tracking. v2: - Fix the Yf sizes (Ville). - Don't change the Gen 2/3 behavior for both tiled and non-tiled. v3: - Edit the commit message, clarify that v1 was wrongly treating gen 2/3 non-tiled as tiled (Chris). Requested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Diffstat (limited to 'lib/igt_fb.h')
-rw-r--r--lib/igt_fb.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/igt_fb.h b/lib/igt_fb.h
index 5cc8644d..064027cb 100644
--- a/lib/igt_fb.h
+++ b/lib/igt_fb.h
@@ -69,6 +69,8 @@ enum igt_text_align {
align_hcenter = 0x08,
};
+void igt_calc_fb_size(int fd, int width, int height, int bpp, uint64_t tiling,
+ unsigned *size_ret, unsigned *stride_ret);
unsigned int
igt_create_fb_with_bo_size(int fd, int width, int height,
uint32_t format, uint64_t tiling,