summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-02-19 08:11:00 -0800
committerEric Anholt <eric@anholt.net>2010-02-20 12:55:13 -0500
commitec5deb2bcbf828c3c47488eb77461c26cab38ed6 (patch)
tree2f19d49628238b4f2053b8a07d94b16068e9a0b7 /src
parenta4180eabfa00c256494ed09aa336a17605c49a8a (diff)
Remove dead assignments noticed by clang.
Diffstat (limited to 'src')
-rw-r--r--src/drmmode_display.c5
-rw-r--r--src/i810_driver.c24
-rw-r--r--src/i810_video.c3
-rw-r--r--src/i830_driver.c9
-rw-r--r--src/i830_memory.c7
-rw-r--r--src/i830_render.c1
-rw-r--r--src/i830_uxa.c5
7 files changed, 6 insertions, 48 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 70e14103..9e566988 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1322,7 +1322,7 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
drmmode_ptr drmmode = drmmode_crtc->drmmode;
intel_screen_private *intel = intel_get_screen_private(scrn);
i830_memory *old_front = NULL;
- Bool tiled, ret;
+ Bool ret;
ScreenPtr screen = screenInfo.screens[scrn->scrnIndex];
uint32_t old_fb_id;
int i, pitch, old_width, old_height, old_pitch;
@@ -1331,7 +1331,6 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
return TRUE;
pitch = i830_pad_drawable_width(width, intel->cpp);
- tiled = i830_tiled_width(intel, &pitch, intel->cpp);
xf86DrvMsg(scrn->scrnIndex, X_INFO,
"Allocate new frame buffer %dx%d stride %d\n",
width, height, pitch);
@@ -1498,7 +1497,6 @@ drm_wakeup_handler(pointer data, int err, pointer p)
Bool drmmode_pre_init(ScrnInfoPtr scrn, int fd, int cpp)
{
intel_screen_private *intel = intel_get_screen_private(scrn);
- xf86CrtcConfigPtr xf86_config;
struct drm_i915_getparam gp;
drmmode_ptr drmmode;
unsigned int i;
@@ -1509,7 +1507,6 @@ Bool drmmode_pre_init(ScrnInfoPtr scrn, int fd, int cpp)
drmmode->fb_id = 0;
xf86CrtcConfigInit(scrn, &drmmode_xf86crtc_config_funcs);
- xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
drmmode->cpp = cpp;
drmmode->mode_res = drmModeGetResources(drmmode->fd);
diff --git a/src/i810_driver.c b/src/i810_driver.c
index 68e45bb6..3bec0929 100644
--- a/src/i810_driver.c
+++ b/src/i810_driver.c
@@ -445,7 +445,6 @@ static Bool intel_pci_probe (DriverPtr driver,
intptr_t match_data)
{
ScrnInfoPtr scrn = NULL;
- EntityInfoPtr entity;
scrn = xf86ConfigPciEntity (scrn, 0, entity_num, I810PciChipsets,
NULL,
@@ -457,8 +456,6 @@ static Bool intel_pci_probe (DriverPtr driver,
scrn->name = I810_NAME;
scrn->Probe = NULL;
- entity = xf86GetEntityInfo (entity_num);
-
switch (DEVICE_ID(device)) {
#ifndef I830_ONLY
case PCI_CHIP_I810:
@@ -825,7 +822,6 @@ I810PreInit(ScrnInfoPtr pScrn, int flags)
}
if (!pI810->MaxClock)
pI810->MaxClock = pI810->pEnt->device->dacSpeeds[0];
- from = X_CONFIG;
} else {
switch (pScrn->bitsPerPixel) {
case 8:
@@ -961,17 +957,10 @@ I810PreInit(ScrnInfoPtr pScrn, int flags)
static Bool
I810MapMMIO(ScrnInfoPtr pScrn)
{
- int mmioFlags;
I810Ptr pI810 = I810PTR(pScrn);
struct pci_device *const device = pI810->PciInfo;
int err;
-#if !defined(__alpha__)
- mmioFlags = VIDMEM_MMIO | VIDMEM_READSIDEEFFECT;
-#else
- mmioFlags = VIDMEM_MMIO | VIDMEM_READSIDEEFFECT | VIDMEM_SPARSE;
-#endif
-
err = pci_device_map_range (device,
pI810->MMIOAddr,
I810_REG_SIZE,
@@ -1456,7 +1445,7 @@ I810CalcVCLK(ScrnInfoPtr pScrn, double freq)
I810Ptr pI810 = I810PTR(pScrn);
I810RegPtr i810Reg = &pI810->ModeReg;
int m, n, p;
- double f_out, f_best;
+ double f_out;
double f_err;
double f_vco;
int m_best = 0, n_best = 0, p_best = 0;
@@ -1484,7 +1473,6 @@ I810CalcVCLK(ScrnInfoPtr pScrn, double freq)
if (fabs(f_err) < err_max) {
m_best = m;
n_best = n;
- f_best = f_out;
err_best = f_err;
}
} while ((fabs(f_err) >= err_target) &&
@@ -1685,12 +1673,10 @@ static void
I810LoadPalette15(ScrnInfoPtr pScrn, int numColors, int *indices,
LOCO * colors, VisualPtr pVisual)
{
- I810Ptr pI810;
vgaHWPtr hwp;
int i, j, index;
unsigned char r, g, b;
- pI810 = I810PTR(pScrn);
hwp = VGAHWPTR(pScrn);
for (i = 0; i < numColors; i++) {
@@ -1711,12 +1697,10 @@ static void
I810LoadPalette16(ScrnInfoPtr pScrn, int numColors, int *indices,
LOCO * colors, VisualPtr pVisual)
{
- I810Ptr pI810;
vgaHWPtr hwp;
int i, index;
unsigned char r, g, b;
- pI810 = I810PTR(pScrn);
hwp = VGAHWPTR(pScrn);
/* Load all four entries in each of the 64 color ranges. -jens */
@@ -1777,12 +1761,10 @@ static void
I810LoadPalette24(ScrnInfoPtr pScrn, int numColors, int *indices,
LOCO * colors, VisualPtr pVisual)
{
- I810Ptr pI810;
vgaHWPtr hwp;
int i, index;
unsigned char r, g, b;
- pI810 = I810PTR(pScrn);
hwp = VGAHWPTR(pScrn);
for (i = 0; i < numColors; i++) {
@@ -1908,7 +1890,6 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
vgaHWPtr hwp;
I810Ptr pI810;
VisualPtr visual;
- MessageType driFrom = X_DEFAULT;
pScrn = xf86Screens[pScreen->myNum];
pI810 = I810PTR(pScrn);
@@ -1957,8 +1938,6 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
if (pI810->directRenderingEnabled==TRUE)
pI810->directRenderingEnabled = I810DRIScreenInit(pScreen);
- else
- driFrom = X_CONFIG;
#else
pI810->directRenderingEnabled = FALSE;
@@ -2014,7 +1993,6 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
#ifdef XF86DRI
if (pI810->LpRing->mem.Start == 0 && pI810->directRenderingEnabled) {
pI810->directRenderingEnabled = FALSE;
- driFrom = X_PROBED;
I810DRICloseScreen(pScreen);
}
diff --git a/src/i810_video.c b/src/i810_video.c
index ee1a2326..9bb98705 100644
--- a/src/i810_video.c
+++ b/src/i810_video.c
@@ -1206,7 +1206,7 @@ I810AllocateSurface(
XF86SurfacePtr surface
){
FBLinearPtr linear;
- int pitch, fbpitch, size, bpp;
+ int pitch, size, bpp;
OffscreenPrivPtr pPriv;
I810Ptr pI810 = I810PTR(pScrn);
@@ -1216,7 +1216,6 @@ I810AllocateSurface(
w = (w + 1) & ~1;
pitch = ((w << 1) + 15) & ~15;
bpp = pScrn->bitsPerPixel >> 3;
- fbpitch = bpp * pScrn->displayWidth;
size = ((pitch * h) + bpp - 1) / bpp;
if(!(linear = I810AllocateMemory(pScrn, NULL, size)))
diff --git a/src/i830_driver.c b/src/i830_driver.c
index c88195ce..35e57f67 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -232,25 +232,20 @@ const OptionInfoRec *I830AvailableOptions(int chipid, int busid)
static Bool I830GetRec(ScrnInfoPtr scrn)
{
- intel_screen_private *intel;
-
if (scrn->driverPrivate)
return TRUE;
- intel = scrn->driverPrivate = xnfcalloc(sizeof(intel_screen_private), 1);
+ scrn->driverPrivate = xnfcalloc(sizeof(intel_screen_private), 1);
+
return TRUE;
}
static void I830FreeRec(ScrnInfoPtr scrn)
{
- intel_screen_private *intel;
-
if (!scrn)
return;
if (!scrn->driverPrivate)
return;
- intel = intel_get_screen_private(scrn);
-
xfree(scrn->driverPrivate);
scrn->driverPrivate = NULL;
}
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 79c9fa71..289c5f00 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -480,7 +480,6 @@ i830_memory *i830_allocate_framebuffer(ScrnInfoPtr scrn)
{
intel_screen_private *intel = intel_get_screen_private(scrn);
unsigned int pitch = scrn->displayWidth * intel->cpp;
- unsigned long minspace;
long size, fb_height;
int flags;
i830_memory *front_buffer = NULL;
@@ -493,12 +492,6 @@ i830_memory *i830_allocate_framebuffer(ScrnInfoPtr scrn)
*/
fb_height = scrn->virtualY;
- /* Calculate how much framebuffer memory to allocate. For the
- * initial allocation, calculate a reasonable minimum. This is
- * enough for the virtual screen size.
- */
- minspace = pitch * scrn->virtualY;
-
size = ROUND_TO_PAGE(pitch * fb_height);
if (intel->tiling && IsTileable(scrn, pitch))
diff --git a/src/i830_render.c b/src/i830_render.c
index 4d37a404..89e5acb6 100644
--- a/src/i830_render.c
+++ b/src/i830_render.c
@@ -326,7 +326,6 @@ static void i830_texture_setup(PicturePtr picture, PixmapPtr pixmap, int unit)
(FILTER_LINEAR << TM0S3_MIN_FILTER_SHIFT));
break;
default:
- filter = 0;
FatalError("Bad filter 0x%x\n", picture->filter);
}
filter |= (MIPFILTER_NONE << TM0S3_MIP_FILTER_SHIFT);
diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index 4a892b5a..f489f4f0 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -156,7 +156,7 @@ i830_uxa_pixmap_compute_size(PixmapPtr pixmap,
*/
size = *stride * ALIGN(h, 2);
} else {
- int aligned_h = h;
+ int aligned_h;
if (*tiling == I915_TILING_X)
aligned_h = ALIGN(h, 8);
else
@@ -189,7 +189,6 @@ i830_uxa_prepare_solid(PixmapPtr pixmap, int alu, Pixel planemask, Pixel fg)
{
ScrnInfoPtr scrn = xf86Screens[pixmap->drawable.pScreen->myNum];
intel_screen_private *intel = intel_get_screen_private(scrn);
- unsigned long pitch;
drm_intel_bo *bo_table[] = {
NULL, /* batch_bo */
i830_get_pixmap_bo(pixmap),
@@ -213,8 +212,6 @@ i830_uxa_prepare_solid(PixmapPtr pixmap, int alu, Pixel planemask, Pixel fg)
if (!intel_check_pitch_2d(pixmap))
return FALSE;
- pitch = i830_pixmap_pitch(pixmap);
-
if (!i830_pixmap_pitch_is_aligned(pixmap)) {
intel_debug_fallback(scrn, "pixmap pitch not aligned");
return FALSE;