aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/intel-gtt.c
Commit message (Collapse)AuthorAgeFilesLines
* merge more stuff from 3.2.72Wolfgang Wiedmeyer2015-10-231-2/+33
|
* agp/intel: add Ivy Bridge supportJesse Barnes2011-05-131-0/+10
| | | | | | | | Just use the Sandy Bridge routines. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
* agp/intel: Experiment with a 855GM GWB bitChris Wilson2011-02-221-35/+21
| | | | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=27187 Tested-by: Thorsten Vollmer <thorsten@thvo.de> (DFI-ACP G5M150-N w/852GME) Tested-by: Moritz Brunner <2points@gmx.org> (Asus M2400N/i855GM) Tested-by: Indan Zupancic <indan@nul.nu> (Thinkpad X40/855GM rev 02) Tested-by: Eric Anholt <eric@anholt.net> (865G) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* drm/i915,agp/intel: Do not clear stolen entriesChris Wilson2011-01-241-10/+9
| | | | | | | | | | | | | We can only utilize the stolen portion of the GTT if we are in sole charge of the hardware. This is only true if using GEM and KMS, otherwise VESA continues to access stolen memory. Reported-by: Arnd Bergmann <arnd@arndb.de> Reported-by: Frederic Weisbecker <fweisbec@gmail.com> Tested-by: Jiri Olsa <jolsa@redhat.com> Tested-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* agp/intel: Fix device names of i845 and 845GOswald Buddenhagen2011-01-141-1/+1
| | | | | | | | They got mixed up when the switch was converted to a table in 2007. Signed-off-by: Oswald Buddenhagen <ossi@kde.org> [ickle: minor changes for 2.6.37+] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* i915/gtt: fix ordering causing DMAR errors on object teardown.Dave Airlie2011-01-121-2/+2
| | | | | | | | | | | Previous to the last GTT rework we always rewrote the GTT then unmapped the object, somehow this got reversed in the rework in 2.6.37-rc5 timeframe. This fix needs to go to stable in an alternate form since the code changed. This fixes DMAR reports on my Ironlake HP2540p. Signed-off-by: Dave Airlie <airlied@redhat.com>
* i915/gtt: fix ordering issues with status setup and DMARDave Airlie2011-01-121-2/+2
| | | | | | | | This code was setting up the status page before setting the DMAR-is-on-bit, so we were getting DMAR errors on the status page. Reverse the two bits of init code to the correct result. Signed-off-by: Dave Airlie <airlied@redhat.com>
* agp/intel: Flush the chipset write buffers when changing GTT baseChris Wilson2011-01-111-0/+9
| | | | | | | | | | Flush the chipset write buffers before and after adjusting the GTT base register, just in case. We only modify this value upon initialisation (boot and resume) so there should be no outstanding writes, however there are always those persistent PGTBL_ER that keep getting reported upon resume. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Merge branch 'drm-intel-fixes' into drm-intel-nextChris Wilson2010-12-141-2/+9
|\
| * agp/intel: Fix missed cached memory flags setting in i965_write_entry()Chris Wilson2010-12-141-2/+9
| | | | | | | | | | | | | | | | This fixes regression from a6963596a13e62f8e65b1cf3403a330ff2db407c, that missed to set cached memory type in GTT entry. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | Merge branch 'drm-intel-fixes' into drm-intel-nextChris Wilson2010-12-051-2/+4
|\ \ | |/ | | | | | | | | | | | | Immediate merge for the conflicting introduction of HAS_COHERENT_RINGS. Conflicts: drivers/gpu/drm/i915/i915_dma.c include/drm/i915_drm.h
| * agp/intel: Fix wrong kunmap in i830_cleanup()Takashi Iwai2010-12-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Add a missing NULL check and fix the wrong address passed to kunmap() in i830_cleanup(). Cc: stable@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de> [danvet: added cc stable] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
| * agp/intel: fix cache control for sandybridgeZhenyu Wang2010-11-041-2/+2
| | | | | | | | | | | | | | | | | | This is broken from 97ef1bdd0bc75bce7b2058e9c432b6c277dcf4d3. Let's set the correct bit for LLC+MLC and LLC only. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Cc: stable@kernel.org Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
| * agp/intel: restore cache behavior on sandybridgeZhenyu Wang2010-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This restores cache behavior for default AGP_USER_MEMORY as uncached, and leave default AGP_USER_CACHED_MEMORY as LLC only. I've seen different cache behavior on one sandybridge desktop CPU vs. another mobile CPU. Until we figure out how to detect the real cache config, restore back to the original behavior now. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Cc: stable@kernel.org Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | agp/intel: Remove duplicate constChris Wilson2010-11-231-1/+1
| | | | | | | | | | | | drivers/char/agp/intel-gtt.c:340:48: warning: duplicate const Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | intel-gtt: export api for drm/i915Daniel Vetter2010-11-231-52/+68
| | | | | | | | | | | | | | | | Just some minor shuffling to get rid of any agp traces in the exported functions. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | agp: kill agp_flush_chipset and corresponding ioctlDaniel Vetter2010-11-231-6/+0
| | | | | | | | | | | | | | | | | | The intel drm calls the chipset functions now directly. Userspace never called the corresponding ioctl, hence it can be killed, too. Cc: Dave Airlie <airlied@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | drm/i915/gtt: call chipset flush directlyDaniel Vetter2010-11-231-0/+7
| | | | | | | | | | Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | drm/i915|intel-gtt: consolidate intel-gtt.h headersDaniel Vetter2010-11-231-5/+0
| | | | | | | | | | | | | | ... and a few other defines. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | intel-gtt: fold i81x-only dcache support into the generic driverDaniel Vetter2010-11-231-89/+61
| | | | | | | | | | | | | | Now the intel-gtt.c rewrite is complete! Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | intel-gtt: switch i81x to the common initialization helpersDaniel Vetter2010-11-231-127/+71
| | | | | | | | | | | | | | | | Still a separate agp_bridge_driver because of the i81x-only dedicated vram support. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | intel-gtt: switch i81x to the write_entry helpersDaniel Vetter2010-11-231-92/+60
| | | | | | | | | | | | | | | | | | Initialization is still done with the old code with a few added things sprinkled in to make the intel_fake_agp helper functions work. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | intel-gtt: kill unneeded sandybridge memory typesDaniel Vetter2010-11-231-6/+0
| | | | | | | | | | | | | | Used for the now dead agp type_to_mask stuff. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | intel-gtt: drop dcache support for i830 and laterDaniel Vetter2010-11-231-7/+1
| | | | | | | | | | | | | | | | i830_check_flags already disallows it, so no need to implement it in the write_entry function. Seems to be a remnant from i810 support. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | agp/intel: Remove confusion of stolen entries not stolen memoryChris Wilson2010-11-231-33/+7
| | | | | | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | agp/intel: Remove the artificial cap on stolen sizeChris Wilson2010-11-231-13/+3
| | | | | | | | | | | | | | Now that the stolen memory does not also steal entries from the GTT, we can use all the memory the BIOS set aside for the GPU. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | agp/intel: restore cache behavior on sandybridgeZhenyu Wang2010-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | This restores cache behavior for default AGP_USER_MEMORY as uncached, and leave default AGP_USER_CACHED_MEMORY as LLC only. I've seen different cache behavior on one sandybridge desktop CPU vs. another mobile CPU. Until we figure out how to detect the real cache config, restore back to the original behavior now. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | agp/intel: fix cache control for sandybridgeZhenyu Wang2010-11-021-2/+2
| | | | | | | | | | | | | | | | This is broken from 97ef1bdd0bc75bce7b2058e9c432b6c277dcf4d3. Let's set the correct bit for LLC+MLC and LLC only. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | agp/intel: the GMCH is always enabled for integrated processor graphicsChris Wilson2010-10-311-16/+27
| | | | | | | | | | | | | | | | | | | | ... and trying to set the bit is ineffectual. Fixes the regression from e380f60 which detected that we were trying to do undefined operations on the I830_GMCH_CTRL. Reported-by: Alexey Fisher <bug-track@fisher-privat.net> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | agp/intel: Sandybridge doesn't require GMCH enablingChris Wilson2010-10-291-7/+30
| | | | | | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | intel-gtt: maximize ggtt size on platforms that support thisDaniel Vetter2010-10-271-26/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On VT-d supporting platforms the GGTT is allocated in a stolen mem section separate from graphcis stolen mem. The GMCH register contains a bitfield specifying the size of that region. Docs suggest that this region can only be used for GGTT and PPGTT. Hence ensure that the PPGTT is disabled and use the complete area for the GGTT. Unfortunately the graphics core on G33/Pineview can't cope with really large GTTs and the BIOS usually enables the maximum of 512MB. So don't bother with maximizing the GTT on these platforms. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* | intel-gtt: save PGETBL_CTL later in the setup processDaniel Vetter2010-10-271-7/+7
|/ | | | | | | | | | | | ... and switch to a more classical store-reg-on-suspend, restore-on-resume way of doing things. Obviously this is just preparation for the future, the code is not there at all, yet. This is needed because the next patch adjusts this register and everything in it (not just the pagetable address) needs to be restored on resume. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* agp/intel: Restore valid PTE bit for Sandybridge after bdd3072Chris Wilson2010-10-221-3/+3
| | | | | | | In cleaning up the mask functions in bdd3072, the setting of the PTE valid bit was dropped for Sandybridge. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* some clean up to intel-gtt.cJan Beulich2010-09-241-2/+1
| | | | | | | | | | | | | | | | In commit e517a5e97080bbe52857bd0d7df9b66602d53c4d the call to map_page_into_agp() got removed from intel_i830_setup_flush(), but the counterpart call from intel_i830_fini_flush() to unmap_page_from_agp() was left in place. Additionally, the page allocated here never gets its physical address used for sending to hardware, so there's no need to allocate it with GFP_DMA32. Nor is __GFP_ZERO really necessary, as the page is used only to store data to force flushing of some internal processor state. Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: Eric Anholt <eric@anholt.net> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* intel-gtt add a cleanup function for chipset specific stuffDaniel Vetter2010-09-211-8/+31
| | | | | | | | The old code didn't clean up the i830 chipset flush page. And it looks nicer. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* intel-gtt: store the dma mask size in intel_gtt_driverDaniel Vetter2010-09-211-7/+11
| | | | | | | | Storing this explicitly makes for clearer code and hopefully less further confusion. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* intel-gtt: clean up gtt size reportingDaniel Vetter2010-09-211-1/+5
| | | | | | | | Consolidate everything in intel-gtt.c and also kill the export of intel_max_stolen. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* intel-gtt: consolidate fake_agp driver structsDaniel Vetter2010-09-211-131/+39
| | | | | | | They're now all the same. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* intel-gtt: move chipset flush to the gtt driver structDaniel Vetter2010-09-211-7/+21
| | | | | | | This is the last differentiator between the different fake agp drivers. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* intel-gtt: kill mask_memory functionsDaniel Vetter2010-09-211-92/+13
| | | | | | | | That indirection mess can now go. Add a dummy i81x gtt_driver to avoid a NULL pointer check. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* intel-gtt: generic (insert|remove)_entries for sandybridgeDaniel Vetter2010-09-211-136/+8
| | | | | | | | Like before, but now with the added bonus of being able to kill quite a bit of no-longer userful code (the old dmar support stuff). Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* intel-gtt: generic (insert|remove)_entries for g33/i965Daniel Vetter2010-09-211-12/+9
| | | | | | | Like for the i915. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* intel-gtt: generic (insert|remove)_entries for i915Daniel Vetter2010-09-211-11/+49
| | | | | | | | | Beef up the generic version to support dmar. Otherwise like for the i830. v2: Don't try to DMA remap on resume for already remapped pages. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* intel-gtt: generic (insert|remove)_entries for i830Daniel Vetter2010-09-211-25/+28
| | | | | | | | | | | Well, not all too generic because it does not yet support dmar. Add a new function check_flags to ensure that non-gem code does not try to screw us over. v2: Beautify i830_check_flags with an idea from Chris Wilson. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* intel-gtt: drop agp scratch page support stuffDaniel Vetter2010-09-211-28/+0
| | | | | | | | intel-gtt.c now handles the scratch page itself, so drop all that was just there to support it. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* intel-gtt: introduce pte write function for gen6Daniel Vetter2010-09-211-22/+26
| | | | | | | Like for i830. intel_i9xx_configure is now unused, so kill it. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* intel-gtt: introduce pte write function for g33/i965/gm45Daniel Vetter2010-09-211-2/+15
| | | | | | | Like for the i830. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* intel-gtt: introduce pte write function for i8xx/i915/i945Daniel Vetter2010-09-211-9/+32
| | | | | | | | | And put it to use in the gtt configuration code that writes the scratch page addr in all gtt ptes. This makes intel_i830_configure generic, hence rename it to intel_fake_agp_configure. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* intel-gtt: initialize our own scratch pageDaniel Vetter2010-09-211-17/+64
| | | | | | | | | | | | | | | | | | The intel gtt fake agp driver is the only agp driver to use dma address remapping. So it makes sense to fold this code back into the only user (and thus reduce the reliance on the agp code). This patch does the first step by initializing (and remapping) the scratch page in a new function intel_gtt_setup_scratch_page. Unfortunately intel_gtt_cleanup had to move to avoid a forward declaration. The new scratch page is not yet used, though. v2: Refactor out scratch page teardown. Suggested by Chris Wilson on irc. This makes it clear what's going on and results in a nice symmetry between setup and teardown. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Merge branch 'drm-intel-fixes' into HEADChris Wilson2010-09-211-0/+2
|\ | | | | | | | | | | Conflicts: drivers/char/agp/intel-agp.c drivers/gpu/drm/i915/intel_crt.c