Rather than use `clang-format` from $PATH (which changes between devs),
use `cros format` which has a pinned version for all people.
Add *.cpp to the include list as not all C++ files use *.cc.
Then run format on the files to fix latent issues.
BUG=None
TEST=./presubmit.sh
Change-Id: I28e167d454a7b089bb79e932b7265fa87e4c331f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/6475964
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Ryan Neph <ryanneph@google.com>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Bug: None
Test: lunch brya-trunk_staging-userdebug && m libminigbm_gralloc
Change-Id: I23022dbb536ade53951fe61014c5056e114f4bbc
This change adds behavior to pad the requested buffer size when the
BO_USE_CURSOR flag is set. This change is required due to restrictions
on cursor planes with the i915 driver, where a buffer must be of a
particular size in order to be committed to a cursor plane. The exact
requirements can be queried from the DRM_CAP_CURSOR_{WIDTH|HEIGHT}
properties, which if provided, will specify a known acceptable cursor
buffer size. After this change, if the BO_USE_CURSOR flag is set and the
requested size is less than indicated capability, the resulting buffer
will be padded according to the difference.
Bug: b/378461707 , b/388014686
Change-Id: I451421cc784d1e3fdc83eb4e9762d6f0f4caea7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/6282179
Tested-by: Andrew Wolfers <aswolfers@chromium.org>
Reviewed-by: Lina Versace <linyaa@google.com>
Commit-Queue: Andrew Wolfers <aswolfers@chromium.org>
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>
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>
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>
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>
Crosvm currently makes the simplistic assumption that if driver==i915
then cached mappings to guest should be used for minigbm allocated
buffers. But this may not always be the correct choice. And other
drivers can do cached mappings to, in certain cases. But on ARM devices
in particular, we should be consistent in cachability when it comes to
CPU mappings. So add a new minigbm API which crosvm can use to
determine how to map to guest.
BUG=b:239718180, b:306548532
TEST=no artifact in Camera FOV Calibration of CtsVerifier on rex
Change-Id: I5c9b6346270f6a2eb83e6637a911f2153f6120ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3777567
Tested-by: Chia-I Wu <olv@google.com>
Auto-Submit: Rob Clark <robdclark@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Commit-Queue: Chia-I Wu <olv@google.com>
Previously, when the environment variable is not found, IOW when the
feature flag does not set the value for the variable,
|enable_intel_media_compression_var| is NULL and minigbm would log about
this. This would create noise in the log, especially when
`drv->compression` is not true or when the feature flag has not landed.
This CL makes change to only log about the failure to get the
environment variables for Media compression support if
`drv->compression == true`.
Change-Id: Ia6d33b08759d4fe94f2bc8de3fb99287748442b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4919324
Tested-by: Hang Nguyen <hnt@chromium.org>
Reviewed-by: Andres Calderon Jaramillo <andrescj@google.com>
Reviewed-by: Nathan Hebert <nhebert@chromium.org>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Commit-Queue: Hang Nguyen <hnt@chromium.org>
This CL removes the combination of having media compressed buffers for
hardware protected content. The current API does not allow the support
for dma-bufs with protected content in libva.
BUG=b:201620358, b:289449755
TEST=Run the video.PlayDRM.* test on Chrome with feature flag enabled
for MMC and verify that no compressed buffer is allocated in the output
of below command:
localhost ~ # cat /sys/kernel/debug/dri/0/i915_gem_framebuffer
user size: 854 x 480, depth 0, 8 bpp, modifier 0x100000000000002
Change-Id: Ib5850d68a36556195110aaae1419a4fb51ecca53
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4887518
Reviewed-by: Andres Calderon Jaramillo <andrescj@chromium.org>
Commit-Queue: Hang Nguyen <hnt@chromium.org>
Tested-by: Hang Nguyen <hnt@chromium.org>
Reviewed-by: Andres Calderon Jaramillo <andrescj@google.com>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
From Gen-12 onwards Media compression aux buffer layout has been
changed. The functionality to allocate minigbm compressed buffers are
mostly taken from CL:3275292 and this CL adapts it to guard this
feature behind an environment variable controlled by the minigbm user
application (we're not re-using the original CL because it seems the
original author is no longer active).
BUG=b:201620358
TEST=Play video on Chrome with feature flag enabled for MMC and verify
type (7) of buffer modifer in the output of below command:
localhost ~ # cat /sys/kernel/debug/dri/0/i915_gem_framebuffer
user size: 1280 x 720, depth 0, 8 bpp, modifier 0x100000000000007
Change-Id: I69cb527eb9d16498f7e9c2fb32c793cea6b6a4ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4655427
Reviewed-by: Andres Calderon Jaramillo <andrescj@google.com>
Commit-Queue: Hang Nguyen <hnt@chromium.org>
Tested-by: Hang Nguyen <hnt@chromium.org>
This is the reland of crrev.com/c/4615698. It is reverted because it
causes the camera regression (b/289983468). The camera IPU hardware
cannot handle a frame whose Y plane and UV planes are not contiguous.
Aligning the height by 16 makes the space between the planes.
This CL aligns the height by 8. This will not cause the camera
problem today because all the heights of camera stack exposed as
supported are aligned by 8.
BUG=b:274756117, b:289983468
TEST=PSNR 31.946 => 34.012 in video.EncodeAccelPerf.av1_180p_desktop2 on rex
Change-Id: I96907ea372bae6740559a67f71856a89811c7cc8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4739135
Reviewed-by: Chia-I Wu <olv@google.com>
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
This reverts commit 670301f61a.
Reason for revert: b/289983468
Original change's description:
> i915: Vertical align video encode buffers to macroblock size
>
> Verically align buffers used in video encoding to the size of a
> macroblock. This prevents uninitialized data from entering the encoding
> pipeline, which causes quality degradations.
>
> BUG=b:274756117 b:277690367
> TEST=Tested by running "./video_encode_accelerator_perf_tests
> --codec=av1 --bitrate=84120 180p_perf.yuv 180p_perf.json
> --gtest_filter=VideoEncoderTest.MeasureProducedBitstreamQuality" on a
> Rex. The average PSNR goes from 34.4939dB to 38.6649dB.
>
> Change-Id: I6783f1986869e11b1dd19e949d25c4450229c4c6
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4615698
> Tested-by: Justin Green <greenjustin@google.com>
> Commit-Queue: Justin Green <greenjustin@google.com>
> Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
> Reviewed-by: Dominik Behr <dbehr@chromium.org>
BUG=b:274756117 b:277690367
Change-Id: I0ac9a1fecd74bffa9c10cebaa38469331224b9b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4671806
Commit-Queue: Ren-Pei Zeng <kamesan@chromium.org>
Tested-by: Ren-Pei Zeng <kamesan@chromium.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Verically align buffers used in video encoding to the size of a
macroblock. This prevents uninitialized data from entering the encoding
pipeline, which causes quality degradations.
BUG=b:274756117 b:277690367
TEST=Tested by running "./video_encode_accelerator_perf_tests
--codec=av1 --bitrate=84120 180p_perf.yuv 180p_perf.json
--gtest_filter=VideoEncoderTest.MeasureProducedBitstreamQuality" on a
Rex. The average PSNR goes from 34.4939dB to 38.6649dB.
Change-Id: I6783f1986869e11b1dd19e949d25c4450229c4c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4615698
Tested-by: Justin Green <greenjustin@google.com>
Commit-Queue: Justin Green <greenjustin@google.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
fix a typo in combinations affecting the legacy (no explicit modifiers)
allocation path.
BUG=b:279974016, b:243459433
TEST=glxgears in Crostini on MTL
Change-Id: I97d5a66effd82d8265bb2b977d623ee07bad5af0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4492277
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Lina Versace <chadversary@chromium.org>
Reviewed-by: Matt Turner <msturner@google.com>
Same as NV12, but more restricted. This will unbreak plane_test
as used in Tast PlatformOverlays.24bpp_p010_overlay, which is
currently broken because P010 BOs are tried to be mappe in
userspace.
BUG=b:226417611
TEST=plane_test --format XR24 --plane P010 --size 640x360 on brya
Change-Id: Ifb7b38435bcb3ff6d911a7671a01598f0ec45f87
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4459793
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Commit-Queue: Dominik Behr <dbehr@chromium.org>
Tested-by: Miguel Casas-Sanchez <mcasas@chromium.org>
Auto-Submit: Miguel Casas-Sanchez <mcasas@chromium.org>
Reviewed-by: Hang Nguyen <hnt@chromium.org>
Use clflushopt if it is supported instead of clflush. clflushopt is more
optimized and suggested by the HW engineers. It has improved MTL unmap
operation times significantly.
BUG=b:274641129
TEST=camera preview should be minimum of 30fps
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Signed-off-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Change-Id: I9bf7e355d5ebdfb1647c578173123bb73db5571d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4382538
Reviewed-by: Dominik Behr <dbehr@chromium.org>
The multi-planar formats are being allocated into a single plane,
and the minigbm exynos backend is dropped. So we can use `handle` instead of handles as of now.
Remove some of the helper functions that calculate the number of planes.
There is no need to check if there is more than one kernel buffer per buffer object.
Added a new function `drv_gem_close` in `drv_helpers` that can be used by `drv_gem_bo_destroy` and `drv_prime_bo_import`. It can be used to clean the unused gem_handle.
Bug=b:266776512
TEST=camera and screenshot work fine after deploying the change #strongbad
TEST=camera and screenshot work fine after deploying the change #kukui-arc-r
TEST=camera and screenshot work fine after deploying the change, tested a couple of apps in the Google Play Store, and checked file `dma_buf/bufinfo` to see there's no object leaking. #guybrush
Change-Id: Ib63559504e4cb8f1a32ae90170925146613d694f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4297873
Commit-Queue: Dawn Han <dawnhan@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Dawn Han <dawnhan@google.com>
drv_bo_from_format will apply stride_align to all planes. Since we
always pass 1 for stride_align, there is no change except when the
format is DRM_FORMAT_YVU420_ANDROID.
When the format is DRM_FORMAT_YVU420_ANDROID, and when stride_align is 0
or 1, drv_bo_from_format assumes there is no hw requirement and forces
stride_align to 16. But because we used to require stride to be aligned
to 32, there is no actual change either.
BUG=b:265746435
TEST=subset of CTS and CTS Verifier on grunt, guybrush and skyrim
Change-Id: Ia6ef89bb744c39d2baead07bc47f11b0eea96b97
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4336265
Tested-by: Chia-I Wu <olv@google.com>
Commit-Queue: Chia-I Wu <olv@google.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Dawn Han <dawnhan@google.com>
Remove the parameter to align with upstream gbm.
For some places that use the number of planes. The number is 1. The
multi-planar formats are being allocated into a single plane, and
minigbm exynos backend is dropped. So we can just set the plane
index to 0 if needed.
Fixed the format in i915.c.
Bug=b:266776512
TEST=camera works after deploying the change #strongbad
TEST=camera works after deploying the change #corsola
Change-Id: I0880917754c01b9d0f27d21f3c42d87f00a09f50
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4249501
Commit-Queue: Dawn Han <dawnhan@google.com>
Tested-by: Dawn Han <dawnhan@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olv@google.com>
mmap ioctl is disallowed for all discrete platforms and for all
platforms with GRAPHICS_VER > 12.
Refer: https://patchwork.freedesktop.org/patch/440915/
BUG=b:266001234
TEST=Photo capture on camera
Signed-off-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Change-Id: I2151f56a6e32217a30783b10b3edfa915773316e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4179852
Tested-by: Arselan Alvi <arselan.alvi@intel.com>
Reviewed-by: Drew Davenport <ddavenport@chromium.org>
Reviewed-by: Matt Turner <msturner@google.com>
Absorbed one of the return fix in crrev/c/3379650.
BUG=N/A
TEST=build
Change-Id: Ic169d6478a04915a5f8b907de90f9b84a9811750
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4039721
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
HAL_PIXEL_FORMAT_BLOB gets resolved into DRM_FORMAT_R8 with height of 1.
Avoid doing any vertical alignment for this case. Ideally we want a new
DRM_FORMAT_BLOB format.
BUG=b:255226937
TEST=atest CtsNNAPITestCases:GpuNnapiTest
Change-Id: Iea86481392b40c6c827f84323cb50450ddec03a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4035255
Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
1) Adding MTL PCI-IDs to minigbm
2) renamed gen variable to graphics_version to allign to driver naming
convention and to adapt to upcoming split ip versions for
display/graphics/media.
BUG=b:243459433, b:243685631
TEST=emerge-rex minigbm
Change-Id: I9859fadecf737532e8f1689c1531caccf31fe212
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3841636
Tested-by: Ashutosh Kumar <ashutosh1.kumar@intel.com>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Commit-Queue: Rajat Jain <rajatja@google.com>
This is required for modern Android atop a gralloc with the cross_domain
backend or other native backend.
BUG=b:238609372
TEST=build and AHB cts
Change-Id: Id963eeec62c4400cc009384e127c93588c99346e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3777566
Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Jason Macnak <natsu@google.com>
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
Like ADL-P, RPL-P is gen12 and has XE_LPD
PCI IDs from https://crrev.com/c/3654737
BUG=b:233114312
TEST=Protect playback works on RPL-P
'cat /sys/kernel/debug/dri/0/i915_gem_framebuffer' shows gen12
modifier
Change-Id: I5595d72a97fd5eb09080eea48ac4a3e3800747d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3726504
Commit-Queue: Juston Li <juston.li@intel.com>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Tested-by: George D Sworo <george.d.sworo@intel.corp-partner.google.com>
Rename to reflect that ADL-P has the newer XE_LPD display IP that
required the height and stride adjustments.
RPL-P also has XE_LPD
BUG=b:233114312
TEST=sudo emerge-brya minigbm
Change-Id: I5f83a74d5332b4118fb841efd9200a6519e545e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3732651
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Tested-by: George D Sworo <george.d.sworo@intel.corp-partner.google.com>
Commit-Queue: Juston Li <juston.li@intel.com>
and implement num_planes_from_modifier interface.
This only includes the i915 parts of
commit 1a733377e9, partially reverting
commit 853b8542fb.
Bug🅱️224580219
Change-Id: I94b5181f3ec231929873bc56c1044ca427f9de5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3568488
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Robert Mader <robert.mader@collabora.corp-partner.google.com>
Tested-by: Robert Mader <robert.mader@collabora.corp-partner.google.com>
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
This reverts commit 1a733377e9.
Reason for revert: Broke many ARC tests b/227807607 b/227830888
Original change's description:
> minigbm: i915/amdgpu: Update plane count in bo_import
>
> For format/modifier combination where the plane count does not
> match the `DRM_FORMAT_MOD_INVALID` case, importing BOs
> (via e.g. `gbm_bo_import`) currently fails as `bo->meta.num_planes`
> is not set correctly.
>
> Fix that by making the driver backends that support such
> format/modifier combinations update the plane count accordingly.
>
>
> minigbm: i915: Implement num_planes_from_modifier interface
>
> Some format/modifier combinations have different plane counts
> compared to the formats default (i.e. when the modifier is
> `DRM_FORMAT_MOD_INVALID`).
>
> Right now the supported cases are hardcoded in
> `i915_bo_compute_metadata()`, however this does not cover all
> use-cases. So implement the already existing backend interface,
> aligning i915 with e.g. amdgpu.
>
> Bug🅱️224580219
> Change-Id: If017997c70ab7da04ebf9d6cb9db775d9271ed05
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3516490
> Reviewed-by: Bas Nieuwenhuizen <basni@chromium.org>
> Tested-by: Bas Nieuwenhuizen <basni@chromium.org>
> Commit-Queue: Bas Nieuwenhuizen <basni@chromium.org>
Bug: b:224580219
Change-Id: I334f8cedb1d0414ecd0a38217afa4afc0df6ab47
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3568890
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Tested-by: Kazuhiro Inaba <kinaba@chromium.org>
Auto-Submit: Kazuhiro Inaba <kinaba@chromium.org>
Reviewed-by: Tadashi G. Takaoka <takaoka@google.com>
Commit-Queue: Tadashi G. Takaoka <takaoka@google.com>
Owners-Override: Tadashi G. Takaoka <takaoka@google.com>
For format/modifier combination where the plane count does not
match the `DRM_FORMAT_MOD_INVALID` case, importing BOs
(via e.g. `gbm_bo_import`) currently fails as `bo->meta.num_planes`
is not set correctly.
Fix that by making the driver backends that support such
format/modifier combinations update the plane count accordingly.
minigbm: i915: Implement num_planes_from_modifier interface
Some format/modifier combinations have different plane counts
compared to the formats default (i.e. when the modifier is
`DRM_FORMAT_MOD_INVALID`).
Right now the supported cases are hardcoded in
`i915_bo_compute_metadata()`, however this does not cover all
use-cases. So implement the already existing backend interface,
aligning i915 with e.g. amdgpu.
Bug🅱️224580219
Change-Id: If017997c70ab7da04ebf9d6cb9db775d9271ed05
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3516490
Reviewed-by: Bas Nieuwenhuizen <basni@chromium.org>
Tested-by: Bas Nieuwenhuizen <basni@chromium.org>
Commit-Queue: Bas Nieuwenhuizen <basni@chromium.org>