OSDN Git Service
David Stevens [Wed, 25 Dec 2019 07:35:55 +0000 (16:35 +0900)]
minigbm: align BO_USE flags with GBM flags
Swap the values of the BO_USE encoder and decoder flags, to match the
values of the respective GBM flags.
BUG=none
TEST=compile
Change-Id: I419ca7b8234d4ce4e8a771ee608efac836b7d007
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1980687
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: David Stevens <stevensd@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
Fritz Koenig [Wed, 11 Dec 2019 00:30:34 +0000 (16:30 -0800)]
msm: Add scanout support for UBWC RGB8888
msm hardware does not support UBWC RGB, only BGR.
The creator and consumers know that UBWC buffers
are hw native format. This is an opaque buffer
that will not be accessed outside of the gpu.
BUG=b:
145579089
TEST=webgl aquarium goes to ubwc underlay
Change-Id: I4872958d00e1de623b2a9692249e88e4aa302334
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1960784
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Fritz Koenig <frkoenig@chromium.org>
Commit-Queue: Fritz Koenig <frkoenig@chromium.org>
Auto-Submit: Fritz Koenig <frkoenig@chromium.org>
Moja Hsu [Wed, 2 Oct 2019 06:47:10 +0000 (14:47 +0800)]
mediatek: Align height to 16 bytes for NV12
We want to use the same buffer from camera to JPEG hardware encoder so
align the height of camera usage buffer 16 that is required by the JPEG
hardware encoder.
BUG=b:
141516308
TEST=Check if data offset is correct. Take picture with CCA.
Change-Id: I0db10762494423f7c4a340725015839803b40af4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1984211
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Hsu Wei-Cheng <mojahsu@chromium.org>
Commit-Queue: Hsu Wei-Cheng <mojahsu@chromium.org>
Hirokazu Honda [Fri, 11 Oct 2019 06:54:50 +0000 (15:54 +0900)]
mediatek: Allocate a buffer expected by encoder if BO_USE_HW_VIDEO_ENCODER
MediaTek driver expects 16 aligned width and 32 aligned height for an input
buffer on encoding [1]. Besides, there is an extra data between planes.
This changes the minigbm allocation to match the expectation though width
is aligned by 64 for the AMD cache-width optimization.
[1] https://chromium.googlesource.com/chromiumos/third_party/kernel/+/
3c551224d8600b956ed53097520501d58f31cf59/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c#278
BUG=b:
144135251
TEST=ARC++ encoder on kukui
Change-Id: Id330a8a6b0a40040098920427e6e29f05fcb64d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1855520
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Auto-Submit: Hirokazu Honda <hiroh@chromium.org>
Commit-Queue: Hsu Wei-Cheng <mojahsu@chromium.org>
Dominik Behr [Wed, 9 Oct 2019 22:43:52 +0000 (15:43 -0700)]
minigbm: virtio: restrict formats supported without 3D
Upstream virtio drm commit "drm/virtio: fix DRM_FORMAT_* handling" severely
restricts supported formats and strictly enforces 32bpp dumb buffers.
Therefore now we only support XRGB8888 for scanout, ARGB8888 for cursor,
ARGB8888 for rendering. Also, we pretend all buffers are 32bpp when allocating
as dumb buffers.
BUG=none
TEST=tast run 127.0.0.1:9222 webrtc.RTCPeerConnection.vp8
Change-Id: I6225a9cb3c49f0850c6d94b2d12efaf9a33b149e
Signed-off-by: Dominik Behr <dbehr@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1849773
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Hirokazu Honda [Fri, 6 Dec 2019 06:21:45 +0000 (15:21 +0900)]
virtio_gpu: Add HW_VIDEO_ENCODER usage flags to NV12
A virtual device resolves a flexible format to NV12. NV12 should
have the usage HW_VIDEO_ENCODER.
BUG=b:
145715379
TEST=Camera video recording on a virtual device
Change-Id: I8ea1c75087d35c19c472890138c603b74f1ef491
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1955344
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Matthias Springer <springerm@chromium.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Tested-by: Matthias Springer <springerm@chromium.org>
Auto-Submit: Hirokazu Honda <hiroh@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Drew Davenport [Tue, 12 Nov 2019 19:03:59 +0000 (12:03 -0700)]
minigbm: dri: Don't redefine GL typedefs
dri_interface.h now #includes GL/gl.h so there is no need to define
these.
BUG=b:
143621384
TEST=build/deploy minigbm and arc-cros-gralloc for grunt
Cq-Depend: chromium:
1907530
Change-Id: Ic370dc1404156c8e5de5dc9490a8c68b49661c00
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1912763
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Ilja H. Friedel <ihf@chromium.org>
Tested-by: Ilja H. Friedel <ihf@chromium.org>
Jasmine Chen [Wed, 14 Aug 2019 07:28:22 +0000 (15:28 +0800)]
Add MediaTek private format for reprocessing
In this CL, we add DRM_FORMAT_MTISP_SXYZW10, a 10-bit private bayer
format for private reprocessing on MediaTek ISP P1. We change the logic
around resolving the DRM format for IMPLEMENTATION_DEFINED buffers. When
CAMERA_READ usage flag is present, we consider it to be a buffer for
reprocessing and resolve the format to our private format.
BUG=b:
130851309
TEST=Emerge and deploy minigbm cros-camera-libcbm cros-camera
cros-camera-hal-mtk, then verify that ZSL is working.
Change-Id: I8d9fd4e6a20c284751915e136bef0b4ceb143d78
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1753902
Tested-by: Jasmine Chen <lnishan@google.com>
Auto-Submit: Jasmine Chen <lnishan@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Jasmine Chen <lnishan@google.com>
Hirokazu Honda [Tue, 3 Dec 2019 02:01:59 +0000 (11:01 +0900)]
gralloc0: Unmask HW_VIDEO_ENCODER usage in the case of non-YUV formats
Non-yuv formats are allocated with HW_VIDEO_ENCODER usage as an
intermediate buffers, for example, camera fills. They are converted to
YUV formats finally when they are fed to a hw encoder. So there is no
need of allocating the buffers with HW_VIDEO_ENCODER.
TEST=Recording with GCA
TEST=android.media.cts.EncodeVirtualDisplayTest#testEncodeVirtualDisplay on kevin
Cq-Depend: chromium:
1947685
Change-Id: Ic5c09823de1f53ffb6117d07327779e46f32a3f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1940034
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Auto-Submit: Hirokazu Honda <hiroh@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Hirokazu Honda [Tue, 3 Dec 2019 02:12:09 +0000 (02:12 +0000)]
Revert "Enable to allocate XBGR8888 with HW_VIDEO_ENCODER usage"
This reverts commit
aa6b072d4ce2d445e48b9978ac3f0bc73cd97176.
Reason for revert: This change is unnecessary because HW_VIDEO_ENCODER
usage is unmasked in crrev.com/c/
1940034.
Original change's description:
> Enable to allocate XBGR8888 with HW_VIDEO_ENCODER usage
>
> crrev.com/c/
1904910 masks the HW_VIDEO_ENCODER usage when
> BO_USE_HW_VIDEO_ENCODER is specified in gralloc. A camera stack allocates
> XBGR8888 buffer with BO_USE_HW_VIDEO_ENCODER usage in ARC++ video
> recording if the camera HAL version is V1. Thanks to crrev.com/c/
1904910,
> it is necessary to enable to allocate XBGR8888 with HW_VIDEO_ENCODER usage.
>
> BUG=b:
144135251
> TEST=Recording with GCA
>
> Change-Id: I61beee87a1531c0dea371861ffb31ce2189ef854
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1934068
> Tested-by: Hirokazu Honda <hiroh@chromium.org>
> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
> Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Bug: b:
144135251
Cq-Depend: chromium:
1940034
Change-Id: I8d64c97399a601487fc84a6ecae337c235bd4464
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1947685
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Auto-Submit: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Hirokazu Honda [Mon, 25 Nov 2019 07:48:30 +0000 (16:48 +0900)]
Enable to allocate XBGR8888 with HW_VIDEO_ENCODER usage
crrev.com/c/
1904910 masks the HW_VIDEO_ENCODER usage when
BO_USE_HW_VIDEO_ENCODER is specified in gralloc. A camera stack allocates
XBGR8888 buffer with BO_USE_HW_VIDEO_ENCODER usage in ARC++ video
recording if the camera HAL version is V1. Thanks to crrev.com/c/
1904910,
it is necessary to enable to allocate XBGR8888 with HW_VIDEO_ENCODER usage.
BUG=b:
144135251
TEST=Recording with GCA
Change-Id: I61beee87a1531c0dea371861ffb31ce2189ef854
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1934068
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Miguel Casas [Tue, 19 Nov 2019 21:10:17 +0000 (16:10 -0500)]
i915: allow allocating AR30/AB30 for scanout
This CL extends the current M.O. of allowing ARGB formats for
scanout if the corresponding XRGB format supports it, for XR30
and XB30.
(Needs crrev.com/c/
1925247 patched in).
BUG=chromium:949260
TEST=null_platform_tests -f AR30 etc on kohaku/hatch
Change-Id: I720e82a17873e5f635f530bf3eefff24c2e3ab77
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1925250
Tested-by: Miguel Casas <mcasas@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Hirokazu Honda [Fri, 8 Nov 2019 03:57:55 +0000 (12:57 +0900)]
gralloc0: Add BO_USE_HW_VIDEO_ENCODER mask in GRALLOC_USAGE_HW_VIDEO_ENCODER
BUG=b:
144135251
TEST=ARC++ encoder on kukui
Change-Id: Ic15adebf2266b51aeaa19e863369e1c49c4fab03
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1904910
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Auto-Submit: Hirokazu Honda <hiroh@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Lepton Wu [Sat, 9 Nov 2019 06:58:12 +0000 (22:58 -0800)]
minigbm: virtio_gpu: add NV12 back as texture source format
BUG=b:
141082210
TEST=ozone_gl_unittests
Change-Id: I8288806796038f46ef9cb61afbf37443505dc79e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1907996
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Lepton Wu <lepton@chromium.org>
Auto-Submit: Lepton Wu <lepton@chromium.org>
Commit-Queue: Lepton Wu <lepton@chromium.org>
Jason Macnak [Tue, 12 Nov 2019 18:53:05 +0000 (10:53 -0800)]
Make drv_mapping_destroy() be called in release builds
The entire assert statement is currently being dropped when NDEBUG is defined
which causes mappings to never be cleaned up on bo destruction. When mappings
are not cleaned up, a new buffer that gets a recycled handle may find an old
mapping in drv_bo_map() which is not valid for the new buffer.
BUG=b:
123764798
TEST=built and ran with cuttlefish locally
Change-Id: Ib7147c3f5ed3a2b84793dfc2b17236ee0d92ac13
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1912760
Tested-by: Jason Macnak <natsu@google.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Jason Macnak <natsu@google.com>
Xin Li [Wed, 30 Oct 2019 21:21:41 +0000 (14:21 -0700)]
[automerger skipped] DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@
5915889 into stage-aosp-master am:
30f6c76384
am:
d78d3b2d59 -s ours
am skip reason: subject contains skip directive
Change-Id: Iaae5d34210bf805c4751f3810f786026d661cef2
Xin Li [Wed, 30 Oct 2019 20:57:46 +0000 (13:57 -0700)]
DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@
5915889 into stage-aosp-master
am:
30f6c76384
Change-Id: Iaedce822ce9ce5cf9979aa296f68ef9ebb8bbcfa
Xin Li [Wed, 30 Oct 2019 18:48:14 +0000 (11:48 -0700)]
DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@
5915889 into stage-aosp-master
Bug:
142003500
Change-Id: Ia09f52b985183da2799aae2796b2836d158bc559
David Stevens [Thu, 24 Oct 2019 05:59:31 +0000 (14:59 +0900)]
minigbm: virtio-gpu: bo_invalidate fixes
When invalidating a buffer, minigbm needs to ensure that the
host-to-guest transfer completes before returning from invalidate, to
prevent the host from overwriting subsequent guest changes.
However, invalidate is only necessary when the host can modify the
buffer. For now, just check for buffers the virtio gpu device can write
to (BO_USE_RENDERING). More flags can be added later for other virtio
devices.
BUG=b:
142687692
TEST=manual - Launch play store and verify there is no black app window.
Change-Id: Id9475e6037ff667324f4fd95a94b1723c18ea2d2
Reviewed-on: https://chromium-review.googlesource.com/
1875897
Tested-by: David Stevens <stevensd@chromium.org>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Lepton Wu <lepton@chromium.org>
Gurchetan Singh [Tue, 24 Sep 2019 17:37:59 +0000 (10:37 -0700)]
minigbm: rockchip/mediatek: add PROTECTED flag back in
crrev.com/c/
1643677 removed it, so we should add it back in.
BUG=b:
141347335
TEST=GtsExoPlayerTestCases/GtsMediaTestCases
Change-Id: Ic49bd4158349da6170e8435c5c516954fe1646fa
Reviewed-on: https://chromium-review.googlesource.com/
1821693
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Ready: Kazuhiro Inaba <kinaba@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
David Stevens [Wed, 25 Sep 2019 02:17:48 +0000 (11:17 +0900)]
minigbm: i915: fix planar height alignment
Aligned planar height should be calculated from the planar height, not
the buffer height.
BUG=b:
133292033
TEST=ArcVideoTest renders video correctly (w/a few other changes)
Change-Id: I1dc35ab4eebf9a5a86b2a9befaeb817a56dcfec2
Reviewed-on: https://chromium-review.googlesource.com/
1824304
Tested-by: David Stevens <stevensd@chromium.org>
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Gurchetan Singh [Tue, 24 Sep 2019 17:20:07 +0000 (10:20 -0700)]
minigbm: modify gbm.pc
virglrenderer will start requiring gbm >= 18.0.0, so add that
here.
BUG=none
TEST=local build
Change-Id: I40e63140d8b0ad6a76fc273c9c1e561c264aad7d
Reviewed-on: https://chromium-review.googlesource.com/
1821692
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Ready: Kazuhiro Inaba <kinaba@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Robert Tarasov <tutankhamen@chromium.org>
Alexandre Courbot [Tue, 1 Oct 2019 07:07:31 +0000 (16:07 +0900)]
mediatek: provide NV12 buffers for video decoding for MT8183
crrev.com/c/
1767450 changed the default android flexible buffer format
back to YV12, but the video decoding scenario on MT8183 requires NV12
buffers. Add an exception for this case.
BUG=b:
141732718
TEST=Play H.264 video with acceleration using both Chrome and Android's
Youtube.
Change-Id: Ie4b80389b22650450ea45f5cdea36a00360899a9
Reviewed-on: https://chromium-review.googlesource.com/
1833362
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Ready: Alexandre Courbot <acourbot@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Gurchetan Singh [Fri, 21 Jun 2019 03:48:01 +0000 (20:48 -0700)]
minigbm: allocate YV12 according to Android requirements
If we teach GBM/Virgl protocol/crosvm about
DRM_FORMAT_YVU420_ANDROID, we'll have probably teach Chrome too.
Since nobody uses DRM_FORMAT_YVU420 on GBM side really, let's
just resolve to DRM_FORMAT_YVU420_ANDROID for now.
Since DRM_FORMAT_YVU420_ANDROID is strictly defined, this call can
be probably be completely resolved in the guest in the future
possibly.
BUG=b:
132939420
TEST=compile only
Change-Id: I834e1d2644b199d74ac6efc5920e9040097246c7
Reviewed-on: https://chromium-review.googlesource.com/
1670555
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
David Stevens [Tue, 3 Sep 2019 01:45:33 +0000 (10:45 +0900)]
minigbm: virtio-gpu: pass more bind flags
Change-Id: I771b5e7ce8e028477570bff8bc7eee6822aaf22b
Reviewed-on: https://chromium-review.googlesource.com/
1786418
Tested-by: David Stevens <stevensd@chromium.org>
Commit-Ready: David Stevens <stevensd@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Ricky Liang [Tue, 24 Sep 2019 05:15:55 +0000 (13:15 +0800)]
mediatek: Fix the metadata for R8
The R8 format should be configured with LINEAR_METADATA.
BUG=b:
141328294
TEST=manually on Kukui
Change-Id: I612e78d28b63960428a6dce04104c3266b124a23
Reviewed-on: https://chromium-review.googlesource.com/
1816204
Tested-by: Ricky Liang <jcliang@chromium.org>
Commit-Ready: Ricky Liang <jcliang@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Gurchetan Singh [Tue, 24 Sep 2019 17:18:59 +0000 (10:18 -0700)]
minigbm: modify OWNERS
Having more reviewers is always nice.
BUG=none
TEST=none
Change-Id: I6990e248f0c1a2c4b9c791110dbf32585e296507
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1821691
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Gurchetan Singh [Sat, 14 Sep 2019 01:36:52 +0000 (18:36 -0700)]
minigbm: fix flags to align with GBM
For virtio, we can just forward use flags to host gbm. For that
to work, these flags must be aligned.
BUG=chromium:924405
TEST=compile
Change-Id: I64c03b4a374296a59749dccf65ab9ebeb59fc762
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1804827
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Gurchetan Singh [Thu, 19 Sep 2019 16:55:18 +0000 (09:55 -0700)]
minigbm: factor out metadata from struct bo
Generated using coccinelle:
@@
struct bo *B;
@@
- B->width
+ B->width
BUG=chromium:924405
TEST=compile
Change-Id: I4da1731a650d198ce7f2bda3031a47b2f9c3041c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1815566
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
David Stevens [Tue, 3 Sep 2019 01:49:50 +0000 (10:49 +0900)]
minigbm: cros_gralloc: handle video decoder flag
Although gralloc0 doesn't include a video decoder flag, the IAllocator
gralloc0 passthrough gives the lower 32 bits of the BufferUsage flags
to gralloc0. This change makes cros_gralloc add the video decoder BO_USE
flag when that happens. It also adds some missing combinations for when
the BO_USE_HW_VIDEO_DECODER flag is actually set.
Change-Id: If2248f33ac2456c077fe63e90d2c39e7f57e2568
Reviewed-on: https://chromium-review.googlesource.com/
1786419
Tested-by: David Stevens <stevensd@chromium.org>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Gurchetan Singh [Tue, 4 Jun 2019 23:53:54 +0000 (16:53 -0700)]
minigbm: rockchip/mediatek: remove R8 as texture source on Mali/Bifrost
EGL can't import this format on Mali/Bifrost.
BUG=chromium:969044
TEST=Ozone unit test
Change-Id: I356ec2bd35030af600b268bf39565e30e16465f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1643677
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Commit-Queue: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Kazuhiro Inaba [Thu, 19 Sep 2019 03:18:31 +0000 (03:18 +0000)]
Revert "minigbm: remove vgem backend"
This reverts commit
d014ed5b4c12e7c806260e2ae304accfcd6c73aa.
Reason for revert: broke video tests on rockchip devices b/
141093122
Bug:
141278896
Bug:
141093122
Original change's description:
> minigbm: remove vgem backend
>
> It's not used anymore, or atleast shouldn't be.
>
> BUG=none
> TEST=CQ will test
>
> Change-Id: Ib9232a7704bd39e59a8e2a5bc2ece62c5dd8e9c1
> Reviewed-on: https://chromium-review.googlesource.com/
1643676
> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
> Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Bug: none
Change-Id: I6645e9b32ebc6dcd97d126cc40523f516a201a05
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1812540
Reviewed-by: Kazuhiro Inaba <kinaba@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Kazuhiro Inaba <kinaba@chromium.org>
Auto-Submit: Kazuhiro Inaba <kinaba@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Nataraj Deshpande [Wed, 21 Aug 2019 22:19:46 +0000 (15:19 -0700)]
minigbm: Add support for RGBA_1010102 and RGBA_FP16
The CL adds support for HAL_PIXEL_FORMAT_RGBA_1010102 and
HAL_PIXEL_FORMAT_RGBA_FP16 in order to supplement Android
framework's VkFormats: VK_FORMAT_A2B10G10R10_UNORM_PACK32
and VK_FORMAT_R16G16B16A16_SFLOAT.
Fixes following dEQP failures on eve-arcnext.
dEQP-VK.wsi.android.swapchain.create#image_format
dEQP-VK.wsi.android.swapchain.simulate_oom#image_format
dEQP-VK.wsi.android.colorspace#basic
dEQP-VK.wsi.android.incremental_present.*
BUG=b:
139890132
TEST=Run dEQP-VK.wsi.android.* tests on eve-arcnext.
Change-Id: I0b52d9f970d34fe69e1b8c31a1f096365a74d8ec
Signed-off-by: Nataraj Deshpande <nataraj.deshpande@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/
1769261
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Gurchetan Singh [Sat, 29 Jun 2019 00:21:40 +0000 (17:21 -0700)]
minigbm: virtio-gpu: stride == level
Unfortunately, the kernel doesn't actually pass the guest layer_stride
and guest stride to the host (compare virtio_gpu.h and virtgpu_drm.h).
We can use the level to work around this.
BUG=b:
132939420
TEST=none
Change-Id: I96927b22fae2662a3a37e5191b3dfdf86c99dd84
Reviewed-on: https://chromium-review.googlesource.com/
1683087
Tested-by: David Stevens <stevensd@chromium.org>
Commit-Ready: David Stevens <stevensd@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: David Stevens <stevensd@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Gurchetan Singh [Tue, 4 Jun 2019 23:27:56 +0000 (16:27 -0700)]
minigbm: remove vgem backend
It's not used anymore, or atleast shouldn't be.
BUG=none
TEST=CQ will test
Change-Id: Ib9232a7704bd39e59a8e2a5bc2ece62c5dd8e9c1
Reviewed-on: https://chromium-review.googlesource.com/
1643676
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Kansho Nishida [Fri, 14 Jun 2019 09:28:18 +0000 (18:28 +0900)]
minigbm: virtio-gpu: Allocate one buffer even for multi plane format
It seems that DRM_IOCTL_VIRTGPU_RESOURCE_INFO ioctl doesn't work.
BUG=b:
133385154 b:
132939420
TEST=None
Change-Id: I3eec946894b0935a5fcd774346194087bb831249
Signed-off-by: Kansho Nishida <kansho@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/
1659792
Tested-by: David Stevens <stevensd@chromium.org>
Commit-Ready: Keiichi Watanabe <keiichiw@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Hirokazu Honda [Fri, 30 Aug 2019 02:07:53 +0000 (11:07 +0900)]
rockchip: Don't align height in NV12 format
crrev.com/c/
1729176 corrected a wrong NV12 buffer allocation on rockchip. After
the CL, the width and height both are aligned by 16. Since GBM API doesn't
notify the aligned height to an application. The application must handle the
planes with offsets.
It turns out that Camera HAL on ChromeOS doesn't handle the allocated buffer
with offsets. In other words, it doesn't think of extra data between planes.
This causes, in a camera preview, a green line at bottom and a strange blue line
due to misposition of color planes.
This CL is a temproal workaround for the Camera HAL issue. This CL changes
minigbm implementation to not align height. This works because present video
encoder and decoder always calls GBM API with the height already aligned by
video driver. Note that a camera stack on encoding process will have to allocate
a proper buffer with non-aligned height in the future. This must be a temporal
workaround.
BUG=b:
140152839
TEST=Confirm no green line in camera view and recorded video with Camera app
Change-Id: Ide53fa6801fc4bdabcfbe46004d01f5ab83a002f
Reviewed-on: https://chromium-review.googlesource.com/
1775953
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Commit-Ready: Hirokazu Honda <hiroh@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Xin Li [Sun, 8 Sep 2019 22:13:54 +0000 (15:13 -0700)]
[automerger skipped] Merge qt-r1-dev-plus-aosp-without-vendor (
5817612) into stage-aosp-master am:
513558d983 -s ours am:
0484cc459d -s ours
am:
80aeabe082 -s ours
am skip reason: change_id Ibfac366eff7b1e63b2b6757d2600ef20f19e71a6 with SHA1
03d46b8ec2 is in history
Change-Id: I128cf1d3c3c1f29d58d30b3df1cfd12856d28fef
Xin Li [Sun, 8 Sep 2019 21:52:48 +0000 (14:52 -0700)]
[automerger skipped] Merge qt-r1-dev-plus-aosp-without-vendor (
5817612) into stage-aosp-master am:
513558d983 -s ours
am:
0484cc459d -s ours
am skip reason: change_id Ibfac366eff7b1e63b2b6757d2600ef20f19e71a6 with SHA1
03d46b8ec2 is in history
Change-Id: I774dc301a4868b98f5cd4858b52cf7e0b1ebb327
Xin Li [Sun, 8 Sep 2019 21:32:24 +0000 (14:32 -0700)]
[automerger skipped] Merge qt-r1-dev-plus-aosp-without-vendor (
5817612) into stage-aosp-master
am:
513558d983 -s ours
am skip reason: change_id Ibfac366eff7b1e63b2b6757d2600ef20f19e71a6 with SHA1
03d46b8ec2 is in history
Change-Id: If8b46edb3d19fb36581337e19773a85fdc3e74f1
Xin Li [Sun, 8 Sep 2019 19:43:56 +0000 (12:43 -0700)]
Merge qt-r1-dev-plus-aosp-without-vendor (
5817612) into stage-aosp-master
No content change.
Bug:
135460123
Change-Id: I9ddc1e4394738bc99b33e251f138736806fdffd7
Merged-In: Ibfac366eff7b1e63b2b6757d2600ef20f19e71a6
Xin Li [Thu, 5 Sep 2019 20:18:16 +0000 (13:18 -0700)]
[automerger skipped] DO NOT MERGE - Merge Android 10 into master am:
03d46b8ec2 -s ours am:
8e859c3fc8 am:
8a1667b9d3
am:
4b8c5e4043 -s ours
am skip reason: subject contains skip directive
Change-Id: I3d34f638e7e22a2b0345b9403e49c28a2829ec76
Xin Li [Thu, 5 Sep 2019 19:56:06 +0000 (12:56 -0700)]
[automerger skipped] DO NOT MERGE - Merge Android 10 into master am:
03d46b8ec2 -s ours am:
8e859c3fc8
am:
8a1667b9d3
Change-Id: I851ec26c25933ce1341a4b0dc3c0457bc7b4c5ea
Xin Li [Thu, 5 Sep 2019 19:31:24 +0000 (12:31 -0700)]
[automerger skipped] DO NOT MERGE - Merge Android 10 into master am:
03d46b8ec2 -s ours
am:
8e859c3fc8
Change-Id: I3accd9b32304054b1543bceef94bfe480e0f7c3d
Xin Li [Thu, 5 Sep 2019 18:44:24 +0000 (11:44 -0700)]
[automerger skipped] DO NOT MERGE - Merge Android 10 into master
am:
03d46b8ec2 -s ours
am skip reason: subject contains skip directive
Change-Id: I41627158e22d83ac54c395523706bdd4b8ddbe05
Xin Li [Wed, 4 Sep 2019 20:33:46 +0000 (13:33 -0700)]
DO NOT MERGE - Merge Android 10 into master
Bug:
139893257
Change-Id: Ibfac366eff7b1e63b2b6757d2600ef20f19e71a6
Nicolas Boichat [Thu, 29 Aug 2019 13:46:29 +0000 (21:46 +0800)]
mediatek/rockchip: Use PRIu64 to print uint64_t variables
Required to build for arm64 on mediatek, and let's fix the
rockchip one, while we're at it.
BUG=b:
140228960
TEST=emerge-kevin-arc64 -av arc-cros-gralloc
TEST=emerge-kukui -av arc-cros-gralloc (with ARC++ 64-bit)
Change-Id: I8e04355a4d247b44ac86963331be72495655d321
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
1775949
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Auto-Submit: Nicolas Boichat <drinkcat@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Nicolas Boichat <drinkcat@chromium.org>
Hirokazu Honda [Fri, 23 Aug 2019 05:31:31 +0000 (14:31 +0900)]
mediatek: Change android flexible format to allocate YVU420 buffer
crrev.com/c/
1716864 made gralloc allocae NV12 buffer with the android flexible
format, DRM_FORMAT_FLEX_YCbCr_420_888. However, the change broke many CTS tests.
This partially reverts the commit. The allocated buffer fromat becomes YVU420.
BUG=chromium:987185
BUG=b:
139714614
Cq-Depend: chromium:
1767680
Change-Id: I9fcde88cff79fac2655fb627418b371b314077c1
Reviewed-on: https://chromium-review.googlesource.com/
1767450
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Commit-Ready: Hirokazu Honda <hiroh@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Mark Yacoub [Wed, 21 Aug 2019 19:32:43 +0000 (19:32 +0000)]
Revert "minigbm/i915: Add support for I915_FORMAT_MOD_Y_TILED_CCS"
This reverts commit
a0868975d7d0242fd47c0090c2f779f8f2049dba.
Reason for revert: Broke many tests such as the screenshot test and using a 2nd external monitor.
Original change's description:
> 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 Intels render
> buffer compression.
>
> BUG=979736
>
> Change-Id: I2f3d19be8b7661693054da8a153c2412c65233f1
> Reviewed-on: https://chromium-review.googlesource.com/
1706735
> Tested-by: Mark Yacoub <markyacoub@google.com>
> Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
> Reviewed-by: Mark Yacoub <markyacoub@google.com>
Bug: 996011,988559,995549,996036,
Change-Id: I5fbed90c5d8774b9385811a145b14a11423bb707
Reviewed-on: https://chromium-review.googlesource.com/
1759155
Tested-by: Mark Yacoub <markyacoub@google.com>
Commit-Ready: Mark Yacoub <markyacoub@google.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Mark Yacoub <markyacoub@google.com>
David Stevens [Fri, 9 Aug 2019 11:20:23 +0000 (20:20 +0900)]
minigbm: virtio_gpu: Add camera usage to all NV12 combinations
This change adds camera usage to all NV12 combinations after all
combinations have been added. This fixes an issue where a virtio_gpu
with 3d support would not have any camera compatible NV12 combinations.
BUG=b:
132939858
TEST=Camera apps run on arcvm with no gralloc errors (although they
don't actually work for separate reasons).
Change-Id: Icc868398d6e036f8430afb9a351809bb7965202e
Reviewed-on: https://chromium-review.googlesource.com/
1746346
Tested-by: Tomasz Figa <tfiga@chromium.org>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Hirokazu Honda [Wed, 31 Jul 2019 07:35:52 +0000 (16:35 +0900)]
Add GBM_BO_USE_HW_VIDEO_ENCODER use flag
Chrome needs to allocate a linear buffer that a hardware video encoder can read
and cpu can read and write. There is no use flag in gbm that specifies the
former. This CL introduces a new use flag for that.
BUG=b:
138703716
TEST=None
Change-Id: Ied0321914a366294a47e4fc5c2a8f08ee0351bd8
Reviewed-on: https://chromium-review.googlesource.com/
1728729
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Hirokazu Honda [Wed, 24 Jul 2019 10:40:20 +0000 (19:40 +0900)]
mediatek: Add NV12 format for output frame in HW decoder
YV12 have been a pixel format of output frame in HW decoder on MediaTek device.
Since all other platforms uses NV12 for the format, it is good to change the
format to NV12 on MediaTek as well. So we can only think about NV12 for a pixel
format in HW decoder.
BUG=chromium:987185
TEST=video_decode_accelerator_tests
TEST=Play video with Chrome
Cq-Depend:chromium:
1716844
Change-Id: Ic7e4f66d503247bdeba9cb66c8a598b233ed6df9
Reviewed-on: https://chromium-review.googlesource.com/
1716864
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Hirokazu Honda [Thu, 1 Aug 2019 07:37:47 +0000 (16:37 +0900)]
rockchip: Fix the size computation with NV12 buffer
The size and offsets are computed with the given height that is not aligned.
This CL changes to compute them with an aligned height
Bug: None
Test: video_decode_accelerator_tests on kevin
Change-Id: I3e316400d2ab40beee8785f337e9451408ef7318
Reviewed-on: https://chromium-review.googlesource.com/
1729176
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Hirokazu Honda [Wed, 31 Jul 2019 08:33:06 +0000 (17:33 +0900)]
amdgpu: Enable to allocate YVU420 buffer with BO_USE_TEXTURE_MASK flag
Chrome needs to allocate YUV420 buffer that cpu can read and write with a linear
view. YUV420 is not supported by gbm widely. YVU420 is used on behalf of YUV420.
This CL adds YVU420 to texture_source_formats so that YVU420 buffer can be
allocated on AMD platform.
BUG=chromium:987860
TEST=None
Change-Id: I11af92e74ad1d3c7c5631e67c5a2fef90077d887
Reviewed-on: https://chromium-review.googlesource.com/
1728730
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Commit-Ready: Hirokazu Honda <hiroh@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Gurchetan Singh [Sat, 27 Jul 2019 01:11:18 +0000 (18:11 -0700)]
minigbm: cros_gralloc: fix fd leaks
We were leaking fds.
BUG=none
TEST=compile
Change-Id: I75f43d6f696f619c0ae284695b38586bc9ffff8c
Reviewed-on: https://chromium-review.googlesource.com/
1722289
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Gurchetan Singh [Fri, 26 Jul 2019 03:48:28 +0000 (20:48 -0700)]
minigbm: clang format
It's good to run this once and a while.
Change-Id: I69b6f9252455360b6d326a3ec89fe51517abda2f
Reviewed-on: https://chromium-review.googlesource.com/
1719976
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Mark Yacoub [Thu, 25 Jul 2019 15:08:07 +0000 (11:08 -0400)]
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 Intels render
buffer compression.
BUG=979736
Change-Id: I2f3d19be8b7661693054da8a153c2412c65233f1
Reviewed-on: https://chromium-review.googlesource.com/
1706735
Tested-by: Mark Yacoub <markyacoub@google.com>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Mark Yacoub <markyacoub@google.com>
Greg Hartman [Wed, 17 Jul 2019 22:55:17 +0000 (15:55 -0700)]
Fix potential uninitialed read
BUG=none
Test=can compile crosvm
Change-Id: I65577ca08f4d41ff6a7b6d2a2af42f82798608bf
Tested-by: ghartman@google.com
Reviewed-by: adelva@google.com
Reviewed-on: https://android-review.googlesource.com/c/platform/external/minigbm/+/
1056177
Reviewed-on: https://chromium-review.googlesource.com/
1707385
Tested-by: Greg Hartman <ghartman@google.com>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Miguel Casas [Thu, 18 Jul 2019 17:07:30 +0000 (13:07 -0400)]
minigbm: enable BO_USE_HW_VIDEO_DECODER for P010
This should be enabled for decoding P010 buffers, but had forgotten
to add this BO explicitly.
Change-Id: Icd3bbd419711b649299c7eea92d93b3c7f9a5ada
Bug: 911754
Reviewed-on: https://chromium-review.googlesource.com/
1708514
Tested-by: Miguel Casas <mcasas@chromium.org>
Commit-Ready: Miguel Casas <mcasas@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
David Riley [Tue, 28 May 2019 20:08:12 +0000 (13:08 -0700)]
minigbm: i915: Add support for AR30 DRM_FORMAT_ARGB2101010.
BUG=chromium:963559
TEST=freecad starts under crosvm
Change-Id: I01c9bfcb0eb8419f06fff69edff6f5eb09232403
Reviewed-on: https://chromium-review.googlesource.com/
1631946
Tested-by: David Riley <davidriley@chromium.org>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Greg Hartman [Thu, 18 Jul 2019 04:18:32 +0000 (21:18 -0700)]
Fix potential uninitialized read am:
6acf248c84 am:
1c4a1cf7e4 am:
a4ec2bb29d
am:
f003a0f6df
Change-Id: I8e711cf4a31274376b0e8649067b125126689c4d
Greg Hartman [Thu, 18 Jul 2019 04:09:31 +0000 (21:09 -0700)]
Fix potential uninitialized read am:
6acf248c84 am:
1c4a1cf7e4
am:
a4ec2bb29d
Change-Id: Iae80b4aaad1c79ed9a0fda9cea2ba8ea1ac42f90
Greg Hartman [Thu, 18 Jul 2019 03:45:20 +0000 (20:45 -0700)]
Fix potential uninitialized read am:
6acf248c84
am:
1c4a1cf7e4
Change-Id: I372f5d9c878cda0512eaa6ea475cfb39949106d1
Greg Hartman [Thu, 18 Jul 2019 03:24:45 +0000 (20:24 -0700)]
Fix potential uninitialized read
am:
6acf248c84
Change-Id: I2bb6e03c66349cde447abddb6b8cc9e138a2b3b7
Greg Hartman [Wed, 17 Jul 2019 22:55:17 +0000 (15:55 -0700)]
Fix potential uninitialized read
BUG:
137793471
Test: Patched and can compile minigbm
Change-Id: I65577ca08f4d41ff6a7b6d2a2af42f82798608bf
Gurchetan Singh [Mon, 8 Jul 2019 16:50:01 +0000 (09:50 -0700)]
minigbm: Reland "minigbm: virtio-gpu: remove NV12 as texture source format"
Add the SW mask and linear flags too, which are required for WebRTC tests.
BUG=b:
135504137
TEST=tast.camera.WebRTC
Change-Id: Ifa37546e855471e3a125acb483c57d5b34d61edf
Reviewed-on: https://chromium-review.googlesource.com/
1691068
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Mark Yacoub [Tue, 9 Jul 2019 17:59:50 +0000 (13:59 -0400)]
Change Assert to Check and return NULL
Security wise, we now end up relying on gbm_bo_import failing.
gbm does some basic validation based on lseek and the provided format.
For robustness, return NULL instead of crashing the system.
BUG=979736
Change-Id: Ib25a770a3a986a3079fe8db183ea78ac5f777602
Reviewed-on: https://chromium-review.googlesource.com/
1693301
Tested-by: Mark Yacoub <markyacoub@google.com>
Commit-Ready: Mark Yacoub <markyacoub@google.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Mark Yacoub <markyacoub@google.com>
Tomasz Figa [Thu, 4 Jul 2019 02:41:30 +0000 (02:41 +0000)]
Revert "minigbm: virtio-gpu: remove NV12 as texture source format"
This reverts commit
2efa6b924c3cafc1bd6b25998978aa0e9e63f526.
Reason for revert: Broke camera VM tests, b/
135504137.
The intention was to apparently just disable the texturing usage,
but the change effectively reduced NV12 from the whole
BO_USE_TEXTURE_MASK down to just BO_USE_CAMERA_READ |
BO_USE_CAMERA_WRITE. Given the definition of the former, which is
#define BO_USE_TEXTURE_MASK BO_USE_LINEAR | BO_USE_PROTECTED | BO_USE_RENDERSCRIPT | \
BO_USE_SW_READ_OFTEN | BO_USE_SW_WRITE_OFTEN | \
BO_USE_SW_READ_RARELY | BO_USE_SW_WRITE_RARELY | BO_USE_TEXTURE
it removed even the SW access flags, which are needed in the capture
stack, and thus broke the camera.
Original change's description:
> minigbm: virtio-gpu: remove NV12 as texture source format
>
> This breaks the Ozone EGL unit tests. This should still work for
> Vivid Camera testing.
>
> BUG=chromium:970923
> TEST=ozone EGL unit test
>
> Change-Id: I850584f926a7bd1cdd4dbc749d446ba775363e2a
> Reviewed-on: https://chromium-review.googlesource.com/
1646884
> Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
> Reviewed-by: Stphane Marchesin <marcheu@chromium.org>
> Reviewed-by: Miguel Casas <mcasas@chromium.org>
Bug: chromium:970923
Bug: b:
135504137
Change-Id: Ic506f38a85f1fa164f0ac7fd9f562872e4cac700
Test: tast.camera.WebRTC on betty
Reviewed-on: https://chromium-review.googlesource.com/
1687732
Tested-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Ready: Keiichi Watanabe <keiichiw@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Gurchetan Singh [Wed, 5 Jun 2019 02:43:41 +0000 (19:43 -0700)]
minigbm: virtio-gpu: use NV12 as flexible media format
All of our future drivers (including MTK_MT8183) seem to
prefer NV12 as their flexible media format, so advertise that.
In the unlikely event that changes, we can set either use the
capabilities or resource create versioning (a planned feature).
This has the benefit of keeping Android flexible formats in
Android userspace.
BUG=b:
132939420
TEST=compile
Change-Id: I486f7be23f8431aa8bbaea89dca7c1304536e9ac
Reviewed-on: https://chromium-review.googlesource.com/
1644464
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Lepton Wu <lepton@chromium.org>
Gurchetan Singh [Wed, 5 Jun 2019 02:39:51 +0000 (19:39 -0700)]
minigbm: modify resolve format hooks a bit
Plumb the driver backend to the resolve format hook.
BUG=b:
132939420
TEST=compile
Change-Id: I3ac10f5c986bc5dae5b34cd70654676d4ad289ea
Reviewed-on: https://chromium-review.googlesource.com/
1645879
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Lepton Wu <lepton@chromium.org>
Gurchetan Singh [Wed, 5 Jun 2019 15:48:02 +0000 (08:48 -0700)]
minigbm: update virgl_hw.h
Taken from ToT virglrenderer (commit e27247), which contains the
upstream version of this file.
BUG=b:
132939420
TEST=compile
Change-Id: I6efc5faa55dfc2841ca17d04db9f16eaeac39d7e
Reviewed-on: https://chromium-review.googlesource.com/
1645878
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Lepton Wu <lepton@chromium.org>
Gurchetan Singh [Fri, 28 Jun 2019 00:53:24 +0000 (17:53 -0700)]
minigbm: fix subsampling issue
For YUV, we're not consistent. For the "y" component, we assume
the offset is just y * plane_stride, letting the API user take
care of the subsampling. For the "x" component, we subsample the
"x" the user passes in (see drv_stride_from_format(..)).
Let's be consistent and not subsample.
This likely makes neglible difference since the users of the API map
the entire plane.
BUG=b:
132939420
TEST=none
Change-Id: I0fcfd8ba6a2ae59a419af963eb7b54245f697d77
Reviewed-on: https://chromium-review.googlesource.com/
1681382
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Lepton Wu <lepton@chromium.org>
Xin Li [Tue, 2 Jul 2019 22:32:24 +0000 (15:32 -0700)]
[automerger skipped] DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (
5699924) into stage-aosp-master am:
c960faca0f
am:
09c0257064 -s ours
am skip reason: subject contains skip directive
Change-Id: I1bb231ad6290efa709731547bb1452511578f364
Xin Li [Tue, 2 Jul 2019 19:42:45 +0000 (12:42 -0700)]
DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (
5699924) into stage-aosp-master
am:
c960faca0f
Change-Id: I7ecfedce5f9214ed1b75f7378d3b743bc02aadbd
Xin Li [Mon, 1 Jul 2019 20:59:32 +0000 (20:59 +0000)]
DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (
5699924) into stage-aosp-master
Bug:
134405016
Change-Id: Ie88471035cd29f26971b4865c7c1d721bd6f5c76
Alistair Delva [Thu, 27 Jun 2019 21:42:32 +0000 (14:42 -0700)]
Update OWNERS for my new LDAP am:
d0dceb46dd am:
9f8fe2bbe0 am:
6c13d0657c
am:
6a3267bcfe
Change-Id: I589960765fee17ab80eb0aab436a915db1450009
Alistair Delva [Thu, 27 Jun 2019 19:41:52 +0000 (12:41 -0700)]
Update OWNERS for my new LDAP am:
d0dceb46dd am:
9f8fe2bbe0
am:
6c13d0657c
Change-Id: I34f6f5ff0da513faf3f008944885785011130997
Alistair Delva [Thu, 27 Jun 2019 19:20:24 +0000 (12:20 -0700)]
Update OWNERS for my new LDAP am:
d0dceb46dd
am:
9f8fe2bbe0
Change-Id: Ice7c045feace9fe2f2876569215abd9e94481640
Alistair Delva [Thu, 27 Jun 2019 19:05:51 +0000 (12:05 -0700)]
Update OWNERS for my new LDAP
am:
d0dceb46dd
Change-Id: I440ec83d2f236b52c442891535e866f559e282fa
Alistair Delva [Wed, 26 Jun 2019 18:29:55 +0000 (11:29 -0700)]
Update OWNERS for my new LDAP
Exempt-From-Owner-Approval: I was the only owner
Change-Id: Ife39959288f2414da063652739343656bccc7cf9
Ludovico de Nittis [Wed, 29 May 2019 08:02:21 +0000 (10:02 +0200)]
minigbm: fix uninitialized variable error
To fix the maybe uninitialized error we assign plane_type a starting
value.
The number zero corresponds to DRM_PLANE_TYPE_OVERLAY, so instead we
initialize plane_type to UINT64_MAX.
Bug: chromium:968030
Change-Id: I4fe119c1491926227151742041a73207971f56f0
Reviewed-on: https://chromium-review.googlesource.com/
1634771
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Gurchetan Singh [Thu, 6 Jun 2019 00:07:56 +0000 (17:07 -0700)]
minigbm: virtio-gpu: remove NV12 as texture source format
This breaks the Ozone EGL unit tests. This should still work for
Vivid Camera testing.
BUG=chromium:970923
TEST=ozone EGL unit test
Change-Id: I850584f926a7bd1cdd4dbc749d446ba775363e2a
Reviewed-on: https://chromium-review.googlesource.com/
1646884
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Gurchetan Singh [Wed, 29 May 2019 00:49:09 +0000 (17:49 -0700)]
minigbm: run presubmit.sh and add OWNERS file
This now apparently is required.
Change-Id: I28b19684d207aad50493974dc71d8249bc82ca21
Reviewed-on: https://chromium-review.googlesource.com/
1633452
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Ludovico de Nittis [Tue, 28 May 2019 14:03:34 +0000 (16:03 +0200)]
Add dri.c to the MINIGBM_SRC list
dri.c needs to be included in the minigbm build because it is required
when using an AMD gpu.
Bug: chromium:967346
Change-Id: I642836bb970d2b738c98a9869a245ca36c80f3ed
Reviewed-on: https://chromium-review.googlesource.com/
1631282
Commit-Ready: Daniel Nicoara <dnicoara@chromium.org>
Tested-by: Daniel Nicoara <dnicoara@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Daniel Nicoara <dnicoara@chromium.org>
Nick Fan [Mon, 8 Oct 2018 03:53:26 +0000 (11:53 +0800)]
minigbm: Add formats support for MT8183 camera
Add NV21, YUYV and YVU420 formats support for MT8183 camera
Use config to seperate modification only for MT8183
BUG=b:
109911488
TEST=emerge-kukui minigbm
Change-Id: I7201b89de3fa062f96cd69e4b91a2a4b434c738e
Signed-off-by: Nick Fan <Nick.Fan@mediatek.com>
Reviewed-on: https://chromium-review.googlesource.com/
1267857
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Nick Fan <nick.fan@mediatek.corp-partner.google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Valerie Hau [Mon, 6 May 2019 16:38:33 +0000 (09:38 -0700)]
Modify gralloc0 implementation am:
8894cf7256
am:
cef328d2bc
Change-Id: I6a585f763752f8a811c84ac7b8c5d928ded4e243
Valerie Hau [Mon, 6 May 2019 16:28:35 +0000 (09:28 -0700)]
Modify gralloc0 implementation
am:
8894cf7256
Change-Id: I904b1c519f8a39284738d4d26418a00fbf2f896f
Miguel Casas [Tue, 30 Apr 2019 22:11:40 +0000 (18:11 -0400)]
Add support for DRM_FORMAT_P010
Test: Tested with chrome's ozone_gl_unittests: crrev.com/c/
1561136
Bug: 911754
Change-Id: I8a9a28ba1c3a1186fd88b43c85098a5550fa1c8b
Reviewed-on: https://chromium-review.googlesource.com/
1590464
Commit-Ready: Miguel Casas <mcasas@chromium.org>
Tested-by: Miguel Casas <mcasas@chromium.org>
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Lepton Wu [Fri, 19 Apr 2019 19:26:39 +0000 (12:26 -0700)]
minigbm: virgl: Map BO_USE_SCANOUT to VIRGL_BIND_SCANOUT
Now crosvm use VIRGL_BIND_SCANOUT to decide if we should allocate buffer from
host minigbm. For buffers sent to Wayland, they have to be allocated from host
minigbm. Since arc-cros-gralloc already maps GRALLOC_USAGE_HW_COMPOSER to
BO_USE_SCANOUT, we only need to mark related formats good for BO_USE_SCANOUT and
then map BO_USE_SCANOUT to VIRGL_BIND_SCANOUT.
BUG=b:
130848979
TEST=manual - Run arcvm with updated arc-cros-gralloc
Change-Id: If6a126707701198911409f39627c860573be34f4
Reviewed-on: https://chromium-review.googlesource.com/
1575526
Commit-Ready: Lepton Wu <lepton@chromium.org>
Tested-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Valerie Hau [Thu, 25 Apr 2019 18:12:42 +0000 (11:12 -0700)]
Modify gralloc0 implementation
Add validateBufferSize and getTransportSize
Bug:
131089111
Test: build, boot
Change-Id: I53195c75907c51585ed68a885d8c35fe90f1b885
Stephen Boyd [Tue, 9 Apr 2019 18:03:00 +0000 (11:03 -0700)]
minigbm: msm: Silence printf warning on 64-bit build
Compiling this file with a 64-bit userland fails like so:
/mnt/host/source/src/platform/minigbm/msm.c:243:70: error: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Werror,-Wformat]
drv_log("invalid format = %d, flags = %llx combination\n", format, flags);
~~~~ ^~~~~
%lx
Fix the error by using the appropriate hex printing printf format for
uint64_t types.
BUG=None
TEST=Compile with arm64 userland
Change-Id: If1b0298ccf12b8ed4e162a8e5668de1be7ad29e5
Reviewed-on: https://chromium-review.googlesource.com/
1559755
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Bas Nieuwenhuizen [Wed, 3 Apr 2019 16:12:12 +0000 (18:12 +0200)]
amdgpu: Add ABGR8888 using non-linear tiling too.
BUG=b:
129625642
TEST=test_that ${IP} cheets_CTS_P.9.0_r7.x86.CtsGraphicsTestCases on Grunt
Change-Id: I716533df9e56e52818b4c52ee557747dc3a68e40
Reviewed-on: https://chromium-review.googlesource.com/
1550921
Commit-Ready: Drew Davenport <ddavenport@chromium.org>
Tested-by: Bas Nieuwenhuizen <basni@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Drew Davenport <ddavenport@chromium.org>
Bill Rassieur [Thu, 4 Apr 2019 00:38:32 +0000 (17:38 -0700)]
Merge master@
5428150 into git_qt-dev. am:
abd6c0d172
am:
99e3b93c35
Change-Id: If6e1d1a9aa383036b3d68ec31aed26768d8157ba
Bill Rassieur [Wed, 3 Apr 2019 23:29:47 +0000 (16:29 -0700)]
Merge master@
5428150 into git_qt-dev-plus-aosp.
am:
2ebe94b665
Change-Id: I9324f1d823e3f971bd63a2a5bcc3d70dbec36480
Bill Rassieur [Wed, 3 Apr 2019 15:46:26 +0000 (08:46 -0700)]
Merge master@
5428150 into git_qt-dev.
am:
abd6c0d172
Change-Id: Id4a0dd4be90c1bd0c40b7c977be57f0df3d28378
Bill Rassieur [Tue, 2 Apr 2019 18:30:16 +0000 (18:30 +0000)]
Merge master@
5428150 into git_qt-dev-plus-aosp.
Change-Id: Iab4a62d752fbf4432cff21eb2ac34a52557582b8
BUG:
129345239
Fritz Koenig [Tue, 19 Mar 2019 20:25:45 +0000 (13:25 -0700)]
minigbm: mediatek: Implement bo_create_with_modifiers
Mediatek MT8183 only supports DRM_FORMAT_MOD_LINEAR.
BUG=b:
123042223, b:
129645475
TEST=null_platform_test -m DRM_FORMAT_MOD_LINEAR
Change-Id: I1938e52a9b221f25b62ddd27916a2222be8c0a46
Reviewed-on: https://chromium-review.googlesource.com/
1529226
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Fritz Koenig <frkoenig@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Bill Rassieur [Tue, 2 Apr 2019 16:54:20 +0000 (16:54 +0000)]
Merge master@
5428150 into git_qt-dev.
Change-Id: I722f2f84c552b5fdce2aee867c740ea41093d614
BUG:
129345239
Drew Davenport [Mon, 25 Mar 2019 15:18:42 +0000 (09:18 -0600)]
amdgpu: Add ABGR8888 for scanout
BUG=b:
127868532
TEST=Complete glbench without errors in crosvm
Change-Id: I921ab9dd1611d6b45eb980ed7988941806eb6761
Reviewed-on: https://chromium-review.googlesource.com/
1538374
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Drew Davenport <ddavenport@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Colin Cross [Wed, 27 Mar 2019 08:26:34 +0000 (01:26 -0700)]
Convert external/minigbm to Android.bp am:
9521a60253 am:
5a5d91c739
am:
1649282621
Change-Id: I45add530e5e692a4878aa37117858c639a5711e7