Commit graph

9 commits

Author SHA1 Message Date
Mike Frysinger
bc47e98159 UPSTREAM: presubmit: switch to cros format
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
2025-06-24 17:37:57 -07:00
Carlos Santa
3ab89b0247 xe: add initial Xe kmd support for gen12 xelp
Adds a new intel backend for interfacing with the Xe kernel driver.
Currently only tested on gen12 (Xe1; e.g. TGL, ADL, MTL).

Test 1: drm-tests (natively): stop ui and then run:
	- mapped_texture_test
	- null_platform_test -m [I915_FORMAT_MOD_X_TILED|I915_FORMAT_MOD_Y_TILED]
	- plane_test (by default it uses NV12)

Test 2: full OS: boot to UI, execute webGL and/or YouTube successfully and watch
the terminal: TERM=xterm watch -n1 -d cat /sys/kernel/debug/dri/0/i915_display_info
for color formats and display plane usage

v1: Carlos Santa <carlos.santa@intel.corp-partner.google.com>
v2: Ryan Neph <ryanneph@google.com>
  - formatting fixes
  - remove deprecated #ifdef I915_SCANOUT_Y_TILED conditional compilation
  - add missing backend_xe implementations
  - mimic i915_add_combinations
    - Match formatting, order of operations, and add the missing combo for
      YVU420_ANDROID + USE_CAMERA_WRITE.
    - In a future CL, we'll factor this into a common function called by both
      backends.
  - simplify xe_bo_map()
    - The conditional body is always taken, so remove the conditional entirely.
  - mark late-gen12 as mtl_or_newer until proper version handling is used.

BUG=b:358427077
TEST=drm-tests (see above)

Change-Id: I1eaa1dcce6cee706a421b3c4d6a532a6b83f8564
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/6245159
Tested-by: Ryan Neph <ryanneph@google.com>
Commit-Queue: Ryan Neph <ryanneph@google.com>
Reviewed-by: Matt Turner <msturner@google.com>
Reviewed-by: Lina Versace <linyaa@google.com>
2025-02-10 11:07:50 -08:00
Yiwei Zhang
8291bfe6f1 minigbm: format fix
BUG=n/a
TEST=./presubmit.sh

Change-Id: Ic581ebe770c648ee344cfbe20ba6655786a2088e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5505015
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Satoshi Niwa <niwa@chromium.org>
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
2024-05-01 08:09:45 +00:00
Gurchetan Singh
cf9ed9dc8e amdgpu: make libdir work on stock Linux
BUG=b:145747113
TEST=emerge-grunt minigbm

Cq-Depend: chromium:1967711
Change-Id: I10e721ffcbe8e36551269cf54e981be411389eaf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1967731
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
2020-01-21 20:43:23 +00:00
Kristian H. Kristensen
e8778f00ce i915: Align stride and offset per plane
Current code over-aligns the Y-plane dimensions by a factor of two, so
as to make sure alignment requirements are still satisfied when the
subsampled plane stride and height are divided by two. Instead, this
commit changes the approach to align each plane separately after
computing the plane width and height. We stop using
drv_bo_from_format(), which divides the stride and instead loop
through the planes ourselves.

BUG=822346
TEST=test_that graphics_Gbm

Change-Id: I1ea8f2fb8b1780686d4086f51e9bab759f724d78
Reviewed-on: https://chromium-review.googlesource.com/996647
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
2018-05-07 20:45:47 -07:00
Gurchetan Singh
1b1d56ae40 minigbm: add clang-format and presubmit hooks
Running the presubmit.sh script will apply our rules to every file in
the repo. Exclude gbm.h from the formatting requirements since this file
was taken from other open-source projects, and diffing will be easier
without our formatting rules.

In addition, special case drivers where the order of includes matters.

BUG=none
TEST=Verified the following commands succeed:

emerge-cyan minigbm/arc-cros-gralloc
emerge-oak minigbm/arc-cros-gralloc
emerge-veyron_minnie-cheets minigbm/arc-cros-gralloc
emerge-peach_pi minigbm
emerge-nyan_big minigbm
emerge-jadeite minigbm

Change-Id: I6ce93fb1930da254d13d5017766c17341870ccc9
Reviewed-on: https://chromium-review.googlesource.com/447319
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
2017-03-31 10:40:27 -07:00
Daniele Castagna
7a755de4f3 minigbm: Remove (c) from copyright notice.
The pre-submit hook script checks that copyright messages don't
contain "(c)".

This CL removes "(c)" from all the copyrights header in minigbm
that still have it.

BUG=None
TEST=emerge-$BOARD minigbm.

Change-Id: I1922d9d29b78d124302d497310fe1c1cfd6fc695
Reviewed-on: https://chromium-review.googlesource.com/421588
Commit-Ready: David Reveman <reveman@chromium.org>
Commit-Ready: Daniele Castagna <dcastagna@chromium.org>
Tested-by: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
2016-12-17 19:33:05 -08:00
Yuly Novikov
96c7a3bf4c Support multi-plane buffers.
Enable NV12 format on Exynos.

BUG=chromium:368775
TEST=HW video overlay works on snow and peach_pi

Change-Id: Ia149618fa086b9ba3ef998149c3557052833e33b
Signed-off-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/318550
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
2016-01-23 06:40:51 -08:00
Stéphane Marchesin
25a2606a25 Import minigbm
Minigbm is a gbm implementation for a few DRM targets. Currently the
targets are:
- cirrus
- exynos
- gma500
- i915
- rockchip
- tegra
- udl

Right some targets are controlled with GBM_{TARGET} flags. I would
like to get to a place where we can just build all the targets in a
single library, but we need the drm headers for all targets for that
to happen so this needs more thinking.

BUG=chromium:394868,chromium:402597,chromium:413947,chromium:412508
TEST=unit tests, which I will need to import later

Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
Change-Id: I36ae07f2a59827a807e19e1432891ca196b28803
Reviewed-on: https://chromium-review.googlesource.com/218030
2014-09-13 01:34:56 +00:00