OSDN Git Service

modetest: Allocate dumb buffers with the correct bpp
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 9 Dec 2014 20:00:58 +0000 (22:00 +0200)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 11 Jan 2015 12:37:53 +0000 (14:37 +0200)
commitd7c0a08bc576deb07df6c3f91f393ca8edd0c4bf
tree8655e690adaeb888110ef392abf799c3217871e2
parent566c3ce877a4be72697e15cdfc421ce965f7c37d
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>
tests/modetest/Android.mk
tests/modetest/Makefile.am
tests/modetest/buffers.c
tests/modetest/buffers.h
tests/modetest/modetest.c