minigbm: add amlogic backend
Add dumb amlogic backend based on udl. BUG=none TEST=emerge-falco minigbm Change-Id: I435d0924d8206b4058b76bf403175f9b2cbb1291 Reviewed-on: https://chromium-review.googlesource.com/861865 Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org> Reviewed-by: Sergey Volk <servolk@chromium.org>
This commit is contained in:
parent
9ad07155dd
commit
08052344f5
3 changed files with 39 additions and 0 deletions
3
Makefile
3
Makefile
|
|
@ -16,6 +16,9 @@ ifdef DRV_AMDGPU
|
|||
CFLAGS += $(shell $(PKG_CONFIG) --cflags libdrm_amdgpu)
|
||||
LDLIBS += -lamdgpuaddr
|
||||
endif
|
||||
ifdef DRV_AMLOGIC
|
||||
CFLAGS += $(shell $(PKG_CONFIG) --cflags libdrm_amlogic)
|
||||
endif
|
||||
ifdef DRV_EXYNOS
|
||||
CFLAGS += $(shell $(PKG_CONFIG) --cflags libdrm_exynos)
|
||||
endif
|
||||
|
|
|
|||
33
amlogic.c
Normal file
33
amlogic.c
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright 2018 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.
|
||||
*/
|
||||
|
||||
#ifdef DRV_AMLOGIC
|
||||
|
||||
#include "drv_priv.h"
|
||||
#include "helpers.h"
|
||||
#include "util.h"
|
||||
|
||||
static const uint32_t render_target_formats[] = { DRM_FORMAT_ARGB8888, DRM_FORMAT_XRGB8888 };
|
||||
|
||||
static int amlogic_init(struct driver *drv)
|
||||
{
|
||||
drv_add_combinations(drv, render_target_formats, ARRAY_SIZE(render_target_formats),
|
||||
&LINEAR_METADATA, BO_USE_RENDER_MASK);
|
||||
|
||||
return drv_modify_linear_combinations(drv);
|
||||
}
|
||||
|
||||
const struct backend backend_amlogic = {
|
||||
.name = "amlogic",
|
||||
.init = amlogic_init,
|
||||
.bo_create = drv_dumb_bo_create,
|
||||
.bo_destroy = drv_dumb_bo_destroy,
|
||||
.bo_import = drv_prime_bo_import,
|
||||
.bo_map = drv_dumb_bo_map,
|
||||
.bo_unmap = drv_bo_munmap,
|
||||
};
|
||||
|
||||
#endif
|
||||
3
drv.c
3
drv.c
|
|
@ -67,6 +67,9 @@ static const struct backend *drv_get_backend(int fd)
|
|||
const struct backend *backend_list[] = {
|
||||
#ifdef DRV_AMDGPU
|
||||
&backend_amdgpu,
|
||||
#endif
|
||||
#ifdef DRV_AMLOGIC
|
||||
&backend_amlogic,
|
||||
#endif
|
||||
&backend_evdi,
|
||||
#ifdef DRV_EXYNOS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue