• R/O
  • HTTP
  • SSH

List of commits

No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得cocoawindowspythonrubyphpgameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdombtronvb.netdirectxarduinopreviewerゲームエンジン


Rev. Time Author
c2518c7 nougat-x86 oreo-x86 pie-x86 q-x86 r-x86 android-x86-7.1-r5 android-x86-8.1-r6 2020-09-28 08:08:35 Chih-Wei Huang

Merge remote-tracking branch 'origin/master' into nougat-x86

cecd1a2 2020-09-17 22:37:50 John Stultz

gralloc_gbm: Quiet logcat verbosity

When using gralloc_gbm, especially playing yuv video, there's tons
of log noise like:

09-17 05:46:12.823 494 2001 D GRALLOC-GBM: handle 0xb400006d6a4d4380, hnd 0xb400006d6a4d4380, usage 0x33
09-17 05:46:12.824 494 2001 I GRALLOC-GBM: lock bo 0xb400006d7a4a26f0, cnt=0, usage=33

over and over.

So set these two messages to verbose via ALOGV.

Signed-off-by: John Stultz <john.stultz@linaro.org>

7bd5d5f 2020-08-14 00:25:14 Roman Stratiienko

Support getting offsets via lock_ycbcr()

When no software access usage flag specified,
.lock_ycbcr() should return NULL pointer based plane addresses,
which mesa3d interprets as offsets.

Fixes 13c5034a859b ("gralloc_gbm: add .lock_ycbcr to support video playback use case")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>

e0cd733 2020-06-30 04:23:46 Rob Herring

Merge pull request #15 from pundiramit/master

support video playback

13c5034 2020-06-23 18:29:10 Shawn Guo

gralloc_gbm: add .lock_ycbcr to support video playback use case

The .lock_ycbcr function hook is currently missing from gralloc driver,
and that stops video playback from working. Add a .lock_ycbcr function
implementation to get SW video playback test start working, where
HAL_PIXEL_FORMAT_YV12 format is used/tested.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
[AmitP: Verified by playing a mp4 format file using s/w codec
(medaswcodec) on db845c running AOSP.]
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>

3090c6e 2020-06-23 18:29:05 Shawn Guo

gralloc_gbm: fix gralloc_gbm_bo_lock() declaration

The variable names in gralloc_gbm_bo_lock() function declaration don't
match the definition in gralloc_gbm.cpp. Let's fix them to stop the

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>

709726c 2020-03-03 22:51:41 Rob Herring

Merge pull request #14 from johnstultz-work/null-crop-fix

gralloc_gbm: Handle null crop values

450ddef 2020-03-03 14:58:51 John Stultz

gralloc_gbm: Handle null crop values

Yongqin recently reported an issue here:

Where the CTS VirtualDisplayTest is failing on db845c.

The trace looks like this:
arm64-v8a CtsDisplayTestCases[instant]: Instrumentation run failed
due to 'Process crashed.'
Crash Message:lock buffer failed for format 0x1
java.lang.RuntimeException: lock buffer failed for format 0x1
at android.media.ImageReader$SurfaceImage.nativeCreatePlanes(Native Method)
at android.media.ImageReader$SurfaceImage.getPlanes(ImageReader.java:898)
at android.display.cts.VirtualDisplayTest$ImageListener.scanImage(VirtualDisplayTest.java:381)
at android.display.cts.VirtualDisplayTest$ImageListener.onImageAvailable(VirtualDisplayTest.java:364)
at android.media.ImageReader$ListenerHandler.handleMessage(ImageReader.java:798)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:216)
at android.os.HandlerThread.run(HandlerThread.java:67)

What seems to be happening, is that the call chain looks like:

in frameworks/base/media/jni/android_media_ImageReader.cpp:
nativeCreatePlanes() ->
Image_createSurfacePlanes() ->
Image_getLockedImage() ->
Which then calls the other lockImageFromBuffer() with a uninitialized
bufferItem->mCrop value:

That then calls: buffer->lockAsync(inUsage, rect, &pData, fenceFd);

which calls into gralloc::lock() in the gralloc_gbm implementation.

gralloc_gbm::gralloc_gbm_bo_lock() calls gbm_map():

gralloc_gbm::gbm_map() calls gbm_bo_map():

Which returns an error if height or width is zero:

While not common, since some users are passing null crop rects,
I propose we consider null crop rects to be the same as the
entire buffer.

Thus this patch special cases these null rects and changes the
width and height value to be the full buffer width and height.

With this patch, the affected CTS tests no longer fail.

Signed-off-by: John Stultz <john.stultz@linaro.org>

db36c00 2019-08-19 20:01:35 Rob Herring

Merge pull request #12 from rsglobal/fixes-pr


8f698a6 2019-08-11 04:37:09 Roman Stratiienko

Use log/log.h instead of cutils/log.h

Using cutils/log.h is deprecated and produces build warning.

Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>

15e391e 2019-08-11 04:22:46 Roman Stratiienko

Add libhardware dependency

Fixes missing hardware/gralloc.h header build error.

Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>

