Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 274065 | Differences between
and this patch

Collapse All | Expand All

(-)plymouth_orig/configure.ac (-29 / +118 lines)
Lines 56-109 Link Here
56
AC_SUBST(GTK_CFLAGS)
56
AC_SUBST(GTK_CFLAGS)
57
AC_SUBST(GTK_LIBS)
57
AC_SUBST(GTK_LIBS)
58
58
59
PKG_CHECK_MODULES(DRM, [libdrm libdrm_intel libdrm_radeon libdrm_nouveau])
59
AC_ARG_ENABLE(libdrm_intel, AS_HELP_STRING([--enable-libdrm_intel],[enable building with libdrm_intel support]),enable_libdrm_intel=$enableval,enable_libdrm_intel=yes)
60
AM_CONDITIONAL(ENABLE_LIBDRM_INTEL,  [test "$enable_libdrm_intel" = yes])
60
61
61
OLD_CFLAGS="$CFLAGS"
62
if test x$enable_libdrm_intel = xyes; then
62
CFLAGS="$CFLAGS $DRM_CFLAGS"
63
  PKG_CHECK_MODULES(DRM, [libdrm libdrm_intel])
63
AC_MSG_CHECKING([if i915_drm.h, radeon_drm.h and nouveau_drm.h are in include path])
64
  OLD_CFLAGS="$CFLAGS"
64
AC_COMPILE_IFELSE(AC_LANG_PROGRAM(
65
  CFLAGS="$CFLAGS $DRM_CFLAGS"
65
[[
66
  AC_MSG_CHECKING([if i915_drm.h is in include path])
66
  #include <stdint.h>
67
  #include <stdlib.h>
68
  #include "i915_drm.h"
69
  #include "radeon_drm.h"
70
  #include "nouveau_drm.h"
71
]],[[]]),[found_drm_kernel_headers=yes],[found_drm_kernel_headers=no])
72
73
if test "$found_drm_kernel_headers" = "yes"; then
74
  AC_MSG_RESULT([yes])
75
else
76
  AC_MSG_RESULT([no])
77
  AC_MSG_CHECKING([if we can find them anyway])
78
79
  MORE_DRM_CFLAGS="-I`$PKG_CONFIG --variable includedir libdrm`/drm"
80
  CFLAGS="$CFLAGS $MORE_DRM_CFLAGS"
81
  AC_COMPILE_IFELSE(AC_LANG_PROGRAM(
67
  AC_COMPILE_IFELSE(AC_LANG_PROGRAM(
82
  [[
68
  [[
83
    #include <stdint.h>
69
    #include <stdint.h>
84
    #include <stdlib.h>
70
    #include <stdlib.h>
85
    #include "i915_drm.h"
71
    #include "i915_drm.h"
72
  ]],[[]]),[found_drm_intel_kernel_headers=yes],[found_drm_intel_kernel_headers=no])
73
74
  if test "$found_drm_intel_kernel_headers" = "yes"; then
75
    AC_MSG_RESULT([yes])
76
  else
77
    AC_MSG_RESULT([no])
78
    AC_MSG_CHECKING([if we can find them anyway])
79
80
    MORE_DRM_CFLAGS="-I`$PKG_CONFIG --variable includedir libdrm`/drm"
81
    CFLAGS="$CFLAGS $MORE_DRM_CFLAGS"
82
    AC_COMPILE_IFELSE(AC_LANG_PROGRAM(
83
    [[
84
      #include <stdint.h>
85
      #include <stdlib.h>
86
      #include "i915_drm.h"
87
    ]],[[]]),[found_drm_intel_kernel_headers=yes],[found_drm_intel_kernel_headers=no])
88
89
    if test "$found_drm_intel_kernel_headers" = "yes"; then
90
      AC_MSG_RESULT([yes])
91
      DRM_CFLAGS="$DRM_CFLAGS $MORE_DRM_CFLAGS"
92
    else
93
      AC_MSG_RESULT([no])
94
      AC_MSG_ERROR([Could not find i915_drm.h])
95
    fi
96
  fi
97
98
  AC_SUBST(DRM_CFLAGS)
99
  AC_SUBST(DRM_LIBS)
100
  AC_DEFINE(PLY_ENABLE_LIBDRM_INTEL, 1, [Enable support for libdrm_intel driver])
101
fi
102
103
AC_ARG_ENABLE(libdrm_radeon, AS_HELP_STRING([--enable-libdrm_radeon],[enable building with libdrm_radeon support]),enable_libdrm_radeon=$enableval,enable_libdrm_radeon=yes)
104
AM_CONDITIONAL(ENABLE_LIBDRM_RADEON,  [test "$enable_libdrm_radeon" = yes])
105
106
if test x$enable_libdrm_radeon = xyes; then
107
  PKG_CHECK_MODULES(DRM, [libdrm libdrm_radeon])
108
  OLD_CFLAGS="$CFLAGS"
109
  CFLAGS="$CFLAGS $DRM_CFLAGS"
110
  AC_MSG_CHECKING([if radeon_drm.h is in include path])
111
  AC_COMPILE_IFELSE(AC_LANG_PROGRAM(
112
  [[
113
    #include <stdint.h>
114
    #include <stdlib.h>
86
    #include "radeon_drm.h"
115
    #include "radeon_drm.h"
116
  ]],[[]]),[found_drm_radeon_kernel_headers=yes],[found_drm_radeon_kernel_headers=no])
117
118
  if test "$found_drm_radeon_kernel_headers" = "yes"; then
119
    AC_MSG_RESULT([yes])
120
  else
121
    AC_MSG_RESULT([no])
122
    AC_MSG_CHECKING([if we can find them anyway])
123
124
    MORE_DRM_CFLAGS="-I`$PKG_CONFIG --variable includedir libdrm`/drm"
125
    CFLAGS="$CFLAGS $MORE_DRM_CFLAGS"
126
    AC_COMPILE_IFELSE(AC_LANG_PROGRAM(
127
    [[
128
      #include <stdint.h>
129
      #include <stdlib.h>
130
      #include "radeon_drm.h"
131
    ]],[[]]),[found_drm_radeon_kernel_headers=yes],[found_drm_radeon_kernel_headers=no])
132
133
    if test "$found_drm_radeon_kernel_headers" = "yes"; then
134
      AC_MSG_RESULT([yes])
135
      DRM_CFLAGS="$DRM_CFLAGS $MORE_DRM_CFLAGS"
136
    else
137
      AC_MSG_RESULT([no])
138
      AC_MSG_ERROR([Could not find radeon_drm.h])
139
    fi
140
  fi
141
142
  AC_SUBST(DRM_CFLAGS)
143
  AC_SUBST(DRM_LIBS)
144
  AC_DEFINE(PLY_ENABLE_LIBDRM_RADEON, 1, [Enable support for libdrm_radeon driver])
145
fi
146
147
AC_ARG_ENABLE(libdrm_nouveau, AS_HELP_STRING([--enable-libdrm_nouveau],[enable building with libdrm_nouveau support]),enable_libdrm_nouveau=$enableval,enable_libdrm_nouveau=yes)
148
AM_CONDITIONAL(ENABLE_LIBDRM_NOUVEAU,  [test "$enable_libdrm_nouveau" = yes])
149
150
if test x$enable_libdrm_nouveau = xyes; then
151
  PKG_CHECK_MODULES(DRM, [libdrm libdrm_nouveau])
152
  OLD_CFLAGS="$CFLAGS"
153
  CFLAGS="$CFLAGS $DRM_CFLAGS"
154
  AC_MSG_CHECKING([if nouveau_drm.h is in include path])
155
  AC_COMPILE_IFELSE(AC_LANG_PROGRAM(
156
  [[
157
    #include <stdint.h>
158
    #include <stdlib.h>
87
    #include "nouveau_drm.h"
159
    #include "nouveau_drm.h"
88
  ]],[[]]),[found_drm_kernel_headers=yes],[found_drm_kernel_headers=no])
160
  ]],[[]]),[found_drm_nouveau_kernel_headers=yes],[found_drm_nouveau_kernel_headers=no])
89
161
90
  if test "$found_drm_kernel_headers" = "yes"; then
162
  if test "$found_drm_nouveau_kernel_headers" = "yes"; then
91
    AC_MSG_RESULT([yes])
163
    AC_MSG_RESULT([yes])
92
    DRM_CFLAGS="$DRM_CFLAGS $MORE_DRM_CFLAGS"
93
  else
164
  else
94
    AC_MSG_RESULT([no])
165
    AC_MSG_RESULT([no])
95
    AC_MSG_ERROR([Could not find i915_drm.h, radeon_drm.h and/or nouveau_drm.h])
166
    AC_MSG_CHECKING([if we can find them anyway])
167
168
    MORE_DRM_CFLAGS="-I`$PKG_CONFIG --variable includedir libdrm`/drm"
169
    CFLAGS="$CFLAGS $MORE_DRM_CFLAGS"
170
    AC_COMPILE_IFELSE(AC_LANG_PROGRAM(
171
    [[
172
      #include <stdint.h>
173
      #include <stdlib.h>
174
      #include "nouveau_drm.h"
175
    ]],[[]]),[found_drm_nouveau_kernel_headers=yes],[found_drm_nouveau_kernel_headers=no])
176
177
    if test "$found_drm_nouveau_kernel_headers" = "yes"; then
178
      AC_MSG_RESULT([yes])
179
      DRM_CFLAGS="$DRM_CFLAGS $MORE_DRM_CFLAGS"
180
    else
181
      AC_MSG_RESULT([no])
182
      AC_MSG_ERROR([Could not find nouveau_drm.h])
183
    fi
96
  fi
184
  fi
185
186
  AC_SUBST(DRM_CFLAGS)
187
  AC_SUBST(DRM_LIBS)
188
  AC_DEFINE(PLY_ENABLE_LIBDRM_NOUVEAU, 1, [Enable support for libdrm_nouveau driver])
97
fi
189
fi
98
CFLAGS="$OLD_CFLAGS"
99
AC_SUBST(DRM_CFLAGS)
100
AC_SUBST(DRM_LIBS)
101
190
102
AC_ARG_ENABLE(libkms, AS_HELP_STRING([--enable-libkms],[enable building with libkms support]),enable_libkms=$enableval,enable_libkms=yes)
191
AC_ARG_ENABLE(libkms, AS_HELP_STRING([--enable-libkms],[enable building with libkms support]),enable_libkms=$enableval,enable_libkms=yes)
103
AM_CONDITIONAL(ENABLE_LIBKMS,  [test "$enable_libkms" = yes])
192
AM_CONDITIONAL(ENABLE_LIBKMS,  [test "$enable_libkms" = yes])
104
193
105
if test x$enable_libkms = xyes; then
194
if test x$enable_libkms = xyes; then
106
  PKG_CHECK_MODULES(LIBKMS, [libkms])
195
  PKG_CHECK_MODULES(LIBKMS, [libdrm libkms])
107
  AC_SUBST(LIBKMS_CFLAGS)
196
  AC_SUBST(LIBKMS_CFLAGS)
108
  AC_SUBST(LIBKMS_LIBS)
197
  AC_SUBST(LIBKMS_LIBS)
109
  AC_DEFINE(PLY_ENABLE_LIBKMS, 1, [Enable support for libkms abstraction over drm drivers])
198
  AC_DEFINE(PLY_ENABLE_LIBKMS, 1, [Enable support for libkms abstraction over drm drivers])
