OSDN Git Service

android-x86/external-minigbm.git
18 months agogeneric_dri: don't advertise BGR24 as a render/texture target r-x86
Mauro Rossi [Tue, 22 Dec 2020 10:41:10 +0000 (11:41 +0100)]
generic_dri: don't advertise BGR24 as a render/texture target

Inspired by AOSP commit 71bc665179f9 ("minigbm: don't advertise BGR24 as a render/texture target")
https://android.googlesource.com/platform/external/minigbm/+/71bc665179f9e8a94c4b2293f6b3406887f96d34

Change-Id: Ieea7931195552f4c2d61f210a3f06060fce15d26

18 months agoAndroid.bp: fix mesa include path
Mauro Rossi [Sat, 19 Dec 2020 22:38:02 +0000 (23:38 +0100)]
Android.bp: fix mesa include path

To avoid the following building errors:

FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b out/soong -n out -d out/soong/build.ninja.d -globFile out/soon
g/.bootstrap/build-globs.ninja -o out/soong/build.ninja Android.bp
error: external/minigbm/Android.bp:120:1: module "gralloc.minigbm_intel" variant "android_x86_64_shared": source path "external/mesa3d/include
" does not exist
error: external/minigbm/Android.bp:104:1: module "libminigbm_cros_gralloc" variant "android_x86_64_static": source path "external/mesa3d/inclu
de" does not exist
error: external/minigbm/Android.bp:137:1: module "gralloc.minigbm_meson" variant "android_x86_64_shared": source path "external/mesa3d/include
" does not exist
error: external/minigbm/Android.bp:113:1: module "gralloc.minigbm" variant "android_x86_64_shared": source path "external/mesa3d/include" does
 not exist

Change-Id: I49e858d09ea242dcc5c4d70dcf1aa6143e5ab0e6

18 months agogralloc0_register_buffer: initialize gralloc0 when needed
Mauro Rossi [Sat, 18 Apr 2020 08:20:32 +0000 (10:20 +0200)]
gralloc0_register_buffer: initialize gralloc0 when needed

Based on Michael Goffioul "Always initialize gralloc0 module"
considerign that !mod->initialized defines the condition when it's needed.

Original commit message:
Both mapper and allocator HIDL adapter uses the same gralloc module, but
the mapper HILD does not fully initialize the module, leaving the
allocator HIDL in limbo if the mapper HIDL is called first.

Fixes SystemUI crash on startup.

18 months agoRevert "Modify gralloc0 implementation"
Mauro Rossi [Tue, 22 Dec 2020 22:09:26 +0000 (23:09 +0100)]
Revert "Modify gralloc0 implementation"

This reverts commit 8894cf7256f1d17344fd1e0b5bb849e719afe11e.

18 months agoAndroid-x86: Implement some perform functionality from drm_gralloc (v2)
lambdadroid [Sat, 10 Nov 2018 18:48:11 +0000 (19:48 +0100)]
Android-x86: Implement some perform functionality from drm_gralloc (v2)

 Conflicts:
Android.mk

(v2) git rm Android.mk due to aosp master branch minigbm implementation

18 months agocros_gralloc_driver: init_master: set try_generic argument to true
Mauro Rossi [Sat, 19 Dec 2020 22:34:00 +0000 (23:34 +0100)]
cros_gralloc_driver: init_master: set try_generic argument to true

Fixes the following building error:

external/minigbm/cros_gralloc/cros_gralloc_driver.cc:169:10: error: no matching function for call to 'drv_create'
                drv_ = drv_create(fd);
                       ^~~~~~~~~~
external/minigbm/drv.h:122:16: note: candidate function not viable: requires 2 arguments, but 1 was provided
struct driver *drv_create(int fd, bool try_generic);
               ^
1 error generated.

Change-Id: I82555ecfd96d7e6ab5423a0640c410118ee77c4f

18 months agoAdd framebuffer HAL implementation based on drm_framebuffer (v4)
Mauro Rossi [Sat, 25 Jan 2020 20:34:29 +0000 (21:34 +0100)]
Add framebuffer HAL implementation based on drm_framebuffer (v4)

(v1) original lambdadroid implementation

(v2) changes in drv.h due to following commits:
     48b4c08 ("minigbm: fix flags to align with GBM")
     6e6dc49 ("minigbm: virtio: restrict formats supported without 3D")

(v3) changes in drv.h due to aosp master branch minigbm implementation

NOTE: #define BO_USE_FRAMEBUFFER (1ull << 19) as the fist available bit

(v4) changes due to aosp updates in cros_gralloc_handle.h, drv.h, drv_priv.h

Change-Id: I1e1192a25ba1105c0230eb63ea50d31115afb6f2

18 months agoRevert "WIP: Pinephone optimization experements"
Roman Stratiienko [Tue, 29 Dec 2020 10:27:00 +0000 (12:27 +0200)]
Revert "WIP: Pinephone optimization experements"

This reverts commit 4b3de7042c073970a1229b537eda6a64f3088286.

18 months agoWIP: Pinephone optimization experements
Roman Stratiienko [Tue, 29 Dec 2020 10:26:36 +0000 (12:26 +0200)]
WIP: Pinephone optimization experements

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
18 months agominigbm: Add dri_generic driver to Android.bp
Roman Stratiienko [Tue, 29 Dec 2020 10:08:32 +0000 (12:08 +0200)]
minigbm: Add dri_generic driver to Android.bp

Depends on mainline mesa3d with
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8259
merged.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: Ic54d3444cdb2a6b536e9faca63ef21e5c592545d

18 months agoRevert "Distinguish COMPOSER_TARGET_BUFFER"
Roman Stratiienko [Tue, 29 Dec 2020 10:43:37 +0000 (12:43 +0200)]
Revert "Distinguish COMPOSER_TARGET_BUFFER"

This reverts commit 662a9fd2acd72fd73e72110924ea9f350429195d.

18 months agoDistinguish COMPOSER_TARGET_BUFFER
Roman Stratiienko [Thu, 24 Dec 2020 15:30:51 +0000 (17:30 +0200)]
Distinguish COMPOSER_TARGET_BUFFER

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: Id024d7b0296ef39755bba39ac0fbb41fba1e7520

18 months agogralloc4: add manifest fragment
Roman Stratiienko [Thu, 24 Dec 2020 13:43:06 +0000 (15:43 +0200)]
gralloc4: add manifest fragment

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: I0c84a7fc3d75a836ab061ca24769a997cbafe844

18 months agogralloc4: Add DRM_FORMAT_ARGB4444 format layout
Roman Stratiienko [Sat, 26 Dec 2020 23:34:52 +0000 (01:34 +0200)]
gralloc4: Add DRM_FORMAT_ARGB4444 format layout

Slow mobile GPUs performance can be boosted in exchange
of reducing image quality by resolving DRM_FORMAT_ARGB8888 to
DRM_FORMAT_ABGR4444 and DRM_FORMAT_XBGR8888 to DRM_FORMAT_RGB565.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: Iae155bfdaf21fff98f34635cc24165f365c62afc

18 months agoAdd DRI-based generic backend
Roman Stratiienko [Mon, 7 Dec 2020 17:22:20 +0000 (19:22 +0200)]
Add DRI-based generic backend

mesa3d project support graphic buffer allocation via DRI API for
various set of hardware, including systems with splitted GPU
and Display controller.

Use it as fallback backend in case no other backends were found in
the supported list.

Tested with Android on sun4i-drm and lima GPU (Pinephone).

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: I9d6ed0bdf3ef255c3c4f9be5385a7b87b571a232

18 months agoAlways export DRM_FORMAT_YVU420_ANDROID as DRM_FORMAT_YVU420
Roman Stratiienko [Mon, 14 Dec 2020 15:34:09 +0000 (17:34 +0200)]
Always export DRM_FORMAT_YVU420_ANDROID as DRM_FORMAT_YVU420

Fixes video playback when gralloc0 and software video decoder are used.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: I676060021806186bb3c23928d0d54af4add5120a

18 months agoMerge "Merge remote-tracking branch 'aosp/upstream-master' into 'aosp/master'"
Treehugger Robot [Fri, 11 Dec 2020 22:51:03 +0000 (22:51 +0000)]
Merge "Merge remote-tracking branch 'aosp/upstream-master' into 'aosp/master'"

18 months agoMerge remote-tracking branch 'aosp/upstream-master' into 'aosp/master'
Jason Macnak [Fri, 11 Dec 2020 18:50:03 +0000 (10:50 -0800)]
Merge remote-tracking branch 'aosp/upstream-master' into 'aosp/master'

... to update minigbm for Cuttlefish to pull in
http://crrev.com/c/2585945 to fix multi layer tests in
CtsNativeHardwareTestCases.

Bug: b/168577830
Bug: b/172409958
Test: cts -m CtsNativeHardwareTestCases
Change-Id: I1df040a15d2034ad469442a92eee4d0710f193af

18 months agoAdd vkms support
Fran├žois-Denis Gonthier [Fri, 22 May 2020 22:02:24 +0000 (18:02 -0400)]
Add vkms support

The vkms driver is used to get the Android to work on the BeagleBone
Black. Only a minimum amount of support is needed but the driver can
only be recognized by looking at card DRM nodes. The vkms driver does
not publish a render node.

We refactored the cros_gralloc_driver::init to test both the render
nodes and the card nodes.

Change-Id: Ie750aa45fc359ba7917919904693b1ab8088ad16
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2213742
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>

18 months agocros_gralloc: Report layerCount > 1 as unsupported
Jason Macnak [Thu, 10 Dec 2020 19:42:54 +0000 (11:42 -0800)]
cros_gralloc: Report layerCount > 1 as unsupported

... to handle AHardwareBufferNativeTests#MultipleLayers_*
tests.

BUG=b:168577830
BUG=b:172409958
TEST=cts -m CtsNativeHardwareTestCases
Change-Id: I40a55d05011a94057d877e228b4b3587dfc48fcb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2585945
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Jason Macnak <natsu@google.com>
Commit-Queue: Jason Macnak <natsu@google.com>

18 months agoi915: Fall back to GEM_MMAP_GTT if GEM_MMAP fails
Kristian H. Kristensen [Thu, 19 Nov 2020 19:20:04 +0000 (19:20 +0000)]
i915: Fall back to GEM_MMAP_GTT if GEM_MMAP fails

DRM_IOCTL_I915_GEM_MMAP mmaps the underlying shm file and returns a
user space address directly, ie, doesn't go through mmap. If we try
that on a dma-buf that doesn't have a shm file, i915.ko returns ENXIO.
Fall through to DRM_IOCTL_I915_GEM_MMAP_GTT in that case, which will
mmap on the drm fd instead.

BUG=b:167236452
TEST=dmabuf_test from drm-tests passes

Change-Id: I41cd0b0150d2d489bd055e23f4495cd13624b831
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2561378
Tested-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Tested-by: Ilja H. Friedel <ihf@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
Commit-Queue: Ilja H. Friedel <ihf@chromium.org>

18 months agominigbm: Add SCANOUT and PROTECTED for P010 buffers
Jeffrey Kardatzke [Sat, 5 Dec 2020 00:58:28 +0000 (16:58 -0800)]
minigbm: Add SCANOUT and PROTECTED for P010 buffers

BUG=b:153111783,b:155511259
TEST=P010 buffers scanout to overlay on TGL

Change-Id: Ib06508a38c8c86b40d3e6082a79051594252697d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2574672
Tested-by: J Kardatzke <jkardatzke@chromium.org>
Tested-by: Jeffrey Kardatzke <jkardatzke@google.com>
Commit-Queue: Jeffrey Kardatzke <jkardatzke@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
18 months agominigbm: add buffer bandwidth compression flag to gbm device
Pilar Molina Lopez [Thu, 12 Nov 2020 23:19:42 +0000 (18:19 -0500)]
minigbm: add buffer bandwidth compression flag to gbm device

Read MINIGBM_DEBUG env var when creating a gbm driver
Store value as a flag inside driver
Avoid allocating compressed buffers in the backends
when the flag disables compression

BUG=b:172215587

Change-Id: Idbd6f0aebc1782c1bf5921a6438310a87212d1f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2535658
Tested-by: Pilar Molina Lopez <pmolinalopez@google.com>
Commit-Queue: Pilar Molina Lopez <pmolinalopez@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
18 months agominigbm/msm: Double pitch alignment for YUV
Rob Clark [Tue, 1 Dec 2020 20:13:13 +0000 (12:13 -0800)]
minigbm/msm: Double pitch alignment for YUV

Something somewhere is assuming the UV pitch can be half of the Y pitch,
leading to failures with CtsMediaTestCases#android.media.cts.DecodeAccuracyTest

To componsate, double the pitch alignment requirement for YUV formats.

BUG=b:159504968, b:165333514
TEST=run CtsMediaTestCases#android.media.cts.DecodeAccuracyTest

Change-Id: I0118d813576654c72ed55500d741cf07a1977b20
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2568395
Commit-Queue: Rob Clark <robdclark@chromium.org>
Commit-Queue: Kristian H. Kristensen <hoegsberg@chromium.org>
Tested-by: Rob Clark <robdclark@chromium.org>
Auto-Submit: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
19 months agominigbm: add option to force 256 byte alignment of linear buffers
Dominik Behr [Fri, 6 Nov 2020 02:58:06 +0000 (18:58 -0800)]
minigbm: add option to force 256 byte alignment of linear buffers

BUG=b:172617736
TEST=run glxgears crostini on mushu

Change-Id: I0a5934e3676a70dd0bdb5f53701114fb0c19f016
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2522635
Reviewed-by: David Riley <davidriley@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Dominik Behr <dbehr@chromium.org>
Auto-Submit: Dominik Behr <dbehr@chromium.org>
Commit-Queue: Dominik Behr <dbehr@chromium.org>

19 months agominigbm: i915: use protected content feature
Gurchetan Singh [Wed, 7 Oct 2020 22:46:23 +0000 (15:46 -0700)]
minigbm: i915: use protected content feature

This enables protected content playback on gen 12 and greater
i915.

BUG=b:153111783,b:155511259
TEST=Protected playback works w/ associated Chrome OS changes

Change-Id: I829dddf506b3b765e5d2f25f2b77af9ecc4f7309
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2459532
Reviewed-by: Jeffrey Kardatzke <jkardatzke@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Jeffrey Kardatzke <jkardatzke@google.com>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>

19 months agominigbm: i915: use experimental uapi
Gurchetan Singh [Wed, 7 Oct 2020 21:42:49 +0000 (14:42 -0700)]
minigbm: i915: use experimental uapi

New proposed i915 features for testing purposes.

BUG=b:153111783,b:155511259
TEST=Protected playback works w/ associated Chrome OS changes

Change-Id: I67bb178794d827c85667bff2fb4500c69fe0a4e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2459531
Reviewed-by: Jeffrey Kardatzke <jkardatzke@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Jeffrey Kardatzke <jkardatzke@google.com>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>

19 months agominigbm: i915: use local i915 drm header
Gurchetan Singh [Wed, 7 Oct 2020 21:31:20 +0000 (14:31 -0700)]
minigbm: i915: use local i915 drm header

Taken from libdrm.  Mainly so we can have local header for
development purposes.

BUG=b:153111783,b:155511259
TEST=Protected playback works w/ associated Chrome OS changes

Change-Id: I947ab11d5fbc0c2b62dbaf8806e7897d2df79621
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2459530
Reviewed-by: Jeffrey Kardatzke <jkardatzke@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Jeffrey Kardatzke <jkardatzke@google.com>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>

19 months agoMark ab/6881855 as merged
Xin Li [Mon, 23 Nov 2020 19:30:22 +0000 (11:30 -0800)]
Mark ab/6881855 as merged

Bug: 172690556
Change-Id: I9e275a8e5755c83362df41a5c57556cfbbb5fda8

19 months agoUpdates libgbm to use libdrm_headers am: 459cfe1128
Jason Macnak [Mon, 16 Nov 2020 21:13:33 +0000 (21:13 +0000)]
Updates libgbm to use libdrm_headers am: 459cfe1128

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1500370

Change-Id: Ia337326c17dcad3d6da49c959c63a539fedc842f

19 months agoUpdates libgbm to use libdrm_headers
Jason Macnak [Mon, 16 Nov 2020 17:56:08 +0000 (09:56 -0800)]
Updates libgbm to use libdrm_headers

... as being able to use cc_library in header_libs is not
intended and does not work on all branches which blocks
aosp/1497292.

Bug: b/173252016
Bug: b/171019648
Test: m
Change-Id: Ia569aa47d28fb3e89e9315b44b6634b7f21fcf0e

19 months agohelpers: Use backend num_planes_from_modifier only when modifier set
Drew Davenport [Tue, 10 Nov 2020 01:37:55 +0000 (18:37 -0700)]
helpers: Use backend num_planes_from_modifier only when modifier set

If modifiers are not set, or if only linear modifier is set, just return
the number of planes based on the format. If there are other modifiers
set, then query the backend.

BUG=b:172830088
TEST=Start camera on zork after mesa uprev

Change-Id: I130e9ef3730b35f6e8777ce9c1919de2eb466733
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2528204
Reviewed-by: Bas Nieuwenhuizen <basni@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Tested-by: Drew Davenport <ddavenport@chromium.org>
Commit-Queue: Drew Davenport <ddavenport@chromium.org>

19 months agoMerge remote-tracking branch 'aosp/upstream-master' into HEAD am: 7482705635
Jason Macnak [Thu, 12 Nov 2020 18:26:25 +0000 (18:26 +0000)]
Merge remote-tracking branch 'aosp/upstream-master' into HEAD am: 7482705635

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1497204

Change-Id: I28f57104829de35dd7582a2ef41fa6bd1148db0d

19 months agoMerge remote-tracking branch 'aosp/upstream-master' into HEAD
Jason Macnak [Thu, 12 Nov 2020 16:19:13 +0000 (08:19 -0800)]
Merge remote-tracking branch 'aosp/upstream-master' into HEAD

... to pull in crrev.com/c/2521454 and crrev.com/c/2503481 to
fix Gralloc4 YUV metadata and memfd availability.

Bug: b/172031518
Test: vts -m VtsHalGraphicsMapperV4_0Target
Change-Id: I35406ba723679b675d0149f9ff773855ea956430

19 months agocros_gralloc: handle memfd_create availability
Jason Macnak [Thu, 5 Nov 2020 21:32:49 +0000 (13:32 -0800)]
cros_gralloc: handle memfd_create availability

BUG=b:172031518
TEST=vts -m VtsHalGraphicsMapperV4_0TargetTest

Change-Id: I9a7a0237620ab2468c014e0778976b379b757acf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2521454
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Jason Macnak <natsu@google.com>
Commit-Queue: Jason Macnak <natsu@google.com>
Auto-Submit: Jason Macnak <natsu@google.com>

19 months agominigbm i915: Enable Y tiling for buffer width greater than 4096
Abhishek Kumar [Mon, 12 Oct 2020 10:54:03 +0000 (16:24 +0530)]
minigbm i915: Enable Y tiling for buffer width greater than 4096

Vappi hardware decoder requires NV12 buffer to be Y-tiled only ,so
enable Y tiling for buffer width > 4096.Intel GEN9/10 Gpu does not
support Y tiled buffers scanout and overlay plane will not be used.

BUG=b:168706685,b:171518235
TEST= play 5k video on hatch

Change-Id: Icb3ad0ebe58b733f22614d95f2ba3976e7d6e33d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2465962
Tested-by: Andres Calderon Jaramillo <andrescj@google.com>
Commit-Queue: Andres Calderon Jaramillo <andrescj@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Robert Tarasov <tutankhamen@chromium.org>
19 months agominigbm/mediatek: Allocate NV12 video buffers for MT8192
Fritz Koenig [Sun, 8 Nov 2020 01:37:38 +0000 (17:37 -0800)]
minigbm/mediatek: Allocate NV12 video buffers for MT8192

MT8192 v4l2 decodes into nv12

BUG=b:167469726
TEST=video_decode_accelerator_tests get the buffers needed

Change-Id: I03fd52c26a3f09d5e4e75e92fd3eb4e55dc2d987
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2524254
Tested-by: Fritz Koenig <frkoenig@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>

19 months agominigbm/msm: Disable UBWC for video gtest
Fritz Koenig [Fri, 6 Nov 2020 17:39:34 +0000 (09:39 -0800)]
minigbm/msm: Disable UBWC for video gtest

video_decode_accelerator_tests need non UBWC
frames in order to check for exactness.  This
is expected to be a short term fix until a
proper verification method is devised.

BUG=b:171260705
TEST=YouTube has UBWC, video_decode_accelerator_tests does not

Change-Id: Ia3ab02493f8b740ba9589b4fc21d3fa6b23ea7cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2523246
Reviewed-by: Fritz Koenig <frkoenig@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Tested-by: Fritz Koenig <frkoenig@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>

