From patchwork Wed Jun 5 04:55:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Gray X-Patchwork-Id: 2664811 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 43423DF264 for ; Wed, 5 Jun 2013 05:19:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D9414E6382 for ; Tue, 4 Jun 2013 22:19:16 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 1330 seconds by postgrey-1.32 at gabe; Tue, 04 Jun 2013 22:17:55 PDT Received: from lechuck.jsg.id.au (jsg.id.au [210.15.216.215]) by gabe.freedesktop.org (Postfix) with ESMTP id 999B3E5C8E for ; Tue, 4 Jun 2013 22:17:55 -0700 (PDT) Received: from carla.jsg.id.au (root@carla.jsg.id.au [192.168.1.42]) by lechuck.jsg.id.au (8.14.6/8.14.6) with ESMTP id r554th3Y017915 for ; Wed, 5 Jun 2013 14:55:43 +1000 (EST) Received: from carla.jsg.id.au (jsg@localhost.jsg.id.au [127.0.0.1]) by carla.jsg.id.au (8.14.6/8.14.3) with ESMTP id r554th3c022147 for ; Wed, 5 Jun 2013 14:55:43 +1000 (EST) Received: (from jsg@localhost) by carla.jsg.id.au (8.14.6/8.14.3/Submit) id r554tgc0016256 for dri-devel@lists.freedesktop.org; Wed, 5 Jun 2013 14:55:42 +1000 (EST) Date: Wed, 5 Jun 2013 14:55:42 +1000 From: Jonathan Gray To: dri-devel@lists.freedesktop.org Subject: [PATCH] radeon: correct RADEON_GEM_WAIT_IDLE use Message-ID: <20130605045542.GA27999@mail.netspace.net.au> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org RADEON_GEM_WAIT_IDLE is declared DRM_IOW but libdrm uses it with drmCommandWriteRead instead of drmCommandWrite which leads to the ioctl being unmatched and returning an error on at least OpenBSD. Problem noticed by and patch from Mark Kettenis. Signed-off-by: Jonathan Gray --- radeon/radeon_bo_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git radeon/radeon_bo_gem.c radeon/radeon_bo_gem.c index fca0aaf..4ea405f 100644 --- radeon/radeon_bo_gem.c +++ radeon/radeon_bo_gem.c @@ -211,8 +211,8 @@ static int bo_wait(struct radeon_bo_int *boi) memset(&args, 0, sizeof(args)); args.handle = boi->handle; do { - ret = drmCommandWriteRead(boi->bom->fd, DRM_RADEON_GEM_WAIT_IDLE, - &args, sizeof(args)); + ret = drmCommandWrite(boi->bom->fd, DRM_RADEON_GEM_WAIT_IDLE, + &args, sizeof(args)); } while (ret == -EBUSY); return ret; }