summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-10 19:38:24 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-05-10 19:38:24 +0100
commita8761585ef0b37736d302299d6b03e0957ad3e16 (patch)
tree0432ba968f298e8df39e93eb658f250bdd012c65
parent9e9b0d85da801f1f95c7bc7e99566fe7056f5813 (diff)
i830: Minor cleanup
Remove some extraneous prototypes and unused variables. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/drmmode_display.c8
-rw-r--r--src/i830.h2
-rw-r--r--src/i830_memory.c10
3 files changed, 9 insertions, 11 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index d8b158e5..cd0787e4 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1255,6 +1255,7 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
drm_intel_bo *old_front = NULL;
Bool ret;
ScreenPtr screen = screenInfo.screens[scrn->scrnIndex];
+ PixmapPtr pixmap;
uint32_t old_fb_id;
int i, w, pitch, old_width, old_height, old_pitch;
@@ -1288,10 +1289,11 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
if (ret)
goto fail;
- i830_set_pixmap_bo(screen->GetScreenPixmap(screen), intel->front_buffer);
+ pixmap = screen->GetScreenPixmap(screen);
+ i830_set_pixmap_bo(pixmap, intel->front_buffer);
+ assert (i830_get_pixmap_intel(pixmap)->stride == pitch);
- screen->ModifyPixmapHeader(screen->GetScreenPixmap(screen),
- width, height, -1, -1, pitch, NULL);
+ screen->ModifyPixmapHeader(pixmap, width, height, -1, -1, pitch, NULL);
for (i = 0; i < xf86_config->num_crtc; i++) {
xf86CrtcPtr crtc = xf86_config->crtc[i];
diff --git a/src/i830.h b/src/i830.h
index fc26f3a2..aa7fedc0 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -510,8 +510,6 @@ intel_debug_fallback(ScrnInfoPtr scrn, char *format, ...)
va_end(ap);
}
-Bool i830_pixmap_tiled(PixmapPtr p);
-
static inline Bool
intel_check_pitch_2d(PixmapPtr pixmap)
{
diff --git a/src/i830_memory.c b/src/i830_memory.c
index a21f29b5..6a73bf6c 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -219,19 +219,18 @@ static Bool IsTileable(ScrnInfoPtr scrn, int pitch)
drm_intel_bo *i830_allocate_framebuffer(ScrnInfoPtr scrn)
{
intel_screen_private *intel = intel_get_screen_private(scrn);
- unsigned int pitch = scrn->displayWidth * intel->cpp;
+ drm_intel_bo *front_buffer;
long size, fb_height;
- int flags, ret;
- drm_intel_bo *front_buffer = NULL;
+ unsigned int pitch;
uint32_t tiling_mode, requested_tiling_mode;
-
- flags = ALLOW_SHARING | DISABLE_REUSE;
+ int ret;
/* We'll allocate the fb such that the root window will fit regardless of
* rotation.
*/
fb_height = scrn->virtualY;
+ pitch = scrn->displayWidth * intel->cpp;
size = ROUND_TO_PAGE(pitch * fb_height);
if (intel->tiling && IsTileable(scrn, pitch))
@@ -254,7 +253,6 @@ drm_intel_bo *i830_allocate_framebuffer(ScrnInfoPtr scrn)
front_buffer = drm_intel_bo_alloc(intel->bufmgr, "front buffer",
size, GTT_PAGE_SIZE);
-
if (front_buffer == NULL) {
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
"Failed to allocate framebuffer.\n");