diff options
author | Dave Airlie <airlied@linux.ie> | 2006-11-18 11:26:55 +1100 |
---|---|---|
committer | airlied <airlied@optimus.localdomain> | 2006-11-18 11:29:00 +1100 |
commit | e2f6dacc736527790ed8e304698678afc17f71c6 (patch) | |
tree | b50c5bc7f0490b64af559beb9bbbf0c690b7c4ad | |
parent | f17e3c34dfd1f1418440bdebf45764e4dbf550f0 (diff) |
dri: setup libdrm hooks as early as possible.
This is due to radeon doing drm stuff before DRI extension gets initialised
-rw-r--r-- | hw/xfree86/dri/dri.c | 6 | ||||
-rw-r--r-- | hw/xfree86/dri/drimodule.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c index a49c63212..5337f9a4a 100644 --- a/hw/xfree86/dri/dri.c +++ b/hw/xfree86/dri/dri.c @@ -84,7 +84,7 @@ static RESTYPE DRIDrawablePrivResType; static RESTYPE DRIContextPrivResType; static void DRIDestroyDummyContext(ScreenPtr pScreen, Bool hasCtxPriv); -static drmServerInfo DRIDRMServerInfo; +drmServerInfo DRIDRMServerInfo; /* Wrapper just like xf86DrvMsg, but without the verbosity level checking. @@ -176,8 +176,6 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) else openbusid = NULL; - drmSetServerInfo(&DRIDRMServerInfo); - /* Note that drmOpen will try to load the kernel module, if needed. */ fd = drmOpen(pDRIInfo->drmDriverName, openbusid); if (fd < 0) { @@ -593,7 +591,7 @@ static void dri_drm_get_perms(gid_t *group, mode_t *mode) *mode = xf86ConfigDRI.mode; } -static drmServerInfo DRIDRMServerInfo = { +drmServerInfo DRIDRMServerInfo = { dri_drm_debug_print, xf86LoadKernelModule, dri_drm_get_perms, diff --git a/hw/xfree86/dri/drimodule.c b/hw/xfree86/dri/drimodule.c index b39c22e11..0e3d84eb8 100644 --- a/hw/xfree86/dri/drimodule.c +++ b/hw/xfree86/dri/drimodule.c @@ -39,8 +39,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "xf86Module.h" #include "globals.h" +#include "xf86drm.h" static MODULESETUPPROTO(driSetup); +drmServerInfo DRIDRMServerInfo; + static XF86ModuleVersionInfo VersRec = { "dri", @@ -81,6 +84,9 @@ driSetup(pointer module, pointer opts, int *errmaj, int *errmin) } else { if (errmaj) *errmaj = LDR_ONCEONLY; } + + drmSetServerInfo(&DRIDRMServerInfo); + /* Need a non-NULL return value to indicate success */ return 1; } |