mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-09 05:58:27 +02:00
[drm] Add start of a drm plugin
This commit adds most of the non-driver specific bits necessary for backing a renderer plugin. Subsequent commits will add the driver specific bits.
This commit is contained in:
parent
069839a58b
commit
920051bc55
7 changed files with 1145 additions and 1 deletions
|
|
@ -56,6 +56,10 @@ PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.12.0 ])
|
|||
AC_SUBST(GTK_CFLAGS)
|
||||
AC_SUBST(GTK_LIBS)
|
||||
|
||||
PKG_CHECK_MODULES(DRM, [libdrm])
|
||||
AC_SUBST(DRM_CFLAGS)
|
||||
AC_SUBST(DRM_LIBS)
|
||||
|
||||
AC_ARG_ENABLE(tracing, AS_HELP_STRING([--enable-tracing],[enable verbose tracing code]),enable_tracing=$enableval,enable_tracing=yes)
|
||||
|
||||
if test x$enable_tracing = xyes; then
|
||||
|
|
@ -211,6 +215,7 @@ AC_OUTPUT([Makefile
|
|||
src/plugins/Makefile
|
||||
src/plugins/renderers/Makefile
|
||||
src/plugins/renderers/frame-buffer/Makefile
|
||||
src/plugins/renderers/drm/Makefile
|
||||
src/plugins/splash/Makefile
|
||||
src/plugins/splash/throbgress/Makefile
|
||||
src/plugins/splash/fade-throbber/Makefile
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ fi
|
|||
|
||||
inst ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so $INITRDDIR
|
||||
|
||||
inst ${PLYMOUTH_PLUGIN_PATH}/renderers/drm.so $INITRDDIR
|
||||
inst ${PLYMOUTH_PLUGIN_PATH}/renderers/frame-buffer.so $INITRDDIR
|
||||
|
||||
if [ -d ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME} ]; then
|
||||
|
|
|
|||
|
|
@ -220,6 +220,7 @@ ply_renderer_open (ply_renderer_t *renderer)
|
|||
*/
|
||||
const char *known_plugins[] =
|
||||
{
|
||||
PLYMOUTH_PLUGIN_PATH "renderers/drm.so",
|
||||
PLYMOUTH_PLUGIN_PATH "renderers/frame-buffer.so",
|
||||
NULL
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
SUBDIRS = frame-buffer
|
||||
SUBDIRS = frame-buffer drm
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
|
|
|||
21
src/plugins/renderers/drm/Makefile.am
Normal file
21
src/plugins/renderers/drm/Makefile.am
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
INCLUDES = -I$(top_srcdir) \
|
||||
-I$(srcdir)/../../../libply \
|
||||
-I$(srcdir)/../../../libplybootsplash \
|
||||
-I$(srcdir)/../../.. \
|
||||
-I$(srcdir)/../.. \
|
||||
-I$(srcdir)/.. \
|
||||
-I$(srcdir)
|
||||
|
||||
plugindir = $(libdir)/plymouth/renderers
|
||||
plugin_LTLIBRARIES = drm.la
|
||||
|
||||
drm_la_CFLAGS = $(PLYMOUTH_CFLAGS) $(DRM_CFLAGS)
|
||||
|
||||
drm_la_LDFLAGS = -module -avoid-version -export-dynamic
|
||||
drm_la_LIBADD = $(PLYMOUTH_LIBS) $(DRM_LIBS) \
|
||||
../../../libply/libply.la \
|
||||
../../../libplybootsplash/libplybootsplash.la
|
||||
drm_la_SOURCES = $(srcdir)/plugin.c \
|
||||
$(srcdir)/ply-renderer-driver.h
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
1049
src/plugins/renderers/drm/plugin.c
Normal file
1049
src/plugins/renderers/drm/plugin.c
Normal file
File diff suppressed because it is too large
Load diff
67
src/plugins/renderers/drm/ply-renderer-driver.h
Normal file
67
src/plugins/renderers/drm/ply-renderer-driver.h
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
/* ply-renderer-driver.h
|
||||
*
|
||||
* Copyright (C) 2009 Red Hat, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*
|
||||
* Written By: Ray Strode <rstrode@redhat.com>
|
||||
*/
|
||||
#ifndef PLY_RENDERER_DRIVER_H
|
||||
#define PLY_RENDERER_DRIVER_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "ply-list.h"
|
||||
#include "ply-rectangle.h"
|
||||
#include "ply-utils.h"
|
||||
|
||||
typedef struct _ply_renderer_driver ply_renderer_driver_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ply_renderer_driver_t * (* create_driver) (int device_fd);
|
||||
|
||||
void (* destroy_driver) (ply_renderer_driver_t *driver);
|
||||
|
||||
uint32_t (* create_buffer) (ply_renderer_driver_t *driver,
|
||||
unsigned long width,
|
||||
unsigned long height,
|
||||
unsigned long *row_stride);
|
||||
bool (* fetch_buffer) (ply_renderer_driver_t *driver,
|
||||
uint32_t buffer_id,
|
||||
unsigned long *width,
|
||||
unsigned long *height,
|
||||
unsigned long *row_stride);
|
||||
|
||||
bool (* map_buffer) (ply_renderer_driver_t *driver,
|
||||
uint32_t buffer_id);
|
||||
|
||||
void (* unmap_buffer) (ply_renderer_driver_t *driver,
|
||||
uint32_t buffer_id);
|
||||
|
||||
char * (* begin_flush) (ply_renderer_driver_t *driver,
|
||||
uint32_t buffer_id);
|
||||
void (* end_flush) (ply_renderer_driver_t *driver,
|
||||
uint32_t buffer_id);
|
||||
|
||||
void (* destroy_buffer) (ply_renderer_driver_t *driver,
|
||||
uint32_t buffer_id);
|
||||
|
||||
} ply_renderer_driver_interface_t;
|
||||
|
||||
#endif /* PLY_RENDERER_DRIVER_H */
|
||||
/* vim: set ts=4 sw=4 et ai ci cino={.5s,^-2,+.5s,t0,g0,e-2,n-2,p2s,(0,=.5s,:.5s */
|
||||
Loading…
Add table
Reference in a new issue