minigbm: format fix and add missing header
BUG=n/a TEST=build Change-Id: Id2dac9a25190ba8ee05f42ef3a4ff8a1e3965844 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4269511 Reviewed-by: Satoshi Niwa <niwa@chromium.org> Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org> Tested-by: Yiwei Zhang <zzyiwei@chromium.org> Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org>
This commit is contained in:
parent
3e300b638a
commit
b377924a7b
3 changed files with 5 additions and 7 deletions
|
|
@ -139,7 +139,6 @@ static void drv_destroy_and_close(struct driver *drv)
|
|||
|
||||
cros_gralloc_driver::cros_gralloc_driver() : drv_(init_try_nodes(), drv_destroy_and_close)
|
||||
{
|
||||
|
||||
char buf[PROP_VALUE_MAX];
|
||||
property_get("ro.product.device", buf, "unknown");
|
||||
mt8183_camera_quirk_ = !strncmp(buf, "kukui", strlen("kukui"));
|
||||
|
|
|
|||
|
|
@ -314,8 +314,7 @@ PUBLIC int gbm_detect_device_info_path(unsigned int detect_flags, const char *de
|
|||
return ret;
|
||||
}
|
||||
|
||||
static struct gbm_device *
|
||||
try_drm_devices(drmDevicePtr *devs, int dev_count, int type, int *out_fd)
|
||||
static struct gbm_device *try_drm_devices(drmDevicePtr *devs, int dev_count, int type, int *out_fd)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
@ -340,10 +339,9 @@ try_drm_devices(drmDevicePtr *devs, int dev_count, int type, int *out_fd)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
PUBLIC struct gbm_device *
|
||||
minigbm_create_default_device(int *out_fd)
|
||||
PUBLIC struct gbm_device *minigbm_create_default_device(int *out_fd)
|
||||
{
|
||||
struct gbm_device *gbm;
|
||||
struct gbm_device *gbm;
|
||||
drmDevicePtr devs[64];
|
||||
int dev_count;
|
||||
int fd;
|
||||
|
|
@ -362,7 +360,7 @@ minigbm_create_default_device(int *out_fd)
|
|||
dev_count = drmGetDevices2(0, devs, sizeof(devs) / sizeof(devs[0]));
|
||||
|
||||
/* try render nodes and then primary nodes */
|
||||
gbm = try_drm_devices(devs, dev_count, DRM_NODE_RENDER, out_fd);
|
||||
gbm = try_drm_devices(devs, dev_count, DRM_NODE_RENDER, out_fd);
|
||||
if (!gbm)
|
||||
gbm = try_drm_devices(devs, dev_count, DRM_NODE_PRIMARY, out_fd);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include <fcntl.h>
|
||||
#include <stdatomic.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue