display: Enable triple framebuffers
Change-Id: I323c10b939277477f724c2d0a20f9c6da4899481
This commit is contained in:
committed by
Iliyan Malchev
parent
b514889338
commit
00fd6a573e
@@ -26,7 +26,8 @@ LOCAL_C_INCLUDES += hardware/qcom/display/libqcomui
|
|||||||
LOCAL_MODULE := gralloc.$(TARGET_BOARD_PLATFORM)
|
LOCAL_MODULE := gralloc.$(TARGET_BOARD_PLATFORM)
|
||||||
LOCAL_MODULE_TAGS := optional
|
LOCAL_MODULE_TAGS := optional
|
||||||
LOCAL_CFLAGS := -DLOG_TAG=\"$(TARGET_BOARD_PLATFORM).gralloc\" \
|
LOCAL_CFLAGS := -DLOG_TAG=\"$(TARGET_BOARD_PLATFORM).gralloc\" \
|
||||||
-DDEBUG_CALC_FPS
|
-DDEBUG_CALC_FPS \
|
||||||
|
-Wno-missing-field-initializers
|
||||||
LOCAL_SRC_FILES := gpu.cpp gralloc.cpp framebuffer.cpp mapper.cpp
|
LOCAL_SRC_FILES := gpu.cpp gralloc.cpp framebuffer.cpp mapper.cpp
|
||||||
|
|
||||||
ifeq ($(TARGET_USES_POST_PROCESSING),true)
|
ifeq ($(TARGET_USES_POST_PROCESSING),true)
|
||||||
|
|||||||
@@ -20,8 +20,7 @@
|
|||||||
#include <linux/fb.h>
|
#include <linux/fb.h>
|
||||||
|
|
||||||
#define NUM_FRAMEBUFFERS_MIN 2
|
#define NUM_FRAMEBUFFERS_MIN 2
|
||||||
//XXX: Enable triple framebuffers
|
#define NUM_FRAMEBUFFERS_MAX 3
|
||||||
#define NUM_FRAMEBUFFERS_MAX 2
|
|
||||||
|
|
||||||
#define NO_SURFACEFLINGER_SWAPINTERVAL
|
#define NO_SURFACEFLINGER_SWAPINTERVAL
|
||||||
#define COLOR_FORMAT(x) (x & 0xFFF) // Max range for colorFormats is 0 - FFF
|
#define COLOR_FORMAT(x) (x & 0xFFF) // Max range for colorFormats is 0 - FFF
|
||||||
|
|||||||
@@ -582,9 +582,10 @@ static int fb_post(struct framebuffer_device_t* dev, buffer_handle_t buffer)
|
|||||||
struct qbuf_t qb;
|
struct qbuf_t qb;
|
||||||
fb_context_t* ctx = (fb_context_t*)dev;
|
fb_context_t* ctx = (fb_context_t*)dev;
|
||||||
|
|
||||||
private_handle_t const* hnd = reinterpret_cast<private_handle_t const*>(buffer);
|
private_handle_t const* hnd =
|
||||||
private_module_t* m = reinterpret_cast<private_module_t*>(
|
reinterpret_cast<private_handle_t const*>(buffer);
|
||||||
dev->common.module);
|
private_module_t* m =
|
||||||
|
reinterpret_cast<private_module_t*>(dev->common.module);
|
||||||
|
|
||||||
if (hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER) {
|
if (hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER) {
|
||||||
|
|
||||||
@@ -1001,6 +1002,7 @@ int fb_device_open(hw_module_t const* module, const char* name,
|
|||||||
const_cast<float&>(dev->device.fps) = m->fps;
|
const_cast<float&>(dev->device.fps) = m->fps;
|
||||||
const_cast<int&>(dev->device.minSwapInterval) = PRIV_MIN_SWAP_INTERVAL;
|
const_cast<int&>(dev->device.minSwapInterval) = PRIV_MIN_SWAP_INTERVAL;
|
||||||
const_cast<int&>(dev->device.maxSwapInterval) = PRIV_MAX_SWAP_INTERVAL;
|
const_cast<int&>(dev->device.maxSwapInterval) = PRIV_MAX_SWAP_INTERVAL;
|
||||||
|
const_cast<int&>(dev->device.numFramebuffers) = m->numBuffers;
|
||||||
if (m->finfo.reserved[0] == 0x5444 &&
|
if (m->finfo.reserved[0] == 0x5444 &&
|
||||||
m->finfo.reserved[1] == 0x5055) {
|
m->finfo.reserved[1] == 0x5055) {
|
||||||
dev->device.setUpdateRect = fb_setUpdateRect;
|
dev->device.setUpdateRect = fb_setUpdateRect;
|
||||||
|
|||||||
Reference in New Issue
Block a user