From: ville.syrjala@linux.intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 5/8] intel-gtt: Use i810_write_entry() on gen2 platforms
Date: Thu, 28 Nov 2013 17:15:07 +0200 [thread overview]
Message-ID: <1385651710-7768-6-git-send-email-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <1385651710-7768-1-git-send-email-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
i810_write_entry() is identical to i830_write_entry(), except the the
use of the AGP_DCACHE_MEMORY flag to signal that the PTE should be
encoded with I810_PTE_LOCAL. We want that on i830 if we have local
memory. So simply swap all gen2 machines over to i810_write_entry()
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/char/agp/intel-gtt.c | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 35788a2..35a667d 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -743,17 +743,6 @@ static void i830_chipset_flush(void)
}
}
-static void i830_write_entry(dma_addr_t addr, unsigned int entry,
- unsigned int flags)
-{
- u32 pte_flags = I810_PTE_VALID;
-
- if (flags == AGP_USER_CACHED_MEMORY)
- pte_flags |= I830_PTE_SYSTEM_CACHED;
-
- writel(addr | pte_flags, intel_private.gtt + entry);
-}
-
bool intel_enable_gtt(void)
{
u8 __iomem *reg;
@@ -1196,7 +1185,7 @@ static const struct intel_gtt_driver i8xx_gtt_driver = {
.has_pgtbl_enable = 1,
.setup = i830_setup,
.cleanup = i830_cleanup,
- .write_entry = i830_write_entry,
+ .write_entry = i810_write_entry,
.dma_mask_size = 32,
.check_flags = i830_check_flags,
.chipset_flush = i830_chipset_flush,
@@ -1207,7 +1196,7 @@ static const struct intel_gtt_driver i915_gtt_driver = {
.setup = i9xx_setup,
.cleanup = i9xx_cleanup,
/* i945 is the last gpu to need phys mem (for overlay and cursors). */
- .write_entry = i830_write_entry,
+ .write_entry = i810_write_entry,
.dma_mask_size = 32,
.check_flags = i830_check_flags,
.chipset_flush = i9xx_chipset_flush,
--
1.8.3.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2013-11-28 15:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-28 15:15 [PATCH 0/8] Gen2 stolen/local memory support ville.syrjala
2013-11-28 15:15 ` [PATCH 1/8] x86: Add vfunc for Intel graphics stolen memory base address ville.syrjala
2013-11-28 15:15 ` [PATCH 2/8] x86: Add Intel graphics stolen memory quirk for gen2 platforms ville.syrjala
2013-11-30 12:58 ` Ingo Molnar
2013-11-28 15:15 ` [PATCH 3/8] intel-gtt: Return whether we have local memory or not ville.syrjala
2013-11-28 15:15 ` [PATCH 4/8] intel-gtt: Assume last 128KB of stolen contains the GTT entries on gen2 ville.syrjala
2013-11-28 15:15 ` ville.syrjala [this message]
2013-11-28 15:15 ` [PATCH 6/8] drm/i915: Add I915_CACHE_LOCAL to indicate local memory ville.syrjala
2013-11-28 15:15 ` [PATCH 7/8] drm/i915: Keep track if we have " ville.syrjala
2013-11-28 15:15 ` [PATCH 8/8] drm/i915: Determine the stolen memory base address on gen2 ville.syrjala
2013-11-28 16:32 ` Chris Wilson
2013-11-28 18:01 ` Ville Syrjälä
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1385651710-7768-6-git-send-email-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox