mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-27 01:20:36 +00:00
kmsro: Add freedreno renderonly support
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
This commit is contained in:
parent
7d458c0c69
commit
f6292c32cc
@ -209,8 +209,8 @@ endif
|
|||||||
if with_dri_i915 and with_gallium_i915
|
if with_dri_i915 and with_gallium_i915
|
||||||
error('Only one i915 provider can be built')
|
error('Only one i915 provider can be built')
|
||||||
endif
|
endif
|
||||||
if with_gallium_kmsro and not (with_gallium_vc4 or with_gallium_etnaviv)
|
if with_gallium_kmsro and not (with_gallium_vc4 or with_gallium_etnaviv or with_gallium_freedreno)
|
||||||
error('kmsro driver requires one or more renderonly drivers (vc4, etnaviv)')
|
error('kmsro driver requires one or more renderonly drivers (vc4, etnaviv, freedreno)')
|
||||||
endif
|
endif
|
||||||
if with_gallium_tegra and not with_gallium_nouveau
|
if with_gallium_tegra and not with_gallium_nouveau
|
||||||
error('tegra driver requires nouveau driver')
|
error('tegra driver requires nouveau driver')
|
||||||
|
@ -37,6 +37,10 @@ if HAVE_GALLIUM_VC4
|
|||||||
AM_CFLAGS += -DGALLIUM_VC4
|
AM_CFLAGS += -DGALLIUM_VC4
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if HAVE_GALLIUM_FREEDRENO
|
||||||
|
AM_CFLAGS += -DGALLIUM_FREEDRENO
|
||||||
|
endif
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libkmsrodrm.la
|
noinst_LTLIBRARIES = libkmsrodrm.la
|
||||||
|
|
||||||
libkmsrodrm_la_SOURCES = $(C_SOURCES)
|
libkmsrodrm_la_SOURCES = $(C_SOURCES)
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "kmsro_drm_public.h"
|
#include "kmsro_drm_public.h"
|
||||||
#include "vc4/drm/vc4_drm_public.h"
|
#include "vc4/drm/vc4_drm_public.h"
|
||||||
#include "etnaviv/drm/etnaviv_drm_public.h"
|
#include "etnaviv/drm/etnaviv_drm_public.h"
|
||||||
|
#include "freedreno/drm/freedreno_drm_public.h"
|
||||||
#include "xf86drm.h"
|
#include "xf86drm.h"
|
||||||
|
|
||||||
#include "pipe/p_screen.h"
|
#include "pipe/p_screen.h"
|
||||||
@ -69,5 +70,17 @@ struct pipe_screen *kmsro_drm_screen_create(int fd)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(GALLIUM_FREEDRENO)
|
||||||
|
ro.gpu_fd = drmOpenWithType("msm", NULL, DRM_NODE_RENDER);
|
||||||
|
if (ro.gpu_fd >= 0) {
|
||||||
|
ro.create_for_resource = renderonly_create_kms_dumb_buffer_for_resource,
|
||||||
|
screen = fd_drm_screen_create(ro.gpu_fd, &ro);
|
||||||
|
if (!screen)
|
||||||
|
close(ro.gpu_fd);
|
||||||
|
|
||||||
|
return screen;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return screen;
|
return screen;
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,9 @@ endif
|
|||||||
if with_gallium_vc4
|
if with_gallium_vc4
|
||||||
kmsro_c_args += '-DGALLIUM_VC4'
|
kmsro_c_args += '-DGALLIUM_VC4'
|
||||||
endif
|
endif
|
||||||
|
if with_gallium_freedreno
|
||||||
|
kmsro_c_args += '-DGALLIUM_FREEDRENO'
|
||||||
|
endif
|
||||||
|
|
||||||
libkmsrowinsys = static_library(
|
libkmsrowinsys = static_library(
|
||||||
'kmsrowinsys',
|
'kmsrowinsys',
|
||||||
|
Loading…
Reference in New Issue
Block a user