OSDN Git Service

android-x86/external-minigbm.git
3 years agoMerge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am: 3d804156b0 am: f34ea21c12...
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

3 years agoMerge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am: 3d804156b0 am: d25b8b1f3d...
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

3 years agoMerge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am: 3d804156b0 am: d25b8b1f3d
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

3 years agoMerge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am: 3d804156b0 am: f34ea21c12
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

3 years agoMerge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am: 3d804156b0
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

3 years agoMerge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am: 3d804156b0
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

3 years agoMerge 'aosp/upstream-master' into 'aosp/master' am: 01b2926cf7 am: 702c5561af am...
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

3 years agoMerge 'aosp/upstream-master' into 'aosp/master' am: 01b2926cf7 am: 702c5561af am...
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

3 years agoMerge 'aosp/upstream-master' into 'aosp/master' am: 01b2926cf7 am: 702c5561af
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

3 years agoMerge 'aosp/upstream-master' into 'aosp/master' am: 01b2926cf7
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

3 years agoMerge 'goog/mirror-aosp-master' into 'goog/rvc-dev'
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

4 years agoMerge 'aosp/upstream-master' into 'aosp/master'
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

4 years agominigbm: Fix cast to avoid null pointer arithmetic
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>

4 years agominigbm: virtio_gpu: add BO_USE_HW_VIDEO_DECODER usage to R8 format.
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>
4 years agoMerge "Merge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am: 3c53003fca am: 273579e...
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

4 years agoMerge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am: 3c53003fca am: 273579e674...
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

4 years agoMerge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am: 3c53003fca am: dc1fc36823...
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

4 years agoMerge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am: 3c53003fca am: 273579e674...
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

4 years agoMerge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am: 3c53003fca am: dc1fc36823
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

4 years agoMerge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am: 3c53003fca am: 273579e674
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

4 years agoMerge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am: 3c53003fca am: 273579e674
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

4 years agoMerge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am: 3c53003fca
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

4 years agoMerge 'goog/mirror-aosp-master' into 'goog/rvc-dev' am: 3c53003fca
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

4 years agoMerge 'goog/mirror-aosp-master' into 'goog/rvc-dev'
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

4 years agoFix YV12 dumb buffer plane sizes
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>

4 years agoRevert "amdgpu: Set USWC for SCANOUT images."
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>

4 years agominigbm: synaptics: add texture source format support
Min Zhao [Tue, 14 Apr 2020 22:51:04 +0000 (15:51 -0700)]
minigbm: synaptics: add texture source format support

BUG=b:152384632
TEST=Test by making DUO video call

Change-Id: I2c7920652ab48699a66aedc11f56f44aea9d1c4d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2162517
Tested-by: Daniel Nicoara <dnicoara@chromium.org>
Commit-Queue: Daniel Nicoara <dnicoara@chromium.org>
Reviewed-by: Daniel Nicoara <dnicoara@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
4 years agoamdgpu: Set USWC for SCANOUT images.
Bas Nieuwenhuizen [Mon, 6 Apr 2020 16:50:24 +0000 (18:50 +0200)]
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>

4 years agoSort OWNERS and add ihf.
Ilja H. Friedel [Fri, 17 Apr 2020 22:50:41 +0000 (15:50 -0700)]
Sort OWNERS and add ihf.

BUG=None.
TEST=None.

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

4 years agoRemove i915_FORMAT_MOD_Y_TILED_CCS from modifier_order
Mark Yacoub [Fri, 17 Apr 2020 20:27:48 +0000 (16:27 -0400)]
Remove i915_FORMAT_MOD_Y_TILED_CCS from modifier_order

Revert adding i915_FORMAT_MOD_Y_TILED_CCS to the modifiers options.
Reason for revert: Devices with internal 4K displays aren't able to drive external 4K monitors as well.

(This is a partial revert of crrev.com/c/2044490)

BUG=chromium:979736,b:153731006

Change-Id: I40a0c686ee348f94e25b399b9ab91d4d6d377bc5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2154983
Tested-by: Ilja H. Friedel <ihf@chromium.org>
Tested-by: Mark Yacoub <markyacoub@google.com>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
Reviewed-by: Mark Yacoub <markyacoub@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Auto-Submit: Mark Yacoub <markyacoub@google.com>
Commit-Queue: Ilja H. Friedel <ihf@chromium.org>
Commit-Queue: Matthew Blecker <matthewb@chromium.org>

4 years agoRevert "amdgpu: make AMDGPU_GEM_CREATE_CPU_GTT_USWC flag default"
Jao-ke Chin-Lee [Fri, 10 Apr 2020 00:12:12 +0000 (00:12 +0000)]
Revert "amdgpu: make AMDGPU_GEM_CREATE_CPU_GTT_USWC flag default"

This reverts commit 4eebcea0cc53e385f715730e883963e86761a2f9.

Reason for revert: Broke tast.video.DecodeAccel.*.h264_resolution_switch on grunt

Original change's description:
> amdgpu: make AMDGPU_GEM_CREATE_CPU_GTT_USWC flag default
>
> amdgpu kernel driver requires USWC flag for allowing bo
> allocation in GTT domain, hence enable it by default.
>
> BUG=b:152378755
> TEST=On Dali play 4k YouTube video
>
> Signed-off-by: Shirish S <shirish.s@amd.com>
> Change-Id: Ic509701f683d184d3fb85b7616dc9a7ed467cfe3
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2128147
> Tested-by: Bas Nieuwenhuizen <basni@chromium.org>
> Reviewed-by: Bas Nieuwenhuizen <basni@chromium.org>
> Reviewed-by: Drew Davenport <ddavenport@chromium.org>

Bug: b:152378755
Change-Id: If382833a741faa5462df841cc801e60fd9fca77a
Exempt-From-Owner-Approval: revert.
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2145078
Tested-by: Ilja H. Friedel <ihf@chromium.org>
Reviewed-by: Jao-ke Chin-Lee <jchinlee@google.com>
4 years ago[automerger skipped] DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp into stag-aosp...
Xin Li [Fri, 10 Apr 2020 04:14:30 +0000 (04:14 +0000)]
[automerger skipped] DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp into stag-aosp-master am: f8aa9be293 -s ours am: 445db39e86 am: 923249285a

Change-Id: I1d0f6d248a46b2d238e02dcca57505ddb48579ae

4 years ago[automerger skipped] DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp into stag-aosp...
Xin Li [Fri, 10 Apr 2020 03:56:42 +0000 (03:56 +0000)]
[automerger skipped] DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp into stag-aosp-master am: f8aa9be293 -s ours am: 445db39e86

Change-Id: Ia1a87aba9e53926e09b8dbdc163e47c6697f85c9

4 years ago[automerger skipped] DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp into stag-aosp...
Xin Li [Fri, 10 Apr 2020 03:17:13 +0000 (03:17 +0000)]
[automerger skipped] DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp into stag-aosp-master am: f8aa9be293 -s ours

am skip reason: subject contains skip directive

Change-Id: I9c49dae1deb812561ed556e317c8434e306c494a

4 years agoDO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp into stag-aosp-master
Xin Li [Fri, 10 Apr 2020 00:50:49 +0000 (17:50 -0700)]
DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp into stag-aosp-master

Bug: 151763422
Change-Id: Ie120bc3c42cef98e182f13c8ef23a15a1e291710

4 years agoamdgpu: make AMDGPU_GEM_CREATE_CPU_GTT_USWC flag default
Shirish S [Tue, 31 Mar 2020 10:35:33 +0000 (16:05 +0530)]
amdgpu: make AMDGPU_GEM_CREATE_CPU_GTT_USWC flag default

amdgpu kernel driver requires USWC flag for allowing bo
allocation in GTT domain, hence enable it by default.

BUG=b:152378755
TEST=On Dali play 4k YouTube video

Signed-off-by: Shirish S <shirish.s@amd.com>
Change-Id: Ic509701f683d184d3fb85b7616dc9a7ed467cfe3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2128147
Tested-by: Bas Nieuwenhuizen <basni@chromium.org>
Reviewed-by: Bas Nieuwenhuizen <basni@chromium.org>
Reviewed-by: Drew Davenport <ddavenport@chromium.org>
4 years agominigbm: virtgpu: refactor virtgpu features
Gurchetan Singh [Fri, 13 Sep 2019 00:26:45 +0000 (17:26 -0700)]
minigbm: virtgpu: refactor virtgpu features

This way, we can call the GET_PARAM ioctl in a loop.

BUG=chromium:924405
TEST=compile

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

4 years agominigbm: add resource_info callback for virtio-gpu
Gurchetan Singh [Fri, 28 Jun 2019 03:05:54 +0000 (20:05 -0700)]
minigbm: add resource_info callback for virtio-gpu

In ARC++, the wayland sevice and the video stack rely on
GRALLOC_DRM_GET_STRIDE and (*lock_ycbcr) with zero flags to return
the metadata associated with the buffer.

In the past, we've simply returned the metadata that was calculated
during allocation.

Since the current virtio-gpu API relies on shadow buffers, there's
actually two different sets of metadata:

1) The metadata of the shadow buffer --> useful for mapping
2) The metadata of the host resource --> useful for passing to Chrome

For the wayland_service and video stack, we want to return (2).
For the Android framework, we want to return (1).

BUG=b:132939420
TEST=compile

Change-Id: I1134d651396ba68e064eaf2e3cad3cb3225d7c5c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1681383
Reviewed-by: David Stevens <stevensd@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
4 years agodrm/virtgpu: add header
Gurchetan Singh [Thu, 6 Feb 2020 02:18:52 +0000 (18:18 -0800)]
drm/virtgpu: add header

It's useless to try to keep up with a evolving UAPI, so just add it
here temporarily.

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

4 years agominigbm: mediatek: fix SCANOUT flag
Gurchetan Singh [Tue, 24 Mar 2020 20:53:51 +0000 (13:53 -0700)]
minigbm: mediatek: fix SCANOUT flag

All renderer target works are eligible for scanout, after looking
at mtk_plane_init.

BUG=b:151064316
TEST=Mirror mode works again on Kukui

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

4 years agominigbm: add synaptics gbm driver
Leona Chou [Thu, 19 Mar 2020 07:06:12 +0000 (15:06 +0800)]
minigbm: add synaptics gbm driver

Change the ozone platform from cast to drm
add synaptics gbm driver for buffer management.

BUG=b:152384632
TEST=use chromecast ui to verify drm
TEST=use ozone_demo app to verify drm

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

4 years agoRemove redundant NOTICE copied from LICENSE. am: 6124269123 am: 3374b31327 am: e9ecf6...
Bob Badour [Thu, 26 Mar 2020 06:41:18 +0000 (06:41 +0000)]
Remove redundant NOTICE copied from LICENSE. am: 6124269123 am: 3374b31327 am: e9ecf65fb0 am: 07a28e66d0

Change-Id: I488e63677f78982ed008f2530e7fb3adb306aaae

4 years agoRemove redundant NOTICE copied from LICENSE. am: 6124269123 am: 3374b31327 am: e9ecf65fb0
Bob Badour [Thu, 26 Mar 2020 06:31:44 +0000 (06:31 +0000)]
Remove redundant NOTICE copied from LICENSE. am: 6124269123 am: 3374b31327 am: e9ecf65fb0

Change-Id: I28d960ae88e74b55ebe6b55ff909a75d93556db6

4 years agoRemove redundant NOTICE copied from LICENSE. am: 6124269123 am: 3374b31327
Bob Badour [Thu, 26 Mar 2020 06:18:54 +0000 (06:18 +0000)]
Remove redundant NOTICE copied from LICENSE. am: 6124269123 am: 3374b31327

Change-Id: Ic34ad220b9351e32222043d72cf398afc4eb06c9

4 years agoRemove redundant NOTICE copied from LICENSE. am: 6124269123 am: 3374b31327
Bob Badour [Thu, 26 Mar 2020 06:18:48 +0000 (06:18 +0000)]
Remove redundant NOTICE copied from LICENSE. am: 6124269123 am: 3374b31327

Change-Id: I0ed1dd49cb0e5146ed623fddc4e6a45893704633

4 years agoRemove redundant NOTICE copied from LICENSE. am: 6124269123
Bob Badour [Thu, 26 Mar 2020 06:08:12 +0000 (06:08 +0000)]
Remove redundant NOTICE copied from LICENSE. am: 6124269123

Change-Id: I51659aff4abeb40ef86658d898b56d5ff8ae2e3f

4 years agoRemove redundant NOTICE copied from LICENSE.
Bob Badour [Thu, 26 Mar 2020 01:56:41 +0000 (18:56 -0700)]
Remove redundant NOTICE copied from LICENSE.

Identified using the below shell script:

$ find -H . -name LICENSE -type f -print0 | xargs -0 dirname \
  | while read dir; do \
    if [ -f "${dir}/NOTICE" ] \
        && diff "${dir}/LICENSE" "${dir}/NOTICE" >/dev/null; then \
      echo "${dir}/NOTICE"; \
    fi; \
  done

Now that http://r.android.com/r/1235427 and http://r.android.com/r/1238719 are
merged, LICENSE files copied into NOTICE files are no longer needed.

Bug: 67772237
Bug: 68860345

Test: manually built and diffed before and after system image notices
Change-Id: I09ef28a103ff9f4b186f4a977cfb66ae63ca01e1

4 years agoAdd more scanout formats to meson driver
Daniel Nicoara [Tue, 24 Mar 2020 23:24:43 +0000 (19:24 -0400)]
Add more scanout formats to meson driver

BUG=None
TEST=Allocated AB24 buffers with scanout bit to validate it works.

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

4 years agominigbm: run presubmit.sh, modify OWNERs
Gurchetan Singh [Tue, 24 Mar 2020 20:48:54 +0000 (13:48 -0700)]
minigbm: run presubmit.sh, modify OWNERs

BUG=none
TEST=none

Change-Id: I07ae6fa603117f16dee39b1b7e9ca3162daa0c97
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2118462
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
4 years ago[automerger skipped] DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp@6304901 into...
Xin Li [Thu, 19 Mar 2020 05:16:15 +0000 (05:16 +0000)]
[automerger skipped] DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp@6304901 into stag-aosp-master am: 9aed03a89c -s ours am: e623e98233 am: d11c2c1ca6

Change-Id: Ida7f3365799c6a92464c3da0009583d5410fbad5

4 years ago[automerger skipped] DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp@6304901 into...
Xin Li [Thu, 19 Mar 2020 04:52:45 +0000 (04:52 +0000)]
[automerger skipped] DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp@6304901 into stag-aosp-master am: 9aed03a89c -s ours am: e623e98233

Change-Id: I696dd2850cbe0135ecc5b9782d7fe683743f4d29

4 years ago[automerger skipped] DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp@6304901 into...
Xin Li [Thu, 19 Mar 2020 04:26:05 +0000 (04:26 +0000)]
[automerger skipped] DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp@6304901 into stag-aosp-master am: 9aed03a89c -s ours

am skip reason: subject contains skip directive

Change-Id: Iefc55b3bca58285f15de016771885e64652b093a

4 years agoDO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp@6304901 into stag-aosp-master am...
Xin Li [Thu, 19 Mar 2020 04:20:03 +0000 (04:20 +0000)]
DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp@6304901 into stag-aosp-master am: 9aed03a89c

Change-Id: I24776053add4a793c3223612d580f71ffb1ed8a8

4 years agoDO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp@6304901 into stag-aosp-master
Xin Li [Thu, 19 Mar 2020 02:40:39 +0000 (19:40 -0700)]
DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp@6304901 into stag-aosp-master

Bug: 151763422
Change-Id: I59a7d953d879770eee93ccb8c7c4ba355baa20d9

4 years agominigbm: virtio: check caps available before disabling formats am: 51990ce154 am...
Automerger Merge Worker [Mon, 16 Mar 2020 20:22:29 +0000 (20:22 +0000)]
minigbm: virtio: check caps available before disabling formats am: 51990ce154 am: 586e8d4831 am: d6069745f9 am: 2288c3e8c8

Change-Id: Iee4038a9d7bfa5212f2afd8934decaabb7ae7a91

4 years agominigbm: virtio: check caps available before disabling formats am: 51990ce154 am...
Automerger Merge Worker [Mon, 16 Mar 2020 20:11:06 +0000 (20:11 +0000)]
minigbm: virtio: check caps available before disabling formats am: 51990ce154 am: 586e8d4831 am: d6069745f9

Change-Id: I9fdc7fe783ced3319854eaa9422866a5470df3c7

4 years agominigbm: virtio: check caps version before disabling formats
Jason Macnak [Fri, 13 Mar 2020 16:55:13 +0000 (09:55 -0700)]
minigbm: virtio: check caps version before disabling formats

Gfxstream backend does not yet populate supported formats cap
info.

Bug: b/146066070
Test: launch_cvd --gpu_mode=gfxstream
Change-Id: I28964c7701c5fd4cbe4ebc77f9fc553c64aeb924
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2103048
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Jason Macnak <natsu@google.com>
Commit-Queue: Jason Macnak <natsu@google.com>

4 years agominigbm: virtio: check caps available before disabling formats am: 51990ce154 am...
Automerger Merge Worker [Mon, 16 Mar 2020 19:56:33 +0000 (19:56 +0000)]
minigbm: virtio: check caps available before disabling formats am: 51990ce154 am: 586e8d4831

Change-Id: I84f231a945f7d8523e7020ced171bb94dd272ae7

4 years agominigbm: virtio: check caps available before disabling formats am: 51990ce154 am...
Automerger Merge Worker [Mon, 16 Mar 2020 19:56:19 +0000 (19:56 +0000)]
minigbm: virtio: check caps available before disabling formats am: 51990ce154 am: 586e8d4831

Change-Id: Id890d935a494f81ae1c7cff4407987c7d15500ce

4 years agominigbm: virtio: check caps available before disabling formats am: 51990ce154
Automerger Merge Worker [Mon, 16 Mar 2020 19:42:51 +0000 (19:42 +0000)]
minigbm: virtio: check caps available before disabling formats am: 51990ce154

Change-Id: Id847d8e81c9e7ce168d101283117e4dc79688903

4 years agomediatek: get prime fd with drv_bo_get_plane_fd
David Stevens [Fri, 13 Mar 2020 06:24:37 +0000 (15:24 +0900)]
mediatek: get prime fd with drv_bo_get_plane_fd

Instead of calling drmPrimeHandleToFD directly, call drv_bo_get_plane_fd
so that the FD is exported with DRM_RDWR if possible.

When a handle is exported, the drm framework caches the underlying
dma_buf struct, even if all fd references are closed. This means that
the flags from the first export operation end up being the primary flags
for all subsequent export attempts. This change ensures that the O_RDWR
flag is set on the first call, to prevent permission checks in
PlatformSharedMemoryRegion from failing.

BUG=b:151394062
TEST=youtube on arcvm on kukui

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

4 years agominigbm: dri: Set the plane sizes on bo creation.
Bas Nieuwenhuizen [Fri, 13 Mar 2020 10:21:34 +0000 (11:21 +0100)]
minigbm: dri: Set the plane sizes on bo creation.

I cut a corner here on a previous patch and apparently it is used.

Since DRI does not give us useful horizontal & vertical strides
(especially considering things like auxiliary surfaces), do this
calculation based on offsets & buffer strides.

BUG=1061315
TEST=test_that graphics_Gbm on Zork.

Change-Id: Idbca7ce42f4f8a692129a2f8ab5d9c3ccd796496
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2100795
Tested-by: Bas Nieuwenhuizen <basni@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Ilja H. Friedel <ihf@chromium.org>

4 years agominigbm: virtio: check caps available before disabling formats
Jason Macnak [Fri, 13 Mar 2020 16:36:33 +0000 (09:36 -0700)]
minigbm: virtio: check caps available before disabling formats

Gfxstream backend does not yet populate supported formats cap
info.

Bug: b/146066070
Test: launch_cvd --gpu_mode=gfxstream
Change-Id: I2eac7bcb1c75e22f554bafc7ae354c961b73583e

4 years agoarc-cros-gralloc: amdgpu: Use DRI_PATH to load radeonsi
Satyajit Sahu [Wed, 4 Mar 2020 10:23:30 +0000 (15:53 +0530)]
arc-cros-gralloc: amdgpu: Use DRI_PATH to load radeonsi

Use DRI_PATH cpp flag exported by ebuild to load the radeonsi
library. This ensures 64/32 bit libraries are loaded as per arch.

BUG=b:148405947, b:148045046, b:139690910, b:150425665, b:150422260,
b:150742051, b:150742059
TEST=Launch play store, no black screen observed

Cq-Depend: chromium:2098992
Change-Id: I12649457c82808aafb468d3d3123ff3eb028e7b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2087294
Reviewed-by: Drew Davenport <ddavenport@chromium.org>
Tested-by: Drew Davenport <ddavenport@chromium.org>
Commit-Queue: Drew Davenport <ddavenport@chromium.org>

4 years agominigbm: dri,amdgpu: Modifier support.
ChromeOS Developer [Mon, 2 Mar 2020 12:08:53 +0000 (13:08 +0100)]
minigbm: dri,amdgpu: Modifier support.

This adds modifier support to minigbm in the amdgpu driver.

This includes

(a) creation of images with modifiers
(b) imports
  - Had to distinguish between legacy and non-legacy.
(c) Support for planes > format planes

BUG=b:149819940
TEST=Login on a Zork device + play a YT video.

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

4 years agominigbm: dri: Support 2+ planes query for modifiers.
ChromeOS Developer [Mon, 2 Mar 2020 15:32:09 +0000 (16:32 +0100)]
minigbm: dri: Support 2+ planes query for modifiers.

If the driver does not implement the new function, or
if modifier is INVALID this should return exactly the
same as before.

For LINEAR, DRI should return exactly the same as
minigbm for all the YUV formats.

BUG=b:149819940
TEST=Use with followup patch and login on a Zork device + play a YT
video.

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

4 years agoReland "minigbm: introduce test allocation"
David Stevens [Mon, 9 Mar 2020 12:23:42 +0000 (12:23 +0000)]
Reland "minigbm: introduce test allocation"

This reverts commit 08d8dbf094fdc5aa9b92c7257e292edcf28602b2.

The original change returned early from drv_bo_create_with_modifiers,
which broke reference counting. This must have hit some race condition
in the tests, as they no longer flake after fixing reference counting.