19 months agovirtgpu: set blob_id when creating blob resources
David Stevens [Wed, 28 Oct 2020 07:06:38 +0000 (16:06 +0900)]
virtgpu: set blob_id when creating blob resources

Setting the blob_id is necessary to prevent a race where the cmds for
two concurrent CREATE_BLOB ioctls get swapped.

BUG=b:170375809
TEST=android.media.cts.EncoderTest

Change-Id: I74d4ebe9a819f0564e10736ba5f35c5f8fc8aa1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2503995
Reviewed-by: Jason Macnak <natsu@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
Tested-by: David Stevens <stevensd@chromium.org>
19 months agominigbm: virtgpu: Fix mapping of DRM_FORMAT_ABGR16161616F
Lepton Wu [Fri, 30 Oct 2020 23:29:26 +0000 (16:29 -0700)]
minigbm: virtgpu: Fix mapping of DRM_FORMAT_ABGR16161616F

This fixes SingleLayer_ColorTest_CpuWriteColorGpuRead_R16G16B16A16_FLOAT
in AHardwareBufferNativeTests with help of this upstream CL:
https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/434

BUG=b:158618381
TEST=manual - the failed test passed

Change-Id: Ib57bd316c17baa7129a6f4067487b88fe0f6e527
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2511795
Tested-by: Lepton Wu <lepton@chromium.org>
Auto-Submit: Lepton Wu <lepton@chromium.org>
Reviewed-by: Jason Macnak <natsu@google.com>
Reviewed-by: David Stevens <stevensd@chromium.org>
Commit-Queue: Lepton Wu <lepton@chromium.org>

20 months agoresolve merge conflicts of 42ca6159e52c5a2217825da02a26cf504998301b to stage-aosp...
Jason Macnak [Thu, 29 Oct 2020 22:37:47 +0000 (15:37 -0700)]
resolve merge conflicts of 42ca6159e52c5a2217825da02a26cf504998301b to stage-aosp-master

... by making stage-aosp-master contents match goog/mirror-aosp-master
exactly.

Change-Id: I11be47e51b5e12562384b5870d5442cee1f12be8

20 months agominigbm: add back in udl/evdi
Gurchetan Singh [Wed, 28 Oct 2020 22:00:10 +0000 (15:00 -0700)]
minigbm: add back in udl/evdi

These drivers are still in use for MIMO displays.

BUG=b:171725208
TEST=enterprise_RemoraRequisitionDisplayUsage

Change-Id: Idecc686e7977a1739943ccb01df849552e40f979
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2505738
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
20 months ago[automerger skipped] Sync aosp and internal minigbm am: 96edf3270e -s ours
Jason Macnak [Wed, 28 Oct 2020 21:09:06 +0000 (21:09 +0000)]
[automerger skipped] Sync aosp and internal minigbm am: 96edf3270e -s ours

am skip reason: Change-Id Id5222980cc2e7c284a846259c808bf79cf5f2a75 with SHA-1 1e4aff7321 is in history

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1479136

Change-Id: If991b6df3472205d3ae2f1a45b5cad670b7cb770

20 months agoUpdate Android.bp after merge
Jason Macnak [Wed, 28 Oct 2020 18:12:09 +0000 (11:12 -0700)]
Update Android.bp after merge

Mostly to reflect changes in http://crrev.com/c/2429952

Bug: b/171019648
Test: launch_cvd
Test: launch_cvd --gpu_mode=gfxstream
Change-Id: I7c15919cb95b04d2dd6eb7c42b4d7d2da61cd75e

20 months agoMerge 'aosp/upstream-master' into HEAD
Jason Macnak [Wed, 28 Oct 2020 20:27:30 +0000 (13:27 -0700)]
Merge 'aosp/upstream-master' into HEAD

... to pull in PlaneLayout metadata fix http://crrev.com/c/2503481

Bug: b/171019648
Test: launch_cvd
Test: launch_cvd --gpu_mode=gfxstream
Change-Id: I9c2a52e2eca3339c024154840cb91f65bb7ed577

20 months agoSync aosp and internal minigbm
Jason Macnak [Wed, 28 Oct 2020 17:54:17 +0000 (10:54 -0700)]
Sync aosp and internal minigbm

The merge in aosp/1431491 did not re-apply many of the changes
from aosp/1431490 as intended.

Bug: b/171019648
Test: launch_cvd
Test: launch_cvd --gpu_mode=gfxstream
Merged-In: Id5222980cc2e7c284a846259c808bf79cf5f2a75
Change-Id: I3a0136b6303a1b1c5e27f7e225466438e3de0616

20 months agocros_gralloc: Fix PlaneLayout width/height metadata
Jason Macnak [Tue, 27 Oct 2020 18:58:35 +0000 (11:58 -0700)]
cros_gralloc: Fix PlaneLayout width/height metadata

... by using the horizontal/vertical subsampling of
each plane.

BUG=b:171019648
TEST=vts -m VtsHalGraphicsMapperV4_0TargetTest

Change-Id: I3eccfa1c0ac30394314c83b54ca50d690c679724
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2503481
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Jason Macnak <natsu@google.com>
Auto-Submit: Jason Macnak <natsu@google.com>
Commit-Queue: Jason Macnak <natsu@google.com>

20 months agogralloctest: update test for ARCVM
David Stevens [Tue, 27 Oct 2020 04:40:17 +0000 (13:40 +0900)]
gralloctest: update test for ARCVM

On ARCVM, the stride obtained from GRALLOC_DRM_GET_STRIDE is the host
stride, and may be larger than the guest stride.

This change also moves the line which prints the next test to execute to
before the test actually runs, so it appears before test failures.

BUG=b:155238003
TEST=tast run DUT arc.Gralloc*

Change-Id: I4594f352fba585fa4bdbaff609f198888b99c8f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2500971
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
Tested-by: David Stevens <stevensd@chromium.org>
20 months agominigbm: vc4: add YUV support
Gurchetan Singh [Mon, 23 Mar 2020 16:46:09 +0000 (09:46 -0700)]
minigbm: vc4: add YUV support

Ozone should work with VC4's MMAL in V4L2.

Change-Id: Ife783f7005628c49756f251692b0cc42e8b47d8c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2115562
Reviewed-by: Ewan Roycroft <ewan.roycroft@bbc.co.uk>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Ewan Roycroft <ewan.roycroft@bbc.co.uk>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>

20 months agoi915: Enable Y-tiling for huge buffer object for GEN11 GPU
Abhishek Kumar [Fri, 9 Oct 2020 10:38:01 +0000 (16:08 +0530)]
i915: Enable Y-tiling for huge buffer object for GEN11 GPU

Intel GEN11+ Gpu can scan out Y-tiled buffers with maximum width
5320, so enable Y-tiled buffer for GEN11.

BUG=b:168573604 b:168706685
TEST=play 5k video on JSL device

Change-Id: Idb99c9512591e786f796fb32c0e60f549cec03da
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2462328
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Andres Calderon Jaramillo <andrescj@chromium.org>
Tested-by: Girish DS <girish.ds@intel.corp-partner.google.com>
Commit-Queue: Andres Calderon Jaramillo <andrescj@chromium.org>

