OSDN Git Service
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
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
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
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
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
Jason Macnak [Mon, 31 Aug 2020 16:50:17 +0000 (16:50 +0000)]
cros_gralloc: map custom drm fourcc back to standard fourcc am:
aa65a6a67c
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/minigbm/+/
12488884
Change-Id: Ie724925b276997cb6f31a84d5bc9271f32a46918
Alistair Delva [Sat, 29 Aug 2020 18:35:41 +0000 (18:35 +0000)]
Avoid pulling libdrm.so from the AOSP host build am:
70742d1caa am:
17c0ca3e53 am:
410c2cdb08 am:
3e671785bc
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/
1414808
Change-Id: Iba98830dc6a5dc2cc1a27a0140c938a2aa7c2516
Alistair Delva [Sat, 29 Aug 2020 17:58:06 +0000 (17:58 +0000)]
Avoid pulling libdrm.so from the AOSP host build am:
70742d1caa am:
17c0ca3e53 am:
410c2cdb08
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/
1414808
Change-Id: I9dad059dd79f0e42b16604b25f14480bdc2ea884
Jason Macnak [Sat, 25 Jul 2020 13:02:22 +0000 (06:02 -0700)]
cros_gralloc: map custom drm fourcc back to standard fourcc
Minigbm uses a custom fourcc DRM_FORMAT_YVU420_ANDROID to
specify a DRM_FORMAT_YVU420 format with the extra Android
specific alignment requirement. Mapper should map this
custom code back into the standard one for metadata get().
Bug: b/
146515640
Test: launch_cvd, open youtube video, observe no hwc warning
Change-Id: Id9ac2bb233837b6c7aa093eddbea81da0bdf3c1b
Alistair Delva [Sat, 29 Aug 2020 17:42:30 +0000 (17:42 +0000)]
Avoid pulling libdrm.so from the AOSP host build am:
70742d1caa am:
17c0ca3e53
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/
1414808
Change-Id: I253dfb4faa1b38d0e2bb5b16bb1b60f86243008e
Alistair Delva [Sat, 29 Aug 2020 17:26:29 +0000 (17:26 +0000)]
Avoid pulling libdrm.so from the AOSP host build am:
70742d1caa
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/
1414808
Change-Id: I243a273721b8a45beacfb280bcd89ec39911c64f
Alistair Delva [Fri, 28 Aug 2020 17:28:11 +0000 (10:28 -0700)]
Avoid pulling libdrm.so from the AOSP host build
When binaries depending on minigbm/gbm on the host are linked to it, it
will cause libdrm.so to be taken from the host build done by the Android
build system (i.e. out/host/linux-x86/lib64/libdrm.so), but usually this
library is used with binary GPU drivers that are built out-of-tree, and
they will use the libdrm.so from the host system
(i.e. /usr/lib/x86_64-linux-gnu/libdrm.so.2). As libdrm uses globals to
store things like the ctx hashtable, only one libdrm.so can be loaded
into memory at the same time, or weird crashes in drmClose() and other
drm API functions will occur.
This workaround is only applied to the host "libgbm.so" target, which is
only used by crosvm currently.
Change-Id: Iedcb65d9a031220d8c095fd54a1b967647eb537c
Alistair Delva [Mon, 27 Jul 2020 22:13:48 +0000 (22:13 +0000)]
[automerger skipped] Add host build of libgbm.so for crosvm am:
9413c105e4 am:
30d997f31d -s ours am:
a616766046 -s ours am:
b62c0672be -s ours
am skip reason: Change-Id I30699c38f958ee03a1b3f8495ecc42e9779f8332 with SHA-1
2c88e76494 is in history
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/
1368796
Change-Id: I3d4453b503d68e39bf80c08955338222098eb131
Alistair Delva [Mon, 27 Jul 2020 22:01:20 +0000 (22:01 +0000)]
[automerger skipped] Add host build of libgbm.so for crosvm am:
9413c105e4 am:
30d997f31d -s ours am:
a616766046 -s ours
am skip reason: Change-Id I30699c38f958ee03a1b3f8495ecc42e9779f8332 with SHA-1
2c88e76494 is in history
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/
1368796
Change-Id: I534acc55a351de6fe94194de9dba4f55ba43558f
Alistair Delva [Mon, 27 Jul 2020 21:48:58 +0000 (21:48 +0000)]
[automerger skipped] Add host build of libgbm.so for crosvm am:
9413c105e4 am:
30d997f31d -s ours
am skip reason: Change-Id I30699c38f958ee03a1b3f8495ecc42e9779f8332 with SHA-1
2c88e76494 is in history
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/
1368796
Change-Id: I9abff193d05dc46d109c08a468a97ff71a212ece
Alistair Delva [Mon, 27 Jul 2020 21:39:53 +0000 (21:39 +0000)]
Add host build of libgbm.so for crosvm am:
9413c105e4
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/
1368796
Change-Id: Ia6539242a93745b32b8c17c547bafcebac5b4254
Alistair Delva [Mon, 27 Jul 2020 20:19:29 +0000 (20:19 +0000)]
Add host build of libgbm.so for crosvm am:
2c88e76494 am:
d290f4d01e
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/minigbm/+/
12237645
Change-Id: I11f78d5786bb939c8010864961eeb6a6231ee73f
Alistair Delva [Mon, 27 Jul 2020 20:07:27 +0000 (20:07 +0000)]
Add host build of libgbm.so for crosvm am:
2c88e76494
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/minigbm/+/
12237645
Change-Id: If51f20547b6b73071902ce9c4555424a717bfa3b
Alistair Delva [Tue, 21 Jul 2020 19:04:48 +0000 (12:04 -0700)]
Add host build of libgbm.so for crosvm
Build minigbm for the host.
Bug:
161831173
Change-Id: I30699c38f958ee03a1b3f8495ecc42e9779f8332
Merged-In: I30699c38f958ee03a1b3f8495ecc42e9779f8332
Alistair Delva [Tue, 21 Jul 2020 19:04:48 +0000 (12:04 -0700)]
Add host build of libgbm.so for crosvm
Build minigbm for the host.
Bug:
161831173
Change-Id: I30699c38f958ee03a1b3f8495ecc42e9779f8332
Jason Macnak [Mon, 13 Jul 2020 16:50:28 +0000 (16:50 +0000)]
[automerger skipped] cros_gralloc: makes flex format use RGBX am:
cbd768f2b3 am:
9f909ad34e -s ours am:
0709f569be -s ours am:
254738cd1b -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/+/
1359582
Change-Id: I937502e96e8688c032b6a2ed8846e404f6c215f8
Jason Macnak [Mon, 13 Jul 2020 16:31:59 +0000 (16:31 +0000)]
[automerger skipped] cros_gralloc: makes flex format use RGBX am:
cbd768f2b3 am:
9f909ad34e -s ours am:
0709f569be -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/+/
1359582
Change-Id: Ifd471b1e5e0422d16aecd56df0fcb0f6f92ef4a9
Jason Macnak [Mon, 13 Jul 2020 16:14:45 +0000 (16:14 +0000)]
[automerger skipped] cros_gralloc: makes flex format use RGBX am:
cbd768f2b3 am:
9f909ad34e -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/+/
1359582
Change-Id: Id6c11d1f63223260f5e71ea00b6499164c019abd
Jason Macnak [Mon, 13 Jul 2020 16:02:58 +0000 (16:02 +0000)]
cros_gralloc: makes flex format use RGBX am:
cbd768f2b3
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/
1359582
Change-Id: Ie13c165594322fea07b6c946a5b569a14ea81208
Jason Macnak [Thu, 9 Jul 2020 20:39:18 +0000 (13:39 -0700)]
cros_gralloc: makes flex format use RGBX
Cuttlefish's current camera hal and emulated camera implementation
assumes that HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED is RGBA.
Note: this will be Android specific change and will not upstream
and this change should be reverted when the new hal and emulated
camera implementation lands.
Bug: b/
157902551
Test: cts -m CtsCameraTestCases
Change-Id: Ifb4f37a66e1bc012790b45c7c10d491c039bd58c
Merged-In: I27f020b4f661890bcc2817deb09ffb9af1c76f1b
Jason Macnak [Wed, 8 Jul 2020 23:45:20 +0000 (23:45 +0000)]
[automerger skipped] cros_gralloc: Fix logging statement format specifier am:
b26e66e866 am:
2530ad5e17 -s ours am:
7332e7e350 -s ours am:
ed2bc80b68 -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/+/
1358924
Change-Id: Idbe8f3534b8e61f4aa55941eead76bebc02d9428
Jason Macnak [Wed, 8 Jul 2020 23:33:55 +0000 (23:33 +0000)]
[automerger skipped] cros_gralloc: Fix logging statement format specifier am:
b26e66e866 am:
2530ad5e17 -s ours am:
7332e7e350 -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/+/
1358924
Change-Id: Id3b31e6687787714054090115d1a14a7b4871257
Jason Macnak [Wed, 8 Jul 2020 23:26:48 +0000 (23:26 +0000)]
[automerger skipped] cros_gralloc: Fix logging statement format specifier am:
b26e66e866 am:
2530ad5e17 -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/+/
1358924
Change-Id: Ie812cafe90f864ccbfa3ceb555953c8e28c94465
Jason Macnak [Wed, 8 Jul 2020 23:15:05 +0000 (23:15 +0000)]
cros_gralloc: Fix logging statement format specifier am:
b26e66e866
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/
1358924
Change-Id: Ifeb5ed4f935d3c3e432290dfec01d5e52aec4ce5
Jason Macnak [Wed, 8 Jul 2020 21:37:28 +0000 (14:37 -0700)]
cros_gralloc: Fix logging statement format specifier
Bug: b/
160813623
Test: lunch aosp_x86_64-eng && m
Change-Id: I8101c2f99925d877d14ef8f4cce372e73288bc22
Merged-In: I27f020b4f661890bcc2817deb09ffb9af1c76f1b
Jason Macnak [Wed, 8 Jul 2020 21:55:31 +0000 (21:55 +0000)]
[automerger skipped] cros_gralloc: set install path in Android.bp am:
410021fde7 am:
b63e9ba9e0 -s ours am:
5adb60eebf -s ours am:
dfd8212d3c -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/+/
1358644
Change-Id: Ie9d84de58c741c73c2b036fb80bea5e296fa03e2
Jason Macnak [Wed, 8 Jul 2020 21:55:29 +0000 (21:55 +0000)]
[automerger skipped] Merge 'aosp/upstream-master' into 'aosp/master' am:
b337d757c9 am:
f034387461 -s ours am:
cb6d35f648 -s ours am:
21cbafd44c -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/+/
1358643
Change-Id: Ia1ca0c0984542442b287a5c3eb544fd58182aa2c
Jason Macnak [Wed, 8 Jul 2020 21:47:47 +0000 (21:47 +0000)]
[automerger skipped] cros_gralloc: set install path in Android.bp am:
410021fde7 am:
b63e9ba9e0 -s ours am:
5adb60eebf -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/+/
1358644
Change-Id: Ica2a30f04529e9d2dcc3aeea506c15ca63e7ee3f
Jason Macnak [Wed, 8 Jul 2020 21:47:45 +0000 (21:47 +0000)]
[automerger skipped] Merge 'aosp/upstream-master' into 'aosp/master' am:
b337d757c9 am:
f034387461 -s ours am:
cb6d35f648 -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/+/
1358643
Change-Id: Idd351d88d44f174445d5faba2adc393ddf4fe4a0
Jason Macnak [Wed, 8 Jul 2020 21:38:00 +0000 (21:38 +0000)]
[automerger skipped] cros_gralloc: set install path in Android.bp am:
410021fde7 am:
b63e9ba9e0 -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/+/
1358644
Change-Id: I0f2532d0329a36de10d66e4ed8c8b44d7873d249
Jason Macnak [Wed, 8 Jul 2020 21:37:58 +0000 (21:37 +0000)]
[automerger skipped] Merge 'aosp/upstream-master' into 'aosp/master' am:
b337d757c9 am:
f034387461 -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/+/
1358643
Change-Id: I1bf99b0208d389681cf0d88b12dd62003e49507f
Jason Macnak [Wed, 8 Jul 2020 21:20:01 +0000 (21:20 +0000)]
cros_gralloc: set install path in Android.bp am:
410021fde7
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/
1358644
Change-Id: I55adc2b5857f696c7ac6af0f38c9fa09215866d1
Jason Macnak [Wed, 8 Jul 2020 21:19:59 +0000 (21:19 +0000)]
Merge 'aosp/upstream-master' into 'aosp/master' am:
b337d757c9
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/
1358643
Change-Id: I8cd59f945e4ce5553510fc0bb14bf5d857ca06b9
Jason Macnak [Wed, 8 Jul 2020 19:05:51 +0000 (12:05 -0700)]
cros_gralloc: set install path in Android.bp
Upstream change in crrev.com/c/
2288141
Bug: b/
157902551
Test: run Cuttlefish w/ Minigbm Gralloc0
Merged-In: I27f020b4f661890bcc2817deb09ffb9af1c76f1b
Change-Id: I92bf42f1f7ff82c0c6697f131b01557a5fc94767
Jason Macnak [Wed, 8 Jul 2020 19:03:20 +0000 (12:03 -0700)]
Merge 'aosp/upstream-master' into 'aosp/master'
... to update Minigbm for Cuttlefish to support Gralloc3
on Minigbm.
Bug: b/
157902551
Test: m && launch_cvd --gpu_mode=gfxstream
Test: m && launch_cvd --gpu_mode=drm_virgl
Merged-In: I27f020b4f661890bcc2817deb09ffb9af1c76f1b
Change-Id: Ic96add709a99005ff7aa6c7d886e3069b827e4bc
Jason Macnak [Fri, 24 Jan 2020 23:05:57 +0000 (15:05 -0800)]
cros_gralloc: Adds gralloc 3.0 support
Implements the allocator 3.0 and mapper 3.0 interfaces
which:
- Implements HIDL interface directly (older versions
are wrapped in a passthrough HIDL interface)
- Adds isSupported() to allow checking for format and
usage combination support before allocating.
Adds emulated multi-planar buffer support to virtio
backend for non gbm enabled hosts.
Updates cros_gralloc_handle to use uint64_t instead of
two uint32_t for some members.
Updates cros_gralloc_handle to have a single format
modifier.
Replaces Android makefiles with Android bp files.
BUG=b:
146515640
TEST=run Cuttlefish w/ gralloc3 and run CTS tests
Change-Id: I43ed9788a2413201bddce17ffb69b76006ef39fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
2273554
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Jason Macnak <natsu@google.com>
Commit-Queue: Jason Macnak <natsu@google.com>
Ikshwaku Chauhan [Mon, 29 Jun 2020 11:14:57 +0000 (16:44 +0530)]
minigbm:amdgpu: align height to 16 bit for video buffers
Currently, allocator used by chrome aligns the height of Encoder/Decoder
buffer while allocator used by android(gralloc/minigbm) doesn't provide
any aligment.Aligned the height for video buffers in minigbm.
BUG=b:
153130069
TEST=cheets_CTS_P.x86.CtsVideoTestCases
Signed-off-by: Ikshwaku Chauhan <ikshwaku.chauhan@amd.corp-partner.google.com>
Change-Id: I62a883ca55c07674fab7981af0974277fbd2c5b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
2273037
Reviewed-by: Bas Nieuwenhuizen <basni@chromium.org>
Reviewed-by: Drew Davenport <ddavenport@chromium.org>
Tested-by: Drew Davenport <ddavenport@chromium.org>
Commit-Queue: Drew Davenport <ddavenport@chromium.org>
Bas Nieuwenhuizen [Thu, 4 Jun 2020 21:11:27 +0000 (23:11 +0200)]
Revert "Revert "amdgpu: Set USWC for SCANOUT images.""
This reverts commit
91d36976aa84abde87f0f56d235d57042ca3ea81.i
The previous changes should fix the mapping performance with USWC
memory.
original change:
amdgpu: Set USWC for SCANOUT images.
This is necessary for scanout from GTT. Without it, the kernel will
migrate it to the carveout. For large resolutions this would not be
feasible due to small carveout sizes and hence it is important that
we alloc scanout from GTT.
The original patch was on top of
4eebcea "amdgpu: make AMDGPU_GEM_CREATE_CPU_GTT_USWC flag default"
which set USWC unconditionally, but has since been reverted. The
main failure reason is being addressed in mesa-amd. This patch also
still disables USWC if we can and the image will be read often on
the CPU, to avoid staging textures during memory mapping.
TEST=Run android.hardware.camera2.cts.RecordingTest#testVideoPreviewSurfaceSharing on Grunt.
BUG=b:
152378755
Change-Id: Ice0041de6676c057a2659986b962c2d54833e928
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
2246025
Tested-by: Bas Nieuwenhuizen <basni@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Bas Nieuwenhuizen <basni@chromium.org>
Bas Nieuwenhuizen [Sat, 20 Jun 2020 01:50:34 +0000 (03:50 +0200)]
amdgpu: Add SDMA copy support.
For SCANOUT images we need to use USWC memory. However USWC
memory is very slow to read from (~25 MiB/second).
At the same time for video decoding there are some images
that are allocated with SCANOUT but at the same time frequently
accessed from the CPU. Just mapping these is going to result
in non-satisfactory performance, so this patch adds a DMA step
to copy it to memory that is faster to acces from the CPU.
Benchmarked on Grunt with
android.hardware.camera2.cts.RecordingTest#testVideoPreviewSurfaceSharing
The time that an image (~500 KiB) is kept mapped for processing,
including the time for mapping and unmapping:
plain GTT (cachaeable): 1.5-2 ms
USWC: 45-50 ms
USWC w/ memcpy: 20-30 ms
USWC w/ SDMA copy: 3.5-5.5 ms
We can clearly see that the Android video processing code only gets
a throughput of ~10 MiB/s with USWC memory. memcpy is slightly more
efficient by getting 20-30 MiB/s, but neither of these are suitable
for 30+ fps video.
Furthermore, with SDMA copy, the timing is roughly as follows:
map:
- Allocate plain GTT BO: ~400-800 us
- map src & dst BO into GPU VM: ~25 us
- submit SDMA copy: ~80 us
- wait till SDMA copy finishes: ~400 us
- unmap src & dst BO from GPU: ~15 us
- map dst BO into CPU: ~30 us
unmap:
- unmapping dst BO from CPU: ~30 us
- Copy not benchmarked (avoided for RO map)
- delete BO: ~100 us
ideas for further improvement:
- BO cache
- rely on implicit sync and don't wait for the copy during
unmapping.
Alternatives that have been rejected:
- Use radeonsi + DRI interface: each plane gets mapped into
its own BO, which is an issue for gralloc.
- more persistently mapping each BO into GPU VM: this needs
proper address space management which adds complexity.
librm_amdgpu can do it for us but brings its own can of worms
with dedup of the drm fd. (which makes e.g. implicit sync not
work with any radeonsi instances in the same process)
- Use SDMA instead of DRI/Radeonsi for more images. This is an
issue because SDMA for images is a whole mess with lots of
corner cases and lots of changes per generation. Furthermore,
it wouldn't work for DCC compressed images.
TEST=Run android.hardware.camera2.cts.RecordingTest#testVideoPreviewSurfaceSharing on Grunt.
BUG=b:
152378755
Change-Id: I8f5e00ff4b6d9e31f78fd4de7eb62d0d3aa66438
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
2256228
Tested-by: Bas Nieuwenhuizen <basni@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Bas Nieuwenhuizen <basni@chromium.org>
Hirokazu Honda [Tue, 23 Jun 2020 08:52:20 +0000 (17:52 +0900)]
Modify NV12 allowed buffer usages for camera capture use case
We use SCANOUT_VEA_READ_CAMERA_AND_CPU_READ_WRITE for camera
capture use scenario in Chrome. Therefore, NV12 format must be
allowed for all those usage masks. This CL modifies the usages on
all platforms.
BUG=chromium:982201
TEST=video.EncodeAccel.vp8_720p_i420 on eve
Change-Id: I7880e64049f3bbf9dd1c177619e41362baf641f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
2240995
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Matthias Springer [Mon, 22 Jun 2020 01:05:22 +0000 (10:05 +0900)]
minigbm: virtio-gpu: Remove offset log message
When running the Zoom Android client, "Non-zero transfer offset" was
printed in the logs. We now know for sure that we encounter this case in
the wild, thus removing the log message.
BUG=none
TEST=build minigbm manually
Change-Id: I1a536df50996e5218548fb097543566affa9af3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
2255931
Tested-by: Matthias Springer <springerm@chromium.org>
Auto-Submit: Matthias Springer <springerm@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Matthias Springer <springerm@chromium.org>
Hirokazu Honda [Tue, 16 Jun 2020 06:28:56 +0000 (15:28 +0900)]
Remove HW_VIDEO_ENCODER usage of YVU420
minigbm has allowed HW_VIDEO_ENCODER usage to YVU420 so that
chrome can allocate YVU420 with HW_VIDEO_ENCODER. But this
format is no longer allocated by chrome with the usage. Let's
delete the code.
BUG=chromium:982201
TEST=None
Change-Id: Ia6bbc24e7782e3e73c2eb00c00127af212ddf486
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
2245967
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Auto-Submit: Hirokazu Honda <hiroh@chromium.org>
David Stevens [Mon, 15 Jun 2020 04:48:48 +0000 (13:48 +0900)]
minigbm: add encoder/decoder blob combination
ARCVM sets encoder/decoder usage on the blob output/input buffers, so
that virtio_gpu knows to perform transfers from/to the host where
appropriate. Recently, virtio_gpu started passing all bind flags to the
host, instead of reducing them in the guest. These factors combined
means that the host backends now need to support encoder/decoder usage
with R8 format.
Test: manually verify ARCVM YouTube
Bug: b:
158957350
Change-Id: I58bf657496647f8002c693d17a1186f4cf527b01
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
2245540
Tested-by: David Stevens <stevensd@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
Automerger Merge Worker [Thu, 11 Jun 2020 22:43:57 +0000 (22:43 +0000)]
Merge "gralloc: Use YVU420_ANDROID for YCbCr flex am:
06d77b4e7d am:
eefde98531 am:
03f2dd1f20" into rvc-qpr-dev-plus-aosp
Jason Macnak [Thu, 11 Jun 2020 22:43:53 +0000 (22:43 +0000)]
gralloc: Use YVU420_ANDROID for YCbCr flex am:
06d77b4e7d am:
eefde98531 am:
03f2dd1f20
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/minigbm/+/
11817987
Change-Id: I87ad89312b91cb19850ebca7ebde820d2ccf7c6d
Jason Macnak [Thu, 11 Jun 2020 22:43:50 +0000 (22:43 +0000)]
gralloc: Use YVU420_ANDROID for YCbCr flex am:
06d77b4e7d am:
a07fb5901a am:
06fb002d01
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/minigbm/+/
11817987
Change-Id: I91a0bd340b1709a5514c76b9600c994fb869300e
Jason Macnak [Thu, 11 Jun 2020 22:43:40 +0000 (22:43 +0000)]
gralloc: Use YVU420_ANDROID for YCbCr flex am:
06d77b4e7d am:
a07fb5901a am:
c7db69e435
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/minigbm/+/
11817987
Change-Id: I5b0f0087c7f77b77bd46c3fd0f14e46fdcd1dd4d
Jason Macnak [Thu, 11 Jun 2020 22:32:44 +0000 (22:32 +0000)]
gralloc: Use YVU420_ANDROID for YCbCr flex am:
06d77b4e7d am:
eefde98531
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/minigbm/+/
11817987
Change-Id: I6fe35969d638395aef1e5e613534ff6661993036
Jason Macnak [Thu, 11 Jun 2020 22:32:34 +0000 (22:32 +0000)]
gralloc: Use YVU420_ANDROID for YCbCr flex am:
06d77b4e7d am:
a07fb5901a
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/minigbm/+/
11817987
Change-Id: I7455578ef9594a643ef2b5d304687cc73ddadd3c
Jason Macnak [Thu, 11 Jun 2020 22:32:24 +0000 (22:32 +0000)]
gralloc: Use YVU420_ANDROID for YCbCr flex am:
06d77b4e7d am:
a07fb5901a
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/minigbm/+/
11817987
Change-Id: Ic2e66c7ce27fc07a3e202d4e31e615823a4856ca
Jason Macnak [Thu, 11 Jun 2020 22:20:45 +0000 (22:20 +0000)]
gralloc: Use YVU420_ANDROID for YCbCr flex am:
06d77b4e7d
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/minigbm/+/
11817987
Change-Id: I5cba8e31b5ff2636bcf7b0579531d787b585f1b8
Jason Macnak [Thu, 11 Jun 2020 22:20:34 +0000 (22:20 +0000)]
gralloc: Use YVU420_ANDROID for YCbCr flex am:
06d77b4e7d
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/minigbm/+/
11817987
Change-Id: Iea468f3f71e885dd2826188f3b09c07d34b5c6f0
Jason Macnak [Thu, 11 Jun 2020 05:39:06 +0000 (22:39 -0700)]
gralloc: Use YVU420_ANDROID for YCbCr flex
... to fix camera preview.
Bug: b/
146515640
Bug: b/
158703419
Test: manually open default camera app
Test: manually open TestingCamera app
Change-Id: Ice550649c5fa125cc09394bd17ad8a5f9c4ed2fa
David Staessens [Thu, 28 May 2020 06:47:15 +0000 (15:47 +0900)]
minigbm: virtio_gpu: add BO_USE_HW_VIDEO_ENCODER usage to R8 format.
This combination will be used by ARCVM for video encoder bitstream
blobs. Minigbm uses the usage flags to determine whether it needs to
transfer data to/from the host, and whether that transfer needs to be
synchronous. BO_USE_HW_VIDEO_ENCODER needs to be set on the encoder's
output buffers so that minigbm knows that the host modifies the buffer,
so that minigbm transfers the data to the guest.
BUG=b:
143570994
TEST=emerge-$BOARD minigbm arc-cros-gralloc
Change-Id: I05eb35d7b68092138c337c0e7fc43f60dd1bc32d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
2217833
Tested-by: David Staessens <dstaessens@chromium.org>
Commit-Queue: David Staessens <dstaessens@chromium.org>
Reviewed-by: David Stevens <stevensd@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
David Stevens [Fri, 15 May 2020 05:15:35 +0000 (14:15 +0900)]
minigbm: virtio_gpu: use expanded bind flags
Pass more bind flags from minigbm to virglrenderer. This is necessary to
handle cases where special alignment/padding is required for certain
use cases. For example, jpeg camera recording on mediatek requires extra
padding. Minigbm adds this due to BO_USE_HW_VIDEO_ENCODER, so that flag
must be properly passed from virtio_gpu to host minigbm.
BUG: b:
151197279
TEST: verify that ArcCameraFpsTest recording works on kukui
Change-Id: Ie2871b37ca468930abe41738ed0ee4fad0f4cf1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
2203164
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
Tested-by: David Stevens <stevensd@chromium.org>
Douglas Anderson [Tue, 19 May 2020 17:12:14 +0000 (10:12 -0700)]
minigbm/msm: Add DRM_FORMAT_FLEX_IMPLEMENTATION_DEFINED for msm
It seems to be tradition to copy a bit of code into the
resolve_format() function for everyone. The msm driver isn't one to
break from tradition, so we'll adopt this code fragment too.
BUG=b:
154782445
TEST=Hangout
Change-Id: I9e8eaf0c5a8485afea82437fd7249e24e5509b5e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
2209178
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Douglas Anderson <dianders@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
Marissa Wall [Fri, 29 May 2020 19:35:25 +0000 (19:35 +0000)]
gralloc4: adds gralloc4 support am:
1476c7ea85 am:
06937a2a57 am:
8d6f95ebf2
Change-Id: Ic01cd8a6c1892fb94004499ee59a3c5d7b177bcf
Marissa Wall [Fri, 29 May 2020 19:34:56 +0000 (19:34 +0000)]
gralloc4: adds gralloc4 support am:
1476c7ea85 am:
b2ccef119d am:
b2c5ebd8d0
Change-Id: I188f2b002ca07506b566be9b634d7ce2eaaf9e67
Marissa Wall [Fri, 29 May 2020 19:34:48 +0000 (19:34 +0000)]
gralloc4: adds gralloc4 support am:
1476c7ea85 am:
06937a2a57 am:
dd7a2f1015
Change-Id: I5dd7a1993e7fc938b24faad0eae7d978b2ad0602
Marissa Wall [Fri, 29 May 2020 19:18:17 +0000 (19:18 +0000)]
gralloc4: adds gralloc4 support am:
1476c7ea85 am:
06937a2a57
Change-Id: Id24f09a864db2b9b78a80aeef5625754849cb3bf
Marissa Wall [Fri, 29 May 2020 19:18:05 +0000 (19:18 +0000)]
gralloc4: adds gralloc4 support am:
1476c7ea85 am:
b2ccef119d
Change-Id: I1597e1e805faeb5fcaaa73d452be28d313a6b23c
Marissa Wall [Fri, 29 May 2020 19:18:01 +0000 (19:18 +0000)]
gralloc4: adds gralloc4 support am:
1476c7ea85 am:
06937a2a57
Change-Id: I5187e4cab429cf54e397e6b8f1b559da2820bf2a
Marissa Wall [Fri, 29 May 2020 19:04:54 +0000 (19:04 +0000)]
gralloc4: adds gralloc4 support am:
1476c7ea85
Change-Id: I4a241480e9f397d4cd9869e72c35ba7a00ae615f
Marissa Wall [Fri, 29 May 2020 19:04:21 +0000 (19:04 +0000)]
gralloc4: adds gralloc4 support am:
1476c7ea85
Change-Id: I88b8fa28c41bd0918740a4775a85477d0bdcf43d
Marissa Wall [Fri, 24 Jan 2020 23:05:57 +0000 (15:05 -0800)]
gralloc4: adds gralloc4 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)
Exempt-From-Owner-Approval: OWNERS.android is not being parsed
Bug: b/
146515640
Test: m && launch_cvd
Test: m && launch_cvd --gpu_mode=drm_virgl
Change-Id: I27f020b4f661890bcc2817deb09ffb9af1c76f1b
Gurchetan Singh [Tue, 5 May 2020 16:18:22 +0000 (09:18 -0700)]
minigbm: virtio_gpu: fill transfer offset
virglrenderer expects info->offset to be non-zero when a subregion
of the buffer is transferred. Interestingly enough, minigbm doesn't
seem to hit that case in my (limited) testing. Fill the transfer
offset and add logging statements. Maybe we could fail on that case
if we don't encounter it in the wild.
BUG=none
TEST=manual testing with betty
Change-Id: I2f3afaff373777fb8808a0bea169be491d864d1a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
2182791
Reviewed-by: David Stevens <stevensd@chromium.org>
Reviewed-by: Chia-I Wu <olv@google.com>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Sean Paul [Tue, 19 May 2020 14:17:07 +0000 (10:17 -0400)]
i915: Avoid using y-tiling on huge buffer objects
<= GEN11 i915 devices can't scan out Y-tiled buffers greater than 4096
in width. This patch downgrades these huge buffers to X-tiled which can
be scanned out.
BUG=b:
151166605
BUG=chromium:988091
TEST=Tested with hatch on Samsung CRG9 5k display
Change-Id: I9f83ab1f9d1f2a254ca0ae7028c138f87be378eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
2207670
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Robert Tarasov <tutankhamen@chromium.org>
Tested-by: Sean Paul <seanpaul@chromium.org>
Auto-Submit: Sean Paul <seanpaul@chromium.org>
Commit-Queue: Sean Paul <seanpaul@chromium.org>
Jason Macnak [Wed, 20 May 2020 07:26:35 +0000 (07:26 +0000)]
Merge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am:
3d804156b0 am:
f34ea21c12 am:
8127a65d6b
Change-Id: I1b5a61e0dfd3bbbc7dfa265fabcac096cdc2ea55
Jason Macnak [Wed, 20 May 2020 07:26:11 +0000 (07:26 +0000)]
Merge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am:
3d804156b0 am:
f34ea21c12 am:
2ce2d6753c
Change-Id: I0bd647f58d8497f69f1745403588589e190ecdb7
Jason Macnak [Wed, 20 May 2020 07:25:48 +0000 (07:25 +0000)]
Merge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am:
3d804156b0 am:
d25b8b1f3d am:
70f006db81
Change-Id: Ic7a65c33c157435fe831f179c94f9fa74bf9b99b
Jason Macnak [Wed, 20 May 2020 07:08:02 +0000 (07:08 +0000)]
Merge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am:
3d804156b0 am:
f34ea21c12
Change-Id: Ie99416047d4de9960f39e4d48711a9e6246ebf69
Jason Macnak [Wed, 20 May 2020 07:07:46 +0000 (07:07 +0000)]
Merge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am:
3d804156b0 am:
d25b8b1f3d
Change-Id: Iae36ceaf58eddbc06086fcbea9d9be370c3f5bdf
Jason Macnak [Wed, 20 May 2020 07:07:42 +0000 (07:07 +0000)]
Merge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am:
3d804156b0 am:
f34ea21c12
Change-Id: I08ba3a68eff2cdf72cb6bb63c86bd3aa87d717df
Jason Macnak [Wed, 20 May 2020 06:34:54 +0000 (06:34 +0000)]
Merge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am:
3d804156b0
Change-Id: Iab41f5c23682063d7c453ccc1f3630f19ad6a4bb
Jason Macnak [Wed, 20 May 2020 06:34:38 +0000 (06:34 +0000)]
Merge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am:
3d804156b0
Change-Id: Ic142c36eefae4c9104fb0952f69328cf3b92e4c2
Jason Macnak [Tue, 19 May 2020 17:01:08 +0000 (17:01 +0000)]
Merge 'aosp/upstream-master' into 'aosp/master' am:
01b2926cf7 am:
702c5561af am:
21229dade5 am:
70ba9a4e61
Change-Id: I9285ff0ec24cf816cbe4cc0429aae2f99307377f
Jason Macnak [Tue, 19 May 2020 16:48:39 +0000 (16:48 +0000)]
Merge 'aosp/upstream-master' into 'aosp/master' am:
01b2926cf7 am:
702c5561af am:
21229dade5
Change-Id: Ifd2df39c17b3acd2b5b7a78296caf088ca750449
Jason Macnak [Tue, 19 May 2020 16:30:02 +0000 (16:30 +0000)]
Merge 'aosp/upstream-master' into 'aosp/master' am:
01b2926cf7 am:
702c5561af
Change-Id: I8db9f66059bba42a1f15dbeb8327e7184360f03f
Jason Macnak [Tue, 19 May 2020 16:20:10 +0000 (16:20 +0000)]
Merge 'aosp/upstream-master' into 'aosp/master' am:
01b2926cf7
Change-Id: Ib55889bc29919cf571406f1e1563fa0c34c7bbf7
Jason Macnak [Tue, 19 May 2020 16:14:33 +0000 (09:14 -0700)]
Merge 'goog/mirror-aosp-master' into 'goog/rvc-dev'
... to merge in http://crrev.com/c/
2171157 which
is needed for Cuttlefish on Minigbm Gralloc 4.
Also adds OWNERS.android to avoid merge conflicts
with upstream OWNERS file.
Bug: b/
146515640
Test: launch_cvd
Test: launch_cvd --gpu_mode=drm_virgl
Change-Id: Ic3b0812c7c35cc99fc96d3bdd3b8f811fb1507f5
Jason Macnak [Mon, 18 May 2020 19:05:53 +0000 (12:05 -0700)]
Merge 'aosp/upstream-master' into 'aosp/master'
... to merge in http://crrev.com/c/
2171157 which
is needed for Cuttlefish on Minigbm Gralloc 4.
Also adds OWNERS.android to avoid merge conflicts
with upstream OWNERS file.
Bug: b/
146515640
Test: launch_cvd
Test: launch_cvd --gpu_mode=drm_virgl
Change-Id: I6dafb814cc47e3193439cc10af74a0099962813e
Jason Macnak [Thu, 14 May 2020 17:57:17 +0000 (10:57 -0700)]
minigbm: Fix cast to avoid null pointer arithmetic
'external/minigbm/cros_gralloc/gralloc0/gralloc0.cc:417:50:
error: arithmetic on a null pointer treated as a cast from
integer to pointer is a GNU extension'
BUG=b:
146515640
TEST=m gralloc.minigbm
Change-Id: I2e86b676224657bdb656a45db4cfa49e84b61c2d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
2202518
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Auto-Submit: Jason Macnak <natsu@google.com>
Tested-by: Jason Macnak <natsu@google.com>
Commit-Queue: Jason Macnak <natsu@google.com>
Chih-Yu Huang [Thu, 7 May 2020 02:54:24 +0000 (11:54 +0900)]
minigbm: virtio_gpu: add BO_USE_HW_VIDEO_DECODER usage to R8 format.
This combination will be used by ARCVM for video decoder bitstream
blobs.
BUG=b:
156442659
TEST=run e2e test with C2VDAComponent
Change-Id: Iad978f659c0a8edf3279b303794c2b840446be31
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
2189994
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: David Stevens <stevensd@chromium.org>
Auto-Submit: Chih-Yu Huang <akahuang@chromium.org>
Commit-Queue: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Automerger Merge Worker [Wed, 6 May 2020 22:45:10 +0000 (22:45 +0000)]
Merge "Merge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am:
3c53003fca am:
273579e674 am:
a3cc144327" into rvc-qpr-dev-plus-aosp
Jason Macnak [Wed, 6 May 2020 22:45:03 +0000 (22:45 +0000)]
Merge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am:
3c53003fca am:
273579e674 am:
a3cc144327
Change-Id: Id36b3a8438ce8a9f7f14c37d7b6ae39b4dc5563c
Jason Macnak [Wed, 6 May 2020 22:45:01 +0000 (22:45 +0000)]
Merge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am:
3c53003fca am:
dc1fc36823 am:
ca10289684
Change-Id: I6e1121f3e89ad5739149e43f47baca9c1385a0d9
Jason Macnak [Wed, 6 May 2020 22:44:19 +0000 (22:44 +0000)]
Merge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am:
3c53003fca am:
273579e674 am:
34eeec0da7
Change-Id: Id8d2cd059bc3313c4d810ef4b25cf9c07122fb1c
Jason Macnak [Wed, 6 May 2020 22:28:45 +0000 (22:28 +0000)]
Merge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am:
3c53003fca am:
dc1fc36823
Change-Id: I8de03f327e9f12bb6bff0481497d93a1dc49b8c3
Jason Macnak [Wed, 6 May 2020 22:28:20 +0000 (22:28 +0000)]
Merge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am:
3c53003fca am:
273579e674
Change-Id: I3110c4b3606b712c3bdadda017af65df6dd2d772
Jason Macnak [Wed, 6 May 2020 22:27:42 +0000 (22:27 +0000)]
Merge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am:
3c53003fca am:
273579e674
Change-Id: I141b20f77f5b87ec2d8003e09e7025e8958d1159
Jason Macnak [Wed, 6 May 2020 22:14:47 +0000 (22:14 +0000)]
Merge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am:
3c53003fca
Change-Id: I07b7abc10695e968b769ffacabecf1cbdb4bb55f
Jason Macnak [Wed, 6 May 2020 22:14:28 +0000 (22:14 +0000)]
Merge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am:
3c53003fca
Change-Id: I66239555d0d08f4b4006f762b29fb94e09cb14d6
Jason Macnak [Wed, 6 May 2020 20:38:12 +0000 (13:38 -0700)]
Merge 'goog/mirror-aosp-master' into 'goog/rvc-dev'
... to cherry-pick aosp/
1252358 into rvc-dev for gralloc 4
changes.
Bug: b/
146515640
Test: m && launch_cvd
Change-Id: I09be0f84945557878ffdf56b2579dba2879d1b50
Jason Macnak [Tue, 28 Apr 2020 18:21:16 +0000 (11:21 -0700)]
Fix YV12 dumb buffer plane sizes
Allocating a 1280x720 YUV420 (YV12) buffer results in
calling the create dumb ioctl with 1280x1080 and results
in a file with size
1384448
(1280 * 1080 =
1382400, ALIGN(
1382400, 4096) =
1384448).
The existing code calls drv_bo_from_format with the
aligned height of 768 which results in oversized planes
totaling a size of
1474560 bytes. This ultimately leads
to segfaults when running past the end of the mapped
file.
Because the dumb buffer iotcl height is computed using
the buffer's unaligned height (bo->meta.height), the
call to drv_bo_from_format should use the unaligned
height as well.
BUG=b:
146515640
TEST=cts android.media.cts.EncodeDecodeTest
Change-Id: I40893cf92caa9d35a89d21a3512604f361822222
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
2171157
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Jason Macnak <natsu@google.com>
Commit-Queue: Jason Macnak <natsu@google.com>
Bas Nieuwenhuizen [Mon, 27 Apr 2020 19:59:29 +0000 (19:59 +0000)]
Revert "amdgpu: Set USWC for SCANOUT images."
This reverts commit
d2c28439190dbf1ab678a4dae5aa23dada7808bd.
Reason for revert: b/
55018529: broke android.hardware.camera2.cts.RecordingTest#testVideoPreviewSurfaceSharing and fixing it is non-trivial
Original change's description:
> amdgpu: Set USWC for SCANOUT images.
>
> This is necessary for scanout from GTT. Without it, the kernel will
> migrate it to the carveout. For large resolutions this would not be
> feasible due to small carveout sizes and hence it is important that
> we alloc scanout from GTT.
>
> The original patch was on top of
>
4eebcea "amdgpu: make AMDGPU_GEM_CREATE_CPU_GTT_USWC flag default"
> which set USWC unconditionally, but has since been reverted. The
> main failure reason is being addressed in mesa-amd. This patch also
> still disables USWC if we can and the image will be read often on
> the CPU, to avoid staging textures during memory mapping.
>
> BUG=b:
153247881
> TEST=Run CtsCameraTestCases on Grunt.
> 4k YouTube video p/b
>
> Change-Id: If6393e60cea5d2a98a052d7c46604e0012de0618
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
2134451
> Tested-by: Bas Nieuwenhuizen <basni@chromium.org>
> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
> Commit-Queue: Bas Nieuwenhuizen <basni@chromium.org>
Bug: b:
153247881
Change-Id: I395798c637ab10a2cf2a2a65a3a418a18feb2310
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
2167399
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Bas Nieuwenhuizen <basni@chromium.org>
Commit-Queue: Bas Nieuwenhuizen <basni@chromium.org>