The multi-planar formats are being allocated into a single plane,
and the minigbm exynos backend is dropped. So we can use `handle` instead of handles as of now.
Remove some of the helper functions that calculate the number of planes.
There is no need to check if there is more than one kernel buffer per buffer object.
Added a new function `drv_gem_close` in `drv_helpers` that can be used by `drv_gem_bo_destroy` and `drv_prime_bo_import`. It can be used to clean the unused gem_handle.
Bug=b:266776512
TEST=camera and screenshot work fine after deploying the change #strongbad
TEST=camera and screenshot work fine after deploying the change #kukui-arc-r
TEST=camera and screenshot work fine after deploying the change, tested a couple of apps in the Google Play Store, and checked file `dma_buf/bufinfo` to see there's no object leaking. #guybrush
Change-Id: Ib63559504e4cb8f1a32ae90170925146613d694f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4297873
Commit-Queue: Dawn Han <dawnhan@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Dawn Han <dawnhan@google.com>
drv_bo_from_format will apply stride_align to all planes. Since we
always pass 1 for stride_align, there is no change except when the
format is DRM_FORMAT_YVU420_ANDROID.
When the format is DRM_FORMAT_YVU420_ANDROID, and when stride_align is 0
or 1, drv_bo_from_format assumes there is no hw requirement and forces
stride_align to 16. But because we used to require stride to be aligned
to 32, there is no actual change either.
BUG=b:265746435
TEST=subset of CTS and CTS Verifier on grunt, guybrush and skyrim
Change-Id: Ia6ef89bb744c39d2baead07bc47f11b0eea96b97
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4336265
Tested-by: Chia-I Wu <olv@google.com>
Commit-Queue: Chia-I Wu <olv@google.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Dawn Han <dawnhan@google.com>
Remove the parameter to align with upstream gbm.
For some places that use the number of planes. The number is 1. The
multi-planar formats are being allocated into a single plane, and
minigbm exynos backend is dropped. So we can just set the plane
index to 0 if needed.
Fixed the format in i915.c.
Bug=b:266776512
TEST=camera works after deploying the change #strongbad
TEST=camera works after deploying the change #corsola
Change-Id: I0880917754c01b9d0f27d21f3c42d87f00a09f50
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4249501
Commit-Queue: Dawn Han <dawnhan@google.com>
Tested-by: Dawn Han <dawnhan@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olv@google.com>
V4L2 aligns the stride of P010 to 256 while
NV12 is aligned to 128. Previously the width
was doubled, but not the alignment.
BUG=b:259594959
TEST=v4l2_stateful_decoder -f test-25fps.vp9_2 -c P010 -w -m 1
Change-Id: I35f566178f02e2506861930cb348c05f9b5e27b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4214566
Commit-Queue: Fritz Koenig <frkoenig@chromium.org>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Tested-by: Fritz Koenig <frkoenig@chromium.org>
Reviewed-by: Nathan Hebert <nhebert@chromium.org>
GBM users don't know how to do CPU access to any buffer with a modfier.
So they have no business mapping them.
This fixes "jailbar" corruption resulting from something somewhere
trying to do sw rendering to a UBWC buffer
BUG=b:237708681
TEST=Alt-TopRowFullScreenButton on herobrine
Change-Id: Ideb80df17d4f174600b7f605f563f275655a88da
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4195657
Tested-by: Rob Clark <robdclark@chromium.org>
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
Commit-Queue: Rob Clark <robdclark@chromium.org>
Auto-Submit: Rob Clark <robdclark@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
This reverts commit 7a1a7dbda3.
BUG=b:243681772
TEST=confirm UBWC usage in arcvm
Cq-Depend: chromium:3900312
Change-Id: I126353bd91b75b7656257da00bc6fdf7d4c17060
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3900553
Reviewed-by: Chia-I Wu <olv@google.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Auto-Submit: Rob Clark <robdclark@chromium.org>
Tested-by: Rob Clark <robdclark@chromium.org>
Commit-Queue: Rob Clark <robdclark@chromium.org>
This is required for modern Android atop a gralloc with the cross_domain
backend or other native backend.
BUG=b:238609372
TEST=build and AHB cts
Change-Id: Id963eeec62c4400cc009384e127c93588c99346e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3777566
Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Jason Macnak <natsu@google.com>
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
With arcvm, virtgpu_cross_domain.c in the host remaps YVU420_ANDROID to
YVU420, to avoid exposing custom DRM_FORMAT_x values in the API between
the host and guest. Which means it expects identical behavior for both.
Fortunately, we can do this, provided that it is a single level+layer
(minigbm does not allocate anything more complex than non-mipmap 2D),
and not tiled/UBWC. The latter constraint we can get away with because
NV12 is used for anything produced by hw.
BUG=b:238158981
TEST=cts-tradefed run cts -m CtsVideoTestCases
Change-Id: If1330340f84835643be7cf8cae95026cbcebf273
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3774456
Auto-Submit: Rob Clark <robdclark@chromium.org>
Tested-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Commit-Queue: Rob Clark <robdclark@chromium.org>
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
This actually reverts commit 407eb0ebf3.
However, the rationales have been updated.
BUG=b:229147702
TEST=emerge and deploy and verified graphics working in crostini
Change-Id: I8f491daf14f97a5dbda797207886695a985e44e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3586372
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org>
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olv@google.com>
Commit-Queue: Chia-I Wu <olv@google.com>
This reverts commit 1d3637fbf6.
The browser has support for disabling bandwidth compression
by passing the |disable-buffer-bw-compression| flag. This
makes the reliance on dlsym obsolete.
BUG=b:171260705
BUG=b:220910969
TEST=video_decode_accelerator_tests
Change-Id: Ic4d88b28c3a2cc095e5f782fc2255032ae20d281
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3150967
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Chia-I Wu <olv@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Fritz Koenig <frkoenig@chromium.org>
Commit-Queue: Fritz Koenig <frkoenig@chromium.org>
These are needed by vrend.
BUG=b:216322701
TEST=n/a
Change-Id: I19351e7f72b9b5d205176ef6466889c3260407fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3413989
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Rob Clark <robdclark@chromium.org>
Auto-Submit: Rob Clark <robdclark@chromium.org>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Commit-Queue: Dominik Behr <dbehr@chromium.org>
Currently when we allocate a NV12 buffer, it ends up being
created with the DRM_FORMAT_MOD_QCOM_COMPRESSED modifier.
Unfortunately the upstream venus driver doesn't actually
understand drm buffer modifiers. So video decoder output
buffers are written to in uncompressed NV12.
Then when the buffer is set to the GPU or display, we end up
treating the uncompressed NV12 data like compressed data.
Which produces garbage output.
This patch adds a build option which disables UBWC compression
on just NV12 buffers.
A follow up patch to the Android.bp (only in the AOSP tree) will
be made to enable this.
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: Ib064ff9f3978bd8847355c5fd1cc9346b551efd8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3265874
Reviewed-by: Rob Clark <robdclark@chromium.org>
It makes more sense to resovle the format and use_flags together to
avoid duplicates.
Add the helper to vc4 and dumb_driver backends since that's missed
from prior frontend refactoring.
Split the resolve helper in virtgpu_virgl for the 3d and 2d paths to
make code logic cleaner.
BUG=b:199524294
TEST=CQ
Change-Id: I89b633ea484f0fc5bb9b4e0548cad017b9970cc6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3200143
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Jason Macnak <natsu@google.com>
Reviewed-by: Chia-I Wu <olv@google.com>
Reviewed-by: Jason Macnak <natsu@google.com>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
BUG=b:194817426
TEST=db845c external webcam works
Change-Id: Ib4abb5caa86bc40fbb56c22667f8c11205b920eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3195656
Tested-by: John Stultz <john.stultz@linaro.org>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org>
Commit-Queue: Rob Clark <robdclark@chromium.org>
1. frontends access the driver via drv.h only
2. the renamed drv_helpers and drv_array_helpers are for driver only
3. remove extern "C" from drv_helpers.h given not exposed to gralloc
4. remove all redundant includes for those helpers
BUG=b:199524294
TEST=CQ and gralloc builds on aosp
Change-Id: I3f4d33076a6a8161804f1b7c26950ff5496507e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3195651
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olv@google.com>
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
7180 can produce P010 frames, but they can't be
scanned out. 7280 can produce and scan out.
BUG=b:183020822
TEST=v4l2_stateful_decoder -f vp9_2_test_file.ivf -o P010
Cq-Depend: chromium:3100276
Change-Id: I79cc60f26268cccd683a45609384b62a752ae44c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3100277
Tested-by: Fritz Koenig <frkoenig@chromium.org>
Auto-Submit: Fritz Koenig <frkoenig@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Fritz Koenig <frkoenig@chromium.org>
In order to support external/usb camera provider on db845c with
AOSP, add flag combination for the YV12 format so is_supported()
will succeed.
Similar logic may be needed elsewhere as well
Bug: b:194817426
Test: Manually run camera app in AOSP on db845c with usb webcam
Change-Id: Idcb98e93164eb51c58943f0ae992d8123b6ede68
Signed-off-by: John Stultz <john.stultz@linaro.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3058396
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Am I the only one who does this????
BUG=none
TEST=none
Change-Id: Ie121703c631debd5e7eed1760334bb8ce5ebe115
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2857885
Reviewed-by: Lingfeng Yang <lfy@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Auto-Submit: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
On msm camera stack, the usage of uwbc for camera buffer is disabled.
The path removes the usage to avoid format mismatch for camera buffer.
BUG=b:184725673
TEST=Android Camera APP preview works
Change-Id: I8eae5a944978934a66fab0e733e018b601ce00a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2847963
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hanlin Chen <hanlinchen@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Hanlin Chen <hanlinchen@chromium.org>
Add a flag to indicate that a buffer will be used for front-buffer (low-
latency) rendering. We need to avoid using framebuffer compression in
this case, as the compression data and pixel data can be transiently out
of sync, resulting in corrupted display.
BUG=b:168868719
TEST=None
Change-Id: I08e6444aba99a5f694d010372277de775bc56fd4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2450927
Tested-by: Rob Clark <robdclark@chromium.org>
Auto-Submit: Rob Clark <robdclark@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Rob Clark <robdclark@chromium.org>
The early version of the modifier assumed per plane modifiers.
The current version is only one modifier per buffer object.
BUG=none
TEST=compile
Change-Id: Ic3899118d44cb172ee2e4eae346e98cdf8328cf9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2654590
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Read MINIGBM_DEBUG env var when creating a gbm driver
Store value as a flag inside driver
Avoid allocating compressed buffers in the backends
when the flag disables compression
BUG=b:172215587
Change-Id: Idbd6f0aebc1782c1bf5921a6438310a87212d1f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2535658
Tested-by: Pilar Molina Lopez <pmolinalopez@google.com>
Commit-Queue: Pilar Molina Lopez <pmolinalopez@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Something somewhere is assuming the UV pitch can be half of the Y pitch,
leading to failures with CtsMediaTestCases#android.media.cts.DecodeAccuracyTest
To componsate, double the pitch alignment requirement for YUV formats.
BUG=b:159504968, b:165333514
TEST=run CtsMediaTestCases#android.media.cts.DecodeAccuracyTest
Change-Id: I0118d813576654c72ed55500d741cf07a1977b20
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2568395
Commit-Queue: Rob Clark <robdclark@chromium.org>
Commit-Queue: Kristian H. Kristensen <hoegsberg@chromium.org>
Tested-by: Rob Clark <robdclark@chromium.org>
Auto-Submit: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
video_decode_accelerator_tests need non UBWC
frames in order to check for exactness. This
is expected to be a short term fix until a
proper verification method is devised.
BUG=b:171260705
TEST=YouTube has UBWC, video_decode_accelerator_tests does not
Change-Id: Ia3ab02493f8b740ba9589b4fc21d3fa6b23ea7cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2523246
Reviewed-by: Fritz Koenig <frkoenig@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Tested-by: Fritz Koenig <frkoenig@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
With real HW protection on the horizon, let's repurpose the
protection flag to mean that.
Currently, our protected buffer scheme on the Android side
allocates a dummy fd, which is sent to Chrome. Chrome
associates that dummy fd with an unmappable shared memory
buffer. In the entire process, minigbm doesn't really do
anything.
We prevent buffers allocated with the protected
flag from being mapped, but since it's a dummy fd it's not
really useful.
Chrome doesn't use the protected flag yet, but hopefully will
so in the future, but with real HW protection.
BUG=
TEST=
Change-Id: I57be26926539471f062ffeff33b523a3899c35f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2466958
Reviewed-by: David Stevens <stevensd@chromium.org>
Reviewed-by: Jeffrey Kardatzke <jkardatzke@google.com>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
BUG=b:149525848
TEST=video_decode_accelerator_tests use UBWC
Change-Id: I66f44f31f69b2a1d32c66a802c21e0a76d95ec89
Cq-Depend: chromium:2460816, chromium:2455450
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2343729
Tested-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Fritz Koenig <frkoenig@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Commit-Queue: Kristian H. Kristensen <hoegsberg@chromium.org>
V4L2 is the consumer of these buffers and sets up
the allocation in get_framesize_raw_nv12_ubwc().
There was a mismatch where V4L2 was aligning the
uv buffer differently than minigbm.
BUG=b:166157708
TEST=video_decode_accelerator_tests with 856x480 video
Change-Id: Idb9fb689a56639dbc73753d453e7e6e5daeb6700
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2402146
Tested-by: Fritz Koenig <frkoenig@chromium.org>
Commit-Queue: Fritz Koenig <frkoenig@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Whether rarely or often, we can't support any kind of sw access if the
buffer is UBWC compressed. We could potentially add support for
blitting in and out of the buffer, but for now just allocate linear.
BUG=b:167934919
TEST=Buffers allocated with any SW access use flag don't get UBWC
Change-Id: Ic9c1d86a124e24b7bc4aa259c62d8c4882c487b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2397084
Tested-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Kristian H. Kristensen <hoegsberg@chromium.org>
This reverts commit 8e2ae67794. With the
uprev from CL:2375596, we have support for modifiers all the way from
ARC++, through EGL and exo to KMS and can re-enable UBWC.
BUG=b:145579089, b:79682290, b:163562363
TEST=Once UBWC is enabled again in minigbm, ARC++ buffers should be UBWC
compressed.
Cq-Depend: chromium:2375596
Change-Id: Iec9bb6f2057eb897fe119750f6a961bbefb871af
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2375673
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Commit-Queue: Rob Clark <robdclark@chromium.org>
BUG=b:145579089, b:79682290. b:163562363
TEST=Verify that UBWC is off (eg /sys/kernel/debug/dri/1/state)
Change-Id: Icc62960ea12c30bfa709e358ec1cfb097333e6fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2353749
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Commit-Queue: Kristian H. Kristensen <hoegsberg@chromium.org>
Waffle does not support modifiers, detect it and fall back to linear
buffers. Fixes glmark2-waffle, glbench/windowmanagertest, etc.
BUG=b:158238296, b:153675943
TEST=run glmark2-waffle and verify it displays correct
TEST=run graphics.Sanity and verify that it passes
TEST=start ui and verify that it still picks UBWC modifier
Change-Id: I591136c8d07bd32beb6f4efa63971821193ce39e
Exempt-From-Owner-Approval: already CR+2 from owner
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2343173
Tested-by: Rob Clark <robdclark@chromium.org>
Commit-Queue: Rob Clark <robdclark@chromium.org>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Auto-Submit: Rob Clark <robdclark@chromium.org>
CL:2245540 seems to have accidentally modified msm.c to use an
uninitialized metadata when setting up DRM_FORMAT_R8. Let's go back
to using LINEAR_METADATA.
BUG=b:161426616
TEST=Camera no longer crashes
Change-Id: Ia587821216c82d4488b096686904f82147224aa5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2310289
Tested-by: Douglas Anderson <dianders@chromium.org>
Auto-Submit: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: David Stevens <stevensd@chromium.org>
Commit-Queue: Douglas Anderson <dianders@chromium.org>
We use SCANOUT_VEA_READ_CAMERA_AND_CPU_READ_WRITE for camera
capture use scenario in Chrome. Therefore, NV12 format must be
allowed for all those usage masks. This CL modifies the usages on
all platforms.
BUG=chromium:982201
TEST=video.EncodeAccel.vp8_720p_i420 on eve
Change-Id: I7880e64049f3bbf9dd1c177619e41362baf641f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2240995
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
minigbm has allowed HW_VIDEO_ENCODER usage to YVU420 so that
chrome can allocate YVU420 with HW_VIDEO_ENCODER. But this
format is no longer allocated by chrome with the usage. Let's
delete the code.
BUG=chromium:982201
TEST=None
Change-Id: Ia6bbc24e7782e3e73c2eb00c00127af212ddf486
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2245967
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Auto-Submit: Hirokazu Honda <hiroh@chromium.org>
ARCVM sets encoder/decoder usage on the blob output/input buffers, so
that virtio_gpu knows to perform transfers from/to the host where
appropriate. Recently, virtio_gpu started passing all bind flags to the
host, instead of reducing them in the guest. These factors combined
means that the host backends now need to support encoder/decoder usage
with R8 format.
Test: manually verify ARCVM YouTube
Bug: b:158957350
Change-Id: I58bf657496647f8002c693d17a1186f4cf527b01
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2245540
Tested-by: David Stevens <stevensd@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
It seems to be tradition to copy a bit of code into the
resolve_format() function for everyone. The msm driver isn't one to
break from tradition, so we'll adopt this code fragment too.
BUG=b:154782445
TEST=Hangout
Change-Id: I9e8eaf0c5a8485afea82437fd7249e24e5509b5e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2209178
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Douglas Anderson <dianders@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
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>
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>
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>
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>
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>