Original change's description:
> Revert "minigbm: introduce test allocation"
>
> This reverts commit f0e607c7d436134b53fd45a4ead36d714451be8a.
>
> Reason for revert: caused flaky regressions across the board.
>
> BUG=b:150997559
> Exempt-From-Owner-Approval: revert.
>
> Original change's description:
> > minigbm: introduce test allocation
> >
> > This change introduces a GBM_TEST_ALLOC flag to minigbm, which allows
> > for the creation of fake buffers that can be used to determine buffer
> > metadata without actually allocating a full buffer. The new flag is
> > supported by the i915 backends. This flag also alleviates the need to
> > cache buffers when virtio_gpu queries metadata properties.
> >
> > BUG=b:145994510
> > TEST=play youtube with arcvm demo image plus this and virgl change
> >
> > Change-Id: I9c6819aa3b5b674e4bb33b0656f2a9f155b0884e
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1980688
> > Tested-by: David Stevens <stevensd@chromium.org>
> > Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
> > Commit-Queue: David Stevens <stevensd@chromium.org>
>
> Bug: b:145994510
> Change-Id: I50079b7f0aabf38e1f373cac0f28c0e057eed760
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2093923
> Commit-Queue: Ilja H. Friedel <ihf@chromium.org>
> Tested-by: Ilja H. Friedel <ihf@chromium.org>
> Reviewed-by: Ilja H. Friedel <ihf@chromium.org>

Bug: b:150997559, b:145994510
Change-Id: If0f02a4701bb6960b6413d6b0c00b481146914d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2094068
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
Tested-by: David Stevens <stevensd@chromium.org>
4 years agoRevert "minigbm: introduce test allocation"
Ilja H. Friedel [Sun, 8 Mar 2020 04:48:13 +0000 (04:48 +0000)]
Revert "minigbm: introduce test allocation"

This reverts commit f0e607c7d436134b53fd45a4ead36d714451be8a.

Reason for revert: caused flaky regressions across the board.

BUG=b:150997559
Exempt-From-Owner-Approval: revert.

Original change's description:
> minigbm: introduce test allocation
>
> This change introduces a GBM_TEST_ALLOC flag to minigbm, which allows
> for the creation of fake buffers that can be used to determine buffer
> metadata without actually allocating a full buffer. The new flag is
> supported by the i915 backends. This flag also alleviates the need to
> cache buffers when virtio_gpu queries metadata properties.
>
> BUG=b:145994510
> TEST=play youtube with arcvm demo image plus this and virgl change
>
> Change-Id: I9c6819aa3b5b674e4bb33b0656f2a9f155b0884e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1980688
> Tested-by: David Stevens <stevensd@chromium.org>
> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
> Commit-Queue: David Stevens <stevensd@chromium.org>

Bug: b:145994510
Change-Id: I50079b7f0aabf38e1f373cac0f28c0e057eed760
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2093923
Commit-Queue: Ilja H. Friedel <ihf@chromium.org>
Tested-by: Ilja H. Friedel <ihf@chromium.org>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
4 years agoMerge 'aosp/upstream-master' into 'aosp/master' am: 24cb462579 am: 88b0a4235a am...
Automerger Merge Worker [Fri, 6 Mar 2020 05:18:08 +0000 (05:18 +0000)]
Merge 'aosp/upstream-master' into 'aosp/master' am: 24cb462579 am: 88b0a4235a am: cfd96315f8 am: 55b9558d53

Change-Id: I53b7258696893e40d919094f0ff1b0d22a4898fb

4 years agoMerge 'aosp/upstream-master' into 'aosp/master' am: 24cb462579 am: 88b0a4235a am...
Automerger Merge Worker [Fri, 6 Mar 2020 01:16:51 +0000 (01:16 +0000)]
Merge 'aosp/upstream-master' into 'aosp/master' am: 24cb462579 am: 88b0a4235a am: cfd96315f8

Change-Id: I9005bb07b0fee743a6bc469270c7df8908a811d6

4 years agoMerge 'aosp/upstream-master' into 'aosp/master' am: 24cb462579 am: 88b0a4235a
Automerger Merge Worker [Fri, 6 Mar 2020 01:04:15 +0000 (01:04 +0000)]
Merge 'aosp/upstream-master' into 'aosp/master' am: 24cb462579 am: 88b0a4235a

Change-Id: I1d1ca0df355e6a91dac49ee62619f109c34044c8

4 years agoMerge 'aosp/upstream-master' into 'aosp/master' am: 24cb462579 am: 88b0a4235a
Automerger Merge Worker [Fri, 6 Mar 2020 01:03:56 +0000 (01:03 +0000)]
Merge 'aosp/upstream-master' into 'aosp/master' am: 24cb462579 am: 88b0a4235a

Change-Id: I3637cf92fe783b01da45222d53e7c7b08fdbbdaa

4 years agoMerge 'aosp/upstream-master' into 'aosp/master' am: 24cb462579
Automerger Merge Worker [Fri, 6 Mar 2020 00:48:15 +0000 (00:48 +0000)]
Merge 'aosp/upstream-master' into 'aosp/master' am: 24cb462579

Change-Id: I5d46b2f8589803ff4fa80a99e785a280512951a6

4 years agoMerge 'aosp/upstream-master' into 'aosp/master'
Jason Macnak [Thu, 5 Mar 2020 22:14:25 +0000 (14:14 -0800)]
Merge 'aosp/upstream-master' into 'aosp/master'

... to update Minigbm for Cuttlefish to support always using
Minigbm as its Gralloc implementation with the 2D virtio-gpu
backend and for updating the base for implementing the latest
Gralloc version.

Bug: b/123764798
Bug: b/146515640
Test: m && launch_cvd
Test: m && launch_cvd --gpu_mode=drm_virgl
Change-Id: I196928cceb6bfede8a0cd302fe93f5cc1a9c29e5

4 years agominigbm: vc4: add create_with_modifiers function
Gurchetan Singh [Sat, 22 Feb 2020 01:59:01 +0000 (17:59 -0800)]
minigbm: vc4: add create_with_modifiers function

Change-Id: Iedba297cbcf69e3c87165bd54fce316b75a7a530
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2068463
Reviewed-by: Ewan Roycroft <ewan.roycroft@bbc.co.uk>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
4 years agominigbm: introduce test allocation
David Stevens [Wed, 25 Dec 2019 07:43:36 +0000 (16:43 +0900)]
minigbm: introduce test allocation

