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 Miscellaneous little fixes for...
details: https://anonhg.NetBSD.org/src/rev/c3d33b10d0d4
branches: trunk
changeset: 329346:c3d33b10d0d4
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue May 20 15:50:11 2014 +0000
description:
Miscellaneous little fixes for harmless issues:
- Fix sense of subtraction in i915_gem_restore_gtt_mappings (not
currently used, so this was harmless).
- Program gtt->gtt_scratch_map->dm_segs[0].ds_addr rather than
gtt->gtt_scratch_seg.ds_addr into the GTT for consistency with the
bus_dma API. These are currently the same, but if we ever start
using x86 iommu perhaps that may change.
- Kassert that the scratch PTE decodes into the scratch address.
diffstat:
sys/external/bsd/drm2/i915drm/i915_gem_gtt.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (56 lines):
diff -r e521cce07ee9 -r c3d33b10d0d4 sys/external/bsd/drm2/i915drm/i915_gem_gtt.c
--- a/sys/external/bsd/drm2/i915drm/i915_gem_gtt.c Tue May 20 15:31:55 2014 +0000
+++ b/sys/external/bsd/drm2/i915drm/i915_gem_gtt.c Tue May 20 15:50:11 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_gem_gtt.c,v 1.10 2014/05/19 14:57:37 riastradh Exp $ */
+/* $NetBSD: i915_gem_gtt.c,v 1.11 2014/05/20 15:50:11 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.10 2014/05/19 14:57:37 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_gtt.c,v 1.11 2014/05/20 15:50:11 riastradh Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -345,7 +345,7 @@
struct drm_i915_gem_object *obj;
i915_ggtt_clear_range(dev, (dev_priv->mm.gtt_start >> PAGE_SHIFT),
- ((dev_priv->mm.gtt_start - dev_priv->mm.gtt_end) >> PAGE_SHIFT));
+ ((dev_priv->mm.gtt_end - dev_priv->mm.gtt_start) >> PAGE_SHIFT));
list_for_each_entry(obj, &dev_priv->mm.bound_list, gtt_list) {
i915_gem_clflush_object(obj);
@@ -483,7 +483,7 @@
{
struct drm_i915_private *const dev_priv = dev->dev_private;
struct intel_gtt *const gtt = dev_priv->mm.gtt;
- const bus_addr_t addr = gtt->gtt_scratch_seg.ds_addr;
+ const bus_addr_t addr = gtt->gtt_scratch_map->dm_segs[0].ds_addr;
struct agp_i810_softc *const isc = agp_i810_sc->as_chipc;
unsigned page;
@@ -716,15 +716,15 @@
struct drm_i915_private *const dev_priv = dev->dev_private;
const bus_space_tag_t bst = dev->bst;
const bus_space_handle_t bsh = dev_priv->mm.gtt->gtt_bsh;
- const gtt_pte_t scratch_pte = gen6_pte_encode(dev,
- dev_priv->mm.gtt->gtt_scratch_map->dm_segs[0].ds_addr,
+ const bus_addr_t scratch_addr =
+ dev_priv->mm.gtt->gtt_scratch_map->dm_segs[0].ds_addr;
+ const gtt_pte_t scratch_pte = gen6_pte_encode(dev, scratch_addr,
I915_CACHE_LLC);
unsigned int i;
KASSERT(start_page < dev_priv->mm.gtt->gtt_total_entries);
KASSERT(npages <= (dev_priv->mm.gtt->gtt_total_entries - start_page));
- KASSERT(dev_priv->mm.gtt->gtt_scratch_map->dm_segs[0].ds_addr ==
- gen6_pte_decode(scratch_pte));
+ KASSERT(scratch_addr == gen6_pte_decode(scratch_pte));
for (i = 0; i < npages; i++)
bus_space_write_4(bst, bsh, 4*(start_page + i), scratch_pte);
Home |
Main Index |
Thread Index |
Old Index