dri: setup libdrm hooks as early as possible.
This is due to radeon doing drm stuff before DRI extension gets initialised
This commit is contained in:
parent
f17e3c34df
commit
e2f6dacc73
|
@ -84,7 +84,7 @@ static RESTYPE DRIDrawablePrivResType;
|
||||||
static RESTYPE DRIContextPrivResType;
|
static RESTYPE DRIContextPrivResType;
|
||||||
static void DRIDestroyDummyContext(ScreenPtr pScreen, Bool hasCtxPriv);
|
static void DRIDestroyDummyContext(ScreenPtr pScreen, Bool hasCtxPriv);
|
||||||
|
|
||||||
static drmServerInfo DRIDRMServerInfo;
|
drmServerInfo DRIDRMServerInfo;
|
||||||
|
|
||||||
/* Wrapper just like xf86DrvMsg, but
|
/* Wrapper just like xf86DrvMsg, but
|
||||||
without the verbosity level checking.
|
without the verbosity level checking.
|
||||||
|
@ -176,8 +176,6 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
|
||||||
else
|
else
|
||||||
openbusid = NULL;
|
openbusid = NULL;
|
||||||
|
|
||||||
drmSetServerInfo(&DRIDRMServerInfo);
|
|
||||||
|
|
||||||
/* Note that drmOpen will try to load the kernel module, if needed. */
|
/* Note that drmOpen will try to load the kernel module, if needed. */
|
||||||
fd = drmOpen(pDRIInfo->drmDriverName, openbusid);
|
fd = drmOpen(pDRIInfo->drmDriverName, openbusid);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
|
@ -593,7 +591,7 @@ static void dri_drm_get_perms(gid_t *group, mode_t *mode)
|
||||||
*mode = xf86ConfigDRI.mode;
|
*mode = xf86ConfigDRI.mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
static drmServerInfo DRIDRMServerInfo = {
|
drmServerInfo DRIDRMServerInfo = {
|
||||||
dri_drm_debug_print,
|
dri_drm_debug_print,
|
||||||
xf86LoadKernelModule,
|
xf86LoadKernelModule,
|
||||||
dri_drm_get_perms,
|
dri_drm_get_perms,
|
||||||
|
|
|
@ -39,8 +39,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#include "xf86Module.h"
|
#include "xf86Module.h"
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
|
|
||||||
|
#include "xf86drm.h"
|
||||||
static MODULESETUPPROTO(driSetup);
|
static MODULESETUPPROTO(driSetup);
|
||||||
|
|
||||||
|
drmServerInfo DRIDRMServerInfo;
|
||||||
|
|
||||||
static XF86ModuleVersionInfo VersRec =
|
static XF86ModuleVersionInfo VersRec =
|
||||||
{
|
{
|
||||||
"dri",
|
"dri",
|
||||||
|
@ -81,6 +84,9 @@ driSetup(pointer module, pointer opts, int *errmaj, int *errmin)
|
||||||
} else {
|
} else {
|
||||||
if (errmaj) *errmaj = LDR_ONCEONLY;
|
if (errmaj) *errmaj = LDR_ONCEONLY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
drmSetServerInfo(&DRIDRMServerInfo);
|
||||||
|
|
||||||
/* Need a non-NULL return value to indicate success */
|
/* Need a non-NULL return value to indicate success */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue