Commit graph

4 commits

Author SHA1 Message Date
Dawn Han
a845b4c157 minigbm: clean up legacy gbm_get_default_device_fd usage
`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>
2023-03-09 05:06:53 +00:00
Chia-I Wu
52fca9c2cd minigbm: add minigbm_create_default_device helper
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>
2023-02-06 22:54:56 +00:00
Gurchetan Singh
cadc54fe5d minigbm: consistent style
- 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>
2021-02-03 04:22:38 +00:00
Dominik Behr
8ff2bf873f minigbm: add helper function for detecting DRI devices
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>
2021-01-16 08:01:01 +00:00