Git Product home page Git Product logo

gbm_gralloc's People

Contributors

aleasto avatar aleksander0m avatar cwhuang avatar dhina17 avatar elliott-wen avatar evelikov avatar johnstultz-work avatar maurossi avatar robherring avatar rsglobal avatar shawnguo2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gbm_gralloc's Issues

Buiding error in Android 10 due to commit 07176f0

Hi @rsglobal

After testing the build of gbm_gralloc starting from Android 9 to Android 12
I found that Android 10 is the only version affected by the following building error:

FAILED: 
build/make/core/base_rules.mk:526: error: overriding commands for target `out/target/product/x86_64/system/vendor/etc/vintf/manifest/gbm_gralloc_manifest.xml', previously defined at build/make/core/base_rules.mk:526
20:37:32 ckati failed with: exit status 1

#### failed to build some targets (02:00 (mm:ss)) ####

As a proposal, is it acceptable for everyone to use LOCAL_VINTF_FRAGMENTS := gbm_gralloc_manifest.xml for Android 11 and later?

gbm_gralloc fails gralloctest gralloc_order

Hello,
gbm_gralloc is the only gralloc0 implementation not passing gralloc_order test,
the test case is described in the comment

gralloctest.c has not changed much, here is a recent version

https://android.googlesource.com/platform/external/minigbm/+/refs/tags/android-11.0.0_r33/cros_gralloc/gralloc0/tests/gralloctest.c

@line 394
	/*
	 * Duplicate the buffer handle to simulate an additional reference
	 * in same process.
	 */
	native_handle_t *native_handle = duplicate_buffer_handle(info.handle);
	duplicate.handle = native_handle;

	CHECK(unregister_buffer(ctx->module, &duplicate) == 0);
	CHECK(register_buffer(ctx->module, &duplicate));    /* @line 402 here is the CHECK that is failing only with gbm_gralloc */

compilation

does this require the AOSP source code in order to be compiled? or can this be built using the NDK and SDK

Android CTS 13 dEQP-EGL causing SIGFPE for unhandled HAL pixel formats

gralloc_gbm_get_bpp() can return 0 for unsupported HAL pixel formats and this is causing segfaults with Android CTS 13 dEQP-EGL test runs due to division by zero

Checking bpp value before proceeding in gralloc_gbm_get_bpp() routines fixes the following segfaults observed with HAL Pixel Formats 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x38

about gbm_mod_close_gpu0

hi,Herring:
when close the gralloc by gbm_mod_close_gpu0 function, do not need to clean up the gbm_bo_handle_map ?

Possible Error In gbm_mod_free_gpu0

Just noticed a potential error in gbm_mod_free_gpu0

I suggested that we should use native_handle_delete rather than delete handle.

Because handle is allocated by malloc rather than "new"

static int gbm_mod_free_gpu0(alloc_device_t *dev, buffer_handle_t handle)
{
struct gbm_module_t *dmod = (struct gbm_module_t *) dev->common.module;

pthread_mutex_lock(&dmod->mutex);
gbm_free(handle);
native_handle_close(handle);
//delete handle;  
native_handle_delete(handle);

Advertise my work on porting the gbm_gralloc philosophy to minigbm (cros_gralloc)

Dispite this project is old, the philosophy that was implemented here makes it attractable to use in modern Android.

But there are several issues that can't be fixes by few lines of code, which forced me to search for alternatives:

  • Poor YUV formats support
  • Android 10+ require Gralloc3+ by VTS, which isn't available here and no adapters exist.
  • Extending this to allocate buffers for camera/HWenc/dec isn't trivial, and require significant code redesigning.

From the other hand minigbm is constantly maintained by Chromium OS guys, all moderns APIs available, but it has different philosophy which require copy part of mesa3d and paste inside minigbm to make it work. Any new device require this copy-paste-test iterations.

Here is my second attempt to port gbm_gralloc as minigbm backend: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3024265 (first was DRI DSO-based)

At this moment it successfully tested with sun4i_drm + lima, v3d+vc4, sun4i_drm+panfrost.

SEGV_MAPERR and graphical glitch with SW_WRITE_OFTEN flagged buffers

Hello,
This one is really tricky for my limited hobbyst knowledge,

I'm opening in order to triage, as this is the last issue preventing the use of gbm_gralloc as default gralloc in android-x86 with Android R - NOTE: Android R requires hwbinder [email protected] and gbm_gralloc needs to become the default gralloc

I'm opening a ticket for a problem happening only with gbm_gralloc and logged on r600 (AMD TURKS)
but it is happening also with radeonsi and nouveau.

As a comparison the problem does not happen with minigbm with the same GPUs and mesa version

0x76d2d8fe6ba0: 9328.00 KiB | 2006 (2048) x 1166 |    1 |        1 | 0x933 | android/com.android.internal.app.ResolverActivity#0
0x76d2d8fe8d10: 9328.00 KiB | 2006 (2048) x 1166 |    1 |        1 | 0x933 | android/com.android.internal.app.ResolverActivity#0
0x76d2d8fea250: 9328.00 KiB | 2006 (2048) x 1166 |    1 |        1 | 0x933 | android/com.android.internal.app.ResolverActivity#0

0x933 flags correspond to
GRALLOC_USAGE_HW_COMPOSER | GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_SW_WRITE_OFTEN | GRALLOC_USAGE_SW_READ_OFTEN

Android R android-11.0.0_r17 mesa 21.0.1

ResolverActivity_20210405-152214

I'm adding logs in the attachments: tombstone, addr2line, modetest and dumpsys SurfaceFlinger

logcat_gbm_gralloc_glitch.zip

tombstone_00_gbm_gralloc_glitch.txt

addr2line_gbm_gralloc_glitch.txt

modetest_gbm_gralloc_glitch.txt

dumpsys_gbm_gralloc_glitch.txt

Chicken Invaders 3 is also affected as explained below, there is a top pane that should show Ads

Chicken_Invaders_3_20210405-173449

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.