a09c603 2019-08-11 04:13:40 Roman Stratiienko

Add missing include required for close()

Fixes build error with Android-Q

Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>

bd3fbe8 2019-08-11 04:09:21 Roman Stratiienko

Revert "replace delete with free"

Fixes "handle is undefined" build error.

This reverts commit 4a94ab2ef43bbbd0abe636b5988119ebe933e846.

4a94ab2 2019-04-22 22:43:11 Elliott Wen

replace delete with free

0afe196 android-x86-7.1-r4 android-x86-8.1-r1 android-x86-8.1-r2 android-x86-8.1-r3 android-x86-8.1-r4 android-x86-8.1-r5 android-x86-9.0-r1 android-x86-9.0-r2 2019-01-14 14:16:42 Chih-Wei Huang

Open the DRM device of the primary framebuffer (fb0)

With the new added drmOpenByFB function in libdrm, it's easy to find
the correct DRM device of the primary framebuffer.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>

22d8ed6 2019-01-14 14:13:50 Chih-Wei Huang

Let gbm_free() return a value

So that gralloc_gbm_handle_unregister() could return correct value
required by gralloctest.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>

9daba0a 2019-01-06 15:37:19 Chih-Wei Huang

Merge branch 'fb' of https://github.com/lambdadroid/gbm_gralloc into oreo-x86

9a78d4f 2019-01-02 11:43:54 Mauro Rossi

android: add gralloctest

gralloctest executable is added for Android based on minigbm/cros_gralloc commits:

b57dffc ("minigbm: move gralloctest to this repo")
2eeaf5a ("minigbm: cros_gralloc: fix -Wimplicit-function-declaration warnings in gralloctest")

Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>

5ddecb1 2018-11-02 16:56:54 Chih-Wei Huang

Merge remote-tracking branch 'origin/master' into oreo-x86


c8de380 2018-11-01 07:01:46 lambdadroid

Add simple framebuffer HAL implementation using drm_framebuffer

137cc39 2018-07-03 07:58:19 Mauro Rossi

Update usage flag handling for hwc

Add support for GRALLOC_USAGE_HW_COMPOSER usage flag
mapping it to GBM flags, inspired by minigbm implementation.

Fixes the artifacts issues with vulkan hal radv with the following apps
with benefit to all apps using HWC layers:
V1 - GPU Benchmark Pro (Vulkan API)
PPSSPP - PSP emulator
Sascha Willems Vulkan Examples (e.g. Vulkan Gears, Vulkan Texture)

Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>

27763e0 2018-07-03 07:50:01 Rob Herring

Switch to use gralloc handle defined in libdrm

Remove our custom handle definition and use the one defined in libdrm.

Signed-off-by: Rob Herring <robh@kernel.org>

f552ac5 2018-07-03 07:44:01 Rob Herring

Use a std::unordered_map to lookup BOs from handles

Remove the fragile dependency on the handle 'data' pointer and
'data_owner' flag.

This idea is stolen from the CrOS minigbm gralloc implementation.

Signed-off-by: Rob Herring <robh@kernel.org>

2b61bef 2018-07-03 07:43:40 Rob Herring


This is no longer used by drm_hwc and can be removed.

Signed-off-by: Rob Herring <robh@kernel.org>

82c0082 2018-07-03 07:43:28 Rob Herring

Move gralloc_gbm_handle_t accesses into gralloc_gbm.cpp

The only access to the gralloc_gbm_handle_t in gralloc.cpp is to set the
stride of allocated buffers. Move this into gralloc_gbm.cpp to isolate
accesses to the struct in one place.

Signed-off-by: Rob Herring <robh@kernel.org>

2f72829 android-x86-7.1-r2 android-x86-7.1-r3 2018-04-02 18:21:23 Chih-Wei Huang

Merge remote-tracking branch 'origin/master' into nougat-x86


ed2c246 2018-01-24 23:21:50 Rob Herring

Explicitly include string.h

The master build started failing on strcmp and memset being undeclared, so
explicitly include string.h.

Change-Id: I55d042b34e55375ed50f9300ab0c3abdfa0f2631
Signed-off-by: Rob Herring <robh@kernel.org>

35be826 2017-12-01 05:28:21 Rob Herring

Fix unused parameter 'handle' warning

AOSP now builds with -Werror. Fix this warning:

gralloc_drm_handle.h:90:62: error: unused parameter 'handle' [-Werror,-Wunused-parameter]

Change-Id: Ief13c01f0ca1ede2b9ef5662acbdc6d0f27f6cd4
Signed-off-by: Rob Herring <robh@kernel.org>

c10ef2b 2017-11-30 01:22:22 Rob Herring

Use native_handle functions

Use native_handle_{create,delete} functions instead of the C++
alloc/free. This will do the initialization for us instead of open
coding it.

Change-Id: I285292770ca756c1d2c2effa5c73e252526bae0c
Signed-off-by: Rob Herring <robh@kernel.org>

3f7e566 android-x86-7.1-r1 2017-10-05 15:57:42 Chih-Wei Huang

Merge remote-tracking branch 'origin/master' into nougat-x86