`gbm_get_default_device_fd` is no longer used externally. It became a
helper function for `minigbm_create_default_device`. So we are no longer
need to expose it as PUBLIC.
BUG=b:267219693
TEST=manual check that the function works
Change-Id: I7109f27e843ee6a86e998c1dc9c2f2a5ff807997
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4308055
Commit-Queue: Dawn Han <dawnhan@google.com>
Tested-by: Dawn Han <dawnhan@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
On display-only DRM devices (e.g. vkms) we have to use primary node for
GBM, which is used by cros-camera. However, if cros-camera is started
before Chrome, it automatically takes over DRM master via minigbm,
blocking Chrome from starting.
Since we don't actually need any DRM master ioctls in minigbm (it works
on render nodes anyway), we'd like to drop it whenever it's taken by
accident.
BUG=b:239110721
TEST=On VM with vkms: stop ui -> restart cros-camera -> start ui
Change-Id: I66d60210e221dad9450ecd1eea939bd1d7813bbd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4290730
Commit-Queue: Yi Xie <yixie@chromium.org>
Tested-by: Yi Xie <yixie@chromium.org>
Reviewed-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Chia-I Wu <olv@google.com>
Variants of minigbm_create_default_device are open-coded in multiple
places. This should be used wherever minigbm can be assumed.
BUG=none
TEST=manual check that the function works
Change-Id: I3ad9897355ab72080fdca329674df09087b9adfd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4163418
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Chia-I Wu <olv@google.com>
Commit-Queue: Chia-I Wu <olv@google.com>
Background:
Tegra K1 (nyan) boards are not longer supported by ChromeOS. The last
compatible device stopped receiving updates after 2020-08-01.
ChromeOS code developed for this board can be removed.
Changes:
* Remove Tegra minigbm handler and plumbing.
Bug: b/180870522
Change-Id: I288b292fa8c85c17e9df1e65b0bf3295b56cb8a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2782243
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Fritz Koenig <frkoenig@chromium.org>
- Sometimes were return -1 and sometimes -errno. Prefer -errno
wherever possible.
- No braces for single line if/else statements. This does not
apply gralloc3/gralloc4, since that directory follows AOSP
style.
BUG=b:178495907
TEST=Cuttlefish CFI
Change-Id: I4c35768e015109730772a972b4b18e8d2c3cbb9b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2665001
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Jason Macnak <natsu@google.com>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
The paths work in the cros build environment, but not when building
on debian (which keeps them in libdrm/*).
The Makefile already takes care of adding the appropriate include
path, so we can just refer to the files directly.
Note: We do compile minigbm on debian for our Kokoro builder that
tests crosvm changes before the CQ.
BUG=None
TEST=CQ Dry Run
Change-Id: I766d14377941b2602df3c117055e17144af51b25
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2643162
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
and discovering "default" device.
These are utility functions to help virglrenderer and possibly other clients
enumerate and discover DRI devices. They can be improved separately from
virglrenderer.
BUG=b:175246639
TEST=build and run together with virglrenderer change
Change-Id: I86c3e68cdab5a824184e744c4c90fb7daa316377
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2583188
Tested-by: Dominik Behr <dbehr@chromium.org>
Auto-Submit: Dominik Behr <dbehr@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Dominik Behr <dbehr@chromium.org>