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/i915drm Fix page/byte sense of AGP GTT...
details: https://anonhg.NetBSD.org/src/rev/1c145fbfbdb6
branches: trunk
changeset: 796079:1c145fbfbdb6
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon May 19 14:55:46 2014 +0000
description:
Fix page/byte sense of AGP GTT parameter calculations.
diffstat:
sys/external/bsd/drm2/i915drm/i915_gem_gtt.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diffs (47 lines):
diff -r e0f4ad787c34 -r 1c145fbfbdb6 sys/external/bsd/drm2/i915drm/i915_gem_gtt.c
--- a/sys/external/bsd/drm2/i915drm/i915_gem_gtt.c Mon May 19 14:44:36 2014 +0000
+++ b/sys/external/bsd/drm2/i915drm/i915_gem_gtt.c Mon May 19 14:55:46 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_gem_gtt.c,v 1.8 2014/05/19 14:44:36 riastradh Exp $ */
+/* $NetBSD: i915_gem_gtt.c,v 1.9 2014/05/19 14:55:46 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem_gtt.c,v 1.8 2014/05/19 14:44:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_gtt.c,v 1.9 2014/05/19 14:55:46 riastradh Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -83,6 +83,16 @@
if (ret)
goto fail0;
+ aprint_error_dev(dev->dev, "GTT:\n"
+ "- gma_bus_addr %"PRIxMAX"\n"
+ "- gtt_mappable_entries %"PRIxMAX"\n"
+ "- stolen_size %"PRIxMAX"\n"
+ "- gtt_total_entries %"PRIxMAX"\n",
+ (uintmax_t)gtt->gma_bus_addr,
+ (uintmax_t)gtt->gtt_mappable_entries,
+ (uintmax_t)gtt->stolen_size,
+ (uintmax_t)gtt->gtt_total_entries);
+
/*
* The GTT entries are limited to 32-bit physical addresses up
* until gen4, at and after which they are limited to 36-bit
@@ -402,9 +412,9 @@
gtt->gma_bus_addr = agp_i810_sc->as_apaddr;
gtt->gtt_mappable_entries = (agp_i810_sc->as_apsize >> AGP_PAGE_SHIFT);
- gtt->stolen_size = (isc->stolen >> AGP_PAGE_SHIFT);
+ gtt->stolen_size = (isc->stolen << AGP_PAGE_SHIFT);
gtt->gtt_total_entries =
- (gtt->gtt_mappable_entries + gtt->stolen_size);
+ (gtt->gtt_mappable_entries + (gtt->stolen_size >> AGP_PAGE_SHIFT));
gtt->gtt_bsh = isc->gtt_bsh;
product = PCI_PRODUCT(dev->pdev->pd_pa.pa_id);
Home |
Main Index |
Thread Index |
Old Index