From 465729c0ca309999f3f82884fe2ca6766420a8b3 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Tue, 14 Jul 2009 10:57:26 +0100 Subject: [PATCH 301/301] Revive i830_update_front_offset() function overzealously pruned during NoAccel removal. Without this, the xserver would segv on startup: Backtrace: 0: /etc/X11/X(xorg_backtrace+0x26) [0x4ec2f6] 1: /etc/X11/X(xf86SigHandler+0x74) [0x48f024] 2: /lib64/libc.so.6 [0x7f31c92cd990] 3: /lib64/libc.so.6(memset+0x370) [0x7f31c9318360] 4: /usr/lib64/xorg/modules/drivers//intel_drv.so [0x7f31c76c4c24] 5: /usr/lib64/xorg/modules/drivers//intel_drv.so [0x7f31c76c5d34] 6: /etc/X11/X(AddScreen+0x1d4) [0x42e644] 7: /etc/X11/X(InitOutput+0x76f) [0x46a47f] 8: /etc/X11/X(main+0x20c) [0x42ed5c] 9: /lib64/libc.so.6(__libc_start_main+0xfd) [0x7f31c92ba91d] 10: /etc/X11/X [0x42e389] This commit reverts a small part of d655a3ff423e69c19a5dc07140cbf3caaa32cb86. --- src/i830_driver.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/src/i830_driver.c b/src/i830_driver.c index dfc2bdf..3546d8b 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -596,6 +596,17 @@ I830LoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, } } +static void +i830_update_front_offset(ScrnInfoPtr pScrn) +{ + I830Ptr pI830 = I830PTR(pScrn); + + /* Update buffer locations, which may have changed as a result of + * i830_bind_all_memory(). + */ + pScrn->fbOffset = pI830->front_buffer->offset; +} + /** * Adjust the screen pixmap for the current location of the front buffer. * This is done at EnterVT when buffers are bound as long as the resources @@ -612,6 +623,8 @@ i830CreateScreenResources(ScreenPtr pScreen) if (!(*pScreen->CreateScreenResources)(pScreen)) return FALSE; + i830_update_front_offset(pScrn); + i830_uxa_create_screen_resources(pScreen); return TRUE; @@ -3029,6 +3042,9 @@ I830EnterVT(int scrnIndex, int flags) i830_describe_allocations(pScrn, 1, ""); + /* Update the screen pixmap in case the buffer moved */ + i830_update_front_offset(pScrn); + intel_batch_init(pScrn); if (IS_I965G(pI830)) -- 1.6.3.3