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
This commit is contained in:
parent
b960a81c8d
commit
25a2606a25
16 changed files with 2115 additions and 0 deletions
54
gbm_priv.h
Normal file
54
gbm_priv.h
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
|
||||
* Use of this source code is governed by a BSD-style license that can be
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#ifndef GBM_PRIV_H
|
||||
#define GBM_PRIV_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
#include "gbm.h"
|
||||
|
||||
struct gbm_device
|
||||
{
|
||||
int fd;
|
||||
struct gbm_driver *driver;
|
||||
void *priv;
|
||||
};
|
||||
|
||||
struct gbm_surface
|
||||
{
|
||||
};
|
||||
|
||||
struct gbm_bo
|
||||
{
|
||||
struct gbm_device *gbm;
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
uint32_t size;
|
||||
uint32_t stride;
|
||||
uint32_t format;
|
||||
union gbm_bo_handle handle;
|
||||
void *priv;
|
||||
void *user_data;
|
||||
void (*destroy_user_data)(struct gbm_bo *, void *);
|
||||
};
|
||||
|
||||
struct gbm_driver
|
||||
{
|
||||
char *name;
|
||||
int (*init)(struct gbm_device *gbm);
|
||||
void (*close)(struct gbm_device *gbm);
|
||||
int (*bo_create)(struct gbm_bo *bo, uint32_t width, uint32_t height, uint32_t format, uint32_t flags);
|
||||
int (*bo_destroy)(struct gbm_bo *bo);
|
||||
struct format_supported {
|
||||
uint32_t format;
|
||||
enum gbm_bo_flags usage;
|
||||
}
|
||||
format_list[10];
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue