minigbm: Add more dumb drivers
Add dumb drivers for Allwinner (sun4i-drm), MediaTek, and Rockchip
platforms. The latter two are only built and used if their respective
drivers are not selected.
BUG=b:258331312
TEST=Build Chromium VDA tests with crrev.com/c/3380427 and
GbmDeviceWrapper using /dev/dri/card* and use_v4l2_codec=true
Run VDA tests on RK3399 or Allwinner H6 decoding VP8 using legacy
decoder should pass tests
`emerge-kevin minigbm` and `emerge-cherry minigbm` should not fail
Change-Id: I82fb8815d5282f6a252a4d530eb764abb7c8c496
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4060691
Reviewed-by: Miguel Casas-Sanchez <mcasas@chromium.org>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Miguel Casas <mcasas@google.com>
Commit-Queue: Chen-Yu Tsai <wenst@chromium.org>
Auto-Submit: Chen-Yu Tsai <wenst@chromium.org>
This commit is contained in:
parent
399fa8b592
commit
dd9c86425b
2 changed files with 19 additions and 17 deletions
22
drv.c
22
drv.c
|
|
@ -30,15 +30,9 @@ extern const struct backend backend_amdgpu;
|
|||
#ifdef DRV_I915
|
||||
extern const struct backend backend_i915;
|
||||
#endif
|
||||
#ifdef DRV_MEDIATEK
|
||||
extern const struct backend backend_mediatek;
|
||||
#endif
|
||||
#ifdef DRV_MSM
|
||||
extern const struct backend backend_msm;
|
||||
#endif
|
||||
#ifdef DRV_ROCKCHIP
|
||||
extern const struct backend backend_rockchip;
|
||||
#endif
|
||||
#ifdef DRV_VC4
|
||||
extern const struct backend backend_vc4;
|
||||
#endif
|
||||
|
|
@ -46,10 +40,13 @@ extern const struct backend backend_vc4;
|
|||
// Dumb / generic drivers
|
||||
extern const struct backend backend_evdi;
|
||||
extern const struct backend backend_marvell;
|
||||
extern const struct backend backend_mediatek;
|
||||
extern const struct backend backend_meson;
|
||||
extern const struct backend backend_nouveau;
|
||||
extern const struct backend backend_komeda;
|
||||
extern const struct backend backend_radeon;
|
||||
extern const struct backend backend_rockchip;
|
||||
extern const struct backend backend_sun4i_drm;
|
||||
extern const struct backend backend_synaptics;
|
||||
extern const struct backend backend_virtgpu;
|
||||
extern const struct backend backend_udl;
|
||||
|
|
@ -72,21 +69,16 @@ static const struct backend *drv_get_backend(int fd)
|
|||
#ifdef DRV_I915
|
||||
&backend_i915,
|
||||
#endif
|
||||
#ifdef DRV_MEDIATEK
|
||||
&backend_mediatek,
|
||||
#endif
|
||||
#ifdef DRV_MSM
|
||||
&backend_msm,
|
||||
#endif
|
||||
#ifdef DRV_ROCKCHIP
|
||||
&backend_rockchip,
|
||||
#endif
|
||||
#ifdef DRV_VC4
|
||||
&backend_vc4,
|
||||
#endif
|
||||
&backend_evdi, &backend_marvell, &backend_meson, &backend_nouveau,
|
||||
&backend_komeda, &backend_radeon, &backend_synaptics, &backend_virtgpu,
|
||||
&backend_udl, &backend_virtgpu, &backend_vkms
|
||||
&backend_evdi, &backend_komeda, &backend_marvell, &backend_mediatek,
|
||||
&backend_meson, &backend_nouveau, &backend_radeon, &backend_rockchip,
|
||||
&backend_sun4i_drm, &backend_synaptics, &backend_udl, &backend_virtgpu,
|
||||
&backend_vkms
|
||||
};
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(backend_list); i++) {
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@
|
|||
#include "drv_priv.h"
|
||||
#include "util.h"
|
||||
|
||||
#define INIT_DUMB_DRIVER(driver) \
|
||||
#define INIT_DUMB_DRIVER_WITH_NAME(driver, _name) \
|
||||
const struct backend backend_##driver = { \
|
||||
.name = #driver, \
|
||||
.name = _name, \
|
||||
.init = dumb_driver_init, \
|
||||
.bo_create = drv_dumb_bo_create, \
|
||||
.bo_create_with_modifiers = dumb_bo_create_with_modifiers, \
|
||||
|
|
@ -23,6 +23,8 @@
|
|||
.resolve_format_and_use_flags = drv_resolve_format_and_use_flags_helper, \
|
||||
};
|
||||
|
||||
#define INIT_DUMB_DRIVER(driver) INIT_DUMB_DRIVER_WITH_NAME(driver, #driver)
|
||||
|
||||
static const uint32_t scanout_render_formats[] = { DRM_FORMAT_ARGB8888, DRM_FORMAT_XRGB8888,
|
||||
DRM_FORMAT_ABGR8888, DRM_FORMAT_XBGR8888,
|
||||
DRM_FORMAT_BGR888, DRM_FORMAT_RGB565 };
|
||||
|
|
@ -68,6 +70,14 @@ INIT_DUMB_DRIVER(marvell)
|
|||
INIT_DUMB_DRIVER(meson)
|
||||
INIT_DUMB_DRIVER(nouveau)
|
||||
INIT_DUMB_DRIVER(radeon)
|
||||
INIT_DUMB_DRIVER_WITH_NAME(sun4i_drm, "sun4i-drm")
|
||||
INIT_DUMB_DRIVER(synaptics)
|
||||
INIT_DUMB_DRIVER(udl)
|
||||
INIT_DUMB_DRIVER(vkms)
|
||||
|
||||
#ifndef DRV_ROCKCHIP
|
||||
INIT_DUMB_DRIVER(rockchip)
|
||||
#endif
|
||||
#ifndef DRV_MEDIATEK
|
||||
INIT_DUMB_DRIVER(mediatek)
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue