Commit graph

1853 commits

Author SHA1 Message Date
Marcell Kovacs
18202bbd23 Add min_sdk_version: "34" to minigbm/libgbm
Bug: 349146763
Test: m -j
Change-Id: I13e3cf8c674fc3c2c402893efd7878eb99680e2d
2025-02-03 12:24:38 -08:00
Hang Nguyen
6c1ec57f22 minigbm: Enable use in cros_codecs am: 584eb0112d am: dd4dab2039
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3470517

Change-Id: I9a3c0cc73ae96b641d64dd208ee1f7bf90de674a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-01-31 12:20:58 -08:00
Hang Nguyen
dd4dab2039 minigbm: Enable use in cros_codecs am: 584eb0112d
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3470517

Change-Id: I00dd5d382b1e262b9a97234faddeb76989f8af55
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-01-31 11:33:09 -08:00
Hang Nguyen
584eb0112d minigbm: Enable use in cros_codecs
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
2025-01-30 19:24:55 +00:00
Eliot Courtney
afef668e27 [i915] Use write-combining for offset map case.
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>
2025-01-09 22:30:59 -08:00
Treehugger Robot
ffca114b45 [automerger skipped] Merge "i915: Choose TILE_4 vs TILE_Y at runtime" into main am: 978f530642 am: 83be8b31c5 -s ours
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>
2025-01-06 12:22:43 -08:00
Treehugger Robot
83be8b31c5 Merge "i915: Choose TILE_4 vs TILE_Y at runtime" into main am: 978f530642
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3427401

Change-Id: I94c813a3b446b0cdc64fd4a1cb765f902264f2bd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-01-06 11:59:21 -08:00
Treehugger Robot
978f530642 Merge "i915: Choose TILE_4 vs TILE_Y at runtime" into main 2025-01-06 11:31:07 -08:00
Sadaf Ebrahimi
25d5898257 Add janitors to the OWNERS file am: a9ae53a8c4 am: bc7722904b
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3423843

Change-Id: I2dc0b51101908fc99cc617175cdc869a67c16c8b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-19 19:34:05 -08:00
Sadaf Ebrahimi
bc7722904b Add janitors to the OWNERS file am: a9ae53a8c4
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3423843

Change-Id: I87d634aab69d04d833fe4b445b2c0da7b3f3c545
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-12-19 19:11:22 -08:00
Lina Versace
513713fa35 i915: Choose TILE_4 vs TILE_Y at runtime
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
2024-12-19 10:49:06 -08:00
Sadaf Ebrahimi
a9ae53a8c4 Add janitors to the OWNERS file
Test: TreeHugger
Change-Id: I83076a58152caad21a5baa264abc5b52edf38b98
2024-12-18 20:27:40 +00:00
Lina Versace
4a73529836 i915: Choose TILE_4 vs TILE_Y at runtime
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
2024-12-17 08:57:33 -08:00
Lina Versace
ad29efaa71 i915: Choose TILE_4 vs TILE_Y at runtime
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>
2024-12-16 23:32:40 -08:00
Owners Cleanup
993130c58e Remove marcheu@chromium.org from OWNERS
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>
2024-11-21 20:10:59 +00:00
Jeffrey Kardatzke
ff04d4aa48 minigbm: Fix 10bit protected allocations on MTK
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>
2024-10-28 07:50:21 +00:00
Xin Li
a0fda659f0 [automerger skipped] Merge "Mark 24Q4 as merged in aosp-main-future" into aosp-main-future am: d7d36a47f5 -s ours
am skip reason: Merged-In Iae2414e672fbc1b1648c044be35eb4c83489ae95 with SHA-1 c18e0198dd is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/external/minigbm/+/29935629

Change-Id: I11749a0d9577c2386a1e0bd7558632dfc0c59727
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-18 23:12:44 +00:00
Xin Li
9a5d381664 [automerger skipped] Mark 24Q4 as merged in aosp-main-future am: b532196196 -s ours
am skip reason: Merged-In Iae2414e672fbc1b1648c044be35eb4c83489ae95 with SHA-1 c18e0198dd is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/external/minigbm/+/29935629

