Hello community,
here is the log from the commit of package xf86-video-modesetting for
openSUSE:Factory checked in at 2014-06-30 21:44:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xf86-video-modesetting (Old)
and /work/SRC/openSUSE:Factory/.xf86-video-modesetting.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xf86-video-modesetting"
Changes:
--------
---
/work/SRC/openSUSE:Factory/xf86-video-modesetting/xf86-video-modesetting.changes
2014-04-26 19:35:08.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.xf86-video-modesetting.new/xf86-video-modesetting.changes
2014-06-30 21:45:06.000000000 +0200
@@ -1,0 +2,16 @@
+Fri Jun 27 01:53:06 UTC 2014 - [email protected]
+
+- Update to version 0.9.0:
+ + modesetting: Don't (brokenly) double-track software cursor
+ + Use own thunk function instead of shadowUpdatePackedWeak
+ + modesetting: query cursor size from the kernel
+ + modesetting: move closing fd to after we check outputs
+ + modesetting: try and use hotspot cursor support
+ + modesetting: fix cursor rendering with hotspots.
+ + modesetting: fix use after free.
+ + modesetting: fix build regression against older servers.
+ + Add support for server managed fds
+- Remove patch(es):
+ + U_Handle_new_DamageUnregister_API_which_has_only_one_argument.patch
+
+-------------------------------------------------------------------
Old:
----
U_Handle_new_DamageUnregister_API_which_has_only_one_argument.patch
xf86-video-modesetting-0.8.0.tar.bz2
New:
----
xf86-video-modesetting-0.9.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xf86-video-modesetting.spec ++++++
--- /var/tmp/diff_new_pack.KbB5rR/_old 2014-06-30 21:45:07.000000000 +0200
+++ /var/tmp/diff_new_pack.KbB5rR/_new 2014-06-30 21:45:07.000000000 +0200
@@ -17,7 +17,7 @@
Name: xf86-video-modesetting
-Version: 0.8.0
+Version: 0.9.0
Release: 0
Summary: Generic modesetting driver
License: MIT
@@ -35,7 +35,6 @@
# by default.
Supplements: xorg-x11-server
-Patch1:
U_Handle_new_DamageUnregister_API_which_has_only_one_argument.patch
Patch2: N_modesetting-default-swcursor.diff
%x11_abi_videodrv_req
@@ -49,7 +48,6 @@
%prep
%setup -q -n %{name}-%{version}
-%patch1 -p1
%patch2 -p1
%build
++++++ xf86-video-modesetting-0.8.0.tar.bz2 ->
xf86-video-modesetting-0.9.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xf86-video-modesetting-0.8.0/ChangeLog
new/xf86-video-modesetting-0.9.0/ChangeLog
--- old/xf86-video-modesetting-0.8.0/ChangeLog 2013-06-12 14:13:08.000000000
+0200
+++ new/xf86-video-modesetting-0.9.0/ChangeLog 2014-06-26 10:38:37.000000000
+0200
@@ -1,3 +1,154 @@
+commit 1e4cb922617990a3005ac23b0c90f89147c3564b
+Author: Maarten Lankhorst <[email protected]>
+Date: Thu Jun 26 10:37:19 2014 +0200
+
+ bump to 0.9.0
+
+commit d1c6e27759ea1d2c30cabc62ff2bc315bbbec5fc
+Author: Adam Jackson <[email protected]>
+Date: Wed May 21 10:16:39 2014 -0400
+
+ Use own thunk function instead of shadowUpdatePackedWeak
+
+ I plan to remove the Weak functions from a future server.
+
+ Signed-off-by: Adam Jackson <[email protected]>
+
+commit 07c5d9cb782fde2a073efdc437489d6c4b432d46
+Author: Dave Airlie <[email protected]>
+Date: Fri May 2 13:16:05 2014 +1000
+
+ modesetting: fix build regression against older servers.
+
+ Signed-off-by: Dave Airlie <[email protected]>
+
+commit 32fb5f2d821e5e13038eab7db35c5048ad807ccc
+Author: Dave Airlie <[email protected]>
+Date: Fri May 2 13:14:30 2014 +1000
+
+ modesetting: fix use after free.
+
+ Signed-off-by: Dave Airlie <[email protected]>
+
+commit 509dbe8cab339e44b02fed3728bbef7de5c60d05
+Author: Hans de Goede <[email protected]>
+Date: Tue Mar 18 15:48:22 2014 +0100
+
+ Add support for server managed fds
+
+ Signed-off-by: Hans de Goede <[email protected]>
+
+commit c9d377a19201973012bb6bbb07e3b8c3e9c3b856
+Author: Dave Airlie <[email protected]>
+Date: Fri Feb 28 12:04:30 2014 +1000
+
+ modesetting: fix cursor rendering with hotspots.
+
+ older kernels report EINVAL not ENOSYS, doh.
+
+ Signed-off-by: Dave Airlie <[email protected]>
+
+commit b8840f5442f9fbd8ce47ab2dd555b75cf4bb114a
+Author: Adam Jackson <[email protected]>
+Date: Tue Feb 25 09:06:55 2014 -0500
+
+ modesetting: Don't (brokenly) double-track software cursor
+
+ Signed-off-by: Adam Jackson <[email protected]>
+
+commit c36a5e298c36deb5f6fd0eef3029235aa58de295
+Author: Dave Airlie <[email protected]>
+Date: Mon Jan 20 11:06:42 2014 +1000
+
+ modesetting: try and use hotspot cursor support
+
+ Signed-off-by: Dave Airlie <[email protected]>
+
+commit bf359b118a0870f18a229d33979270ac2f0f5dcd
+Author: Dave Airlie <[email protected]>
+Date: Fri Feb 21 12:48:42 2014 +1000
+
+ modesetting: move closing fd to after we check outputs
+
+ On something like cirrus, start X, then attempt to start a second
+ X while the first is running, if fbdev is installed it'll fail
+ hard.
+
+ Signed-off-by: Dave Airlie <[email protected]>
+
+commit 677935b2d20f54f21c645b5eb386b6c9485fee5f
+Author: Alex Deucher <[email protected]>
+Date: Wed Feb 12 13:06:51 2014 -0500
+
+ modesetting: query cursor size from the kernel
+
+ Use new drm caps. This allows hw cursors to work
+ correctly on gpus with non-64x64 cursors.
+
+ Signed-off-by: Alex Deucher <[email protected]>
+
+commit da64ee70f96fcac32c08128559b293732b318a00
+Author: Maarten Lankhorst <[email protected]>
+Date: Tue Dec 3 17:01:28 2013 +0100
+
+ bump to 0.8.1
+
+commit c9f899bf34530d54eb96dda9f5e7d9135967fc11
+Author: Thierry Reding <[email protected]>
+Date: Tue Nov 26 17:08:03 2013 +0100
+
+ Properly identify DSI outputs
+
+ Newer Linux kernels support DSI outputs. To be able to identify them
+ properly, add DSI to the list of output names.
+
+ Reviewed-by: Aaron Plattner <[email protected]>
+ Signed-off-by: Thierry Reding <[email protected]>
+
+commit d2403d5a1fb17f925e907296398ba14e8b104e89
+Author: Thierry Reding <[email protected]>
+Date: Tue Nov 26 17:08:02 2013 +0100
+
+ Staticise and constify output names
+
+ This array isn't used anywhere outside this file, so it can be made
+ static. While at it, make the array const as well.
+
+ Signed-off-by: Thierry Reding <[email protected]>
+ Reviewed-by: Aaron Plattner <[email protected]>
+
+commit beca4dfb0e4d11d3729214967a1fe56ee5669831
+Author: Keith Packard <[email protected]>
+Date: Fri Nov 15 13:39:52 2013 +0900
+
+ Handle new DamageUnregister API which has only one argument
+
+ API change in 1.15
+
+ Signed-off-by: Keith Packard <[email protected]>
+
+commit 75e6ae5de483bad6bfdea0ec1d9030bb44af335f
+Author: Keith Packard <[email protected]>
+Date: Fri Nov 15 13:26:36 2013 +0900
+
+ Clean up compiler warnings.
+
+ Add const to any immutable string pointers.
+ Rename 'range' to 'prop_range' to avoid redefined warning.
+ Eliminate some unused return values.
+
+ Signed-off-by: Keith Packard <[email protected]>
+
+commit e8bd7c2dc3329fa0da3078b6d2cc0ffa43b428e5
+Author: Dave Airlie <[email protected]>
+Date: Wed Jul 31 11:24:48 2013 +1000
+
+ modesetting: change output names for secondary GPUs
+
+ if we are a secondary GPU modify the output name to avoid clashes.
+
+ Signed-off-by: Dave Airlie <[email protected]>
+
commit 58d3dc53a89c5aa2acfc93e4ae5719dd92b785b9
Author: Maarten Lankhorst <[email protected]>
Date: Wed Jun 12 14:11:53 2013 +0200
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xf86-video-modesetting-0.8.0/aclocal.m4
new/xf86-video-modesetting-0.9.0/aclocal.m4
--- old/xf86-video-modesetting-0.8.0/aclocal.m4 2013-06-12 14:11:00.000000000
+0200
+++ new/xf86-video-modesetting-0.9.0/aclocal.m4 2014-06-26 10:38:18.000000000
+0200
@@ -2058,10 +2058,10 @@
dnl from the copyright holders.
dnl
-# XORG_DRIVER_CHECK_EXT()
+# XORG_DRIVER_CHECK_EXT(MACRO, PROTO)
# --------------------------
-# Checks for the $1 define in xorg-server.h (from the sdk). If it
-# is defined, then add $1 to $REQUIRED_MODULES.
+# Checks for the MACRO define in xorg-server.h (from the sdk). If it
+# is defined, then add the given PROTO to $REQUIRED_MODULES.
AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
AC_REQUIRE([PKG_PROG_PKG_CONFIG])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xf86-video-modesetting-0.8.0/configure
new/xf86-video-modesetting-0.9.0/configure
--- old/xf86-video-modesetting-0.8.0/configure 2013-06-12 14:11:01.000000000
+0200
+++ new/xf86-video-modesetting-0.9.0/configure 2014-06-26 10:38:18.000000000
+0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for xf86-video-modesetting 0.8.0.
+# Generated by GNU Autoconf 2.69 for xf86-video-modesetting 0.9.0.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@@ -591,8 +591,8 @@
# Identity of this package.
PACKAGE_NAME='xf86-video-modesetting'
PACKAGE_TARNAME='xf86-video-modesetting'
-PACKAGE_VERSION='0.8.0'
-PACKAGE_STRING='xf86-video-modesetting 0.8.0'
+PACKAGE_VERSION='0.9.0'
+PACKAGE_STRING='xf86-video-modesetting 0.9.0'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
PACKAGE_URL=''
@@ -1370,7 +1370,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures xf86-video-modesetting 0.8.0 to adapt to many kinds of
systems.
+\`configure' configures xf86-video-modesetting 0.9.0 to adapt to many kinds of
systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1441,7 +1441,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of xf86-video-modesetting
0.8.0:";;
+ short | recursive ) echo "Configuration of xf86-video-modesetting
0.9.0:";;
esac
cat <<\_ACEOF
@@ -1573,7 +1573,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-xf86-video-modesetting configure 0.8.0
+xf86-video-modesetting configure 0.9.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1897,7 +1897,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by xf86-video-modesetting $as_me 0.8.0, which was
+It was created by xf86-video-modesetting $as_me 0.9.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3771,7 +3771,7 @@
# Define the identity of the package.
PACKAGE='xf86-video-modesetting'
- VERSION='0.8.0'
+ VERSION='0.9.0'
cat >>confdefs.h <<_ACEOF
@@ -18253,12 +18253,12 @@
pkg_cv_DRM_CFLAGS="$DRM_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists
--print-errors \"libdrm >= 2.2\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libdrm >= 2.2") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists
--print-errors \"libdrm >= 2.4.46\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdrm >= 2.4.46") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_DRM_CFLAGS=`$PKG_CONFIG --cflags "libdrm >= 2.2" 2>/dev/null`
+ pkg_cv_DRM_CFLAGS=`$PKG_CONFIG --cflags "libdrm >= 2.4.46" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -18270,12 +18270,12 @@
pkg_cv_DRM_LIBS="$DRM_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists
--print-errors \"libdrm >= 2.2\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libdrm >= 2.2") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists
--print-errors \"libdrm >= 2.4.46\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdrm >= 2.4.46") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_DRM_LIBS=`$PKG_CONFIG --libs "libdrm >= 2.2" 2>/dev/null`
+ pkg_cv_DRM_LIBS=`$PKG_CONFIG --libs "libdrm >= 2.4.46" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -18296,14 +18296,14 @@
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- DRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors
--cflags --libs "libdrm >= 2.2" 2>&1`
+ DRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors
--cflags --libs "libdrm >= 2.4.46" 2>&1`
else
- DRM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs
"libdrm >= 2.2" 2>&1`
+ DRM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs
"libdrm >= 2.4.46" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$DRM_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements (libdrm >= 2.2) were not met:
+ as_fn_error $? "Package requirements (libdrm >= 2.4.46) were not met:
$DRM_PKG_ERRORS
@@ -19071,7 +19071,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by xf86-video-modesetting $as_me 0.8.0, which was
+This file was extended by xf86-video-modesetting $as_me 0.9.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -19137,7 +19137,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //;
s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-xf86-video-modesetting config.status 0.8.0
+xf86-video-modesetting config.status 0.9.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xf86-video-modesetting-0.8.0/configure.ac
new/xf86-video-modesetting-0.9.0/configure.ac
--- old/xf86-video-modesetting-0.8.0/configure.ac 2013-06-12
14:10:45.000000000 +0200
+++ new/xf86-video-modesetting-0.9.0/configure.ac 2014-06-26
10:37:16.000000000 +0200
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-video-modesetting],
- [0.8.0],
+ [0.9.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[xf86-video-modesetting])
AC_CONFIG_SRCDIR([Makefile.am])
@@ -74,7 +74,7 @@
# Checks for header files.
AC_HEADER_STDC
-PKG_CHECK_MODULES(DRM, [libdrm >= 2.2])
+PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.46])
PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.10])
AM_CONDITIONAL(DRM, test "x$DRM" = xyes)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xf86-video-modesetting-0.8.0/src/driver.c
new/xf86-video-modesetting-0.9.0/src/driver.c
--- old/xf86-video-modesetting-0.8.0/src/driver.c 2013-06-12
14:07:36.000000000 +0200
+++ new/xf86-video-modesetting-0.9.0/src/driver.c 2014-06-26
10:20:17.000000000 +0200
@@ -183,7 +183,7 @@
Chipsets);
}
-static int open_hw(char *dev)
+static int open_hw(const char *dev)
{
int fd;
if (dev)
@@ -213,9 +213,20 @@
return ret;
}
-static Bool probe_hw(char *dev)
+static Bool probe_hw(const char *dev, struct xf86_platform_device
*platform_dev)
{
- int fd = open_hw(dev);
+ int fd;
+
+#if XF86_PDEV_SERVER_FD
+ if (platform_dev && (platform_dev->flags & XF86_PDEV_SERVER_FD)) {
+ fd = xf86_get_platform_device_int_attrib(platform_dev, ODEV_ATTRIB_FD,
-1);
+ if (fd == -1)
+ return FALSE;
+ return check_outputs(fd);
+ }
+#endif
+
+ fd = open_hw(dev);
if (fd != -1) {
int ret = check_outputs(fd);
close(fd);
@@ -237,7 +248,7 @@
}
-static Bool probe_hw_pci(char *dev, struct pci_device *pdev)
+static Bool probe_hw_pci(const char *dev, struct pci_device *pdev)
{
int ret = FALSE, fd = open_hw(dev);
char *id, *devid;
@@ -258,11 +269,11 @@
id = drmGetBusid(fd);
devid = ms_DRICreatePCIBusID(pdev);
- close(fd);
if (id && devid && !strcmp(id, devid))
ret = check_outputs(fd);
+ close(fd);
free(id);
free(devid);
return ret;
@@ -283,6 +294,10 @@
flag = (CARD32 *)data;
(*flag) = 0;
return TRUE;
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,15,99,902,0)
+ case SUPPORTS_SERVER_FDS:
+ return TRUE;
+#endif
default:
return FALSE;
}
@@ -298,7 +313,7 @@
scrn = xf86ConfigPciEntity(scrn, 0, entity_num, NULL,
NULL, NULL, NULL, NULL, NULL);
if (scrn) {
- char *devpath;
+ const char *devpath;
GDevPtr devSection = xf86GetDevFromEntity(scrn->entityList[0],
scrn->entityInstanceList[0]);
@@ -335,13 +350,13 @@
int entity_num, int flags, struct xf86_platform_device *dev,
intptr_t match_data)
{
ScrnInfoPtr scrn = NULL;
- char *path = xf86_get_platform_device_attrib(dev, ODEV_ATTRIB_PATH);
+ const char *path = xf86_get_platform_device_attrib(dev, ODEV_ATTRIB_PATH);
int scr_flags = 0;
if (flags & PLATFORM_PROBE_GPU_SCREEN)
scr_flags = XF86_ALLOCATE_GPU_SCREEN;
- if (probe_hw(path)) {
+ if (probe_hw(path, dev)) {
scrn = xf86AllocateScreen(driver, scr_flags);
xf86AddEntityToScreen(scrn, entity_num);
@@ -369,7 +384,7 @@
int i, numDevSections;
GDevPtr *devSections;
Bool foundScreen = FALSE;
- char *dev;
+ const char *dev;
ScrnInfoPtr scrn = NULL;
/* For now, just bail out for PROBE_DETECT. */
@@ -387,7 +402,7 @@
for (i = 0; i < numDevSections; i++) {
dev = xf86FindOptionValue(devSections[i]->options,"kmsdev");
- if (probe_hw(dev)) {
+ if (probe_hw(dev, NULL)) {
int entity;
entity = xf86ClaimFbSlot(drv, 0, devSections[i], TRUE);
scrn = xf86ConfigFbEntity(scrn, 0, entity,
@@ -558,13 +573,26 @@
if (ms->pEnt->location.type == BUS_PCI)
ret = drmClose(ms->fd);
else
+#ifdef XF86_PDEV_SERVER_FD
+ if (!(ms->pEnt->location.type == BUS_PLATFORM &&
+ (ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD)))
+#endif
ret = close(ms->fd);
+ (void) ret;
}
free(ms->Options);
free(ms);
}
+#ifndef DRM_CAP_CURSOR_WIDTH
+#define DRM_CAP_CURSOR_WIDTH 0x8
+#endif
+
+#ifndef DRM_CAP_CURSOR_HEIGHT
+#define DRM_CAP_CURSOR_HEIGHT 0x9
+#endif
+
static Bool
PreInit(ScrnInfoPtr pScrn, int flags)
{
@@ -572,7 +600,8 @@
rgb defaultWeight = { 0, 0, 0 };
EntityInfoPtr pEnt;
EntPtr msEnt = NULL;
- char *BusID = NULL, *devicename;
+ char *BusID = NULL;
+ const char *devicename;
Bool prefer_shadow = TRUE;
uint64_t value = 0;
int ret;
@@ -620,8 +649,15 @@
#if XSERVER_PLATFORM_BUS
if (pEnt->location.type == BUS_PLATFORM) {
- char *path = xf86_get_platform_device_attrib(pEnt->location.id.plat,
ODEV_ATTRIB_PATH);
- ms->fd = open_hw(path);
+#ifdef XF86_PDEV_SERVER_FD
+ if (pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD)
+ ms->fd =
xf86_get_platform_device_int_attrib(pEnt->location.id.plat, ODEV_ATTRIB_FD, -1);
+ else
+#endif
+ {
+ char *path =
xf86_get_platform_device_attrib(pEnt->location.id.plat, ODEV_ATTRIB_PATH);
+ ms->fd = open_hw(path);
+ }
}
else
#endif
@@ -704,6 +740,17 @@
prefer_shadow = !!value;
}
+ ms->cursor_width = 64;
+ ms->cursor_height = 64;
+ ret = drmGetCap(ms->fd, DRM_CAP_CURSOR_WIDTH, &value);
+ if (!ret) {
+ ms->cursor_width = value;
+ }
+ ret = drmGetCap(ms->fd, DRM_CAP_CURSOR_HEIGHT, &value);
+ if (!ret) {
+ ms->cursor_height = value;
+ }
+
ms->drmmode.shadow_enable = xf86ReturnOptValBool(ms->Options,
OPTION_SHADOW_FB, prefer_shadow);
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ShadowFB: preferred %s, enabled
%s\n", prefer_shadow ? "YES" : "NO", ms->drmmode.shadow_enable ? "YES" : "NO");
@@ -763,6 +810,12 @@
return ((uint8_t *)ms->drmmode.front_bo->ptr + row * stride + offset);
}
+static void
+msUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf)
+{
+ shadowUpdatePacked(pScreen, pBuf);
+}
+
static Bool
CreateScreenResources(ScreenPtr pScreen)
{
@@ -780,7 +833,7 @@
drmmode_uevent_init(pScrn, &ms->drmmode);
- if (!ms->SWCursor)
+ if (!ms->drmmode.sw_cursor)
drmmode_map_cursor_bos(pScrn, &ms->drmmode);
pixels = drmmode_map_front_bo(&ms->drmmode);
if (!pixels)
@@ -795,7 +848,7 @@
FatalError("Couldn't adjust screen pixmap\n");
if (ms->drmmode.shadow_enable) {
- if (!shadowAdd(pScreen, rootPixmap, shadowUpdatePackedWeak(),
+ if (!shadowAdd(pScreen, rootPixmap, msUpdatePacked,
msShadowWindow, 0, 0))
return FALSE;
}
@@ -844,21 +897,37 @@
#endif
static Bool
+SetMaster(ScrnInfoPtr pScrn)
+{
+ modesettingPtr ms = modesettingPTR(pScrn);
+ int ret;
+
+#ifdef XF86_PDEV_SERVER_FD
+ if (ms->pEnt->location.type == BUS_PLATFORM &&
+ (ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD))
+ return TRUE;
+#endif
+
+ ret = drmSetMaster(ms->fd);
+ if (ret)
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "drmSetMaster failed: %s\n",
+ strerror(errno));
+
+ return ret == 0;
+}
+
+static Bool
ScreenInit(SCREEN_INIT_ARGS_DECL)
{
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
modesettingPtr ms = modesettingPTR(pScrn);
VisualPtr visual;
- int ret;
pScrn->pScreen = pScreen;
- ret = drmSetMaster(ms->fd);
- if (ret) {
- ErrorF("Unable to set master\n");
+ if (!SetMaster(pScrn))
return FALSE;
- }
-
+
/* HW dependent - FIXME */
pScrn->displayWidth = pScrn->virtualX;
if (!drmmode_create_initial_bos(pScrn, &ms->drmmode))
@@ -931,7 +1000,7 @@
/* Need to extend HWcursor support to handle mask interleave */
if (!ms->drmmode.sw_cursor)
- xf86_cursors_init(pScreen, 64, 64,
+ xf86_cursors_init(pScreen, ms->cursor_width, ms->cursor_height,
HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64 |
HARDWARE_CURSOR_ARGB);
@@ -989,6 +1058,12 @@
pScrn->vtSema = FALSE;
+#ifdef XF86_PDEV_SERVER_FD
+ if (ms->pEnt->location.type == BUS_PLATFORM &&
+ (ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD))
+ return;
+#endif
+
drmDropMaster(ms->fd);
}
@@ -1003,10 +1078,7 @@
pScrn->vtSema = TRUE;
- if (drmSetMaster(ms->fd)) {
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "drmSetMaster failed: %s\n",
- strerror(errno));
- }
+ SetMaster(pScrn);
if (!drmmode_set_desired_modes(pScrn, &ms->drmmode))
return FALSE;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xf86-video-modesetting-0.8.0/src/driver.h
new/xf86-video-modesetting-0.9.0/src/driver.h
--- old/xf86-video-modesetting-0.8.0/src/driver.h 2012-07-17
17:06:33.000000000 +0200
+++ new/xf86-video-modesetting-0.9.0/src/driver.h 2014-06-26
10:20:17.000000000 +0200
@@ -59,7 +59,6 @@
#endif
Bool noAccel;
- Bool SWCursor;
CloseScreenProcPtr CloseScreen;
/* Broken-out options. */
@@ -76,6 +75,7 @@
DamagePtr damage;
Bool dirty_enabled;
+ uint32_t cursor_width, cursor_height;
} modesettingRec, *modesettingPtr;
#define modesettingPTR(p) ((modesettingPtr)((p)->driverPrivate))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xf86-video-modesetting-0.8.0/src/drmmode_display.c
new/xf86-video-modesetting-0.9.0/src/drmmode_display.c
--- old/xf86-video-modesetting-0.8.0/src/drmmode_display.c 2013-06-12
14:07:36.000000000 +0200
+++ new/xf86-video-modesetting-0.9.0/src/drmmode_display.c 2014-06-26
10:20:17.000000000 +0200
@@ -43,6 +43,8 @@
#include "xf86Crtc.h"
#include "drmmode_display.h"
+#include <cursorstr.h>
+
/* DPMS */
#ifdef HAVE_XEXTPROTO_71
#include <X11/extensions/dpmsconst.h>
@@ -52,6 +54,8 @@
#endif
#include "compat-api.h"
+#include "driver.h"
+
static struct dumb_bo *dumb_bo_create(int fd,
const unsigned width, const unsigned height,
const unsigned bpp)
@@ -445,6 +449,7 @@
static void
drmmode_load_cursor_argb (xf86CrtcPtr crtc, CARD32 *image)
{
+ modesettingPtr ms = modesettingPTR(crtc->scrn);
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
int i;
uint32_t *ptr;
@@ -453,10 +458,11 @@
/* cursor should be mapped already */
ptr = (uint32_t *)(drmmode_crtc->cursor_bo->ptr);
- for (i = 0; i < 64 * 64; i++)
+ for (i = 0; i < ms->cursor_width * ms->cursor_height; i++)
ptr[i] = image[i];// cpu_to_le32(image[i]);
- ret = drmModeSetCursor(drmmode_crtc->drmmode->fd,
drmmode_crtc->mode_crtc->crtc_id, handle, 64, 64);
+ ret = drmModeSetCursor(drmmode_crtc->drmmode->fd,
drmmode_crtc->mode_crtc->crtc_id, handle,
+ ms->cursor_width, ms->cursor_height);
if (ret) {
xf86CrtcConfigPtr xf86_config =
XF86_CRTC_CONFIG_PTR(crtc->scrn);
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
@@ -471,21 +477,37 @@
static void
drmmode_hide_cursor (xf86CrtcPtr crtc)
{
+ modesettingPtr ms = modesettingPTR(crtc->scrn);
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
drmmode_ptr drmmode = drmmode_crtc->drmmode;
- drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, 0, 64,
64);
+ drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, 0,
+ ms->cursor_width, ms->cursor_height);
}
static void
drmmode_show_cursor (xf86CrtcPtr crtc)
{
+ modesettingPtr ms = modesettingPTR(crtc->scrn);
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
drmmode_ptr drmmode = drmmode_crtc->drmmode;
uint32_t handle = drmmode_crtc->cursor_bo->handle;
+ static Bool use_set_cursor2 = TRUE;
- drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, handle,
64, 64);
+ if (use_set_cursor2) {
+ xf86CrtcConfigPtr xf86_config =
XF86_CRTC_CONFIG_PTR(crtc->scrn);
+ CursorPtr cursor = xf86_config->cursor;
+ int ret;
+ ret = drmModeSetCursor2(drmmode->fd,
drmmode_crtc->mode_crtc->crtc_id, handle, ms->cursor_width, ms->cursor_height,
cursor->bits->xhot, cursor->bits->yhot);
+ if (ret == -EINVAL)
+ use_set_cursor2 = FALSE;
+ else
+ return;
+ }
+
+ drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, handle,
+ ms->cursor_width, ms->cursor_height);
}
static void
@@ -534,14 +556,13 @@
DamageRegister(&ppix->drawable, drmmode_crtc->slave_damage);
if (ppriv->fb_id == 0) {
- int r;
- r = drmModeAddFB(drmmode->fd, ppix->drawable.width,
- ppix->drawable.height,
- ppix->drawable.depth,
- ppix->drawable.bitsPerPixel,
- ppix->devKind,
- ppriv->backing_bo->handle,
- &ppriv->fb_id);
+ drmModeAddFB(drmmode->fd, ppix->drawable.width,
+ ppix->drawable.height,
+ ppix->drawable.depth,
+ ppix->drawable.bitsPerPixel,
+ ppix->devKind,
+ ppriv->backing_bo->handle,
+ &ppriv->fb_id);
}
return TRUE;
}
@@ -757,11 +778,11 @@
drmModeFreeProperty(drmmode_output->props[i].mode_prop);
free(drmmode_output->props[i].atoms);
}
+ free(drmmode_output->props);
for (i = 0; i < drmmode_output->mode_output->count_encoders; i++) {
drmModeFreeEncoder(drmmode_output->mode_encoders[i]);
- free(drmmode_output->mode_encoders);
}
- free(drmmode_output->props);
+ free(drmmode_output->mode_encoders);
drmModeFreeConnector(drmmode_output->mode_output);
free(drmmode_output);
output->driver_private = NULL;
@@ -830,7 +851,7 @@
drmmode_prop = p->mode_prop;
if (drmmode_prop->flags & DRM_MODE_PROP_RANGE) {
- INT32 range[2];
+ INT32 prop_range[2];
INT32 value = p->value;
p->num_atoms = 1;
@@ -838,12 +859,12 @@
if (!p->atoms)
continue;
p->atoms[0] = MakeAtom(drmmode_prop->name,
strlen(drmmode_prop->name), TRUE);
- range[0] = drmmode_prop->values[0];
- range[1] = drmmode_prop->values[1];
+ prop_range[0] = drmmode_prop->values[0];
+ prop_range[1] = drmmode_prop->values[1];
err = RRConfigureOutputProperty(output->randr_output, p->atoms[0],
FALSE, TRUE,
drmmode_prop->flags & DRM_MODE_PROP_IMMUTABLE ? TRUE :
FALSE,
- 2, range);
+ 2, prop_range);
if (err != 0) {
xf86DrvMsg(output->scrn->scrnIndex, X_ERROR,
"RRConfigureOutputProperty error, %d\n", err);
@@ -962,22 +983,23 @@
SubPixelVerticalBGR,
SubPixelNone };
-const char *output_names[] = { "None",
- "VGA",
- "DVI",
- "DVI",
- "DVI",
- "Composite",
- "S-video",
- "LVDS",
- "CTV",
- "DIN",
- "DisplayPort",
- "HDMI",
- "HDMI",
- "TV",
- "eDP",
- "Virtual"
+static const char * const output_names[] = { "None",
+ "VGA",
+ "DVI",
+ "DVI",
+ "DVI",
+ "Composite",
+ "S-video",
+ "LVDS",
+ "CTV",
+ "DIN",
+ "DisplayPort",
+ "HDMI",
+ "HDMI",
+ "TV",
+ "eDP",
+ "Virtual",
+ "DSI",
};
static void
@@ -1010,6 +1032,10 @@
/* need to do smart conversion here for compat with non-kms ATI driver
*/
if (koutput->connector_type >= MS_ARRAY_SIZE(output_names))
snprintf(name, 32, "Unknown-%d", koutput->connector_type_id -
1);
+#ifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
+ else if (pScrn->is_gpu)
+ snprintf(name, 32, "%s-%d-%d",
output_names[koutput->connector_type], pScrn->scrnIndex - GPU_SCREEN_OFFSET +
1, koutput->connector_type_id - 1);
+#endif
else
snprintf(name, 32, "%s-%d",
output_names[koutput->connector_type], koutput->connector_type_id - 1);
@@ -1481,6 +1507,7 @@
/* create front and cursor BOs */
Bool drmmode_create_initial_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
{
+ modesettingPtr ms = modesettingPTR(pScrn);
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
int width;
int height;
@@ -1496,7 +1523,8 @@
return FALSE;
pScrn->displayWidth = drmmode->front_bo->pitch / cpp;
- width = height = 64;
+ width = ms->cursor_width;
+ height = ms->cursor_height;
bpp = 32;
for (i = 0; i < xf86_config->num_crtc; i++) {
xf86CrtcPtr crtc = xf86_config->crtc[i];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xf86-video-modesetting-0.8.0/src/drmmode_display.h
new/xf86-video-modesetting-0.9.0/src/drmmode_display.h
--- old/xf86-video-modesetting-0.8.0/src/drmmode_display.h 2013-06-12
14:07:36.000000000 +0200
+++ new/xf86-video-modesetting-0.9.0/src/drmmode_display.h 2013-12-03
17:08:08.000000000 +0100
@@ -37,6 +37,10 @@
#define MODESETTING_OUTPUT_SLAVE_SUPPORT 1
#endif
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,14,99,2,0)
+#define DamageUnregister(d, dd) DamageUnregister(dd)
+#endif
+
struct dumb_bo {
uint32_t handle;
uint32_t size;
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]