From patchwork Wed Aug 31 16:26:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 9307521 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 172FD60487 for ; Wed, 31 Aug 2016 16:27:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0920128FB0 for ; Wed, 31 Aug 2016 16:27:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F1A5828FB2; Wed, 31 Aug 2016 16:26:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 77E0628FB0 for ; Wed, 31 Aug 2016 16:26:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E55236E1D4; Wed, 31 Aug 2016 16:26:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk0-f196.google.com (mail-qk0-f196.google.com [209.85.220.196]) by gabe.freedesktop.org (Postfix) with ESMTPS id 658406E1D4 for ; Wed, 31 Aug 2016 16:26:56 +0000 (UTC) Received: by mail-qk0-f196.google.com with SMTP id r128so3831595qkc.1 for ; Wed, 31 Aug 2016 09:26:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=U4lZuqLPdoA4tWTJDZnyrT0xR/Pc5xG3Sze7n5dYhRw=; b=DCxA3yPbjRCjnU84rqnIpNE4z1ezAlUlNnIHv1l5HBGD1AVEGz0dKOL3RlE7s1deJx 7XX1nw4Xiat3sw5XghSliU5srWfuw3A4hjDEp9wIKTo6z9eNhvCb0grVHUIrg6rD7mQA EjTdjuTrztPIS+V4ZXh3wUBxUsWW0erddZffJmGdfl0t5NVWIXPtvTkyX0jT6aPSroyI E6bkHWKaZ1HKlnMs2nXRNSXKK6jiPhE8GG4GHNBIAlB+lFq2QvVB6YfDsuCW71c1dXxa qZ5PZHZvKSLyAy6Rj00RllVPLekar/Paf/sOg0IeRdZGqjRFEzfYhlv62dycRzwM19CU etWA== X-Gm-Message-State: AE9vXwNv5XOAMIRdOUyUfAKlAHEgRxKAo7ENYfEiki6528S8J3M7TH1B9xk2khLt3Z4dJA== X-Received: by 10.55.203.23 with SMTP id d23mr9075935qkj.99.1472660815566; Wed, 31 Aug 2016 09:26:55 -0700 (PDT) Received: from jade.localdomain (modemcable154.55-37-24.static.videotron.ca. [24.37.55.154]) by smtp.gmail.com with ESMTPSA id e33sm334771qta.47.2016.08.31.09.26.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Aug 2016 09:26:54 -0700 (PDT) From: Gustavo Padovan To: David Airlie Subject: [PATCH 1/2] drm/virtio: drop virtio_gpu_execbuffer_ioctl() wrapping Date: Wed, 31 Aug 2016 12:26:52 -0400 Message-Id: <1472660813-28219-1-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.5.5 Cc: open list , Gustavo Padovan , Gerd Hoffmann , "open list:VIRTIO GPU DRIVER" , "open list:VIRTIO GPU DRIVER" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Gustavo Padovan Instead of wrapping virtio_gpu_execbuffer() to execute the ioctl just execute it directly. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c index c046903..e0613a9 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c @@ -89,10 +89,16 @@ static void virtio_gpu_unref_list(struct list_head *head) } } -static int virtio_gpu_execbuffer(struct drm_device *dev, - struct drm_virtgpu_execbuffer *exbuf, +/* + * Usage of execbuffer: + * Relocations need to take into account the full VIRTIO_GPUDrawable size. + * However, the command as passed from user space must *not* contain the initial + * VIRTIO_GPUReleaseInfo struct (first XXX bytes) + */ +static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data, struct drm_file *drm_file) { + struct drm_virtgpu_execbuffer *exbuf = data; struct virtio_gpu_device *vgdev = dev->dev_private; struct virtio_gpu_fpriv *vfpriv = drm_file->driver_priv; struct drm_gem_object *gobj; @@ -182,20 +188,6 @@ out_free: return ret; } -/* - * Usage of execbuffer: - * Relocations need to take into account the full VIRTIO_GPUDrawable size. - * However, the command as passed from user space must *not* contain the initial - * VIRTIO_GPUReleaseInfo struct (first XXX bytes) - */ -static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data, - struct drm_file *file_priv) -{ - struct drm_virtgpu_execbuffer *execbuffer = data; - return virtio_gpu_execbuffer(dev, execbuffer, file_priv); -} - - static int virtio_gpu_getparam_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) {