20 months agominigbm: komeda: Refactor the 'dumb' drivers and add Komeda support
Anders Dellien [Wed, 10 Jun 2020 09:30:44 +0000 (10:30 +0100)]
minigbm: komeda: Refactor the 'dumb' drivers and add Komeda support

Several drivers are very similar in that they only use the 'dumb'
operations. This patch puts all such drivers into a single file and
also adds a driver to support the Arm Komeda/D71 display processor.

TEST=Boot Android and verify that we reach the home screen

Change-Id: If39605deaef446adf8d6693d760a16c2c3f84649
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2429952
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>

20 months ago[automerger skipped] Merge redfin/bramble support. am: 34ca34fb1e -s ours
Xin Li [Tue, 20 Oct 2020 19:04:26 +0000 (19:04 +0000)]
[automerger skipped] Merge redfin/bramble support. am: 34ca34fb1e -s ours

am skip reason: Change-Id I290151f7e04c9c738e06e0859c10cc86f4943aa4 with SHA-1 ad7135fdcc is in history

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1466203

Change-Id: Ia5204730d44278be30755e74515f426d1bece751

20 months agominigbm: cros_gralloc: map protected flag to linear
Gurchetan Singh [Fri, 16 Oct 2020 17:28:04 +0000 (10:28 -0700)]
minigbm: cros_gralloc: map protected flag to linear

This should be fine since the dummy fd was never used
with the encoder / decoders, so it doesn't need to be
tiled.

BUG=b/171018855
TEST=GtsExoPlayerTestCases / GtsMediaTestCases

Change-Id: I1309a641e19a9196e0aed05f4820e0d2672fafa0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2481223
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Jeffrey Kardatzke <jkardatzke@google.com>
Reviewed-by: David Stevens <stevensd@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Auto-Submit: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>

20 months agoMerge redfin/bramble support.
Xin Li [Mon, 19 Oct 2020 17:08:14 +0000 (10:08 -0700)]
Merge redfin/bramble support.

Bug: 171218636
Merged-In: I290151f7e04c9c738e06e0859c10cc86f4943aa4
Change-Id: I904e7893b53256789f566b292f38bd9822bf9ee1

20 months agoamdgpu: Align stride to 512 for multiplane formats
Drew Davenport [Fri, 16 Oct 2020 04:18:00 +0000 (22:18 -0600)]
amdgpu: Align stride to 512 for multiplane formats

Quick fix to ensure subsample stride is aligned to 256 for multiplane formats.

BUG=b:171013552
TEST=CtsMediaTestCases passes on zork

Change-Id: I0f47ae3585e5875f3e35cbb667cb7a0ab6421898
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2477987
Reviewed-by: Bas Nieuwenhuizen <basni@chromium.org>
Commit-Queue: Drew Davenport <ddavenport@chromium.org>
Tested-by: Drew Davenport <ddavenport@chromium.org>
20 months agominigbm: stop faking the protected buffers
Gurchetan Singh [Tue, 13 Oct 2020 00:31:10 +0000 (17:31 -0700)]
minigbm: stop faking the protected buffers

With real HW protection on the horizon, let's repurpose the
protection flag to mean that.

Currently, our protected buffer scheme on the Android side
allocates a dummy fd, which is sent to Chrome.  Chrome
associates that dummy fd with an unmappable shared memory
buffer.  In the entire process, minigbm doesn't really do
anything.

We prevent buffers allocated with the protected
flag from being mapped, but since it's a dummy fd it's not
really useful.

Chrome doesn't use the protected flag yet, but hopefully will
so in the future, but with real HW protection.

BUG=
TEST=

Change-Id: I57be26926539471f062ffeff33b523a3899c35f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2466958
Reviewed-by: David Stevens <stevensd@chromium.org>
Reviewed-by: Jeffrey Kardatzke <jkardatzke@google.com>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>

20 months agoi915: Add gen12 ids for TGL
Sushma Venkatesh Reddy [Thu, 8 Oct 2020 17:18:01 +0000 (10:18 -0700)]
i915: Add gen12 ids for TGL

During 5K/8K HW accelerated video playback, corruptions are observed on
gen12 TGL devices as (i915->gen <= 11) condition is returning true, and
I915_TILING_NONE tile is being set to bo. Adding gen12 ids ensures
buffer allocations happen as per the device's capabilities and here, it
resolves the video corruption issues.

BUG=b:168706685
TEST=Play 5K/8K VP9 codec video

Signed-off-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Change-Id: I24cd0b667f2bf74f73d2377a32f92a148d21c793
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2462345
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Kevin L Derossett <kevin.l.derossett@intel.com>
20 months agovirtgpu: enable blobs for decoder output buffers
David Stevens [Fri, 25 Sep 2020 09:52:26 +0000 (18:52 +0900)]
virtgpu: enable blobs for decoder output buffers

Enabling this requires two changes. First, the check that prevents
BO_USE_RENDERING/BO_USE_TEXTURE buffers from being blobs is removed,
since decoder output buffers are generally used as textures. Second,
NV12 format with no SW usage is added to the list of configurations that
use blobs.

This change also removes the assumption that blobs are mappable, instead
keying off of the software usage flags.

BUG=b:169212117
TEST=Play YouTube on ARCVM

Change-Id: I3fbe744a1ad406fc27f9912296ae4f9b1b55f903
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2430540
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
Tested-by: David Stevens <stevensd@chromium.org>
20 months agominigbm: reduce use of memset
Gurchetan Singh [Wed, 7 Oct 2020 22:28:11 +0000 (15:28 -0700)]
minigbm: reduce use of memset

Also run presubmit.sh.

BUG=none
TEST=compile

Change-Id: I6f5d2afca41c4228a4f8eb40f3670b39bce7b641
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2459529
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>

20 months agominigbm/msm: Enable UBWC for NV12 buffers
Fritz Koenig [Fri, 7 Aug 2020 21:56:18 +0000 (14:56 -0700)]
minigbm/msm: Enable UBWC for NV12 buffers

BUG=b:149525848
TEST=video_decode_accelerator_tests use UBWC

Change-Id: I66f44f31f69b2a1d32c66a802c21e0a76d95ec89
Cq-Depend: chromium:2460816, chromium:2455450
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2343729
Tested-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Fritz Koenig <frkoenig@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Commit-Queue: Kristian H. Kristensen <hoegsberg@chromium.org>

20 months agoSkip ab/6749736 in stage.
Xin Li [Fri, 9 Oct 2020 06:14:04 +0000 (23:14 -0700)]
Skip ab/6749736 in stage.

Bug: 167233921
Merged-In: I534acc55a351de6fe94194de9dba4f55ba43558f
Change-Id: I290151f7e04c9c738e06e0859c10cc86f4943aa4

20 months agominigbm: cros_gralloc: simplify getting the drm format string
Gurchetan Singh [Tue, 6 Oct 2020 00:17:13 +0000 (17:17 -0700)]
minigbm: cros_gralloc: simplify getting the drm format string

