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/pci Sprinkle AGP conditionals where ne...
details: https://anonhg.NetBSD.org/src/rev/f05f744318ff
branches: trunk
changeset: 993080:f05f744318ff
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Aug 27 15:10:12 2018 +0000
description:
Sprinkle AGP conditionals where needed.
diffstat:
sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c | 12 ++++++++++--
sys/external/bsd/drm2/pci/drm_pci_module.c | 10 ++++++++--
sys/external/bsd/drm2/pci/files.drmkms_pci | 4 ++--
3 files changed, 20 insertions(+), 6 deletions(-)
diffs (131 lines):
diff -r 00db05a13704 -r f05f744318ff sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c Mon Aug 27 15:09:58 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c Mon Aug 27 15:10:12 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: radeon_ttm.c,v 1.13 2018/08/27 07:50:54 riastradh Exp $ */
+/* $NetBSD: radeon_ttm.c,v 1.14 2018/08/27 15:10:12 riastradh Exp $ */
/*
* Copyright 2009 Jerome Glisse.
@@ -32,7 +32,7 @@
* Dave Airlie
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_ttm.c,v 1.13 2018/08/27 07:50:54 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_ttm.c,v 1.14 2018/08/27 15:10:12 riastradh Exp $");
#include <ttm/ttm_bo_api.h>
#include <ttm/ttm_bo_driver.h>
@@ -744,7 +744,9 @@
static int radeon_ttm_tt_populate(struct ttm_tt *ttm)
{
struct radeon_ttm_tt *gtt = radeon_ttm_tt_to_gtt(ttm);
+#if !defined(__NetBSD__) || IS_ENABLED(CONFIG_AGP)
struct radeon_device *rdev;
+#endif
#ifndef __NetBSD__
unsigned i;
int r;
@@ -779,7 +781,9 @@
#endif
}
+#if !defined(__NetBSD__) || IS_ENABLED(CONFIG_AGP)
rdev = radeon_get_rdev(ttm->bdev);
+#endif
#if IS_ENABLED(CONFIG_AGP)
if (rdev->flags & RADEON_IS_AGP) {
return ttm_agp_tt_populate(ttm);
@@ -822,7 +826,9 @@
static void radeon_ttm_tt_unpopulate(struct ttm_tt *ttm)
{
+#if !defined(__NetBSD__) || IS_ENABLED(CONFIG_AGP)
struct radeon_device *rdev;
+#endif
struct radeon_ttm_tt *gtt = radeon_ttm_tt_to_gtt(ttm);
#ifndef __NetBSD__
unsigned i;
@@ -838,7 +844,9 @@
if (slave)
return;
+#if !defined(__NetBSD__) || IS_ENABLED(CONFIG_AGP)
rdev = radeon_get_rdev(ttm->bdev);
+#endif
#if IS_ENABLED(CONFIG_AGP)
if (rdev->flags & RADEON_IS_AGP) {
ttm_agp_tt_unpopulate(ttm);
diff -r 00db05a13704 -r f05f744318ff sys/external/bsd/drm2/pci/drm_pci_module.c
--- a/sys/external/bsd/drm2/pci/drm_pci_module.c Mon Aug 27 15:09:58 2018 +0000
+++ b/sys/external/bsd/drm2/pci/drm_pci_module.c Mon Aug 27 15:10:12 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_pci_module.c,v 1.4 2015/03/06 01:24:24 riastradh Exp $ */
+/* $NetBSD: drm_pci_module.c,v 1.5 2018/08/27 15:10:12 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_pci_module.c,v 1.4 2015/03/06 01:24:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_pci_module.c,v 1.5 2018/08/27 15:10:12 riastradh Exp $");
#include <sys/module.h>
#include <sys/once.h>
@@ -39,6 +39,7 @@
MODULE(MODULE_CLASS_MISC, drmkms_pci, "drmkms,pci");
+#ifdef CONFIG_AGP
const struct drm_agp_hooks drmkms_pci_agp_hooks = {
.agph_acquire_ioctl = &drm_agp_acquire_ioctl,
.agph_release_ioctl = &drm_agp_release_ioctl,
@@ -51,15 +52,18 @@
.agph_release = &drm_agp_release,
.agph_clear = &drm_agp_clear,
};
+#endif
static int
drmkms_pci_agp_init(void)
{
+#ifdef CONFIG_AGP
int error;
error = drm_agp_register(&drmkms_pci_agp_hooks);
if (error)
return error;
+#endif
return 0;
}
@@ -80,7 +84,9 @@
drmkms_pci_agp_fini(void)
{
+#ifdef CONFIG_AGP
drm_agp_deregister(&drmkms_pci_agp_hooks);
+#endif
}
static int
diff -r 00db05a13704 -r f05f744318ff sys/external/bsd/drm2/pci/files.drmkms_pci
--- a/sys/external/bsd/drm2/pci/files.drmkms_pci Mon Aug 27 15:09:58 2018 +0000
+++ b/sys/external/bsd/drm2/pci/files.drmkms_pci Mon Aug 27 15:10:12 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.drmkms_pci,v 1.10 2018/08/27 14:02:32 riastradh Exp $
+# $NetBSD: files.drmkms_pci,v 1.11 2018/08/27 15:10:12 riastradh Exp $
# Attribute for kernel components supporting PCI-based real graphics
# drivers, a.k.a. `KMS' (kernel mode-setting), as opposed to the legacy
@@ -7,7 +7,7 @@
define drmkms_pci: drmkms
#file external/bsd/drm2/dist/drm/ati_pcigart.c drmkms_pci
-file external/bsd/drm2/dist/drm/drm_agpsupport.c drmkms_pci
+file external/bsd/drm2/dist/drm/drm_agpsupport.c drmkms_pci & agp
file external/bsd/drm2/pci/drm_pci.c drmkms_pci
file external/bsd/drm2/pci/drm_pci_module.c drmkms_pci
Home |
Main Index |
Thread Index |
Old Index