(-)plymouth_orig/scripts/plymouth-populate-initrd.in (-1 / +1 lines)
Lines 99-105 Link Here
99
99
100
inst ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so $INITRDDIR
100
inst ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so $INITRDDIR
101
101
102
inst ${PLYMOUTH_PLUGIN_PATH}/renderers/drm.so $INITRDDIR
102
[ -f "${PLYMOUTH_PLUGIN_PATH}/renderers/drm.so" ] && inst ${PLYMOUTH_PLUGIN_PATH}/renderers/drm.so $INITRDDIR
103
inst ${PLYMOUTH_PLUGIN_PATH}/renderers/frame-buffer.so $INITRDDIR
103
inst ${PLYMOUTH_PLUGIN_PATH}/renderers/frame-buffer.so $INITRDDIR
104
104
105
if [ -d ${PLYMOUTH_DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME} ]; then
105
if [ -d ${PLYMOUTH_DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME} ]; then
(-)plymouth_orig/src/libply-splash-core/ply-renderer.c (+2 lines)
Lines 229-235 Link Here
229
  const char *known_plugins[] =
229
  const char *known_plugins[] =
230
    {
230
    {
231
      PLYMOUTH_PLUGIN_PATH "renderers/x11.so",
231
      PLYMOUTH_PLUGIN_PATH "renderers/x11.so",
232
#if defined PLY_ENABLE_LIBDRM_INTEL || defined PLY_ENABLE_LIBDRM_RADEON || defined PLY_ENABLE_LIBDRM_NOUVEAU || defined PLY_ENABLE_LIBKMS
232
      PLYMOUTH_PLUGIN_PATH "renderers/drm.so",
233
      PLYMOUTH_PLUGIN_PATH "renderers/drm.so",
234
#endif
233
      PLYMOUTH_PLUGIN_PATH "renderers/frame-buffer.so",
235
      PLYMOUTH_PLUGIN_PATH "renderers/frame-buffer.so",
234
      NULL
236
      NULL
235
    };
237
    };
(-)plymouth_orig/src/plugins/renderers/Makefile.am (-1 / +13 lines)
Lines 1-2 Link Here
1
SUBDIRS = frame-buffer drm x11
1
SUBDIRS = frame-buffer x11
2
if ENABLE_LIBDRM_INTEL
3
SUBDIRS += drm
4
endif
5
if ENABLE_LIBDRM_RADEON
6
SUBDIRS += drm
7
endif
8
if ENABLE_LIBDRM_NOUVEAU
9
SUBDIRS += drm
10
endif
11
if ENABLE_LIBKMS
12
SUBDIRS += drm
13
endif
2
MAINTAINERCLEANFILES = Makefile.in
14
MAINTAINERCLEANFILES = Makefile.in
(-)plymouth_orig/src/plugins/renderers/drm/Makefile.am (-7 / +15 lines)
Lines 16-28 Link Here
16
                         ../../../libply/libply.la                            \
16
                         ../../../libply/libply.la                            \
17
                         ../../../libply-splash-core/libply-splash-core.la
17
                         ../../../libply-splash-core/libply-splash-core.la
18
drm_la_SOURCES = $(srcdir)/plugin.c                                           \
18
drm_la_SOURCES = $(srcdir)/plugin.c                                           \
19
		 $(srcdir)/ply-renderer-driver.h                              \
19
		 $(srcdir)/ply-renderer-driver.h
20
		 $(srcdir)/ply-renderer-i915-driver.h                         \
20
if ENABLE_LIBDRM_INTEL
21
		 $(srcdir)/ply-renderer-i915-driver.c                         \
21
drm_la_SOURCES += $(srcdir)/ply-renderer-i915-driver.h                        \
22
		 $(srcdir)/ply-renderer-radeon-driver.h                       \
22
		  $(srcdir)/ply-renderer-i915-driver.c
23
		 $(srcdir)/ply-renderer-radeon-driver.c                       \
23
endif
24
		 $(srcdir)/ply-renderer-nouveau-driver.h                      \
24
25
		 $(srcdir)/ply-renderer-nouveau-driver.c
