radeon: Fix command type for DRM_RADEON_IRQ_EMIT ioctl.
authorOwain Ainsworth <zerooa@googlemail.com>
Sun, 18 Apr 2010 23:55:37 +0000 (16:55 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 19 Apr 2010 15:33:50 +0000 (09:33 -0600)
This should be drmCommandWriteRead to avoid an EINVAL error on systems
that strictly check ioctl args. This command has been r/w for ever.
Discussion with airlied agreed that this was the correct course.

Signed-off-by: Brian Paul <brianp@vmware.com>
src/mesa/drivers/dri/radeon/radeon_cs_legacy.c

index cc951a12cbc46691e9f1126085cc0c5442c35c40..c2722a4e1951e9b514bdedc7c97beb08674bcf4b 100644 (file)
@@ -326,7 +326,7 @@ static int cs_emit(struct radeon_cs_int *cs)
         (!IS_R600_CLASS(csm->ctx->radeonScreen))) { /* +r6/r7 : No irq for r6/r7 yet. */
        drm_radeon_irq_emit_t emit_cmd;
        emit_cmd.irq_seq = (int*)&csm->pending_age;
-       r = drmCommandWrite(cs->csm->fd, DRM_RADEON_IRQ_EMIT, &emit_cmd, sizeof(emit_cmd));
+       r = drmCommandWriteRead(cs->csm->fd, DRM_RADEON_IRQ_EMIT, &emit_cmd, sizeof(emit_cmd));
        if (r) {
                return r;
        }