Change-Id: Ie6fc1a5f9ea459e6b6640b3bcf6480a5ba967617
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-18 23:12:40 +00:00
Xin Li
d7d36a47f5 Merge "Mark 24Q4 as merged in aosp-main-future" into aosp-main-future 2024-10-18 22:31:05 +00:00
Xin Li
b532196196 Mark 24Q4 as merged in aosp-main-future
Bug: 373937381
Merged-In: Iae2414e672fbc1b1648c044be35eb4c83489ae95
Change-Id: I060253d9c6546496d7f10a1a0e74b94dcdaf7c62
2024-10-17 11:03:26 -07:00
Jason Macnak
efdd094b1b Revert "Revert "UPSTREAM: cros_gralloc: Avoid using masks in han..." am: aac2a172e9 am: 5e6c2647bb
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3312316

Change-Id: I49f51379b61e9cecf142625a522919f2cf5951bd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-17 16:45:15 +00:00
Jason Macnak
3d78e54dd2 Revert^2 "Merge remote-tracking branch 'aosp/upstream-main'" am: 8956e04c7f am: 4ea3c08e34
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3312315

Change-Id: I4d79b7fbddd60b4b2acdef48eb1a6b7296676c59
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-17 16:45:10 +00:00
Jason Macnak
5e6c2647bb Revert "Revert "UPSTREAM: cros_gralloc: Avoid using masks in han..." am: aac2a172e9
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3312316

Change-Id: I1cbc7db44a74f3efbb2e51e4f9ce2b5aede97c5e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-17 16:24:29 +00:00
Jason Macnak
4ea3c08e34 Revert^2 "Merge remote-tracking branch 'aosp/upstream-main'" am: 8956e04c7f
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3312315

Change-Id: I33a7adfe36ae51b3963c38d9f1f557a536ef0559
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-17 16:24:25 +00:00
Jason Macnak
aac2a172e9 Revert "Revert "UPSTREAM: cros_gralloc: Avoid using masks in han..."
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
2024-10-16 19:19:47 +00:00
Jason Macnak
8956e04c7f Revert^2 "Merge remote-tracking branch 'aosp/upstream-main'"
8a3215bf53

Change-Id: I299a95b80910f102a652cbd577838ddfc65fdbc6
2024-10-16 19:19:47 +00:00
Jason Macnak
c18e0198dd Revert "Merge remote-tracking branch 'aosp/upstream-main'" am: 8a3215bf53 am: 0f824af7d8
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3309719

Change-Id: Iae2414e672fbc1b1648c044be35eb4c83489ae95
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-15 22:53:14 +00:00
Jason Macnak
2f32f04fc4 Revert "UPSTREAM: cros_gralloc: Avoid using masks in handle_usage()" am: 3068d2b441 am: cd7a69560b
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3309718

Change-Id: Ie2c2408e4d0467daf0bda841a4cea63900cb691c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-15 22:53:11 +00:00
Jason Macnak
0f824af7d8 Revert "Merge remote-tracking branch 'aosp/upstream-main'" am: 8a3215bf53
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3309719

Change-Id: I93826809532260b3bd9880b225c71c1186d3daa7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-15 22:30:57 +00:00
Jason Macnak
cd7a69560b Revert "UPSTREAM: cros_gralloc: Avoid using masks in handle_usage()" am: 3068d2b441
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3309718

Change-Id: Id0d97f43e607af90bc5a1b92610f25e865e42394
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-15 22:30:55 +00:00
Jason Macnak
8a3215bf53 Revert "Merge remote-tracking branch 'aosp/upstream-main'"
Revert submission 3308804

Reason for revert: b/373667975

Reverted changes: /q/submissionid:3308804

Change-Id: Ieb4e87d2bdcd975f5aa231c8e05f1053963c6c6e
2024-10-15 20:15:13 +00:00
Jason Macnak
3068d2b441 Revert "UPSTREAM: cros_gralloc: Avoid using masks in handle_usage()"
Revert submission 3308804

Reason for revert: b/373667975

Reverted changes: /q/submissionid:3308804

