diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-12-09 22:00:58 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2015-01-11 14:37:53 +0200 |
commit | d7c0a08bc576deb07df6c3f91f393ca8edd0c4bf (patch) | |
tree | 8655e690adaeb888110ef392abf799c3217871e2 /tests/modetest/buffers.h | |
parent | 566c3ce877a4be72697e15cdfc421ce965f7c37d (diff) |
modetest: Allocate dumb buffers with the correct bpp
The modetest application uses libkms to allocate dumb buffers, leading
to overallocation due to the hardcoded 32 bpp value. This can even cause
failures in drivers when the resulting pitch is too large for the
hardware to handle and gets rejected by the driver when creating the
frame buffer.
Fix this by computing the required bpp value and allocating dumb buffers
directly without going through libkms.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'tests/modetest/buffers.h')
-rw-r--r-- | tests/modetest/buffers.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/modetest/buffers.h b/tests/modetest/buffers.h index e320389b..ad73d0e4 100644 --- a/tests/modetest/buffers.h +++ b/tests/modetest/buffers.h @@ -27,8 +27,7 @@ #ifndef __BUFFERS_H__ #define __BUFFERS_H__ -struct kms_bo; -struct kms_driver; +struct bo; enum fill_pattern { PATTERN_TILES = 0, @@ -36,10 +35,11 @@ enum fill_pattern { PATTERN_SMPTE = 2, }; -struct kms_bo *create_test_buffer(struct kms_driver *kms, unsigned int format, +struct bo *bo_create(int fd, unsigned int format, unsigned int width, unsigned int height, unsigned int handles[4], unsigned int pitches[4], unsigned int offsets[4], enum fill_pattern pattern); +void bo_destroy(struct bo *bo); unsigned int format_fourcc(const char *name); |