xf86-video-intel: Branch 'intel-kernelmode' - 2 commits - src/drmmode_display.c src/i830_memory.c
Dave Airlie
airlied at kemper.freedesktop.org
Thu May 8 00:24:28 PDT 2008
src/drmmode_display.c | 9 +++------
src/i830_memory.c | 8 +-------
2 files changed, 4 insertions(+), 13 deletions(-)
New commits:
commit 71ae4a6c9adc275fd143369791e273a35eab755e
Author: Dave Airlie <airlied at linux.ie>
Date: Thu May 8 17:24:07 2008 +1000
drmmode: use bits per pixel in correct place vs depth
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index e725a15..52a41e8 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -272,7 +272,7 @@ drmmode_crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
dri_bo_map(drmmode_crtc->rotate_bo, 1);
ret = drmModeAddFB(drmmode->fd, width, height, crtc->scrn->depth,
- crtc->scrn->depth, rotate_pitch, dri_bo_get_handle(drmmode_crtc->rotate_bo), &drmmode_crtc->rotate_fb_id);
+ crtc->scrn->bitsPerPixel, rotate_pitch, dri_bo_get_handle(drmmode_crtc->rotate_bo), &drmmode_crtc->rotate_fb_id);
if (ret) {
ErrorF("failed to add rotate fb\n");
}
@@ -587,7 +587,7 @@ void drmmode_set_fb(ScrnInfoPtr scrn, drmmode_ptr drmmode, int width, int height
int ret;
ret = drmModeAddFB(drmmode->fd, width, height, scrn->depth,
- scrn->depth, pitch, bo->handle, &drmmode->fb_id);
+ scrn->bitsPerPixel, pitch, bo->handle, &drmmode->fb_id);
if (ret) {
ErrorF("Failed to add fb\n");
@@ -628,8 +628,6 @@ static Bool drmmode_resize_fb(ScrnInfoPtr scrn, drmmode_ptr drmmode, int width,
int pitch;
int ret;
- ErrorF("current width %d height %d\n", drmmode->mode_fb->width, drmmode->mode_fb->height);
-
if (drmmode->mode_fb->width == width && drmmode->mode_fb->height == height)
return TRUE;
@@ -640,10 +638,9 @@ static Bool drmmode_resize_fb(ScrnInfoPtr scrn, drmmode_ptr drmmode, int width,
if (handle == 0)
return FALSE;
- ErrorF("pitch is %d\n", pitch);
ret = drmModeReplaceFB(drmmode->fd, drmmode->fb_id,
width, height,
- scrn->depth, scrn->depth, pitch,
+ scrn->depth, scrn->bitsPerPixel, pitch,
handle);
if (ret)
commit 17d202cfcd0f07de09f7ac259584ec3ed36685ec
Author: Dave Airlie <airlied at linux.ie>
Date: Thu May 8 17:06:09 2008 +1000
intel: just use fb_height.
still some bonghits when gnome is running, the second head
appears to be offset by the wrong amount
diff --git a/src/i830_memory.c b/src/i830_memory.c
index dda51ae..4cba5e6 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -2081,13 +2081,7 @@ i830_allocate_framebuffer_new(ScrnInfoPtr pScrn, I830Ptr pI830, BoxPtr FbMemBox)
/* Clear everything first. */
memset(FbMemBox, 0, sizeof(*FbMemBox));
- /* We'll allocate the fb such that the root window will fit regardless of
- * rotation.
- */
- if (pScrn->virtualX > pScrn->virtualY)
- fb_height = pScrn->virtualX;
- else
- fb_height = pScrn->virtualY;
+ fb_height = pScrn->virtualY;
FbMemBox->x1 = 0;
FbMemBox->x2 = pScrn->displayWidth;
More information about the xorg-commit
mailing list