Change-Id: I601a93f9a36c41327a703d4347ef6de63d4a8365
2024-10-15 20:15:13 +00:00
Jason Macnak
891c4c50ad UPSTREAM: cros_gralloc: Avoid using masks in handle_usage() am: 3b405c8fdf am: 41aab4f4ad
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3308804

Change-Id: I9ee44e79af5c62301ff0ab47d9c72b4677c2e719
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-15 17:35:46 +00:00
Jason Macnak
8843712869 Merge remote-tracking branch 'aosp/upstream-main' am: 93d9ee4352 am: 893ec0c88f
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3306122

Change-Id: Iaadb2b04d4ef29d0ac89cae101d4003ffd9c371e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-15 17:35:42 +00:00
Jason Macnak
41aab4f4ad UPSTREAM: cros_gralloc: Avoid using masks in handle_usage() am: 3b405c8fdf
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3308804

Change-Id: I283d573cbf995dcf976237e95a7abb5b5d646e88
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-15 17:15:30 +00:00
Jason Macnak
893ec0c88f Merge remote-tracking branch 'aosp/upstream-main' am: 93d9ee4352
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3306122

Change-Id: I05caac510642564f1f14402665134256258bd467
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-15 17:15:26 +00:00
Jason Macnak
93e16b9029 cros_gralloc: Avoid using masks in handle_usage()
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>
2024-10-15 16:19:58 +00:00
Jason Macnak
3b405c8fdf UPSTREAM: cros_gralloc: Avoid using masks in handle_usage()
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
2024-10-14 16:39:48 -07:00
Jason Macnak
93d9ee4352 Merge remote-tracking branch 'aosp/upstream-main'
... to pull in https://crrev.com/c/5913519.

Bug: b/320202326
Bug: b/309244873
Test: CI
Change-Id: I353d0c39c44f600d6070a9796f4fd4b824f1848a
2024-10-11 12:30:00 -07:00
Grzegorz Jaszczyk
ccda09042a i915: allow DRM_FORMAT_YVU420_ANDROID for camera use
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>
2024-10-10 22:08:10 +00:00
Grzegorz Jaszczyk
ff0509d723 mediatek: allow DRM_FORMAT_YVU420_ANDROID for camera use
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>
2024-10-10 14:55:09 +00:00
Ryan Neph
6d687b7b62 Revert "gralloc: Error when locking buffer alloc'd without CPU_ usage"
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>
2024-10-08 20:42:45 +00:00
Ren-Pei Zeng
d56aa1353a cros_gralloc: Fix gralloc -> gbm usage flag mapping
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>
2024-10-04 17:09:07 +00:00
Jason Macnak
eb0e5fa310 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>
2024-09-26 21:08:07 +00:00
Ryan Neph
94e1bdc657 OWNERS: add ryanneph@google.com
Change-Id: If6006eb58e2068819eb7002af7c486fe0b84f168
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5894024
Commit-Queue: Jason Macnak <natsu@google.com>
Reviewed-by: Chia-I Wu <olv@google.com>
Reviewed-by: Jason Macnak <natsu@google.com>
Auto-Submit: Ryan Neph <ryanneph@google.com>
Tested-by: Ryan Neph <ryanneph@google.com>
2024-09-26 18:58:25 +00:00
Treehugger Robot
48e3d23225 Merge "Error when attempting to lock buffer alloc'd without CPU_ usage" into main am: 22c6d554b2 am: 25ad577bd6
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3204926

Change-Id: I9cd98f92ace943b5b368af82ed0b74aff64cabe5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-25 22:58:10 +00:00
Treehugger Robot
25ad577bd6 Merge "Error when attempting to lock buffer alloc'd without CPU_ usage" into main am: 22c6d554b2
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3204926

Change-Id: I879c3a611615b888660af6cba272be908417bcc0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-25 22:37:55 +00:00
Treehugger Robot
22c6d554b2 Merge "Error when attempting to lock buffer alloc'd without CPU_ usage" into main 2024-09-25 22:09:14 +00:00
Hang Nguyen
453a4c0dcf i915: Remove media compression support
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>
2024-09-25 15:34:16 +00:00
Ryan Neph
2381df8295 virtgpu_cross_domain: fix planar size calculation
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>
2024-09-11 02:25:27 +00:00