Can we do this.

BUG=none
TEST=compile

Change-Id: If9488038f1eb77b92e37d6daa99c8bea495315c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2451522
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Jason Macnak <natsu@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>

21 months agominigbm: remove vgem from minigbm (take 2)
Gurchetan Singh [Thu, 19 Dec 2019 18:01:13 +0000 (10:01 -0800)]
minigbm: remove vgem from minigbm (take 2)

In theory, vgem is only used on Android, and nothing
should fail. In theory.  Otherwise, we can just revert
again.

BUG=b:141278896
TEST=compile

Change-Id: I998cb83d5342e454b876f4b74274df96b4951882
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2412903
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>

21 months ago[automerger skipped] Adds Android.bp files back after merge. am: 1e4aff7321 -s ours...
Jason Macnak [Fri, 18 Sep 2020 21:36:32 +0000 (21:36 +0000)]
[automerger skipped] Adds Android.bp files back after merge. am: 1e4aff7321 -s ours am: aead8fab07 -s ours am: 3e792b45fb -s ours am: bdeb2ac4f4 -s ours

am skip reason: Change-Id I27f020b4f661890bcc2817deb09ffb9af1c76f1b with SHA-1 1476c7ea85 is in history

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1431492

Change-Id: I0abb3e25bc01295fa23634c19f4fd546c961c156

21 months ago[automerger skipped] Merge remote-tracking branch 'aosp/upstream-master' into HEAD...
Jason Macnak [Fri, 18 Sep 2020 21:36:31 +0000 (21:36 +0000)]
[automerger skipped] Merge remote-tracking branch 'aosp/upstream-master' into HEAD am: 910da248a7 -s ours am: f2f8b352db -s ours am: c247e4922d -s ours am: 42239a749b -s ours

am skip reason: Change-Id I27f020b4f661890bcc2817deb09ffb9af1c76f1b with SHA-1 1476c7ea85 is in history

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1431491

Change-Id: Iaa20036c2501b47c4b5bebef7a38b16d59017e18

21 months ago[automerger skipped] Revert "Merge Android R" am: 56e3e9014e -s ours am: 850031de34...
Jason Macnak [Fri, 18 Sep 2020 21:36:30 +0000 (21:36 +0000)]
[automerger skipped] Revert "Merge Android R" am: 56e3e9014e -s ours am: 850031de34 -s ours am: d768f7beca -s ours am: a0e4364598 -s ours

am skip reason: Change-Id I27f020b4f661890bcc2817deb09ffb9af1c76f1b with SHA-1 1476c7ea85 is in history

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1431490

Change-Id: Ide3639fdf9051bb040ce927338ec06c1b8bb499c

21 months ago[automerger skipped] Adds Android.bp files back after merge. am: 1e4aff7321 -s ours...
Jason Macnak [Fri, 18 Sep 2020 20:29:46 +0000 (20:29 +0000)]
[automerger skipped] Adds Android.bp files back after merge. am: 1e4aff7321 -s ours am: aead8fab07 -s ours am: 3e792b45fb -s ours

am skip reason: Change-Id I27f020b4f661890bcc2817deb09ffb9af1c76f1b with SHA-1 1476c7ea85 is in history

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1431492

Change-Id: I0b0b8bda7f0e8020e8b17bf8ec47452d6f676ab3

21 months ago[automerger skipped] Merge remote-tracking branch 'aosp/upstream-master' into HEAD...
Jason Macnak [Fri, 18 Sep 2020 20:29:45 +0000 (20:29 +0000)]
[automerger skipped] Merge remote-tracking branch 'aosp/upstream-master' into HEAD am: 910da248a7 -s ours am: f2f8b352db -s ours am: c247e4922d -s ours

am skip reason: Change-Id I27f020b4f661890bcc2817deb09ffb9af1c76f1b with SHA-1 1476c7ea85 is in history

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1431491

Change-Id: I665536892e1ae8252412ec03764e1ba2dfb4b4e2

21 months ago[automerger skipped] Revert "Merge Android R" am: 56e3e9014e -s ours am: 850031de34...
Jason Macnak [Fri, 18 Sep 2020 20:29:43 +0000 (20:29 +0000)]
[automerger skipped] Revert "Merge Android R" am: 56e3e9014e -s ours am: 850031de34 -s ours am: d768f7beca -s ours

am skip reason: Change-Id I27f020b4f661890bcc2817deb09ffb9af1c76f1b with SHA-1 1476c7ea85 is in history

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1431490

Change-Id: Ib60c6213e2204671d7a562afe8afb1c42ab003fc

21 months ago[automerger skipped] Adds Android.bp files back after merge. am: 1e4aff7321 -s ours...
Jason Macnak [Fri, 18 Sep 2020 19:08:47 +0000 (19:08 +0000)]
[automerger skipped] Adds Android.bp files back after merge. am: 1e4aff7321 -s ours am: aead8fab07 -s ours

am skip reason: Change-Id I27f020b4f661890bcc2817deb09ffb9af1c76f1b with SHA-1 1476c7ea85 is in history

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1431492

Change-Id: Ie6a37dd0e2f1f5c5a5ca2c3f1058834066ea24d2

21 months ago[automerger skipped] Merge remote-tracking branch 'aosp/upstream-master' into HEAD...
Jason Macnak [Fri, 18 Sep 2020 19:08:46 +0000 (19:08 +0000)]
[automerger skipped] Merge remote-tracking branch 'aosp/upstream-master' into HEAD am: 910da248a7 -s ours am: f2f8b352db -s ours

am skip reason: Change-Id I27f020b4f661890bcc2817deb09ffb9af1c76f1b with SHA-1 1476c7ea85 is in history

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1431491

Change-Id: Iae8211d6da79ecb7479dbbba3e3e2ccd6a604ebf

21 months ago[automerger skipped] Revert "Merge Android R" am: 56e3e9014e -s ours am: 850031de34...
Jason Macnak [Fri, 18 Sep 2020 19:08:44 +0000 (19:08 +0000)]
[automerger skipped] Revert "Merge Android R" am: 56e3e9014e -s ours am: 850031de34 -s ours

am skip reason: Change-Id I27f020b4f661890bcc2817deb09ffb9af1c76f1b with SHA-1 1476c7ea85 is in history

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1431490

Change-Id: I5111e1f4dc02a0848a8f78688c084ef58a1f974c

21 months ago[automerger skipped] Adds Android.bp files back after merge. am: 1e4aff7321 -s ours
Jason Macnak [Fri, 18 Sep 2020 18:46:39 +0000 (18:46 +0000)]
[automerger skipped] Adds Android.bp files back after merge. am: 1e4aff7321 -s ours

am skip reason: Change-Id I27f020b4f661890bcc2817deb09ffb9af1c76f1b with SHA-1 1476c7ea85 is in history

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1431492

Change-Id: Iabe5049c49fbc45727f79f8af6dabab5d9c11b31

