aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_memory.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-10-14 03:39:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-14 03:39:08 -0400
commit2d65a9f48fcdf7866aab6457bc707ca233e0c791 (patch)
treef93e5838d6ac2e59434367f4ff905f7d9c45fc2b /drivers/gpu/drm/drm_memory.c
parentda92da3638a04894afdca8b99e973ddd20268471 (diff)
parentdfda0df3426483cf5fc7441f23f318edbabecb03 (diff)
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull drm updates from Dave Airlie: "This is the main git pull for the drm, I pretty much froze major pulls at -rc5/6 time, and haven't had much fallout, so will probably continue doing that. Lots of changes all over, big internal header cleanup to make it clear drm features are legacy things and what are things that modern KMS drivers should be using. Also big move to use the new generic fences in all the TTM drivers. core: atomic prep work, vblank rework changes, allows immediate vblank disables major header reworking and cleanups to better delinate legacy interfaces from what KMS drivers should be using. cursor planes locking fixes ttm: move to generic fences (affects all TTM drivers) ppc64 caching fixes radeon: userptr support, uvd for old asics, reset rework for fence changes better buffer placement changes, dpm feature enablement hdmi audio support fixes intel: Cherryview work, 180 degree rotation, skylake prep work, execlist command submission full ppgtt prep work cursor improvements edid caching, vdd handling improvements nouveau: fence reworking kepler memory clock work gt21x clock work fan control improvements hdmi infoframe fixes DP audio ast: ppc64 fixes caching fix rcar: rcar-du DT support ipuv3: prep work for capture support msm: LVDS support for mdp4, new panel, gpu refactoring exynos: exynos3250 SoC support, drop bad mmap interface, mipi dsi changes, and component match support" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (640 commits) drm/mst: rework payload table allocation to conform better. drm/ast: Fix HW cursor image drm/radeon/kv: add uvd/vce info to dpm debugfs output drm/radeon/ci: add uvd/vce info to dpm debugfs output drm/radeon: export reservation_object from dmabuf to ttm drm/radeon: cope with foreign fences inside the reservation object drm/radeon: cope with foreign fences inside display drm/core: use helper to check driver features drm/radeon/cik: write gfx ucode version to ucode addr reg drm/radeon/si: print full CS when we hit a packet 0 drm/radeon: remove unecessary includes drm/radeon/combios: declare legacy_connector_convert as static drm/radeon/atombios: declare connector convert tables as static drm/radeon: drop btc_get_max_clock_from_voltage_dependency_table drm/radeon/dpm: drop clk/voltage dependency filters for BTC drm/radeon/dpm: drop clk/voltage dependency filters for CI drm/radeon/dpm: drop clk/voltage dependency filters for SI drm/radeon/dpm: drop clk/voltage dependency filters for NI drm/radeon: disable audio when we disable hdmi (v2) drm/radeon: split audio enable between eg and r600 (v2) ...
Diffstat (limited to 'drivers/gpu/drm/drm_memory.c')
-rw-r--r--drivers/gpu/drm/drm_memory.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c
index 00c67c0f2381..a521ef6ff807 100644
--- a/drivers/gpu/drm/drm_memory.c
+++ b/drivers/gpu/drm/drm_memory.c
@@ -36,8 +36,20 @@
36#include <linux/highmem.h> 36#include <linux/highmem.h>
37#include <linux/export.h> 37#include <linux/export.h>
38#include <drm/drmP.h> 38#include <drm/drmP.h>
39#include "drm_legacy.h"
39 40
40#if __OS_HAS_AGP 41#if __OS_HAS_AGP
42
43#ifdef HAVE_PAGE_AGP
44# include <asm/agp.h>
45#else
46# ifdef __powerpc__
47# define PAGE_AGP __pgprot(_PAGE_KERNEL | _PAGE_NO_CACHE)
48# else
49# define PAGE_AGP PAGE_KERNEL
50# endif
51#endif
52
41static void *agp_remap(unsigned long offset, unsigned long size, 53static void *agp_remap(unsigned long offset, unsigned long size,
42 struct drm_device * dev) 54 struct drm_device * dev)
43{ 55{
@@ -108,25 +120,25 @@ static inline void *agp_remap(unsigned long offset, unsigned long size,
108 120
109#endif /* agp */ 121#endif /* agp */
110 122
111void drm_core_ioremap(struct drm_local_map *map, struct drm_device *dev) 123void drm_legacy_ioremap(struct drm_local_map *map, struct drm_device *dev)
112{ 124{
113 if (dev->agp && dev->agp->cant_use_aperture && map->type == _DRM_AGP) 125 if (dev->agp && dev->agp->cant_use_aperture && map->type == _DRM_AGP)
114 map->handle = agp_remap(map->offset, map->size, dev); 126 map->handle = agp_remap(map->offset, map->size, dev);
115 else 127 else
116 map->handle = ioremap(map->offset, map->size); 128 map->handle = ioremap(map->offset, map->size);
117} 129}
118EXPORT_SYMBOL(drm_core_ioremap); 130EXPORT_SYMBOL(drm_legacy_ioremap);
119 131
120void drm_core_ioremap_wc(struct drm_local_map *map, struct drm_device *dev) 132void drm_legacy_ioremap_wc(struct drm_local_map *map, struct drm_device *dev)
121{ 133{
122 if (dev->agp && dev->agp->cant_use_aperture && map->type == _DRM_AGP) 134 if (dev->agp && dev->agp->cant_use_aperture && map->type == _DRM_AGP)
123 map->handle = agp_remap(map->offset, map->size, dev); 135 map->handle = agp_remap(map->offset, map->size, dev);
124 else 136 else
125 map->handle = ioremap_wc(map->offset, map->size); 137 map->handle = ioremap_wc(map->offset, map->size);
126} 138}
127EXPORT_SYMBOL(drm_core_ioremap_wc); 139EXPORT_SYMBOL(drm_legacy_ioremap_wc);
128 140
129void drm_core_ioremapfree(struct drm_local_map *map, struct drm_device *dev) 141void drm_legacy_ioremapfree(struct drm_local_map *map, struct drm_device *dev)
130{ 142{
131 if (!map->handle || !map->size) 143 if (!map->handle || !map->size)
132 return; 144 return;
@@ -136,4 +148,4 @@ void drm_core_ioremapfree(struct drm_local_map *map, struct drm_device *dev)
136 else 148 else
137 iounmap(map->handle); 149 iounmap(map->handle);
138} 150}
139EXPORT_SYMBOL(drm_core_ioremapfree); 151EXPORT_SYMBOL(drm_legacy_ioremapfree);