summaryrefslogtreecommitdiff
path: root/modules/gralloc/framebuffer.cpp
AgeCommit message (Collapse)Author
2021-12-09Add GRALLOC_FRAMEBUFFER_NUM configurationYiMing Tseng
Add config to set the NUM_BUFFERS. Set NUM_BUFFERS to 1 can prevent page flipping and set it to a larger number can allow userspace to fill up the following frame earlier. Bug: 205917753 Change-Id: Ibf4a52a1e35f4a2404008a48b637cb82c4b46365
2019-10-15gralloc: Configure framebuffer mode according to requested image format.Peter Collingbourne
Previously we were ignoring the requested image format when mapping a graphics device via gralloc_alloc, and using the mode that the framebuffer started up in. This meant that on devices whose framebuffer starts up in a mode other than RGBA8888, we would map the framebuffer in the other mode and attempt to use it as an RGBA8888 framebuffer, which would lead to crashes or incorrecet rendering. This is the case in the ARM FVP, whose framebuffer starts up in RGB565 mode. Unfortunately there is no preferred image format passed in to fb_device_open, and we presumably cannot start passing one in for backwards compatibility reasons. Therefore, we set the image format to RGBA8888, which appears to be the only format that the platform ends up using. Bug: 142352330 Change-Id: I24000fd36910b4044ce7659605efc423e36cba00
2018-02-13Fix a memory leakGeorge Burgess IV
If status < 0, we'd silently leak dev. Bug: None Test: Ran the analyzer; memory leak warnings are gone. Change-Id: I76a78feea4c92aa167de908f5571481864d61d73
2017-12-19Fix compiler warnings.Chih-Hung Hsieh
* Remove unused local variables, functions, and private fields. Bug: 66996870 Test: normal build Change-Id: I3a5d6035a61be1b846dc8df3807088d2ca5dc4a3
2017-04-11libhardware: deprecate cutils/log.hMark Salyzyn
Replace cutils/log.h with log/log.h. Sort headers. Minimize conflicts. Add missing required headers. Test: compile Bug: 34250038 Change-Id: I5c0f231cbfed90b73e0538c9d32ad3226c7cc5e4
2015-08-12Lose HAVE_ANDROID_OS from hardware/libhardware.Elliott Hughes
Change-Id: I9f6bd154479e368aab0ff20798676d9cd409955c
2014-06-02gralloc: let target configure page flipping ioctlBernhard Rosenkraenzer
Let vendor choose which framebuffer ioctl (FBIOPUT_VSCREENINFO or FBIOPAN_DISPLAY) is best suited to do page-flip on its target platform. Neither API is well documented about their usage and most of the time it really depends on the respective framebuffer driver implementation. * Default ioctl to do page-flip is FBIOPUT_VSCREENINFO. * Set "TARGET_USE_PAN_DISPLAY=true" in board config file to use FBIOPAN_DISPLAY. Change-Id: Ic3a50bd0f5fe37ac0149e11649c4abdadea85529 Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2014-02-21gralloc: dont hardcode 32bpp as RGBXBernhard Rosenkraenzer
Not every 32bpp is in RGBX format. Change-Id: Ic3c6a0cbf475bff2fe2fc4b023c6bc58e4fc295e Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2012-06-12am 1fbbb08d: Merge "remove seemed useless gralloc_open() call in ↵Jean-Baptiste Queru
fb_device_open()" * commit '1fbbb08ddda4321ccdb05345658044c1f0235997': remove seemed useless gralloc_open() call in fb_device_open()
2012-03-15remove seemed useless gralloc_open() call in fb_device_open()suyi Yuan
Change-Id: I520e460bd558934c71042b5a4fdb03b3935ad720 Signed-off-by: suyi Yuan <yuan.suyi@gmail.com>
2012-01-08Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block
See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: I0cbe865d464a37365fa3be84948b07e5a0d181d0
2012-01-05Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block
See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I135fadaf10e95af1eb918889a22980c194c650ca
2012-01-04Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGESteve Block
See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: Ia8b6f74b27098b3dba27f177a76264eb23f849ee
2011-06-06Remove workarounds for buggy /dev/fb0 driversJean-Baptiste Queru
Change-Id: Ideadd5f39693d05cf29a81d9f87ed804d7e52380
2011-03-31Allow to force 16bpp when 32bpp has problemsJean-Baptiste Queru
Bug: 4197654 Change-Id: Icf1e8793d6a4d2e070a8f232efd4136d79339496
2011-01-17gralloc: Add support for 32-bit framebuffers.David 'Digit' Turner
Note: The code under hardware/libhardware/modules/gralloc/ is only used when running the system under the emulator. Change-Id: I022978aeaacc5137c9917cd2ef6952dd3897ece4
2011-01-15gralloc: Fix division-by-0 during system emulation.David 'Digit' Turner
This patch avoids a division-by-0 when the system is running under emulation (the kernel driver reports pixclock as 0, for some reason). Which results in a SIGFPE during the boot sequence. Change-Id: Idb6bcdd58999ea9231f2411481c25929d5d02f1d
2010-10-14Allow disabling page-flipping.Jean-Baptiste Queru
Some devices have low-level bugs in their page-flip. Disabling it at this level gives us more flexibility than trying to control it elsewhere. Bug: 3097357 Change-Id: Icc6ae172264e453bec0680e74a497a2b24299c4a
2009-12-15remove all references to pmem and simplify the lock/unlock hooksMathias Agopian
this gralloc module is only used on the emulator or without a h/w renderer. therefore there is no synchronization to do in lock/unlock and pmem buffers are not relevant. hopefully this will remove some of the confusion about how gralloc should be implemented and make it more obvious that this implementation is not intended to be used by h/w renderers.
2009-08-18split gralloc_priv.h and make sure it is C friendlyMathias Agopian
2009-07-15generic gralloc HAL doesn't need to support partial updates using msm7k ↵Mathias Agopian
specific ioctl.
2009-07-13automatically detect update-on-demandMathias Agopian
2009-07-07fix [1965734] Screen flickers a lot [Sholes]Mathias Agopian
2009-07-07Simulator build fixes for the new GL stuff. The simulator still doesn't run, ↵Marco Nelissen
but at least it builds.
2009-07-06workaroud [1964234] emulator renders funny with new gralloc.Mathias Agopian
we detect we're running on the emu (using a very bad heuristic, see 1964251) and switch UPDATE_ON_DEMAND off.
2009-06-09with the new lock/unlock API we don't really mean reference counting on ↵Mathias Agopian
mmap/munmap because we're guaranteed to map the buffers only once within a process. no need to track all handles anymore, which simplifies the code a lot.
2009-05-07better documentation for (*setUpdateRect)()Mathias Agopian
2009-05-05get rid of unused/needed flagsMathias Agopian
2009-05-04lock will now return the vaddr of the buffer. map/umap are gone.Mathias Agopian
- make sure to return an error if a buffer is locked twice or unlocked while not locked. - added registerBuffer() and unregisterBuffer() to the gralloc module so that we can do some cleanup when a buffer is no longer needed. this became necessary after we removed map/unmap so we have a place to unmap buffers without the need of a kernel module. - change the constants for GRALLOC_USAGE_SW_{READ|WRITE}_NEVER to 0, so that NOT specifying them means "NEVER".
2009-04-10Integrate from //sandbox/mathias/donut/...@145728Mathias Agopian
SurfaceFlinger rework for new EGL driver model support.