Adds a new intel backend for interfacing with the Xe kernel driver.
Currently only tested on gen12 (Xe1; e.g. TGL, ADL, MTL).
Test 1: drm-tests (natively): stop ui and then run:
- mapped_texture_test
- null_platform_test -m [I915_FORMAT_MOD_X_TILED|I915_FORMAT_MOD_Y_TILED]
- plane_test (by default it uses NV12)
Test 2: full OS: boot to UI, execute webGL and/or YouTube successfully and watch
the terminal: TERM=xterm watch -n1 -d cat /sys/kernel/debug/dri/0/i915_display_info
for color formats and display plane usage
v1: Carlos Santa <carlos.santa@intel.corp-partner.google.com>
v2: Ryan Neph <ryanneph@google.com>
- formatting fixes
- remove deprecated #ifdef I915_SCANOUT_Y_TILED conditional compilation
- add missing backend_xe implementations
- mimic i915_add_combinations
- Match formatting, order of operations, and add the missing combo for
YVU420_ANDROID + USE_CAMERA_WRITE.
- In a future CL, we'll factor this into a common function called by both
backends.
- simplify xe_bo_map()
- The conditional body is always taken, so remove the conditional entirely.
- mark late-gen12 as mtl_or_newer until proper version handling is used.
BUG=b:358427077
TEST=drm-tests (see above)
Change-Id: I1eaa1dcce6cee706a421b3c4d6a532a6b83f8564
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/6245159
Tested-by: Ryan Neph <ryanneph@google.com>
Commit-Queue: Ryan Neph <ryanneph@google.com>
Reviewed-by: Matt Turner <msturner@google.com>
Reviewed-by: Lina Versace <linyaa@google.com>
This CL consolidates the logic for enabling write-combining on map and
applies it also to the offset map codepath.
BUG=b:371546474
TEST=CQ
Change-Id: Iedb812339f12a5d11386266565168ba06c9f11da
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/6022557
Reviewed-by: Ryan Neph <ryanneph@google.com>
Commit-Queue: Eliot Courtney <edcourtney@chromium.org>
Tested-by: Eliot Courtney <edcourtney@chromium.org>
For all current ChromeOS boards, MTL and older, this patch should change
no behavior. It's just a refactor.
Do not choose at buildtime based on macro definitions. Decisions about
scanout-capable modifiers should be decided at runtime based on chipset
info.
We can safely delete the #ifdef blocks for I915_SCANOUT_4_TILED and
I915_SCANOUT_Y_TILED without changing any behavior. They were controlled
by the ebuild snippet below, and the USE flag is set if and only if
chipset >= MTL.
if use intel_drm_tile4 ; then
append-cppflags -DI915_SCANOUT_4_TILED
else
append-cppflags -DI915_SCANOUT_Y_TILED
fi
I tested the patch on rex (MTL) and brya (ADL), which pre-patch took
different #ifdef paths. Before and after the patch, On MTL, I confirmed
that fullscreen video from https://crosvideo.appspot.com/?codec=h264 was
promoted to a scanout plane with the expected pixel format and modifier:
I915_FORMAT_MOD_4_TILED + DRM_FORMAT_NV12. On ADL, I confirmed the same
for I915_FORMAT_MOD_Y_TILED + DRM_FORMAT_NV12. I confirmed by inspecting
/sys/kernel/debug/dri/0/state during video playback.
BUG=b:349135555
TEST=brya, rex. Confirm fullscreen h264 video gets promoted to scanout
plane with correct pixel format and modifier. See commit message.
Change-Id: I1c5155548287869279fec3aa0b02e057acc788fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/6082999
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Reviewed-by: Marcin Wojtas <mwojtas@google.com>
Tested-by: Lina Versace <linyaa@google.com>
Commit-Queue: ChromeOS Auto Retry <chromeos-auto-retry@chromeos-bot.iam.gserviceaccount.com>
Auto-Submit: Lina Versace <linyaa@google.com>
This suggested change is automatically generated based on group
memberships and affiliations.
If this change is unnecessary or in error, vote the lowest CR value
(i.e. reject the CL) and the bot will abandon it. Vote the highest CR to
approve this change. You may also abandon this change.
See the owner's recent activity for context:
https://chromium-review.googlesource.com/q/marcheu@chromium.org
To report an issue, file a bug in the Infra>Codereview component.
Change-Id: I571430359cb813dd036b5394915b12b9c6374186
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5680841
Tested-by: Matt Turner <msturner@google.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Matt Turner <msturner@google.com>
Reviewed-by: Dawn Han <dawnhan@google.com>
Commit-Queue: Ryan Neph <ryanneph@google.com>
Auto-Submit: Owners Cleanup <swarming-tasks@owners-cleanup-prod.google.com.iam.gserviceaccount.com>
There was another change done after this was tested before which then
was setting the size before the calculation was done to handle the
10-bit case. We now fix that size after doing the 10-bit modification.
BUG=b:367770932
TEST=None
Change-Id: Id5410f802c9140d378217fbf7b33f1d467ebf5ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5967833
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Auto-Submit: Jeffrey Kardatzke <jkardatzke@google.com>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Tested-by: Jeffrey Kardatzke <jkardatzke@google.com>
After https://crrev.com/c/5907583, handle_usage() tries to match
the entire value. An allocation with usage 0x100000203 from
BufferUsage::GPU_RENDER_TARGET |
BufferUsage::CPU_READ_OFTEN |
BufferUsage::FRONT_BUFFER
would fail to match the combined BUFFER_USAGE_FRONT_RENDERING_MASK
(`1U << 28 | 1ULL << 32`) because the allocation only sets a
single usage bit `BUFFER_USAGE_FRONT_RENDERING` (`1ULL << 32`)
and not the combined mask.
Bug: b/373474508
Test: vts -m VtsHalGraphicsAllocatorAidl_TargetTest
Change-Id: I926789a7aab937f2c2092475cb40ad9666b4f95f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5932803
Auto-Submit: Jason Macnak <natsu@google.com>
Tested-by: Jason Macnak <natsu@google.com>
Reviewed-by: Ren-Pei Zeng <kamesan@chromium.org>
Commit-Queue: Jason Macnak <natsu@google.com>
After this change is_supported() succeeds, USB camera starts
working and:
E [minigbm:CrosGralloc4Allocator.cc(88)]: Unsupported combination -- pixel format: YV12, drm format:DRM_FOURCC_9997, usage: CPU_READ_NEVER | CPU_WRITE_NEVER | CPU_WRITE_RARELY | CPU_WRITE_OFTEN | GPU_TEXTURE | CAMERA_OUTPUT (0x20130)
issue is fixed.
Similar settings were already introduced for other backends e.g. msm:
https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3058396
BUG=b:323730914, b:309244873
Test: Verify that USB camera is working in Android environment
Change-Id: I29e0ec914ec8ba7c5b068fe22623efa30f0fb4f3
Reviewed-by: Michal Dubiel <dubielm@google.com>
Reviewed-by: Konrad Adamczyk <konrada@google.com>
Tested-by: Michal Dubiel <dubielm@google.com>
Tested-by: Konrad Adamczyk <konrada@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5913520
Tested-by: Grzegorz Jaszczyk <jaszczyk@google.com>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Auto-Submit: Grzegorz Jaszczyk <jaszczyk@google.com>
Commit-Queue: Grzegorz Jaszczyk <jaszczyk@google.com>
After this change is_supported() succeeds, USB camera starts
working and:
E [minigbm:CrosGralloc4Allocator.cc(88)]: Unsupported combination -- pixel format: YV12, drm format:DRM_FOURCC_9997, usage: CPU_READ_NEVER | CPU_WRITE_NEVER | CPU_WRITE_RARELY | CPU_WRITE_OFTEN | GPU_TEXTURE | CAMERA_OUTPUT (0x20130)
issue is fixed.
Similar settings were already introduced for other backends e.g. msm:
https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3058396
BUG=b:320202326, b:309244873
Test: Verify that external USB camera is working in Android environment
Change-Id: I7e1e328998ddf62ed127c001f054ed10c6fb6a02
Reviewed-by: Michal Dubiel <dubielm@google.com>
Reviewed-by: Konrad Adamczyk <konrada@google.com>
Tested-by: Konrad Adamczyk <konrada@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5913519
Auto-Submit: Grzegorz Jaszczyk <jaszczyk@google.com>
Tested-by: Grzegorz Jaszczyk <jaszczyk@google.com>
Commit-Queue: Grzegorz Jaszczyk <jaszczyk@google.com>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
This reverts commit eb0e5fa310.
Reason for revert: fix ARCVM test regressions while investigating root cause (b/371862010).
Original change's description:
> gralloc: Error when locking buffer alloc'd without CPU_ usage
>
> ... except when running with software rendering as apps do not
> know that they would need to request additional CPU_* usage
> for GPU_* usage.
>
> Bug: b/356845188
> Test: cts -m CtsNativeHardwareTestCases
> Change-Id: I3536d80469d2187550558e9d02795896de4f9827
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5893718
> Reviewed-by: Ryan Neph <ryanneph@google.com>
> Reviewed-by: Juston Li <justonli@google.com>
> Tested-by: Ryan Neph <ryanneph@google.com>
> Tested-by: Juston Li <justonli@google.com>
> Commit-Queue: Ryan Neph <ryanneph@google.com>
> Commit-Queue: Jason Macnak <natsu@google.com>
Bug: b/371862010
Change-Id: Id16c3ae1989fec9d7cd71c24b9c6d55c3d29ae45
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5915946
Auto-Submit: Ryan Neph <ryanneph@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: ChromeOS Auto Retry <chromeos-auto-retry@chromeos-bot.iam.gserviceaccount.com>
GRALLOC_USAGE_SW_READ_RARELY was incorrectly mapped to
BO_USE_SW_READ_OFTEN since GRALLOC_USAGE_SW_READ_OFTEN (== 3) contains
GRALLOC_USAGE_SW_READ_RARELY (== 2) in bit mask. Fix it by making the
flag check compare the full bit mask.
Same for the WRITE case.
BUG=None
TEST=CQ
Change-Id: I0c1e0e6f07978b6090472b2d470f5880ad231d0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5907583
Reviewed-by: Jason Macnak <natsu@google.com>
Tested-by: Ren-Pei Zeng <kamesan@chromium.org>
Commit-Queue: Ren-Pei Zeng <kamesan@chromium.org>
... except when running with software rendering as apps do not
know that they would need to request additional CPU_* usage
for GPU_* usage.
Bug: b/356845188
Test: cts -m CtsNativeHardwareTestCases
Change-Id: I3536d80469d2187550558e9d02795896de4f9827
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5893718
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Juston Li <justonli@google.com>
Tested-by: Ryan Neph <ryanneph@google.com>
Tested-by: Juston Li <justonli@google.com>
Commit-Queue: Ryan Neph <ryanneph@google.com>
Commit-Queue: Jason Macnak <natsu@google.com>
This CL removes the support for media compression on ADL and MTL in
minigbm. The change includes removing the functionality to allocate the
modifier and compute the metadata for media compressed buffers from
minigbm.
BUG=b:365827638
TEST=Build chrome and deploy
Change-Id: I688b30ff08de4753e7491f6e29c688c2133fa27a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5873458
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Reviewed-by: Hang Nguyen <hnt@chromium.org>
Commit-Queue: Hang Nguyen <hnt@chromium.org>
Reviewed-by: Andres Calderon Jaramillo <andrescj@google.com>
Tested-by: Hang Nguyen <hnt@chromium.org>
The last plane's size may include any padding bytes introduced by
virtgpu's page-alignment, but its not incorrect, and all other planes
will be exact.
BUG=b:365820897
TEST=Spot check new size calculation for YVU420_ANDROID allocation
Change-Id: I6e88905d7191dca7e68e5dfd773d2fcaac79773d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5849473
Tested-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Chia-I Wu <olv@google.com>
Commit-Queue: Chia-I Wu <olv@google.com>
Auto-Submit: Ryan Neph <ryanneph@google.com>
Reviewed-by: Dawn Han <dawnhan@google.com>
Metadata query sent to host minigbm detects the YVU420 + LINEAR
combination and internally handle as YVU420_ANDROID to obey Android's
specific layout requirements.
This matches a similar hack applied to the virtgpu_virgl backend long
ago: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2596704
BUG=b:360937659
TEST=Fixes instagram video decode artifacts
Change-Id: I591e427a926327b841be6e280ca57eefab598965
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5849472
Reviewed-by: Chia-I Wu <olv@google.com>
Tested-by: Ryan Neph <ryanneph@google.com>
Auto-Submit: Ryan Neph <ryanneph@google.com>
Commit-Queue: Ryan Neph <ryanneph@google.com>
We need use_flags when we implement the dri interface on top of hbm.
Also, dri_bo_create_with_modifiers does not take use flags only because
gbm_bo_create_with_modifiers does not. That has changed with
gbm_bo_create_with_modifiers2 although minigbm does not reflect that.
BUG=b:292148713
TEST=CQ
Change-Id: I120358c843140a937fee1dd6183d1836ea622eec
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5801181
Reviewed-by: Ryan Neph <ryanneph@google.com>
Commit-Queue: Chia-I Wu <olv@google.com>
Tested-by: Chia-I Wu <olv@google.com>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
There is no reason to leak the internals to backends.
BUG=b:292148713
TEST=CQ
Change-Id: I42215ad3add750f19d4a2f0a575a040d73bb19e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5801180
Commit-Queue: Chia-I Wu <olv@google.com>
Tested-by: Chia-I Wu <olv@google.com>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Make dri_driver a proper object that the backend can create, rather than
something that the backend must inherit from.
This makes dri_init return a dri_driver and make the rest dri_*
functions take a dri_driver. There is no functional change.
BUG=b:292148713
TEST=CQ
Change-Id: I3ef045d73b0015b5c6d926dec7bae69d35d94275
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5801179
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Commit-Queue: Chia-I Wu <olv@google.com>
Tested-by: Chia-I Wu <olv@google.com>
Some parts of Android uses gcc and bfd, this imports upstream common.mk
changes required to avoid pass unsupported flags to them.
BUG=b:352469414
TEST=CQ
Change-Id: Ie9f5ff8d0590e215688105db4b24f529fd948383
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5825982
Commit-Queue: Bas Nieuwenhuizen <basni@chromium.org>
Auto-Submit: Tatsuyuki Ishi <ishitatsuyuki@google.com>
Reviewed-by: Bas Nieuwenhuizen <basni@chromium.org>
Tested-by: Tatsuyuki Ishi <ishitatsuyuki@google.com>
Set `emulated_metadata` fields to default values (0) to prevent
potential usage of uninitialized variables in `virtgpu_virgl.c`.
This fix ensures that the compilation doesn't fail due to warnings
being treated as errors when using strict compiler flags.
Change-Id: I2508168c095896c7fd492830ffb6ff3564dc2733
Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5782849
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
1. Allocate secure buffer from DMA_HEAP_IOCTL_ALLOC ,then using FD to
create a GEM handle and close this FD.
2. Since the secure buffer doesn't allocate via DRM_IOCTL_MTK_GEM_CREATE,
the DRM_MTK_GEM_CREATE_FLAG_RESTRICTED flag can be removed.
It should be added in the code that calls drmModeAddFB2().
3. Add mediatek_private_drv_data to store the dma_heap_fd in drv->priv,
and also add mediatek_close() to close dma_heap_fd and free drv->priv
when backend driver is closing.
BUG=b:248609774
TEST=emerge-geralt minigbm
Change-Id: I96df25580efe04f2c9a739b2d68de8837df091df
Signed-off-by: Jason-jh Lin <jason-jh.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5581571
Reviewed-by: Jeffrey Kardatzke <jkardatzke@google.com>
Commit-Queue: Jeffrey Kardatzke <jkardatzke@google.com>
To improve the efficiency of allocating high-resolution video decoder,
pass a flag to notify the kernel DMA framework to allocate linear
scanout buffers with single pages, so the allocation is more likely to
success when the available large chunk memory is constrained.
BUG=b:352229429
TEST=emerge-geralt libdrm minigbm
Cq-Depend: chromium:5689126
Change-Id: I21f2745cb5bdb7eaf7f50482c4c091791d13bbcc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5706152
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Tested-by: Fei Shao <fshao@chromium.org>
Commit-Queue: Fei Shao <fshao@chromium.org>
This syncs common.mk with the latest source in src/platform2/common-mk.
Main change that affects the compiled binary are the newly added
-fvisibility-inlines-hidden CXXFLAGS and the -Bsymbolic-non-weak
LDFLAGS (see comments in the file for what these do).
Deviating from upstream, disable -Wimplicit-fallthrough and
-Wunreachable-code to unbreak compilation.
BUG=b:352469414
TEST=CQ
Change-Id: I75f7dc4084ba7857ab840ee438309c31d9457211
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5691003
Tested-by: Tatsuyuki Ishi <ishitatsuyuki@google.com>
Auto-Submit: Tatsuyuki Ishi <ishitatsuyuki@google.com>
Commit-Queue: Tatsuyuki Ishi <ishitatsuyuki@google.com>
Reviewed-by: Bas Nieuwenhuizen <basni@chromium.org>
Bug: b:347022601
Test: Ran app that export/import depth through AHB with cf
Change-Id: I07e60729b18a9f15e0d795c33c462ba4b4f255b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5636740
Tested-by: Jean-François Thibert <jfthibert@google.com>
Reviewed-by: Dawn Han <dawnhan@google.com>
Commit-Queue: Jean-François Thibert <jfthibert@google.com>
Reviewed-by: Jason Macnak <natsu@google.com>
Mark the availability of minigbm's newer gbm_bo_get_map_info() API.
Virglrenderer (and others) can test for its existence at build-time and
conditionally use it.
BUG=b:338254311
TEST=emerge minigbm
TEST=virglrenderer can conditionally build with gbm_bo_get_map_info()
Change-Id: I2685813fa99b73316477bef7edfd96e5dd9699a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5636516
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Dawn Han <dawnhan@google.com>
Commit-Queue: Ryan Neph <ryanneph@google.com>
On MTK, when we allocate MT2T surfaces for protected content, these are
sent in as P010 instead. However, P010 uses 16bpp where MT2T requires
only 10bpp. This adjusts the allocation sizes to only be what is needed
so we reduce memory usage by 5/8.
BUG=b:339091167
TEST=Netflix 4K 10-bit HEVC plays on Ciri
Change-Id: Ia34b7d3aa962f3138da130077d723748592023bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5582540
Commit-Queue: Jeffrey Kardatzke <jkardatzke@google.com>
Auto-Submit: Jeffrey Kardatzke <jkardatzke@google.com>
Reviewed-by: Miguel Casas <mcasas@google.com>
Tested-by: Jeffrey Kardatzke <jkardatzke@google.com>
Commit-Queue: Miguel Casas <mcasas@google.com>
FINALLY, the gbm.pc is autogenerated to respect the variables steering
the build.
BUG=b:338254311
TEST=mkdir -p build && OUT=build make && test -f build/gbm.pc && echo "ALL GOOD"
TEST=emerge minigbm
Change-Id: Ie1458bb46375be1357cbf4f0a8f59d698cbd6cfd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5513263
Commit-Queue: Ryan Neph <ryanneph@google.com>
Tested-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Dawn Han <dawnhan@google.com>
Reviewed-by: Miguel Casas-Sanchez <mcasas@chromium.org>
Make it more up to date.
BUG=n/a
TEST=n/a
Change-Id: I0416c2dd02c3ee24155bb94d7b96ca1130098e50
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5505016
Reviewed-by: Satoshi Niwa <niwa@chromium.org>
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Android.bp files are maintained in the AOSP fork repository.
Change-Id: I492e0c2154b22cd4cda85e379df2578b352c23df
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4961034
Commit-Queue: Jason Macnak <natsu@google.com>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Reviewed-by: Jason Macnak <natsu@google.com>
Rationale: this will help get Rust gbm bindings into Android
(go/drm-gbm-rust-crates-for-android) without needing minigbm-specific
patches to upstream Rust code.
Upstream Mesa gbm defines those functions as variants with an extra
"flags" argument[2][3] (these don't exist in the mesa version checked
into Chromium though). The definitions added in this CL provide variants
that fail for any non-zero flags.
[1] https://crates.io/crates/gbm
[2] b7d6d90dab/src/gbm/main/gbm.h (L303)
[3] b7d6d90dab/src/gbm/main/gbm.h (L443)
Bug: 328363177
Test: cros build-packages --board=amd64-generic minigbm drm-tests
Change-Id: I9284d597e2d4de5ff9b677db0a0ffe6d274e4f57
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5352371
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Marcin Radomski <dextero@google.com>
Tested-by: Marcin Radomski <dextero@google.com>
Rationale: this will help get Rust gbm bindings into Android
(go/drm-gbm-rust-crates-for-android) without needing minigbm-specific
patches to upstream Rust code.
Mesa gbm defines the plane argument for some functions as int rather
than size_t. While this doesn't bother C/C++ compilers too much,
attempting to use bindgen-generated Rust bindings to minigbm with gbm
Rust crate[1] fails.
[1] https://crates.io/crates/gbm
Bug: 328363177
Test: cros build-packages --board=amd64-generic minigbm drm-tests
Change-Id: I5938633e0936bf1b9aafb856bfb966ceb1fb1a2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5352370
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Commit-Queue: Marcin Radomski <dextero@google.com>
Tested-by: Marcin Radomski <dextero@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
... to avoid needing a basename() which is dropped from string.h
in musl.
Bug: b/328316038
Test: android build
Change-Id: Ib619b9c45a30ce69be30270fe7da0f13421179be
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5352313
Commit-Queue: Dominik Behr <dbehr@chromium.org>
Auto-Submit: Jason Macnak <natsu@google.com>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Tested-by: Jason Macnak <natsu@google.com>
Reviewed-by: Dawn Han <dawnhan@google.com>
Add support for AR30 overlays to select MTK devices.
BUG=b:325625530
TEST=Tested by running MT2T->AR30 image processing tests on MT8188G.
Change-Id: I570ee740e49b5d9c61a1e1d0da777fdcc937321d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5345669
Reviewed-by: Miguel Casas-Sanchez <mcasas@chromium.org>
Commit-Queue: Justin Green <greenjustin@google.com>
Reviewed-by: Jeffrey Kardatzke <jkardatzke@google.com>
Tested-by: Justin Green <greenjustin@google.com>
Revert reason: Seeing regression with media compression patches.
Video playback is falling back to SW decode.
Reverting media compression for now.
This reverts commit 4492f45651.
Change-Id: I20b84a90f7e7b49559db6fe04e976db159ddfb17
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5343756
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Revert reason: Seeing regression with media compression patches.
Video playback is falling back to SW decode.
Reverting media compression for now.
This reverts commit 33b8c3eb40.
Change-Id: I7f544acc0248887763afeefa056b42f15bdd2b88
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5343755
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
i915 kmd has a special case for MTL in shmem_object_init:
if (HAS_LLC(i915) || (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 70)))
cache_level = I915_CACHE_LLC;
Meanwhile, its i915_gem_object_pin_to_display_plane has:
ret = i915_gem_object_set_cache_level(obj,
HAS_WT(i915) ?
I915_CACHE_WT : I915_CACHE_NONE);
Let's report GBM_BO_MAP_CACHE_CACHED on MTL unless BO_USE_SCANOUT is
set.
BUG=b:325368420
TEST=no artifact in Camera FOV Calibration of CtsVerifier on rex
TEST=android.hardware.cts.CameraTest#testPreviewFpsRange
Change-Id: I0b3b3f13769bbd1db6f4f7194e58afc0f151eb47
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5313949
Reviewed-by: Dawn Han <dawnhan@google.com>
Tested-by: Chia-I Wu <olv@google.com>
Commit-Queue: Chia-I Wu <olv@google.com>
Before the CL, the environment variable
|ENABLE_INTEL_MEDIA_COMPRESSION| control minigbm's behaviour
to allocate the appropriate Intel media compressed buffers.
This variable is set accordingly to a feature flag in chrome
to support video decoding.
This CL removes the environment variable and will let chrome
pass the DRM specific modifier via
gbm_bo_create_with_modifiers() instead. With the modifier
passed, the CL includes the change to have the driver
compute the metadata for the compressed buffers.
BUG=b:315390307
TEST=Video playyback on chrome with MC support.
Change-Id: I9671443cd233295dcb904d6edc995efd19c1013a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5118242
Tested-by: Hang Nguyen <hnt@chromium.org>
Commit-Queue: Hang Nguyen <hnt@chromium.org>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
If a bo has BO_USE_SCANOUT, and it is ever scanned out, the kernel
driver changes its cache level to WC. But the change is not reflected
in the guest. Let's be conservative and report GBM_BO_MAP_CACHE_WC when
BO_USE_SCANOUT is set.
BUG=b:323433235
TEST=Squid works properly with cross-domain on volteer
Change-Id: I9325ffc0cfef8778917e13d5021ae884ac7a6dfb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5255422
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
BUG=b:239718180, b:306548532
TEST=no artifact in Camera FOV Calibration of CtsVerifier on rex
Change-Id: Ia6a0d689fefe20e52db2c62328c97f4aa3558b63
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5254324
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Chia-I Wu <olv@google.com>
Commit-Queue: Chia-I Wu <olv@google.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>