nouveau: update to DRM API patchlevel 10
Finally let DRI build for nouveau.
This commit is contained in:
@@ -98,7 +98,7 @@ void nouveauWaitForIdle(nouveauContextPtr nmesa)
|
||||
// here we call the fifo initialization ioctl and fill in stuff accordingly
|
||||
GLboolean nouveauFifoInit(nouveauContextPtr nmesa)
|
||||
{
|
||||
struct drm_nouveau_fifo_alloc fifo_init;
|
||||
struct drm_nouveau_channel_alloc fifo_init;
|
||||
int i, ret;
|
||||
|
||||
#ifdef NOUVEAU_RING_DEBUG
|
||||
@@ -107,7 +107,7 @@ GLboolean nouveauFifoInit(nouveauContextPtr nmesa)
|
||||
|
||||
fifo_init.fb_ctxdma_handle = NvDmaFB;
|
||||
fifo_init.tt_ctxdma_handle = NvDmaTT;
|
||||
ret=drmCommandWriteRead(nmesa->driFd, DRM_NOUVEAU_FIFO_ALLOC, &fifo_init, sizeof(fifo_init));
|
||||
ret=drmCommandWriteRead(nmesa->driFd, DRM_NOUVEAU_CHANNEL_ALLOC, &fifo_init, sizeof(fifo_init));
|
||||
if (ret) {
|
||||
FATAL("Fifo initialization ioctl failed (returned %d)\n",ret);
|
||||
return GL_FALSE;
|
||||
|
||||
@@ -328,7 +328,7 @@ void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, __DRIsc
|
||||
static const __DRIversion ddx_expected = { 1, 2, 0 };
|
||||
static const __DRIversion dri_expected = { 4, 0, 0 };
|
||||
static const __DRIversion drm_expected = { 0, 0, NOUVEAU_DRM_HEADER_PATCHLEVEL };
|
||||
#if NOUVEAU_DRM_HEADER_PATCHLEVEL != 9
|
||||
#if NOUVEAU_DRM_HEADER_PATCHLEVEL != 10
|
||||
#error nouveau_drm.h version doesn't match expected version
|
||||
#endif
|
||||
dri_interface = interface;
|
||||
|
||||
@@ -39,25 +39,24 @@
|
||||
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); \
|
||||
volatile uint32_t *__v = (void*)nmesa->notifier_block + notifier->offset
|
||||
|
||||
struct drm_nouveau_notifier_alloc *
|
||||
struct drm_nouveau_notifierobj_alloc *
|
||||
nouveau_notifier_new(GLcontext *ctx, GLuint handle, GLuint count)
|
||||
{
|
||||
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
|
||||
struct drm_nouveau_notifier_alloc *notifier;
|
||||
struct drm_nouveau_notifierobj_alloc *notifier;
|
||||
int ret;
|
||||
|
||||
#ifdef NOUVEAU_RING_DEBUG
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
notifier = CALLOC_STRUCT(drm_nouveau_notifier_alloc);
|
||||
notifier = CALLOC_STRUCT(drm_nouveau_notifierobj_alloc);
|
||||
if (!notifier)
|
||||
return NULL;
|
||||
|
||||
notifier->channel = nmesa->fifo.channel;
|
||||
notifier->handle = handle;
|
||||
notifier->count = count;
|
||||
ret = drmCommandWriteRead(nmesa->driFd, DRM_NOUVEAU_NOTIFIER_ALLOC,
|
||||
ret = drmCommandWriteRead(nmesa->driFd, DRM_NOUVEAU_NOTIFIEROBJ_ALLOC,
|
||||
notifier, sizeof(*notifier));
|
||||
if (ret) {
|
||||
MESSAGE("Failed to create notifier 0x%08x: %d\n", handle, ret);
|
||||
@@ -70,7 +69,7 @@ nouveau_notifier_new(GLcontext *ctx, GLuint handle, GLuint count)
|
||||
|
||||
void
|
||||
nouveau_notifier_destroy(GLcontext *ctx,
|
||||
struct drm_nouveau_notifier_alloc *notifier)
|
||||
struct drm_nouveau_notifierobj_alloc *notifier)
|
||||
{
|
||||
/*XXX: free notifier object.. */
|
||||
FREE(notifier);
|
||||
@@ -78,7 +77,7 @@ nouveau_notifier_destroy(GLcontext *ctx,
|
||||
|
||||
void
|
||||
nouveau_notifier_reset(GLcontext *ctx,
|
||||
struct drm_nouveau_notifier_alloc *notifier,
|
||||
struct drm_nouveau_notifierobj_alloc *notifier,
|
||||
GLuint id)
|
||||
{
|
||||
NOTIFIER(n);
|
||||
@@ -96,7 +95,7 @@ nouveau_notifier_reset(GLcontext *ctx,
|
||||
|
||||
GLuint
|
||||
nouveau_notifier_status(GLcontext *ctx,
|
||||
struct drm_nouveau_notifier_alloc *notifier,
|
||||
struct drm_nouveau_notifierobj_alloc *notifier,
|
||||
GLuint id)
|
||||
{
|
||||
NOTIFIER(n);
|
||||
@@ -106,7 +105,7 @@ nouveau_notifier_status(GLcontext *ctx,
|
||||
|
||||
GLuint
|
||||
nouveau_notifier_return_val(GLcontext *ctx,
|
||||
struct drm_nouveau_notifier_alloc *notifier,
|
||||
struct drm_nouveau_notifierobj_alloc *notifier,
|
||||
GLuint id)
|
||||
{
|
||||
NOTIFIER(n);
|
||||
@@ -116,7 +115,7 @@ nouveau_notifier_return_val(GLcontext *ctx,
|
||||
|
||||
GLboolean
|
||||
nouveau_notifier_wait_status(GLcontext *ctx,
|
||||
struct drm_nouveau_notifier_alloc *notifier,
|
||||
struct drm_nouveau_notifierobj_alloc *notifier,
|
||||
GLuint id, GLuint status, GLuint timeout)
|
||||
{
|
||||
NOTIFIER(n);
|
||||
@@ -150,7 +149,7 @@ nouveau_notifier_wait_status(GLcontext *ctx,
|
||||
|
||||
void
|
||||
nouveau_notifier_wait_nop(GLcontext *ctx,
|
||||
struct drm_nouveau_notifier_alloc *notifier,
|
||||
struct drm_nouveau_notifierobj_alloc *notifier,
|
||||
GLuint subc)
|
||||
{
|
||||
NOTIFIER(n);
|
||||
|
||||
@@ -47,24 +47,24 @@
|
||||
#define NV_NOTIFY 0x00000104
|
||||
#define NV_NOTIFY_STYLE_WRITE_ONLY 0
|
||||
|
||||
extern struct drm_nouveau_notifier_alloc *
|
||||
extern struct drm_nouveau_notifierobj_alloc *
|
||||
nouveau_notifier_new(GLcontext *, GLuint handle, GLuint count);
|
||||
extern void
|
||||
nouveau_notifier_destroy(GLcontext *, struct drm_nouveau_notifier_alloc *);
|
||||
nouveau_notifier_destroy(GLcontext *, struct drm_nouveau_notifierobj_alloc *);
|
||||
extern void
|
||||
nouveau_notifier_reset(GLcontext *, struct drm_nouveau_notifier_alloc *,
|
||||
nouveau_notifier_reset(GLcontext *, struct drm_nouveau_notifierobj_alloc *,
|
||||
GLuint id);
|
||||
extern GLuint
|
||||
nouveau_notifier_status(GLcontext *, struct drm_nouveau_notifier_alloc *,
|
||||
nouveau_notifier_status(GLcontext *, struct drm_nouveau_notifierobj_alloc *,
|
||||
GLuint id);
|
||||
extern GLuint
|
||||
nouveau_notifier_return_val(GLcontext *, struct drm_nouveau_notifier_alloc *,
|
||||
nouveau_notifier_return_val(GLcontext *, struct drm_nouveau_notifierobj_alloc *,
|
||||
GLuint id);
|
||||
extern GLboolean
|
||||
nouveau_notifier_wait_status(GLcontext *, struct drm_nouveau_notifier_alloc *,
|
||||
nouveau_notifier_wait_status(GLcontext *, struct drm_nouveau_notifierobj_alloc *,
|
||||
GLuint id, GLuint status, GLuint timeout);
|
||||
extern void
|
||||
nouveau_notifier_wait_nop(GLcontext *ctx, struct drm_nouveau_notifier_alloc *,
|
||||
nouveau_notifier_wait_nop(GLcontext *ctx, struct drm_nouveau_notifierobj_alloc *,
|
||||
GLuint subc);
|
||||
|
||||
extern GLboolean nouveauSyncInitFuncs(GLcontext *ctx);
|
||||
|
||||
Reference in New Issue
Block a user