Add 10-amdgpu.conf xorg.conf.d snippet

This instructs Xorg >= 1.16 to try loading the amdgpu driver for devices
managed by the amdgpu kernel driver.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Michel Dänzer
2015-04-24 09:57:27 +09:00
parent fa4aed6cf5
commit a49ad11af1
4 changed files with 44 additions and 1 deletions

View File

@@ -18,7 +18,7 @@
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
SUBDIRS = src man
SUBDIRS = src man conf
MAINTAINERCLEANFILES = ChangeLog INSTALL
.PHONY: ChangeLog INSTALL

5
conf/10-amdgpu.conf Normal file
View File

@@ -0,0 +1,5 @@
Section "OutputClass"
Identifier "AMDgpu"
MatchDriver "amdgpu"
Driver "amdgpu"
EndSection

24
conf/Makefile.am Normal file
View File

@@ -0,0 +1,24 @@
# Copyright 2015 Advanced Micro Devices, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# on the rights to use, copy, modify, merge, publish, distribute, sub
# license, and/or sell copies of the Software, and to permit persons to whom
# the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
# ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
if HAS_XORG_CONF_DIR
dist_config_DATA = 10-amdgpu.conf
endif

View File

@@ -81,6 +81,19 @@ PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
HAVE_XEXTPROTO_71="no")
AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ])
# Define a configure option for an alternate X Server configuration directory
# Section "OutputClass" is only supported as of xserver 1.16
PKG_CHECK_EXISTS([xorg-server >= 1.16],
[sysconfigdir=`$PKG_CONFIG --variable=sysconfigdir xorg-server`],
[sysconfigdir=""])
AC_ARG_WITH(xorg-conf-dir,
AS_HELP_STRING([--with-xorg-conf-dir=DIR],
[Default xorg.conf.d directory [[default=from $PKG_CONFIG xorg-server]]]),
[configdir="$withval"],
[configdir="$sysconfigdir"])
AC_SUBST(configdir)
AM_CONDITIONAL(HAS_XORG_CONF_DIR, [test "x$sysconfigdir" != "x"])
AC_ARG_ENABLE([udev],
AS_HELP_STRING([--disable-udev], [Disable libudev support [default=auto]]),
[enable_udev="$enableval"],
@@ -212,6 +225,7 @@ AC_CONFIG_FILES([
Makefile
src/Makefile
man/Makefile
conf/Makefile
])
AC_OUTPUT