21 months ago[automerger skipped] Merge remote-tracking branch 'aosp/upstream-master' into HEAD...
Jason Macnak [Fri, 18 Sep 2020 18:46:37 +0000 (18:46 +0000)]
[automerger skipped] Merge remote-tracking branch 'aosp/upstream-master' into HEAD am: 910da248a7 -s ours

am skip reason: Change-Id I27f020b4f661890bcc2817deb09ffb9af1c76f1b with SHA-1 1476c7ea85 is in history

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1431491

Change-Id: I5cbf29b4f3e2231b367b0461ce88469647dacf53

21 months ago[automerger skipped] Revert "Merge Android R" am: 56e3e9014e -s ours
Jason Macnak [Fri, 18 Sep 2020 18:46:35 +0000 (18:46 +0000)]
[automerger skipped] Revert "Merge Android R" am: 56e3e9014e -s ours

am skip reason: Change-Id I27f020b4f661890bcc2817deb09ffb9af1c76f1b with SHA-1 1476c7ea85 is in history

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1431490

Change-Id: I3e0c015c818604b808a73b6b27a431f79873a791

21 months agoAdds Android.bp files back after merge.
Jason Macnak [Fri, 18 Sep 2020 16:11:12 +0000 (09:11 -0700)]
Adds Android.bp files back after merge.

I removed the Android.bp files from upstream as they seemed
to get out of sync quickly. Let's just keep them in Android
repos.

Bug: b/161909468
Test: launch_cvd
Merged-In: I27f020b4f661890bcc2817deb09ffb9af1c76f1b
Change-Id: Id5222980cc2e7c284a846259c808bf79cf5f2a75

21 months agoMerge remote-tracking branch 'aosp/upstream-master' into HEAD
Jason Macnak [Fri, 18 Sep 2020 16:07:51 +0000 (09:07 -0700)]
Merge remote-tracking branch 'aosp/upstream-master' into HEAD

... to update Minigbm for Cuttlefish to have Gralloc3 and
Gralloc4 support.

Bug: b/161909468
Test: launch_cvd
Merged-In: I27f020b4f661890bcc2817deb09ffb9af1c76f1b
Change-Id: I11e31543d3298c2cac67d80e77058d7cd95907db

21 months agoRevert "Merge Android R"
Jason Macnak [Fri, 18 Sep 2020 15:59:40 +0000 (08:59 -0700)]
Revert "Merge Android R"

This reverts commit 25ff66748d4b08e7059aad06d967128681838fd4, reversing
changes made to 8884508fa662f8e2b11ea1639006fb0e17d65483.

Bug: b/161909468
Test: launch_cvd
Merged-In: I27f020b4f661890bcc2817deb09ffb9af1c76f1b
Change-Id: I9929f68d173fb4d11ca1983a3b4a67dabdd35cf8

21 months agovirtgpu: improve blob support on ARCVM
David Stevens [Thu, 10 Sep 2020 01:50:26 +0000 (10:50 +0900)]
virtgpu: improve blob support on ARCVM

This change expands the types of buffers which use blob allocation, to
cover decoder/encoder bitstream buffers. It also adds tiling to the
exported buffer metadata, so that flush/invalidate are properly skipped
on imported blob buffers.

BUG=None
TEST=tast run ARCVM-DUT arc.VideoDecodeAccel.*

Change-Id: I460f4448db9e1bd2f7458f3180c4e92ff3b3d74f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2400839
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: David Stevens <stevensd@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>

21 months agominigbm: Adds Gralloc 4 support
Jason Macnak [Thu, 10 Sep 2020 17:57:46 +0000 (10:57 -0700)]
minigbm: Adds Gralloc 4 support

Implements the Allocator 4.0 and Mapper 4.0 interfaces.

Some notable features of the 4.0 interface:
- buffer metadata getter/setters
- buffer flushing
- buffer debugging (buffer listing and buffer id)

BUG=b:161909468
TEST=build and launch Cuttlefish with Gralloc4

Change-Id: I63bdc76604207e1fcfe0135c9b64fa62bfba5b27
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2404601
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Jason Macnak <natsu@google.com>
Commit-Queue: Jason Macnak <natsu@google.com>

21 months agominigbm: Remove Android.bp files
Jason Macnak [Thu, 10 Sep 2020 17:51:47 +0000 (10:51 -0700)]
minigbm: Remove Android.bp files

These files quickly become out of sync with Android specific
build changes so just drop them from upstream Chromium repo.

BUG=b:161909468
TEST=build Cuttlefish

Change-Id: Icf4e3eb708e13ba6c807fcc7d0abe06572d341c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2404600
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Jason Macnak <natsu@google.com>
Commit-Queue: Jason Macnak <natsu@google.com>

21 months agominigbm/msm: Correct NV12 UBWC buffer allocation
Fritz Koenig [Wed, 9 Sep 2020 22:22:46 +0000 (15:22 -0700)]
minigbm/msm: Correct NV12 UBWC buffer allocation

V4L2 is the consumer of these buffers and sets up
the allocation in get_framesize_raw_nv12_ubwc().
There was a mismatch where V4L2 was aligning the
uv buffer differently than minigbm.

BUG=b:166157708
TEST=video_decode_accelerator_tests with 856x480 video

Change-Id: Idb9fb689a56639dbc73753d453e7e6e5daeb6700
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2402146
Tested-by: Fritz Koenig <frkoenig@chromium.org>
Commit-Queue: Fritz Koenig <frkoenig@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
21 months ago[automerger skipped] Merge Android R am: 25ff66748d -s ours am: bdb6e78844 -s ours...
Xin Li [Fri, 11 Sep 2020 03:59:05 +0000 (03:59 +0000)]
[automerger skipped] Merge Android R am: 25ff66748d -s ours am: bdb6e78844 -s ours am: 49b83e0635 -s ours am: b51c5e0302 -s ours

am skip reason: Change-Id I8d7971fe52ff43b175a9821c97a6f3c6d380a01d with SHA-1 cf0ceff91e is in history

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1422312

Change-Id: I76e713ef9e5465be5f9cc580a172329053eb03a1

21 months ago[automerger skipped] Merge Android R am: 25ff66748d -s ours am: bdb6e78844 -s ours...
Xin Li [Fri, 11 Sep 2020 03:33:34 +0000 (03:33 +0000)]
[automerger skipped] Merge Android R am: 25ff66748d -s ours am: bdb6e78844 -s ours am: 49b83e0635 -s ours

am skip reason: Change-Id I8d7971fe52ff43b175a9821c97a6f3c6d380a01d with SHA-1 cf0ceff91e is in history

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1422312

Change-Id: Ib78b87eaf49bac759670fa2beae2e5c26f219484

21 months ago[automerger skipped] Merge Android R am: 25ff66748d -s ours am: bdb6e78844 -s ours
Xin Li [Fri, 11 Sep 2020 02:02:43 +0000 (02:02 +0000)]
[automerger skipped] Merge Android R am: 25ff66748d -s ours am: bdb6e78844 -s ours

am skip reason: Change-Id I8d7971fe52ff43b175a9821c97a6f3c6d380a01d with SHA-1 cf0ceff91e is in history

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1422312

Change-Id: I3ed8261d785984fc5f8f4f2916f232cb12e0e677

