Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/radeon apply some of the additional ch...
details: https://anonhg.NetBSD.org/src/rev/1362b8ec3738
branches: trunk
changeset: 337544:1362b8ec3738
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Apr 19 01:08:56 2015 +0000
description:
apply some of the additional changes from Arto Huusko in PR#49645:
- call pmf_device_deregister on detach.
i've kept the "resume = true" for radeon_resume_kms() call as it
seems to work for me (indeed, code inspection shows it is unused
on netbsd :-)
my old nforce4 box that can resume old drm (or could, last i tried
several years ago) while X and GL apps were running, can at least
survive a resume if X hasn't started. my one attempt so far with
X exited, but having run, did not work.
diffstat:
sys/external/bsd/drm2/radeon/radeon_pci.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diffs (72 lines):
diff -r 81edfea83a51 -r 1362b8ec3738 sys/external/bsd/drm2/radeon/radeon_pci.c
--- a/sys/external/bsd/drm2/radeon/radeon_pci.c Sat Apr 18 22:56:52 2015 +0000
+++ b/sys/external/bsd/drm2/radeon/radeon_pci.c Sun Apr 19 01:08:56 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: radeon_pci.c,v 1.8 2015/04/10 02:03:14 mrg Exp $ */
+/* $NetBSD: radeon_pci.c,v 1.9 2015/04/19 01:08:56 mrg Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.8 2015/04/10 02:03:14 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.9 2015/04/19 01:08:56 mrg Exp $");
#ifdef _KERNEL_OPT
#include "vga.h"
@@ -264,14 +264,14 @@
return error;
if (sc->sc_task_state == RADEON_TASK_ATTACH)
- return 0;
+ goto out;
if (sc->sc_task_u.workqueue != NULL) {
workqueue_destroy(sc->sc_task_u.workqueue);
sc->sc_task_u.workqueue = NULL;
}
if (sc->sc_drm_dev == NULL)
- return 0;
+ goto out;
/* XXX errno Linux->NetBSD */
error = -drm_pci_detach(sc->sc_drm_dev, flags);
if (error)
@@ -279,6 +279,8 @@
return error;
sc->sc_drm_dev = NULL;
+out: pmf_device_deregister(self);
+
return 0;
}
@@ -288,11 +290,12 @@
struct radeon_softc *const sc = device_private(self);
struct drm_device *const dev = sc->sc_drm_dev;
int ret;
+ bool is_console = true; /* XXX */
if (dev == NULL)
return true;
- ret = radeon_suspend_kms(dev, true, true);
+ ret = radeon_suspend_kms(dev, true, is_console);
if (ret)
return false;
@@ -305,11 +308,12 @@
struct radeon_softc *const sc = device_private(self);
struct drm_device *const dev = sc->sc_drm_dev;
int ret;
+ bool is_console = true; /* XXX */
if (dev == NULL)
return true;
- ret = radeon_resume_kms(dev, true, true);
+ ret = radeon_resume_kms(dev, true, is_console);
if (ret)
return false;
Home |
Main Index |
Thread Index |
Old Index