Update to xf86-video-modesetting 0.9.0

This commit is contained in:
matthieu 2014-07-12 19:15:36 +00:00
parent d90db373e9
commit d098943642
6 changed files with 232 additions and 49 deletions

View File

@ -1,3 +1,92 @@
commit 1e4cb922617990a3005ac23b0c90f89147c3564b
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date: Thu Jun 26 10:37:19 2014 +0200
bump to 0.9.0
commit d1c6e27759ea1d2c30cabc62ff2bc315bbbec5fc
Author: Adam Jackson <ajax@redhat.com>
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 <ajax@redhat.com>
commit 07c5d9cb782fde2a073efdc437489d6c4b432d46
Author: Dave Airlie <airlied@redhat.com>
Date: Fri May 2 13:16:05 2014 +1000
modesetting: fix build regression against older servers.
Signed-off-by: Dave Airlie <airlied@redhat.com>
commit 32fb5f2d821e5e13038eab7db35c5048ad807ccc
Author: Dave Airlie <airlied@redhat.com>
Date: Fri May 2 13:14:30 2014 +1000
modesetting: fix use after free.
Signed-off-by: Dave Airlie <airlied@redhat.com>
commit 509dbe8cab339e44b02fed3728bbef7de5c60d05
Author: Hans de Goede <hdegoede@redhat.com>
Date: Tue Mar 18 15:48:22 2014 +0100
Add support for server managed fds
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
commit c9d377a19201973012bb6bbb07e3b8c3e9c3b856
Author: Dave Airlie <airlied@redhat.com>
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 <airlied@redhat.com>
commit b8840f5442f9fbd8ce47ab2dd555b75cf4bb114a
Author: Adam Jackson <ajax@redhat.com>
Date: Tue Feb 25 09:06:55 2014 -0500
modesetting: Don't (brokenly) double-track software cursor
Signed-off-by: Adam Jackson <ajax@redhat.com>
commit c36a5e298c36deb5f6fd0eef3029235aa58de295
Author: Dave Airlie <airlied@redhat.com>
Date: Mon Jan 20 11:06:42 2014 +1000
modesetting: try and use hotspot cursor support
Signed-off-by: Dave Airlie <airlied@redhat.com>
commit bf359b118a0870f18a229d33979270ac2f0f5dcd
Author: Dave Airlie <airlied@redhat.com>
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 <airlied@redhat.com>
commit 677935b2d20f54f21c645b5eb386b6c9485fee5f
Author: Alex Deucher <alexander.deucher@amd.com>
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 <alexander.deucher@amd.com>
commit da64ee70f96fcac32c08128559b293732b318a00
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date: Tue Dec 3 17:01:28 2013 +0100

View File

@ -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.1.
# 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 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='xf86-video-modesetting'
PACKAGE_TARNAME='xf86-video-modesetting'
PACKAGE_VERSION='0.8.1'
PACKAGE_STRING='xf86-video-modesetting 0.8.1'
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 @@ if test "$ac_init_help" = "long"; then
# 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.1 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 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of xf86-video-modesetting 0.8.1:";;
short | recursive ) echo "Configuration of xf86-video-modesetting 0.9.0:";;
esac
cat <<\_ACEOF
@ -1576,7 +1576,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
xf86-video-modesetting configure 0.8.1
xf86-video-modesetting configure 0.9.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@ -1900,7 +1900,7 @@ cat >config.log <<_ACEOF
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.1, 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 $@
@ -3783,7 +3783,7 @@ fi
# Define the identity of the package.
PACKAGE='xf86-video-modesetting'
VERSION='0.8.1'
VERSION='0.9.0'
cat >>confdefs.h <<_ACEOF
@ -18187,12 +18187,12 @@ if test -n "$DRM_CFLAGS"; then
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
@ -18204,12 +18204,12 @@ if test -n "$DRM_LIBS"; then
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
@ -18230,14 +18230,14 @@ else
_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
@ -19013,7 +19013,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# 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.1, 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
@ -19079,7 +19079,7 @@ _ACEOF
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.1
xf86-video-modesetting config.status 0.9.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

View File

@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-video-modesetting],
[0.8.1],
[0.9.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[xf86-video-modesetting])
AC_CONFIG_SRCDIR([Makefile.am])
@ -74,7 +74,7 @@ AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ])
# 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)

View File

@ -219,9 +219,20 @@ static int check_outputs(int fd)
return ret;
}
static Bool probe_hw(const 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);
@ -264,11 +275,11 @@ static Bool probe_hw_pci(const char *dev, struct pci_device *pdev)
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;
@ -289,6 +300,10 @@ ms_driver_func(ScrnInfoPtr scrn, xorgDriverFuncOp op, void *data)
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;
}
@ -347,7 +362,7 @@ ms_platform_probe(DriverPtr driver,
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);
@ -393,7 +408,7 @@ Probe(DriverPtr drv, int flags)
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,
@ -564,6 +579,10 @@ FreeRec(ScrnInfoPtr pScrn)
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;
}
@ -572,6 +591,14 @@ FreeRec(ScrnInfoPtr pScrn)
}
#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)
{
@ -628,8 +655,15 @@ PreInit(ScrnInfoPtr pScrn, int flags)
#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
@ -712,6 +746,17 @@ PreInit(ScrnInfoPtr pScrn, int flags)
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");
@ -771,6 +816,12 @@ msShadowWindow(ScreenPtr screen, CARD32 row, CARD32 offset, int mode,
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)
{
@ -788,7 +839,7 @@ CreateScreenResources(ScreenPtr pScreen)
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)
@ -803,7 +854,7 @@ CreateScreenResources(ScreenPtr pScreen)
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;
}
@ -851,22 +902,38 @@ msSetSharedPixmapBacking(PixmapPtr ppix, void *fd_handle)
}
#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))
@ -939,7 +1006,7 @@ ScreenInit(SCREEN_INIT_ARGS_DECL)
/* 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);
@ -997,6 +1064,12 @@ LeaveVT(VT_FUNC_ARGS_DECL)
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);
}
@ -1011,10 +1084,7 @@ EnterVT(VT_FUNC_ARGS_DECL)
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;

View File

@ -59,7 +59,6 @@ typedef struct _modesettingRec
#endif
Bool noAccel;
Bool SWCursor;
CloseScreenProcPtr CloseScreen;
/* Broken-out options. */
@ -76,6 +75,7 @@ typedef struct _modesettingRec
DamagePtr damage;
Bool dirty_enabled;
uint32_t cursor_width, cursor_height;
} modesettingRec, *modesettingPtr;
#define modesettingPTR(p) ((modesettingPtr)((p)->driverPrivate))

View File

@ -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 @@ drmmode_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
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 @@ drmmode_load_cursor_argb (xf86CrtcPtr crtc, CARD32 *image)
/* 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 @@ drmmode_load_cursor_argb (xf86CrtcPtr crtc, CARD32 *image)
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
@ -756,11 +778,11 @@ drmmode_output_destroy(xf86OutputPtr output)
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;
@ -1485,6 +1507,7 @@ void drmmode_uevent_fini(ScrnInfoPtr scrn, drmmode_ptr drmmode)
/* 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;
@ -1500,7 +1523,8 @@ Bool drmmode_create_initial_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
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];