st/egl: Rename kms backend to drm.
The main use of the backend is to support EGL_MESA_drm_display. drm should be a better name.
This commit is contained in:
parent
c7c2e7d0ce
commit
e7424d7240
|
@ -1363,7 +1363,7 @@ fi
|
||||||
AC_ARG_WITH([egl-platforms],
|
AC_ARG_WITH([egl-platforms],
|
||||||
[AS_HELP_STRING([--with-egl-platforms@<:@=DIRS...@:>@],
|
[AS_HELP_STRING([--with-egl-platforms@<:@=DIRS...@:>@],
|
||||||
[comma delimited native platforms libEGL supports, e.g.
|
[comma delimited native platforms libEGL supports, e.g.
|
||||||
"x11,kms" @<:@default=auto@:>@])],
|
"x11,drm" @<:@default=auto@:>@])],
|
||||||
[with_egl_platforms="$withval"],
|
[with_egl_platforms="$withval"],
|
||||||
[with_egl_platforms=yes])
|
[with_egl_platforms=yes])
|
||||||
AC_ARG_WITH([egl-displays],
|
AC_ARG_WITH([egl-displays],
|
||||||
|
|
|
@ -72,13 +72,13 @@ drivers will be installed to <code>${libdir}/egl</code>.</p>
|
||||||
<li><code>--with-egl-platforms</code>
|
<li><code>--with-egl-platforms</code>
|
||||||
|
|
||||||
<p>List the platforms (window systems) to support. Its argument is a comma
|
<p>List the platforms (window systems) to support. Its argument is a comma
|
||||||
seprated string such as <code>--with-egl-platforms=x11,kms</code>. It decides
|
seprated string such as <code>--with-egl-platforms=x11,drm</code>. It decides
|
||||||
the platforms a driver may support. The first listed platform is also used by
|
the platforms a driver may support. The first listed platform is also used by
|
||||||
the main library to decide the native platform: the platform the EGL native
|
the main library to decide the native platform: the platform the EGL native
|
||||||
types such as <code>EGLNativeDisplayType</code> or
|
types such as <code>EGLNativeDisplayType</code> or
|
||||||
<code>EGLNativeWindowType</code> defined for.</p>
|
<code>EGLNativeWindowType</code> defined for.</p>
|
||||||
|
|
||||||
<p>The available platforms are <code>x11</code>, <code>kms</code>,
|
<p>The available platforms are <code>x11</code>, <code>drm</code>,
|
||||||
<code>fbdev</code>, and <code>gdi</code>. The <code>gdi</code> platform can
|
<code>fbdev</code>, and <code>gdi</code>. The <code>gdi</code> platform can
|
||||||
only be built with SCons.</p>
|
only be built with SCons.</p>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ EGL_NATIVE_PLATFORM=_EGL_INVALID_PLATFORM
|
||||||
ifeq ($(firstword $(EGL_PLATFORMS)),x11)
|
ifeq ($(firstword $(EGL_PLATFORMS)),x11)
|
||||||
EGL_NATIVE_PLATFORM=_EGL_PLATFORM_X11
|
EGL_NATIVE_PLATFORM=_EGL_PLATFORM_X11
|
||||||
endif
|
endif
|
||||||
ifeq ($(firstword $(EGL_PLATFORMS)),kms)
|
ifeq ($(firstword $(EGL_PLATFORMS)),drm)
|
||||||
EGL_NATIVE_PLATFORM=_EGL_PLATFORM_DRM
|
EGL_NATIVE_PLATFORM=_EGL_PLATFORM_DRM
|
||||||
endif
|
endif
|
||||||
ifeq ($(firstword $(EGL_PLATFORMS)),fbdev)
|
ifeq ($(firstword $(EGL_PLATFORMS)),fbdev)
|
||||||
|
|
|
@ -27,7 +27,7 @@ _eglGetNativePlatformFromEnv(void)
|
||||||
} egl_platforms[_EGL_NUM_PLATFORMS] = {
|
} egl_platforms[_EGL_NUM_PLATFORMS] = {
|
||||||
{ _EGL_PLATFORM_WINDOWS, "gdi" },
|
{ _EGL_PLATFORM_WINDOWS, "gdi" },
|
||||||
{ _EGL_PLATFORM_X11, "x11" },
|
{ _EGL_PLATFORM_X11, "x11" },
|
||||||
{ _EGL_PLATFORM_DRM, "kms" },
|
{ _EGL_PLATFORM_DRM, "drm" },
|
||||||
{ _EGL_PLATFORM_FBDEV, "fbdev" }
|
{ _EGL_PLATFORM_FBDEV, "fbdev" }
|
||||||
};
|
};
|
||||||
_EGLPlatformType plat = _EGL_INVALID_PLATFORM;
|
_EGLPlatformType plat = _EGL_INVALID_PLATFORM;
|
||||||
|
|
|
@ -24,9 +24,9 @@ x11_SOURCES = $(wildcard x11/*.c) \
|
||||||
x11_OBJECTS = $(x11_SOURCES:.c=.o)
|
x11_OBJECTS = $(x11_SOURCES:.c=.o)
|
||||||
|
|
||||||
|
|
||||||
kms_INCLUDES = -I$(TOP)/src/gallium/winsys $(shell pkg-config --cflags-only-I libdrm)
|
drm_INCLUDES = -I$(TOP)/src/gallium/winsys $(shell pkg-config --cflags-only-I libdrm)
|
||||||
kms_SOURCES = $(wildcard kms/*.c)
|
drm_SOURCES = $(wildcard drm/*.c)
|
||||||
kms_OBJECTS = $(kms_SOURCES:.c=.o)
|
drm_OBJECTS = $(drm_SOURCES:.c=.o)
|
||||||
|
|
||||||
|
|
||||||
fbdev_INCLUDES = -I$(TOP)/src/gallium/winsys/sw
|
fbdev_INCLUDES = -I$(TOP)/src/gallium/winsys/sw
|
||||||
|
@ -34,8 +34,8 @@ fbdev_SOURCES = $(wildcard fbdev/*.c)
|
||||||
fbdev_OBJECTS = $(fbdev_SOURCES:.c=.o)
|
fbdev_OBJECTS = $(fbdev_SOURCES:.c=.o)
|
||||||
|
|
||||||
|
|
||||||
ALL_INCLUDES = $(common_INCLUDES) $(x11_INCLUDES) $(kms_INCLUDES) $(fbdev_INCLUDES)
|
ALL_INCLUDES = $(common_INCLUDES) $(x11_INCLUDES) $(drm_INCLUDES) $(fbdev_INCLUDES)
|
||||||
ALL_SOURCES = $(common_SOURCES) $(x11_SOURCES) $(kms_SOURCES) $(fbdev_SOURCES)
|
ALL_SOURCES = $(common_SOURCES) $(x11_SOURCES) $(drm_SOURCES) $(fbdev_SOURCES)
|
||||||
|
|
||||||
EGL_OBJECTS = $(common_OBJECTS)
|
EGL_OBJECTS = $(common_OBJECTS)
|
||||||
EGL_CPPFLAGS = $(common_INCLUDES)
|
EGL_CPPFLAGS = $(common_INCLUDES)
|
||||||
|
@ -45,9 +45,9 @@ ifneq ($(findstring x11, $(EGL_PLATFORMS)),)
|
||||||
EGL_OBJECTS += $(x11_OBJECTS)
|
EGL_OBJECTS += $(x11_OBJECTS)
|
||||||
EGL_CPPFLAGS += -DHAVE_X11_BACKEND
|
EGL_CPPFLAGS += -DHAVE_X11_BACKEND
|
||||||
endif
|
endif
|
||||||
ifneq ($(findstring kms, $(EGL_PLATFORMS)),)
|
ifneq ($(findstring drm, $(EGL_PLATFORMS)),)
|
||||||
EGL_OBJECTS += $(kms_OBJECTS)
|
EGL_OBJECTS += $(drm_OBJECTS)
|
||||||
EGL_CPPFLAGS += -DHAVE_KMS_BACKEND
|
EGL_CPPFLAGS += -DHAVE_DRM_BACKEND
|
||||||
endif
|
endif
|
||||||
ifneq ($(findstring fbdev, $(EGL_PLATFORMS)),)
|
ifneq ($(findstring fbdev, $(EGL_PLATFORMS)),)
|
||||||
EGL_OBJECTS += $(fbdev_OBJECTS)
|
EGL_OBJECTS += $(fbdev_OBJECTS)
|
||||||
|
@ -87,8 +87,8 @@ $(common_OBJECTS): %.o: %.c
|
||||||
$(x11_OBJECTS): %.o: %.c
|
$(x11_OBJECTS): %.o: %.c
|
||||||
$(call egl-cc,x11)
|
$(call egl-cc,x11)
|
||||||
|
|
||||||
$(kms_OBJECTS): %.o: %.c
|
$(drm_OBJECTS): %.o: %.c
|
||||||
$(call egl-cc,kms)
|
$(call egl-cc,drm)
|
||||||
|
|
||||||
$(fbdev_OBJECTS): %.o: %.c
|
$(fbdev_OBJECTS): %.o: %.c
|
||||||
$(call egl-cc,fbdev)
|
$(call egl-cc,fbdev)
|
||||||
|
|
|
@ -65,8 +65,8 @@ egl_g3d_get_platform(_EGLDriver *drv, _EGLPlatformType plat)
|
||||||
break;
|
break;
|
||||||
case _EGL_PLATFORM_DRM:
|
case _EGL_PLATFORM_DRM:
|
||||||
plat_name = "DRM";
|
plat_name = "DRM";
|
||||||
#ifdef HAVE_KMS_BACKEND
|
#ifdef HAVE_DRM_BACKEND
|
||||||
nplat = native_get_kms_platform();
|
nplat = native_get_drm_platform();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case _EGL_PLATFORM_FBDEV:
|
case _EGL_PLATFORM_FBDEV:
|
||||||
|
|
|
@ -227,7 +227,7 @@ const struct native_platform *
|
||||||
native_get_x11_platform(void);
|
native_get_x11_platform(void);
|
||||||
|
|
||||||
const struct native_platform *
|
const struct native_platform *
|
||||||
native_get_kms_platform(void);
|
native_get_drm_platform(void);
|
||||||
|
|
||||||
const struct native_platform *
|
const struct native_platform *
|
||||||
native_get_fbdev_platform(void);
|
native_get_fbdev_platform(void);
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include "util/u_inlines.h"
|
#include "util/u_inlines.h"
|
||||||
#include "egllog.h"
|
#include "egllog.h"
|
||||||
|
|
||||||
#include "native_kms.h"
|
#include "native_drm.h"
|
||||||
|
|
||||||
static boolean
|
static boolean
|
||||||
kms_surface_validate(struct native_surface *nsurf, uint attachment_mask,
|
kms_surface_validate(struct native_surface *nsurf, uint attachment_mask,
|
|
@ -30,7 +30,7 @@
|
||||||
#include "util/u_memory.h"
|
#include "util/u_memory.h"
|
||||||
#include "egllog.h"
|
#include "egllog.h"
|
||||||
|
|
||||||
#include "native_kms.h"
|
#include "native_drm.h"
|
||||||
|
|
||||||
/* see get_drm_screen_name */
|
/* see get_drm_screen_name */
|
||||||
#include <radeon_drm.h>
|
#include <radeon_drm.h>
|
||||||
|
@ -228,13 +228,13 @@ native_create_display(void *dpy, struct native_event_handler *event_handler,
|
||||||
return kms_create_display(fd, event_handler, user_data);
|
return kms_create_display(fd, event_handler, user_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct native_platform kms_platform = {
|
static const struct native_platform drm_platform = {
|
||||||
"KMS", /* name */
|
"DRM", /* name */
|
||||||
native_create_display
|
native_create_display
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct native_platform *
|
const struct native_platform *
|
||||||
native_get_kms_platform(void)
|
native_get_drm_platform(void)
|
||||||
{
|
{
|
||||||
return &kms_platform;
|
return &drm_platform;
|
||||||
}
|
}
|
Loading…
Reference in New Issue