Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7]: src/sys/external/bsd/drm2 Pull up following revision(s) (requ...



details:   https://anonhg.NetBSD.org/src/rev/9012b135d578
branches:  netbsd-7
changeset: 798248:9012b135d578
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Aug 15 11:11:59 2014 +0000

description:
Pull up following revision(s) (requested by riastradh in ticket #18):
        sys/external/bsd/drm2/ttm/ttm_agp_backend.c: revision 1.2
        sys/external/bsd/drm2/ttm/ttm_agp_backend.c: revision 1.3
        sys/external/bsd/drm2/include/linux/pci.h: revision 1.8
Fix shifts & masks in Linux pci_read_config_{word,byte}.
Use ttm_dma_tt_init in ttm_agp_tt_create so we can use ttm_bus_dma.
Zero ttm_agp objects on creation.

diffstat:

 sys/external/bsd/drm2/include/linux/pci.h   |  6 +++---
 sys/external/bsd/drm2/ttm/ttm_agp_backend.c |  8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (59 lines):

diff -r d764ba60e9b6 -r 9012b135d578 sys/external/bsd/drm2/include/linux/pci.h
--- a/sys/external/bsd/drm2/include/linux/pci.h Fri Aug 15 10:23:21 2014 +0000
+++ b/sys/external/bsd/drm2/include/linux/pci.h Fri Aug 15 11:11:59 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci.h,v 1.7 2014/08/06 13:52:06 riastradh Exp $        */
+/*     $NetBSD: pci.h,v 1.7.2.1 2014/08/15 11:11:59 martin Exp $       */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -200,7 +200,7 @@
 {
        KASSERT(!ISSET(reg, 1));
        *valuep = pci_conf_read(pdev->pd_pa.pa_pc, pdev->pd_pa.pa_tag,
-           (reg &~ 3)) >> (8 * (reg & 3));
+           (reg &~ 2)) >> (8 * (reg & 2));
        return 0;
 }
 
@@ -208,7 +208,7 @@
 pci_read_config_byte(struct pci_dev *pdev, int reg, uint8_t *valuep)
 {
        *valuep = pci_conf_read(pdev->pd_pa.pa_pc, pdev->pd_pa.pa_tag,
-           (reg &~ 1)) >> (8 * (reg & 1));
+           (reg &~ 3)) >> (8 * (reg & 3));
        return 0;
 }
 
diff -r d764ba60e9b6 -r 9012b135d578 sys/external/bsd/drm2/ttm/ttm_agp_backend.c
--- a/sys/external/bsd/drm2/ttm/ttm_agp_backend.c       Fri Aug 15 10:23:21 2014 +0000
+++ b/sys/external/bsd/drm2/ttm/ttm_agp_backend.c       Fri Aug 15 11:11:59 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ttm_agp_backend.c,v 1.1 2014/07/16 20:59:58 riastradh Exp $    */
+/*     $NetBSD: ttm_agp_backend.c,v 1.1.4.1 2014/08/15 11:11:59 martin Exp $   */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ttm_agp_backend.c,v 1.1 2014/07/16 20:59:58 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttm_agp_backend.c,v 1.1.4.1 2014/08/15 11:11:59 martin Exp $");
 
 #include <sys/types.h>
 #include <sys/kmem.h>
@@ -57,11 +57,11 @@
 {
        struct ttm_agp *ttm_agp;
 
-       ttm_agp = kmem_alloc(sizeof(*ttm_agp), KM_SLEEP);
+       ttm_agp = kmem_zalloc(sizeof(*ttm_agp), KM_SLEEP);
        ttm_agp->agp = &bridge->abd_sc;
        ttm_agp->ttm_dma.ttm.func = &ttm_agp_backend_func;
 
-       if (ttm_tt_init(&ttm_agp->ttm_dma.ttm, bdev, size, page_flags,
+       if (ttm_dma_tt_init(&ttm_agp->ttm_dma, bdev, size, page_flags,
                dummy_read_page) != 0)
                goto fail;
 



Home | Main Index | Thread Index | Old Index