Commit graph

1853 commits

Author SHA1 Message Date
Ryan Neph
05865d75bb virtgpu_cross_domain: force LINEAR for YVU420_ANDROID
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>
2024-09-10 22:59:26 +00:00
Treehugger Robot
ce11dea258 Merge "Add minigbm helper to libgbm" into main am: a997cbf53a am: 81253f9dc1
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3255522

Change-Id: I570ddb37029f5011c58f82a989b840f6ccc18b53
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-05 18:48:29 +00:00
Treehugger Robot
81253f9dc1 Merge "Add minigbm helper to libgbm" into main am: a997cbf53a
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3255522

Change-Id: Id8ec6cf28371a52c1cc0921fc6d7d730c373b823
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-05 18:37:15 +00:00
Treehugger Robot
fe6aee1501 Merge "Add Soong config variable for libgbm build variants" into main am: 5beb9a4475 am: e2f44a61ff
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3255521

Change-Id: Ie3309c99fa48bbf09894d6a56b57b7f4c7f555f3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-05 18:36:03 +00:00
Treehugger Robot
a997cbf53a Merge "Add minigbm helper to libgbm" into main 2024-09-05 18:26:46 +00:00
Treehugger Robot
e2f44a61ff Merge "Add Soong config variable for libgbm build variants" into main am: 5beb9a4475
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3255521

Change-Id: I027c95b7136eb3214f5e74d91536530d19c6d84d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-05 18:25:50 +00:00
Treehugger Robot
5beb9a4475 Merge "Add Soong config variable for libgbm build variants" into main 2024-09-05 18:12:08 +00:00
Ren-Pei Zeng
7133248700 Add minigbm helper to libgbm
Include minigbm extension functions in libgbm.

Bug: 362894809
Test: m libgbm
Change-Id: Ibbd00602d1e8cde5f3699b7d83ed4c294a19be8e
2024-09-05 17:12:52 +00:00
Ren-Pei Zeng
75370a9012 Add Soong config variable for libgbm build variants
minigbm has platform dependent compile flags that need to be set
correctly to work on the chipset (e.g. -DDRV_I915 on Intel devices). The
libminigbm_gralloc_* variants had set them, but the libgbm doesn't. This
CL introduces a Soong config variable "platform" under "minigbm"
namespace to control libgbm build variants, and apply the flags from
gralloc library to each variant.

Device .mk's can set it like:
$(call soong_config_set, minigbm, platform, intel)

Refer to
https://crsrc.org/o/src/third_party/chromiumos-overlay/media-libs/minigbm/minigbm-9999.ebuild
for ChromiumOS configuration of the compile flags.

Bug: 362894809
Test: m libgbm
Change-Id: I64d03604902072da85643c932832064a2425e25b
2024-09-05 17:11:44 +00:00
Chia-I Wu
e2fdd90122 dri: pass use_flags to dri_bo_create_with_modifiers
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>
2024-09-04 02:19:39 +00:00
Chia-I Wu
ac54d29297 dri: make dri_driver an opaque object
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>
2024-09-04 02:19:37 +00:00
Chia-I Wu
2743358812 dri: make dri_driver a proper object
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>
2024-09-04 02:19:34 +00:00
Tatsuyuki Ishi
a160cb46b1 minigbm: Update common.mk to unbreak gcc and bfd builds
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>
2024-09-03 12:44:03 +00:00
James Farrell
2dd079bc81 Migrate 25 crates to monorepo. am: 3887cf47fb am: 4fc25cc0af
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3242977

Change-Id: I704324a28b7e264b3f3bcc08b67866d4d318a873
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-27 23:12:34 +00:00
James Farrell
4fc25cc0af Migrate 25 crates to monorepo. am: 3887cf47fb
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3242977

Change-Id: I5c7e50e36795fbab9d3f06300e97ac72936dde67
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-27 23:06:07 +00:00
James Farrell
3887cf47fb Migrate 25 crates to monorepo.
bytemuck_derive
hashlink
httparse
http-body
httpdate
idna
instant
intrusive-collections
itertools
jni-sys
lazy_static
libc
libloading
linked-hash-map
linkme
litrs
lock_api
log
lru-cache
lz4_flex
macaddr
managed
maybe-async
memchr
memoffset

Bug: 339424309
Test: treehugger
Change-Id: I6f6545eb832112d6fbf73f24b6632bdd13ae7121
2024-08-27 14:37:59 +00:00
Dorinda Bassey
a2a049d9f5 Initialize emulated_metadata fields to avoid uninitialized warnings
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>
2024-08-27 00:06:40 +00:00
Kiyoung Kim
4668abb742 Define vintf_fragments as modules am: 6210dc3d16 am: 9326e201ce
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3215537

Change-Id: I0628c3229f67adea315e59f7d04337bb06aa56f7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-22 03:08:11 +00:00
Kiyoung Kim
9326e201ce Define vintf_fragments as modules am: 6210dc3d16
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3215537

Change-Id: Ied8b1cedad0f214c6ed62618ee0a463d1cba4535
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-22 02:47:07 +00:00
Kiyoung Kim
6210dc3d16 Define vintf_fragments as modules
Define vintf_fragments as modules if the file is shared among multiple
modules to avoid any conflicts.

Bug: 322089980
Test: aosp_cf_x86_64_phone build succeeded
Change-Id: I653ed96587445a3e0126b3eee415edce7b657939
2024-08-12 13:48:01 +09:00
Devin Moore
2d08959acd ANDROID: Move -fvisibility-inlines-hidden to CXXFLAGS only am: ca50f86101 am: 33ee33bdf0
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3207722

Change-Id: I14fcd525083b457af8565f9b4665ccdf902a157e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-06 21:44:24 +00:00
Devin Moore
33ee33bdf0 ANDROID: Move -fvisibility-inlines-hidden to CXXFLAGS only am: ca50f86101
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3207722

Change-Id: Ied2604611ce47e093e97e0d4f9245f371e7fc85e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-06 21:14:09 +00:00
Devin Moore
ca50f86101 ANDROID: Move -fvisibility-inlines-hidden to CXXFLAGS only
Seeing this error in Android when running `cargo_embargo`:

error: command-line option ‘-fvisibility-inlines-hidden’ is valid
       for C++/ObjC++ but not for C [-Werror]

Test: cargo_embargo generate
Bug: none
Change-Id: Iddfaac9a2e4cce22401b65515dea3ed581e57400
2024-08-05 22:43:46 +00:00
Jason Macnak
a8e423a9b2 Merge remote-tracking branch 'aosp/upstream-main' am: 197d810946 am: 105245d6e3
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3204910

Change-Id: I432afba090f54982a2df91639cdd3ea7cb7194d0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-02 15:52:35 +00:00
Jason Macnak
105245d6e3 Merge remote-tracking branch 'aosp/upstream-main' am: 197d810946
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3204910

Change-Id: I3812b7b1fc5dbc6a842e7a8dead63b895e623775
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-02 15:32:55 +00:00
Jason Macnak
4cca6f67dd Error when attempting to lock 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
2024-08-02 08:18:36 -07:00
Jason Macnak
197d810946 Merge remote-tracking branch 'aosp/upstream-main'
... to pull in https://crrev.com/c/5722608 for depth format support
handling on CF.

Bug: b/352091996
Test: dEQP test cases on Cuttlefish
Change-Id: Ie99042b2d35df70401efa0133b3ccfc370a9a97a
2024-08-01 09:20:50 -07:00
Jean-Francois Thibert
71ca6afaef Add format filtering for virgl gfxstream
Bug=b:352091996
Test=Ran CTS deqp test cases with cuttlefish

Change-Id: Ie6af00d39abfd19b8070b8df9349d05c80b324c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5722608
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Commit-Queue: Jean-François Thibert <jfthibert@google.com>
Reviewed-by: Jason Macnak <natsu@google.com>
Tested-by: Jean-François Thibert <jfthibert@google.com>
2024-08-01 15:42:33 +00:00
Jason-jh Lin
661992dfdf mediatek: Allocate secure buffer by DMA_HEAP_IOCTL_ALLOC
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>
2024-07-17 19:41:57 +00:00
Fei Shao
cd5aef63a7 minigbm: mediatek: Pass ALLOC_SINGLE_PAGES for linear scanout buffer
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>
2024-07-15 13:32:51 +00:00
Fei Shao
c06a7dbe71 minigbm: mediatek: Integrate primitive BO use flag definitions
Move the primitive is_* boolean definitions for BO_USE_* flags to the
top of mediatek_bo_create_with_modifiers().

No functional changes.

BUG=b:352229429
TEST=emerge-geralt minigbm

Change-Id: Id1e9007d16bbf43bfb11af6f0376a18e1fc02cf0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5706151
Tested-by: Fei Shao <fshao@chromium.org>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Commit-Queue: Fei Shao <fshao@chromium.org>
2024-07-15 10:38:19 +00:00
Fei Shao
41fb484c28 minigbm: mediatek: Update restricted flag name
Follow CL:5689125 and rename the flag.

BUG=b:352225473
TEST=emerge-geralt minigbm libdrm

Cq-Depend: chromium:5689125
Change-Id: I271d57e255a79af5b8e93ddb91186107dc8ec529
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5690587
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Tested-by: Fei Shao <fshao@chromium.org>
Commit-Queue: Fei Shao <fshao@chromium.org>
2024-07-12 15:37:52 +00:00
Tatsuyuki Ishi
87c07170be minigbm: Update common.mk with symbolic and visibility flags
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>
2024-07-11 14:28:21 +00:00
Jean-François Thibert
39b06bc3e6 Revert^2 "Merge upstream-main into main" am: fd19358a25 am: 92352d8240
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3158699