21 months ago[automerger skipped] Merge Android R am: 25ff66748d -s ours
Xin Li [Fri, 11 Sep 2020 00:40:16 +0000 (00:40 +0000)]
[automerger skipped] Merge Android R am: 25ff66748d -s ours

am skip reason: Change-Id I8d7971fe52ff43b175a9821c97a6f3c6d380a01d with SHA-1 cf0ceff91e is in history

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1422312

Change-Id: Icd0bcaa5dc0cdc76ee41e699bd4e62b98217e726

21 months agominigbm: remove gbm_bo_map(..) discrepancy
Gurchetan Singh [Tue, 24 Mar 2020 18:05:03 +0000 (11:05 -0700)]
minigbm: remove gbm_bo_map(..) discrepancy

We can now use the upstream gbm_bo_map(..) prototype.

BUG=b:145747350
TEST=compile

Change-Id: Ic3e25ebad903da29be4eb085e5a46bf8109de63f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2118475
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: David Riley <davidriley@chromium.org>
Reviewed-by: Lepton Wu <lepton@chromium.org>
21 months agomsm: Clear all sw use flags for UBWC combinations
Kristian H. Kristensen [Tue, 8 Sep 2020 03:28:23 +0000 (03:28 +0000)]
msm: Clear all sw use flags for UBWC combinations

Whether rarely or often, we can't support any kind of sw access if the
buffer is UBWC compressed.  We could potentially add support for
blitting in and out of the buffer, but for now just allocate linear.

BUG=b:167934919
TEST=Buffers allocated with any SW access use flag don't get UBWC

Change-Id: Ic9c1d86a124e24b7bc4aa259c62d8c4882c487b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2397084
Tested-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Kristian H. Kristensen <hoegsberg@chromium.org>

21 months agoMerge Android R
Xin Li [Tue, 8 Sep 2020 23:54:40 +0000 (16:54 -0700)]
Merge Android R

Bug: 168057903
Merged-In: I8d7971fe52ff43b175a9821c97a6f3c6d380a01d
Change-Id: Ifc3303bb699d1383828b9f323990bcbf301cffcc

21 months agominigbm: add O_CLOEXEC for the opened fd
Boleyn Su [Fri, 21 Aug 2020 03:31:49 +0000 (12:31 +0900)]
minigbm: add O_CLOEXEC for the opened fd

BUG=b:162475183
TEST=None

Change-Id: Ic7debb48874ad90509954f7138e33a9d88da4898
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2368693
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Lepton Wu <lepton@chromium.org>
Tested-by: Boleyn Su <boleynsu@chromium.org>
Auto-Submit: Boleyn Su <boleynsu@chromium.org>
Commit-Queue: Boleyn Su <boleynsu@chromium.org>

21 months ago[automerger skipped] Merge "Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709...
Xin Li [Tue, 1 Sep 2020 22:10:01 +0000 (22:10 +0000)]
[automerger skipped] Merge "Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)" into stage-aosp-master am: 27adcfbd75 -s ours am: 041cb9f1a7 -s ours am: bf1a4ccb86 -s ours

am skip reason: Change-Id Id6c11d1f63223260f5e71ea00b6499164c019abd with SHA-1 0709f569be is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/external/minigbm/+/12485062

Change-Id: Ic0a30fd4db0eec4df3976cf99a7deb509b136d0e

21 months ago[automerger skipped] Merge "Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709...
Xin Li [Tue, 1 Sep 2020 21:46:45 +0000 (21:46 +0000)]
[automerger skipped] Merge "Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)" into stage-aosp-master am: 27adcfbd75 -s ours am: 041cb9f1a7 -s ours

am skip reason: Change-Id Id6c11d1f63223260f5e71ea00b6499164c019abd with SHA-1 0709f569be is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/external/minigbm/+/12485062

Change-Id: I1179aebd2cc0df472bdfe99fac272374ff55c660

21 months ago[automerger skipped] Merge "Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709...
Xin Li [Tue, 1 Sep 2020 20:37:11 +0000 (20:37 +0000)]
[automerger skipped] Merge "Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)" into stage-aosp-master am: 27adcfbd75 -s ours

am skip reason: Change-Id Id6c11d1f63223260f5e71ea00b6499164c019abd with SHA-1 0709f569be is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/external/minigbm/+/12485062

Change-Id: Ibad2d5483c64a841373c09557e919a016697f106

21 months agoMerge "Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)" into stage-aosp...
Xin Li [Tue, 1 Sep 2020 20:03:53 +0000 (20:03 +0000)]
Merge "Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)" into stage-aosp-master

21 months agoANDROID: Add target/device support am: 8884508fa6 am: cf0ceff91e am: 96f63775f7 am...
Alistair Delva [Tue, 1 Sep 2020 01:27:58 +0000 (01:27 +0000)]
ANDROID: Add target/device support am: 8884508fa6 am: cf0ceff91e am: 96f63775f7 am: b6a4b4a154

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1414810

Change-Id: I5ae77c6d8aa723b1c2b1c1f3090e5978a703c34d

21 months agoANDROID: Add target/device support am: 8884508fa6 am: cf0ceff91e am: 96f63775f7
Alistair Delva [Tue, 1 Sep 2020 00:59:16 +0000 (00:59 +0000)]
ANDROID: Add target/device support am: 8884508fa6 am: cf0ceff91e am: 96f63775f7

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1414810

Change-Id: I9c732f412fd4a470d1f7e2449553ad1054ba61f1

21 months agoANDROID: Add target/device support am: 8884508fa6 am: cf0ceff91e
Alistair Delva [Tue, 1 Sep 2020 00:22:49 +0000 (00:22 +0000)]
ANDROID: Add target/device support am: 8884508fa6 am: cf0ceff91e

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1414810

Change-Id: I3f1f78dcdb706c93208e1ff6446b2cafebfb0e7d

21 months agoANDROID: Add target/device support am: 8884508fa6
Alistair Delva [Tue, 1 Sep 2020 00:09:17 +0000 (00:09 +0000)]
ANDROID: Add target/device support am: 8884508fa6

Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/1414810

Change-Id: I8d7971fe52ff43b175a9821c97a6f3c6d380a01d

22 months agoANDROID: Add target/device support
Alistair Delva [Fri, 28 Aug 2020 20:42:24 +0000 (13:42 -0700)]
ANDROID: Add target/device support

Support building libgbm.so for an Android guest.

Change-Id: I1f9d729f847ad9bdd3c8746681e0df00c2107419

22 months agominigbm: virtgpu: add resource create blob function
Gurchetan Singh [Sat, 14 Sep 2019 00:49:20 +0000 (17:49 -0700)]
minigbm: virtgpu: add resource create blob function

Some SW intensive apps could benefit from this.

This should decrease power consumption when playing a Youtube
1080p60fps video by 10%.

BUG=chromium:924405
TEST=mmap_test

Change-Id: I80bb08a95b7387eb8af58e1f0d30beb695fc3e74
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1804914
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Lingfeng Yang <lfy@google.com>
Reviewed-by: Jason Macnak <natsu@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>