This change introduces a GBM_TEST_ALLOC flag to minigbm, which allows
for the creation of fake buffers that can be used to determine buffer
metadata without actually allocating a full buffer. The new flag is
supported by the i915 backends. This flag also alleviates the need to
cache buffers when virtio_gpu queries metadata properties.

BUG=b:145994510
TEST=play youtube with arcvm demo image plus this and virgl change

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

4 years agominigbm/msm: Update msm for removal of kms_query
Jeffrey Kardatzke [Mon, 2 Mar 2020 20:25:55 +0000 (12:25 -0800)]
minigbm/msm: Update msm for removal of kms_query

Recently kms_query was removed which then caused the NV12 texture format
here to use UBWC, which is incorrect currently. This updates the msm
code similar to other changes.

I'm somewhat guessing at this, so please review this thoroughly.

BUG=b:149190288
TEST=VDA tests pass on trogdor again

Change-Id: Ie3370623d324f8378d03bcc3562cd17561f5ba01
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2083720
Tested-by: Jeffrey Kardatzke <jkardatzke@google.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Commit-Queue: Jeffrey Kardatzke <jkardatzke@google.com>

4 years agominigbm: virtio: Advertise BO_USE_SCANOUT correctly.
Lepton Wu [Wed, 26 Feb 2020 23:13:34 +0000 (15:13 -0800)]
minigbm: virtio: Advertise BO_USE_SCANOUT correctly.

If host doesn't support BO_USE_SCANOUT for some format, we shouldn't
advertise it. Otherwise the bo will fail to allocate at host side
with minigbm.

BUG=b:145603024
TEST=tast run 127.0.0.1:9222 arc.Boot.vm

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

4 years agominigbm: virtio-gpu: wait for transfers when necessary
David Stevens [Wed, 26 Feb 2020 08:14:43 +0000 (17:14 +0900)]
minigbm: virtio-gpu: wait for transfers when necessary

There are two situations where guest access and host access to buffers
need to be synchronized to ensure consistency:

  - If the guest CPU can write to the mapping and something in the host
    besides the GPU might access the buffer, flush must be synchronous
    to ensure the host sees any guest changes. Waiting is not necessary
    if only the GPU can access the buffer because any subsequent
    commands will be properly ordered.
  - If the guest CPU can access the mapping and something in the host
    can write to the buffer, then invalidate must be synchronous to
    ensure the guest sees any host changes.

To perform this synchronization, have the virtio_gpu backend wait for
the transfer to/from the host to complete before returning from
flush/invalidate. In the future, support for fence-based synchronization
should also be added.

BUG=b:120456557 b:136733358
TEST=arc-codec-test, ArcVideoPlayer

Change-Id: If4ad293886a67d93d85b0d4a682b31c66597d4ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1687736
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
Tested-by: David Stevens <stevensd@chromium.org>
4 years agominigbm/msm: Add NV12 format for Android flex allocation
Jeffrey Kardatzke [Tue, 25 Feb 2020 18:33:37 +0000 (10:33 -0800)]
minigbm/msm: Add NV12 format for Android flex allocation

BUG=b:149344523
TEST=HW decoder playback on ARC works w/ test codec manifest

Change-Id: Ic4c8ed8466a783dd9779b529e96be85298fc680e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2072600
Tested-by: Jeffrey Kardatzke <jkardatzke@google.com>
Reviewed-by: Fritz Koenig <frkoenig@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Jeffrey Kardatzke <jkardatzke@google.com>

4 years agoReland "minigbm: i915: remove KMS query"
Ilja H. Friedel [Wed, 26 Feb 2020 02:50:51 +0000 (02:50 +0000)]
Reland "minigbm: i915: remove KMS query"

This reverts commit b0787a9fdb40b580c473d79d0e55070a1fd4844a.

Reason for revert: I want to avoid a potentially broken build due to the revert. My local build is taking too long.

BUG=b:149959202
Exempt-From-Owner-Approval: reland change.

Original change's description:
> Revert "minigbm: i915: remove KMS query"
>
> This reverts commit 0254a661f1511cea63d1b993d3d2b1457e371e36.
>
> Reason for revert: speculative revert to address octopus breakages
>
> BUG=b:149959202
> Exempt-From-Owner-Approval: revert change.
>
>
> Original change's description:
> > minigbm: i915: remove KMS query
> >
> > This simplifies the code.  We just have to make sure:
> >
> > - the scanout flag goes to X-tiled.
> >
> > BUG=b:145747132
> > TEST=compile and run on Nami
> >
> > Cq-Depend: chromium:1998011
> > Change-Id: Ic2a1c367017c28abc3a9307bea53c577bc33e31e
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1976275
> > Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
> > Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
> > Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
> > Auto-Submit: Gurchetan Singh <gurchetansingh@chromium.org>
>
> Bug: b:145747132
> Change-Id: If6aa7e3623461b8f837dec581934ed86d4c4a573
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2073173
> Tested-by: Ilja H. Friedel <ihf@chromium.org>
> Reviewed-by: Jao-ke Chin-Lee <jchinlee@google.com>
> Commit-Queue: Jao-ke Chin-Lee <jchinlee@google.com>

Bug: b:149959202, b:145747132
Change-Id: I529f24309ee33bc6b500c65fd83a7f282dafef05
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2073478
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
Reviewed-by: Jao-ke Chin-Lee <jchinlee@google.com>
Commit-Queue: Ilja H. Friedel <ihf@chromium.org>
Tested-by: Ilja H. Friedel <ihf@chromium.org>
4 years agoRevert "minigbm: i915: remove KMS query"
Jao-ke Chin-Lee [Wed, 26 Feb 2020 02:14:19 +0000 (02:14 +0000)]
Revert "minigbm: i915: remove KMS query"

This reverts commit 0254a661f1511cea63d1b993d3d2b1457e371e36.

Reason for revert: speculative revert to address octopus breakages

BUG=b:149959202
Exempt-From-Owner-Approval: revert change.

Original change's description:
> minigbm: i915: remove KMS query
>
> This simplifies the code.  We just have to make sure:
>
> - the scanout flag goes to X-tiled.
>
> BUG=b:145747132
> TEST=compile and run on Nami
>
> Cq-Depend: chromium:1998011
> Change-Id: Ic2a1c367017c28abc3a9307bea53c577bc33e31e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1976275
> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
> Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
> Auto-Submit: Gurchetan Singh <gurchetansingh@chromium.org>

Bug: b:145747132
Change-Id: If6aa7e3623461b8f837dec581934ed86d4c4a573
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2073173
Tested-by: Ilja H. Friedel <ihf@chromium.org>
Reviewed-by: Jao-ke Chin-Lee <jchinlee@google.com>
Commit-Queue: Jao-ke Chin-Lee <jchinlee@google.com>

4 years agomsm: Don't height align R8, height 1 buffers used for camera output
Jeffrey Kardatzke [Fri, 21 Feb 2020 23:35:01 +0000 (15:35 -0800)]
msm: Don't height align R8, height 1 buffers used for camera output

We height align to multiples of 64 and the camera will create a height
one buffer of length 13MB for JPEG output with R8 format. If we see R8
format with height 1, then don't do the height alignment.

BUG=b:148152367
TEST=Camera app works on trogdor

Change-Id: I6e4260f37cc45fe3b7e9bd132844cbde4a58fc26
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2066796
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Jeffrey Kardatzke <jkardatzke@google.com>
Auto-Submit: Jeffrey Kardatzke <jkardatzke@google.com>
Commit-Queue: Jeffrey Kardatzke <jkardatzke@google.com>

4 years agomsm: add camera use flags for NV12 and R8
Ricky Liang [Thu, 13 Feb 2020 02:42:46 +0000 (10:42 +0800)]
msm: add camera use flags for NV12 and R8

NV12 is used by the camera stack for YUV buffers. R8 is used by the
camera stack as a blob format for JPEG images.

BUG=b:148152367
TEST=Manually with built-in camera app on Cheza

Change-Id: I484f1a5ede2dfece549706310d832086af087544
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2053665
Tested-by: Ricky Liang <jcliang@chromium.org>
Commit-Queue: Ricky Liang <jcliang@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
4 years agominigbm: virtio-gpu: check format support when adding combinations
Jason Macnak [Tue, 4 Feb 2020 00:36:46 +0000 (16:36 -0800)]
minigbm: virtio-gpu: check format support when adding combinations

Updates the minigbm virtio backend to check for renderer support
before advertising support of various combinations. This prevents
minigbm from advertising yuv/nv12 formats which are not supported
on Cuttlefish when running on GCE with Nvidia GPUs which do not
support GBM.

BUG=b:123764798
TEST=build + launch_cvd
TEST=build + launch_cvd --gpu_mode=drm_virgl

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

4 years agominigbm: remove KMS dependency
Gurchetan Singh [Thu, 19 Dec 2019 18:56:51 +0000 (10:56 -0800)]
minigbm: remove KMS dependency

Adds unneeded complication and extra kernel patches.
Hopefully with Chrome using modifiers we can remove this.

BUG=b:145747132
TEST=compile and run

Change-Id: I557bbd50828d7e39848c315a44a24587c9e2ce3a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1976277
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
4 years agominigbm: rockchip: remove KMS dependency
Gurchetan Singh [Thu, 19 Dec 2019 18:51:14 +0000 (10:51 -0800)]
minigbm: rockchip: remove KMS dependency

Same reason has i915.

BUG=b:145747132
TEST=emerge-kevin minigbm

Change-Id: Id51c5e9e27a7bfae7db63730d637b8d5d0ff841f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1976276
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Robert Tarasov <tutankhamen@chromium.org>
4 years agominigbm: i915: remove KMS query
Gurchetan Singh [Tue, 17 Dec 2019 17:07:16 +0000 (09:07 -0800)]
minigbm: i915: remove KMS query

This simplifies the code.  We just have to make sure:

- the scanout flag goes to X-tiled.

BUG=b:145747132
TEST=compile and run on Nami

Cq-Depend: chromium:1998011
Change-Id: Ic2a1c367017c28abc3a9307bea53c577bc33e31e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1976275
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Auto-Submit: Gurchetan Singh <gurchetansingh@chromium.org>

4 years agominigbm: Set modifiers for amdgpu/dri.
Bas Nieuwenhuizen [Fri, 7 Feb 2020 19:20:30 +0000 (20:20 +0100)]
minigbm: Set modifiers for amdgpu/dri.

I tried kernel with modifier support and userspace without and it
failed due to having a linear (which is 0) modifier for the tiled
textures. Set the modifier explicitly.

BUG=b:144023522
TEST=Chrome shows the login screen on zork (with some other bugfixes)

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

4 years agominigbm: Disable UBWC for texture formats
Jeffrey Kardatzke [Fri, 14 Feb 2020 00:19:03 +0000 (16:19 -0800)]
minigbm: Disable UBWC for texture formats

The venus driver doesn't understand UBWC formats yet so we shouldn't be
using them for texture formats that the video decoder writes to.

BUG=b:149190288
TEST=video_decode_accelerator_tests pass on trogdor

Change-Id: I572c7ff9e1bddcd58136772b3ced07f79a219cba
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2055873
Tested-by: Jeffrey Kardatzke <jkardatzke@google.com>
Auto-Submit: Jeffrey Kardatzke <jkardatzke@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Fritz Koenig <frkoenig@chromium.org>
Commit-Queue: Fritz Koenig <frkoenig@chromium.org>

4 years agominigbm/i915: Add support for I915_FORMAT_MOD_Y_TILED_CCS
Mark Yacoub [Fri, 7 Feb 2020 16:02:22 +0000 (11:02 -0500)]
minigbm/i915: Add support for I915_FORMAT_MOD_Y_TILED_CCS

