Previous to this CL, cros_codecs caused a build failure in soong
with the following message:
error: system/cros-codecs/Android.bp:17:1: module "libcros_codecs"
variant "android_arm64_armv8-2a_cortex-a55_rlib_rlib-std": depends
on //external/minigbm:libgbm_sys which is not visible to this module
You may need to add "//system/cros-codecs" to its visibility
This CL updates libgbm_sys's visibility with cros_codecs.
Bug: 389780527
Test: Build cros_codecs with libgbm_sys as a depedency.
Change-Id: Id4538880193adfda55d755449d1984d83b0a6919
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>
am skip reason: Merged-In I8643bba907f1f6f7610e6c9cddcbad597a74f270 with SHA-1 4a73529836 is already in history
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3427401
Change-Id: Iba8374dfbe6f9bf91f406e744f502d331cb3bfcf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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.
Upstream-Change-Id: I1c5155548287869279fec3aa0b02e057acc788fa
Upstream-Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/6082999
Merged-In: I8643bba907f1f6f7610e6c9cddcbad597a74f270
Change-Id: I0e9f6d1758ea6a1bf189808d50bd633f52dc4e62
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.
Upstream-Change-Id: I1c5155548287869279fec3aa0b02e057acc788fa
Upstream-Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/6082999
Change-Id: I8643bba907f1f6f7610e6c9cddcbad597a74f270
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>
Revert submission 3309719-revert-3308804-MZCJYQCOVW
Reason for revert: initial cause of b/361574971 believed to be fixed with ag/29881064 and aosp/3309046
Reverted changes: /q/submissionid:3309719-revert-3308804-MZCJYQCOVW
Change-Id: I60894baab0a773fdceb34601d8b05b54a6dd34f3
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 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
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>