summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-12-17 00:18:25 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-01-08 19:46:36 +0000
commit968151898b807b06953b2f4170ac02889f16c8dc (patch)
treebce4e179f2b88a4ae24719ac2b331ff1764ee8cd
parent19b5817a54d4a17161340ada9bf20027644ff074 (diff)
Remove unused GTT/Map sizes and addresses
These have been made obsolete by KMS and GEM. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/intel.h8
-rw-r--r--src/intel_driver.c76
-rw-r--r--src/intel_uxa.c1
3 files changed, 0 insertions, 85 deletions
diff --git a/src/intel.h b/src/intel.h
index 4969bff2..b6e8bde5 100644
--- a/src/intel.h
+++ b/src/intel.h
@@ -271,19 +271,12 @@ enum dri_type {
typedef struct intel_screen_private {
ScrnInfoPtr scrn;
- unsigned char *MMIOBase;
int cpp;
#define RENDER_BATCH I915_EXEC_RENDER
#define BLT_BATCH I915_EXEC_BLT
unsigned int current_batch;
- unsigned int bufferOffset; /* for I830SelectBuffer */
-
- /* These are set in PreInit and never changed. */
- long FbMapSize;
- long GTTMapSize;
-
void *modes;
drm_intel_bo *front_buffer;
long front_pitch, front_tiling;
@@ -327,7 +320,6 @@ typedef struct intel_screen_private {
Bool has_relaxed_fencing;
int Chipset;
- unsigned long LinearAddr;
EntityInfoPtr pEnt;
struct pci_device *PciInfo;
struct intel_chipset chipset;
diff --git a/src/intel_driver.c b/src/intel_driver.c
index 1275e4bc..f9469813 100644
--- a/src/intel_driver.c
+++ b/src/intel_driver.c
@@ -733,50 +733,6 @@ I830BlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask)
intel_video_block_handler(intel);
}
-static void intel_fixup_mtrrs(ScrnInfoPtr scrn)
-{
-#ifdef HAS_MTRR_SUPPORT
- intel_screen_private *intel = intel_get_screen_private(scrn);
- int fd;
- struct mtrr_gentry gentry;
- struct mtrr_sentry sentry;
-
- if ((fd = open("/proc/mtrr", O_RDONLY, 0)) != -1) {
- for (gentry.regnum = 0;
- ioctl(fd, MTRRIOC_GET_ENTRY, &gentry) == 0;
- ++gentry.regnum) {
-
- if (gentry.size < 1) {
- /* DISABLED */
- continue;
- }
-
- /* Check the MTRR range is one we like and if not - remove it.
- * The Xserver common layer will then setup the right range
- * for us.
- */
- if (gentry.base == intel->LinearAddr &&
- gentry.size < intel->FbMapSize) {
-
- xf86DrvMsg(scrn->scrnIndex, X_INFO,
- "Removing bad MTRR range (base 0x%lx, size 0x%x)\n",
- gentry.base, gentry.size);
-
- sentry.base = gentry.base;
- sentry.size = gentry.size;
- sentry.type = gentry.type;
-
- if (ioctl(fd, MTRRIOC_DEL_ENTRY, &sentry) == -1) {
- xf86DrvMsg(scrn->scrnIndex, X_ERROR,
- "Failed to remove bad MTRR range\n");
- }
- }
- }
- close(fd);
- }
-#endif
-}
-
static Bool
intel_init_initial_framebuffer(ScrnInfoPtr scrn)
{
@@ -961,32 +917,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr screen, int argc, char **argv)
struct pci_device *const device = intel->PciInfo;
int fb_bar = IS_GEN2(intel) ? 0 : 2;
- /*
- * The "VideoRam" config file parameter specifies the maximum amount of
- * memory that will be used/allocated. When not present, we allow the
- * driver to allocate as much memory as it wishes to satisfy its
- * allocations, but if agpgart support isn't available, it gets limited
- * to the amount of pre-allocated ("stolen") memory.
- *
- * Note that in using this value for allocator initialization, we're
- * limiting aperture allocation to the VideoRam option, rather than limiting
- * actual memory allocation, so alignment and things will cause less than
- * VideoRam to be actually used.
- */
- scrn->videoRam = intel->FbMapSize / KB(1);
- if (intel->pEnt->device->videoRam != 0) {
- if (scrn->videoRam != intel->pEnt->device->videoRam) {
- xf86DrvMsg(scrn->scrnIndex, X_WARNING,
- "VideoRam configuration found, which is no "
- "longer used.\n");
- xf86DrvMsg(scrn->scrnIndex, X_INFO,
- "Continuing with (ignored) %dkB VideoRam "
- "instead of %d kB.\n",
- scrn->videoRam,
- intel->pEnt->device->videoRam);
- }
- }
-
scrn->videoRam = device->regions[fb_bar].size / 1024;
intel->last_3d = LAST_3D_OTHER;
@@ -998,10 +928,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr screen, int argc, char **argv)
*/
intel->XvEnabled = TRUE;
- xf86DrvMsg(scrn->scrnIndex,
- intel->pEnt->device->videoRam ? X_CONFIG : X_DEFAULT,
- "VideoRam: %d KB\n", scrn->videoRam);
-
#ifdef DRI2
if (intel->directRenderingType == DRI_NONE
&& I830DRI2ScreenInit(screen))
@@ -1011,8 +937,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr screen, int argc, char **argv)
if (!intel_init_initial_framebuffer(scrn))
return FALSE;
- intel_fixup_mtrrs(scrn);
-
intel_batch_init(scrn);
if (INTEL_INFO(intel)->gen >= 40)
diff --git a/src/intel_uxa.c b/src/intel_uxa.c
index 1a591f1d..8f58c29d 100644
--- a/src/intel_uxa.c
+++ b/src/intel_uxa.c
@@ -1185,7 +1185,6 @@ Bool intel_uxa_init(ScreenPtr screen)
memset(intel->uxa_driver, 0, sizeof(*intel->uxa_driver));
- intel->bufferOffset = 0;
intel->uxa_driver->uxa_major = 1;
intel->uxa_driver->uxa_minor = 0;