diff --git a/radeon-modeset.patch b/radeon-modeset.patch index d95758b..fa09bc9 100644 --- a/radeon-modeset.patch +++ b/radeon-modeset.patch @@ -1,3 +1,9 @@ +commit 82783174ca2ed4f9a3afa18d5f32c0274f866f88 +Author: Dave Airlie +Date: Mon Nov 17 16:16:51 2008 +1000 + + radeon: use get/set master ioctls + commit 912a135fa66d50174ed925676ebcbaeae7bd8556 Author: Dave Airlie Date: Fri Nov 14 15:56:16 2008 +1000 @@ -4233,9 +4239,18 @@ index 0000000..041671f + +#endif diff --git a/src/radeon_driver.c b/src/radeon_driver.c -index c759bd6..54cc804 100644 +index c759bd6..2f4b73a 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c +@@ -67,7 +67,7 @@ + + #include + #include +- ++#include + /* Driver data structures */ + #include "radeon.h" + #include "radeon_reg.h" @@ -224,7 +224,10 @@ radeonShadowWindow(ScreenPtr screen, CARD32 row, CARD32 offset, int mode, stride = (pScrn->displayWidth * pScrn->bitsPerPixel) / 8; *size = stride; @@ -5193,10 +5208,10 @@ index c759bd6..54cc804 100644 - if (!xf86SetDesiredModes (pScrn)) + if (info->drm_mode_setting) { + if (!drmmode_set_desired_modes(pScrn, &info->drmmode)) - return FALSE; ++ return FALSE; + } else { + if (!xf86SetDesiredModes (pScrn)) -+ return FALSE; + return FALSE; + } /* Provide SaveScreen & wrap BlockHandler and CloseScreen */ @@ -5261,7 +5276,7 @@ index c759bd6..54cc804 100644 #ifdef XF86DRI if (info->cp->CPStarted && pScrn->pScreen) DRILock(pScrn->pScreen, 0); #endif -@@ -5410,67 +5595,84 @@ Bool RADEONEnterVT(int scrnIndex, int flags) +@@ -5410,67 +5595,91 @@ Bool RADEONEnterVT(int scrnIndex, int flags) xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, "RADEONEnterVT\n"); @@ -5328,7 +5343,13 @@ index c759bd6..54cc804 100644 - if (xf86ReturnOptValBool(info->Options, OPTION_DYNAMIC_CLOCKS, FALSE)) { - atombios_static_pwrmgt_setup(pScrn, 1); - atombios_dyn_clk_setup(pScrn, 1); -- } ++ } else { ++ int ret; ++ if (info->drm_mode_setting) { ++ ret = ioctl(info->dri->drmFD, DRM_IOCTL_SET_MASTER, NULL); ++ if (ret == -EINVAL) ++ ErrorF("Unable to retrieve master\n"); + } } - if (IS_R300_VARIANT || IS_RV100_VARIANT) @@ -5352,10 +5373,10 @@ index c759bd6..54cc804 100644 + + if (info->drm_mode_setting) { + if (!drmmode_set_desired_modes(pScrn, &info->drmmode)) -+ return FALSE; + return FALSE; + } else { + if (!xf86SetDesiredModes(pScrn)) - return FALSE; ++ return FALSE; + } - if (info->ChipFamily < CHIP_FAMILY_R600) @@ -5392,7 +5413,7 @@ index c759bd6..54cc804 100644 } #endif /* this will get XVideo going again, but only if XVideo was initialised -@@ -5482,7 +5684,7 @@ Bool RADEONEnterVT(int scrnIndex, int flags) +@@ -5482,7 +5691,7 @@ Bool RADEONEnterVT(int scrnIndex, int flags) RADEONEngineRestore(pScrn); #ifdef XF86DRI @@ -5401,7 +5422,7 @@ index c759bd6..54cc804 100644 RADEONCP_START(pScrn, info); DRIUnlock(pScrn->pScreen); } -@@ -5505,17 +5707,18 @@ void RADEONLeaveVT(int scrnIndex, int flags) +@@ -5505,17 +5714,18 @@ void RADEONLeaveVT(int scrnIndex, int flags) "RADEONLeaveVT\n"); #ifdef XF86DRI if (RADEONPTR(pScrn)->directRenderingInited) { @@ -5431,7 +5452,19 @@ index c759bd6..54cc804 100644 /* Make sure 3D clients will re-upload textures to video RAM */ if (info->dri->textureSize) { -@@ -5551,10 +5754,15 @@ void RADEONLeaveVT(int scrnIndex, int flags) +@@ -5531,6 +5741,11 @@ void RADEONLeaveVT(int scrnIndex, int flags) + i = list[i].next; + } while (i != 0); + } ++ ++ if (info->drm_mode_setting) ++ ioctl(info->dri->drmFD, DRM_IOCTL_DROP_MASTER, NULL); ++ ++ + } + #endif + +@@ -5551,10 +5766,15 @@ void RADEONLeaveVT(int scrnIndex, int flags) xf86_hide_cursors (pScrn); @@ -5450,7 +5483,7 @@ index c759bd6..54cc804 100644 xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, "Ok, leaving now...\n"); -@@ -5599,7 +5807,8 @@ static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen) +@@ -5599,7 +5819,8 @@ static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen) #endif /* USE_XAA */ if (pScrn->vtSema) { @@ -5460,7 +5493,7 @@ index c759bd6..54cc804 100644 } xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, -@@ -5634,6 +5843,12 @@ static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen) +@@ -5634,6 +5855,12 @@ static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen) info->DGAModes = NULL; xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, "Unmapping memory\n"); diff --git a/xorg-x11-drv-ati.spec b/xorg-x11-drv-ati.spec index 61b657f..c707359 100644 --- a/xorg-x11-drv-ati.spec +++ b/xorg-x11-drv-ati.spec @@ -5,7 +5,7 @@ Summary: Xorg X11 ati video driver Name: xorg-x11-drv-ati Version: 6.9.0 -Release: 46%{?dist} +Release: 47%{?dist} URL: http://www.x.org License: MIT Group: User Interface/X Hardware Support @@ -82,6 +82,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man4/radeon.4* %changelog +* Mon Nov 17 2008 Dave Airlie 6.9.0-47 +- add set/drop master ioctls + * Fri Nov 14 2008 Dave Airlie 6.9.0-46 - fix rebooting on low memory cards.