25
if ENABLE_LIBDRM_RADEON
26
drm_la_SOURCES += $(srcdir)/ply-renderer-radeon-driver.h                      \
27
		  $(srcdir)/ply-renderer-radeon-driver.c
28
endif
29
30
if ENABLE_LIBDRM_NOUVEAU
31
drm_la_SOURCES += $(srcdir)/ply-renderer-nouveau-driver.h                     \
32
		  $(srcdir)/ply-renderer-nouveau-driver.c
33
endif
26
34
27
if ENABLE_LIBKMS
35
if ENABLE_LIBKMS
28
drm_la_LIBADD += $(LIBKMS_LIBS)
36
drm_la_LIBADD += $(LIBKMS_LIBS)
(-)plymouth_orig/src/plugins/renderers/drm/plugin.c (-4 / +16 lines)
Lines 59-67 Link Here
59
#include "ply-renderer.h"
59
#include "ply-renderer.h"
60
#include "ply-renderer-plugin.h"
60
#include "ply-renderer-plugin.h"
61
#include "ply-renderer-driver.h"
61
#include "ply-renderer-driver.h"
62
#ifdef PLY_ENABLE_LIBDRM_INTEL
62
#include "ply-renderer-i915-driver.h"
63
#include "ply-renderer-i915-driver.h"
64
#endif
65
#ifdef PLY_ENABLE_LIBDRM_RADEON
63
#include "ply-renderer-radeon-driver.h"
66
#include "ply-renderer-radeon-driver.h"
67
#endif
68
#ifdef PLY_ENABLE_LIBDRM_NOUVEAU
64
#include "ply-renderer-nouveau-driver.h"
69
#include "ply-renderer-nouveau-driver.h"
70
#endif
65
71
66
#ifdef PLY_ENABLE_LIBKMS
72
#ifdef PLY_ENABLE_LIBKMS
67
#include "ply-renderer-libkms-driver.h"
73
#include "ply-renderer-libkms-driver.h"
Lines 501-522 Link Here
501
      free (driver_name);
507
      free (driver_name);
502
      return false;
508
      return false;
503
    }
509
    }
504
510
  backend->driver_interface = NULL;
505
  if (strcmp (driver_name, "i915") == 0)
511
#ifdef PLY_ENABLE_LIBDRM_INTEL
512
  if (backend->driver_interface == NULL && strcmp (driver_name, "i915") == 0)
506
    {
513
    {
507
      backend->driver_interface = ply_renderer_i915_driver_get_interface ();
514
      backend->driver_interface = ply_renderer_i915_driver_get_interface ();
508
      backend->driver_supports_mapping_console = true;
515
      backend->driver_supports_mapping_console = true;
509
    }
516
    }
510
  else if (strcmp (driver_name, "radeon") == 0)
517
#endif
518
#ifdef PLY_ENABLE_LIBDRM_RADEON
519
  if (backend->driver_interface == NULL && strcmp (driver_name, "radeon") == 0)
511
    {
520
    {
512
      backend->driver_interface = ply_renderer_radeon_driver_get_interface ();
521
      backend->driver_interface = ply_renderer_radeon_driver_get_interface ();
513
      backend->driver_supports_mapping_console = false;
522
      backend->driver_supports_mapping_console = false;
514
    }
523
    }
515
  else if (strcmp (driver_name, "nouveau") == 0)
524
#endif
525
#ifdef PLY_ENABLE_LIBDRM_NOUVEAU
526
  if (backend->driver_interface == NULL && strcmp (driver_name, "nouveau") == 0)
516
    {
527
    {
517
      backend->driver_interface = ply_renderer_nouveau_driver_get_interface ();
528
      backend->driver_interface = ply_renderer_nouveau_driver_get_interface ();
518
      backend->driver_supports_mapping_console = false;
529
      backend->driver_supports_mapping_console = false;
519
    }
530
    }
531
#endif
520
532
521
  free (driver_name);
533
  free (driver_name);
522
534

Return to bug 274065