Change-Id: I0483267d7642f7515672f33060b81a393c4c5343
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-04 14:21:37 +00:00
Jean-François Thibert
92352d8240 Revert^2 "Merge upstream-main into main" am: fd19358a25
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3158699

Change-Id: I32fdd6fc8534b6a6bd564f99426ba71492951876
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-04 13:56:37 +00:00
Jean-François Thibert
fd19358a25 Revert^2 "Merge upstream-main into main"
This reverts commit b7a9a2b7d5.

Reason for revert: Crash resolved by Ieb07b5bbc206f07f69e4afba921149f49d6fe8c4
Bug: 349870098

Change-Id: I49848f6e7311c1f44e6c988cb42107ed79da3a6b
2024-07-03 18:21:13 +00:00
Jason Macnak
163eaa00e4 Revert "Merge upstream-main into main" am: b7a9a2b7d5 am: 7ed6281134
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3151140

Change-Id: I1c2ead2352c79cf015f7d3c6e7ad058d9f8e8dbe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-28 18:21:18 +00:00
Jason Macnak
7ed6281134 Revert "Merge upstream-main into main" am: b7a9a2b7d5
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3151140

Change-Id: I9ae145162c9bc6e7215bbbd9c206f68020d9adbc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-28 18:01:35 +00:00
Jason Macnak
b7a9a2b7d5 Revert "Merge upstream-main into main"
This reverts commit 018f7ff8fa.

Reason for revert: b/349870098

Change-Id: I942c713e4f7a24881b7ea3cff30df13a2b4a7c9c
2024-06-27 21:40:26 +00:00
Jean-Francois Thibert
9e12ea951c Merge upstream-main into main am: 018f7ff8fa am: d7bbfc10d3
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3149096

Change-Id: I0c2e233dce128631c480bdb287e0c09add56ac94
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-26 20:35:32 +00:00
Jean-Francois Thibert
d7bbfc10d3 Merge upstream-main into main am: 018f7ff8fa
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3149096

Change-Id: I6dd1731c05063fac82c0c3649cd9f190bb9caf23
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-26 20:11:04 +00:00
Jean-Francois Thibert
018f7ff8fa Merge upstream-main into main
This includes changes I63a5352e, Ia34b7d3a, I2685813f and I07e60729

mediatek: Add MT8196
minigbm: Reduce allocation size for MT2T allocations
minigbm: #define MINIGBM_HAS_GBM_BO_GET_MAP_INFO
Add depth buffer support for virtgpu virgl

Change-Id: I125c0b751f86b217a6ffbf7ec3fd2a1ddf848461
2024-06-26 13:21:44 -04:00
Jean-Francois Thibert
6158bc1fdc Add depth buffer support for virtgpu virgl
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>
2024-06-26 15:22:27 +00:00
Ryan Neph
698c5e9e8d minigbm: #define MINIGBM_HAS_GBM_BO_GET_MAP_INFO
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>
2024-06-18 03:02:33 +00:00
Jeffrey Kardatzke
de65652cfb minigbm: Reduce allocation size for MT2T allocations
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>
2024-05-31 22:59:05 +00:00
Hsin-Yi Wang
44265d2f9f mediatek: Add MT8196
BUG=b:336924470
TEST=emerge-rauru minigbm

Cq-Depend: chromium:5579120
Change-Id: I63a5352ecc60a98dd9438129e3a33aebb71361cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5577798
Commit-Queue: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Justin Green <greenjustin@google.com>
Tested-by: Hsin-Yi Wang <hsinyi@chromium.org>
2024-05-30 01:06:04 +00:00
Jason Macnak
04f933b2bd Merge changes Ib8cc1147,I33f17670,Ib00873ba into main am: 24a395410e am: 696fa2523a
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/2924559

Change-Id: I4ddab3594382e3881fd0fc766e2621274d836816
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-15 16:31:36 +00:00
Jason Macnak
696fa2523a Merge changes Ib8cc1147,I33f17670,Ib00873ba into main am: 24a395410e
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/2924559

Change-Id: I52e449419359ba9c69c69253432928ecdac0b817
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-15 16:12:34 +00:00
Jason Macnak
24a395410e Merge changes Ib8cc1147,I33f17670,Ib00873ba into main
* changes:
  gralloc: Avoid using std::optional in shared memory metadata
  gralloc: Move buffer metadata accessing into cros_gralloc_buffer
  gralloc: Move buffer metadata initialization into common layer
2024-05-15 15:50:39 +00:00
Ryan Neph
c52bbc8435 minigbm: autogenerate gbm.pc and cleanup build variables
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>
2024-05-10 20:49:02 +00:00