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/dist/drm Use AGP_PAGE_SIZE, not PAGE_S...



details:   https://anonhg.NetBSD.org/src/rev/1c9547fdf0f8
branches:  trunk
changeset: 366456:1c9547fdf0f8
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Aug 28 03:33:54 2018 +0000

description:
Use AGP_PAGE_SIZE, not PAGE_SIZE.

diffstat:

 sys/external/bsd/drm2/dist/drm/drm_agpsupport.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 1c94bd78819b -r 1c9547fdf0f8 sys/external/bsd/drm2/dist/drm/drm_agpsupport.c
--- a/sys/external/bsd/drm2/dist/drm/drm_agpsupport.c   Tue Aug 28 01:24:39 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_agpsupport.c   Tue Aug 28 03:33:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_agpsupport.c,v 1.8 2018/08/27 06:32:57 riastradh Exp $     */
+/*     $NetBSD: drm_agpsupport.c,v 1.9 2018/08/28 03:33:54 riastradh Exp $     */
 
 /**
  * \file drm_agpsupport.c
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_agpsupport.c,v 1.8 2018/08/27 06:32:57 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_agpsupport.c,v 1.9 2018/08/28 03:33:54 riastradh Exp $");
 
 #include <drm/drmP.h>
 #include <linux/errno.h>
@@ -225,7 +225,7 @@
        if (!(entry = kzalloc(sizeof(*entry), GFP_KERNEL)))
                return -ENOMEM;
 
-       pages = (request->size + PAGE_SIZE - 1) / PAGE_SIZE;
+       pages = (request->size + AGP_PAGE_SIZE - 1) / AGP_PAGE_SIZE;
        type = (u32) request->type;
        if (!(memory = agp_allocate_memory(dev->agp->bridge, pages, type))) {
                kfree(entry);
@@ -356,7 +356,7 @@
                return -EINVAL;
        if (entry->bound)
                return -EINVAL;
-       page = (request->offset + PAGE_SIZE - 1) / PAGE_SIZE;
+       page = (request->offset + AGP_PAGE_SIZE - 1) / AGP_PAGE_SIZE;
 #ifdef __NetBSD__
        if ((retcode = drm_bind_agp(dev->agp->bridge, entry->memory, page)))
                return retcode;
@@ -555,7 +555,7 @@
        mem->page_count = num_pages;
 
        mem->is_flushed = true;
-       ret = agp_bind_memory(mem, gtt_offset / PAGE_SIZE);
+       ret = agp_bind_memory(mem, gtt_offset / AGP_PAGE_SIZE);
        if (ret != 0) {
                DRM_ERROR("Failed to bind AGP memory: %d\n", ret);
                agp_free_memory(mem);



Home | Main Index | Thread Index | Old Index