This adds support for allocating buffers with the
I915_FORMAT_MOD_Y_TILED_CCS modifier, which enables Intel's rendering
buffer compression.

(reland of crrev.com/c/1706735)

BUG=979736

Change-Id: I90a8bc5fad0e1133d527b5ef4cff56d371763fc6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2044490
Reviewed-by: Mark Yacoub <markyacoub@google.com>
Reviewed-by: Robert Tarasov <tutankhamen@chromium.org>
Tested-by: Mark Yacoub <markyacoub@google.com>
Tested-by: Robert Tarasov <tutankhamen@chromium.org>
Auto-Submit: Mark Yacoub <markyacoub@google.com>
Commit-Queue: Mark Yacoub <markyacoub@google.com>

4 years agocros_gralloc: Use entire graphics buffer if all-zeros access region is specified
Matthias Springer [Mon, 3 Feb 2020 07:40:09 +0000 (16:40 +0900)]
cros_gralloc: Use entire graphics buffer if all-zeros access region is specified

This is a requirement of gralloc and the graphics.mapper HAL in Android.

BUG=b:143924619
TEST=Photo capture in GCA succeeds and most camera CTS tests pass

Change-Id: Ic34a49aa7175c1c3b9f6c0738b5ab848e002b93d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2035207
Tested-by: Matthias Springer <springerm@chromium.org>
Commit-Queue: Matthias Springer <springerm@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: David Stevens <stevensd@chromium.org>
Auto-Submit: Matthias Springer <springerm@chromium.org>

4 years agominigbm: Reformat with clang-format.
Junichi Uekawa [Wed, 29 Jan 2020 06:45:16 +0000 (15:45 +0900)]
minigbm: Reformat with clang-format.

Touching the files seem to cause reformatting.

BUG=None
TEST=None

Change-Id: I31d2fbb01f4ee803da2b740dea036971e861bf60
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2027288
Tested-by: Junichi Uekawa <uekawa@chromium.org>
Reviewed-by: Lepton Wu <lepton@chromium.org>
Commit-Queue: Junichi Uekawa <uekawa@chromium.org>

4 years agoRemove level=stride hack in virtio_gpu_bo_invalidate
Woody Chow [Fri, 17 Jan 2020 07:46:33 +0000 (16:46 +0900)]
Remove level=stride hack in virtio_gpu_bo_invalidate

The non-gbm path in virglrenderer does not need this hack

BUG=b:142364535
TEST=Run these CTS tests
android.hardware.nativehardware.cts.AHardwareBufferNativeTests#SingleLayer_ColorTest_GpuColorOutputCpuRead_R8G8B8A8_UNORM
android.hardware.nativehardware.cts.AHardwareBufferNativeTests#SingleLayer_ColorTest_GpuColorOutputCpuRead_R8G8B8X8_UNORM
android.hardware.nativehardware.cts.AHardwareBufferNativeTests#SingleLayer_ColorTest_GpuColorOutputCpuRead_R5G6B5_UNORM

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

4 years agominigbm: i915: get rid of tileable texture formats
Gurchetan Singh [Thu, 19 Dec 2019 17:48:21 +0000 (09:48 -0800)]
minigbm: i915: get rid of tileable texture formats

I don't think Chrome ever used DRM_FORMAT_UYVY + DRM_FORMAT_YUYV.
Plus, R8 tiled isn't really useful.

BUG=b:145747113
TEST=compile

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

4 years agominigbm: Remove deprecated methods.
Maksim Sisov [Wed, 6 Mar 2019 11:04:12 +0000 (13:04 +0200)]
minigbm: Remove deprecated methods.

We have been running an effort to align minigbm apis with
the upstream libgbm.

The clients of minigbm are fixed, and the deprecated methods can be
removed now.

Change-Id: I09043ef5728af36298e3331c6694fde656b0d7e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1505613
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
4 years agoamdgpu: make libdir work on stock Linux
Gurchetan Singh [Fri, 13 Dec 2019 17:37:01 +0000 (09:37 -0800)]
amdgpu: make libdir work on stock Linux

BUG=b:145747113
TEST=emerge-grunt minigbm

Cq-Depend: chromium:1967711
Change-Id: I10e721ffcbe8e36551269cf54e981be411389eaf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1967731
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
4 years agorockchip: align height in NV12 format
Hirokazu Honda [Tue, 14 Jan 2020 04:08:12 +0000 (04:08 +0000)]
rockchip: align height in NV12 format

This reverts commit b80c6b9737dc22e7b71ca684fa85e51953465512.

Thanks to crrev.com/c/1909686, camera HAL on scarlet can fill
camera content with arbitrary offsets. Remove the workaround
introduced in b80c6b9737dc22e7b71ca684fa85e51953465512.

BUG=b:140152839
TEST=GCA on scarlet
TEST=CCA on scarlet
Cq-Depend: chromium:1906454
Change-Id: I6782e713b8f5dd57c5cdf6d1217adc9f73b61ac3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1999866
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>

4 years agominigbm: add gbm_bo_map2
Gurchetan Singh [Thu, 12 Dec 2019 18:20:41 +0000 (10:20 -0800)]
minigbm: add gbm_bo_map2

Plan is convert all users to gbm_bo_map2, and then make gbm_bo_map
follow the upstream convention.

BUG=b:145747350
TEST=emerge-nami minigbm

Change-Id: I7c7d54d519277e21ebfa99c57d9a738e9d257a57
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1965671
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
4 years agominigbm: implement new functions
Gurchetan Singh [Fri, 6 Dec 2019 18:24:53 +0000 (10:24 -0800)]
minigbm: implement new functions

These functions were newly added -- implement some, don't implement
surface functions.

This patch series is not bisectable.

BUG=b:145747113
TEST=emerge-nami minigbm

Cq-Depend: chromium:1963000
Change-Id: I36814955b754840daab31fa2762910aa44e80fd8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1963002
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Dominik Behr <dbehr@chromium.org>