From patchwork Fri Feb 23 00:00:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10236635 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 8A50060225 for ; Fri, 23 Feb 2018 00:00:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C74F29095 for ; Fri, 23 Feb 2018 00:00:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 70B492908E; Fri, 23 Feb 2018 00:00:07 +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.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID 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 D2FD12908E for ; Fri, 23 Feb 2018 00:00:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 88DA76EDA3; Fri, 23 Feb 2018 00:00:05 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ua0-x243.google.com (mail-ua0-x243.google.com [IPv6:2607:f8b0:400c:c08::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6D7A66ED89 for ; Fri, 23 Feb 2018 00:00:04 +0000 (UTC) Received: by mail-ua0-x243.google.com with SMTP id m43so4549158uah.1 for ; Thu, 22 Feb 2018 16:00:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Jxt1bT/POKdtMrRDpTeUgWBIfwjMKrcWxDPuReLvCns=; b=TolugBYvVUr+pGxYhTRUtUzPbTePWi4Dr+67+dLmIRmT77ZCCRDZVSw2kFILmo/N2w 3M1Wqth6SNRZyw9LQ2EMdogZ7N4oUNsLbWp68J8UdkFanF577w0+YCkOR+VLoMXLROw4 wlDxQrUJvINBxS4TwroPR/gpQMIr7ondwbDnMf5lEYzJTm1XhKyq7ZIhHxZ45nVlSfGX jjsytu/D1RgOEBeCrGSMb+MUn25B0MrN74QNhbYAY9SHbyMqZiDvfbkBkNiuuvX//dcK oXUGFURc1a3T/SuoBnCM7UwMvz3yRlAhHNphqnzeG6bm4zdZ7ewanuhMS+DRzJQD0tCS izHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Jxt1bT/POKdtMrRDpTeUgWBIfwjMKrcWxDPuReLvCns=; b=lwyfnV5Cx5wDUpC6cL/5020kYbnZLGjsfppGH30XYFC+pp30d/TnHVCs+utpwBeJo2 x+vq3XtSQhzXzE532kLR329jzcwhB27n2XPTN4N26ujwwCUNYpA02jJy7hF/e2UWXHK9 Ty0Z3TUQzeiYya36XnbpzlD/y4aqTzMuZXE9Gty5GePFkSgMUm/p/gjxzrl+rvhpYXep ep6TRm+GQi1nFmODJtB/WNMDU+CowtzCcaSd+BpuyMEH1KVCRqx+09GFinb/4ZvW9LQn E7FyO+dJQ7kx/84d1GaPNdK1AE1LVBfmJ0KFArYHOfz3xwmDSQLZaQvlF8DgZO0L1T0L DcMA== X-Gm-Message-State: APf1xPDta40mIRJGIjDMZPXB4m39xGEJdv+p6+m1PvrPBXzVnJDdJW/s vX1RLlJzWwFfbnCZ6EM/d7U= X-Google-Smtp-Source: AH8x2255pi93CFN2BoIYQwsPbnVXDpf5eVKCjq4wnr9r/vnX7XV5mwt9VC87SVwdkYI7mTHQQK3woA== X-Received: by 10.176.75.109 with SMTP id i45mr6585367uaf.120.1519344003405; Thu, 22 Feb 2018 16:00:03 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id d11sm744656vke.37.2018.02.22.16.00.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Feb 2018 16:00:02 -0800 (PST) Date: Thu, 22 Feb 2018 21:00:00 -0300 From: Rodrigo Siqueira To: David Airlie , Gerd Hoffmann Subject: [PATCH 2/7] drm/virtio: Add blank line after variable declarations Message-ID: <41767852ff9dc584c825e32db6222b9a311603b9.1519343668.git.rodrigosiqueiramelo@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes the checkpatch.pl warnings: virtgpu_drv.c:57: WARNING: Missing a blank line after declarations virtgpu_display.c:99: WARNING: Missing a blank line after declarations ... Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/virtio/virtgpu_display.c | 1 + drivers/gpu/drm/virtio/virtgpu_drv.c | 1 + drivers/gpu/drm/virtio/virtgpu_fb.c | 4 ++++ drivers/gpu/drm/virtio/virtgpu_gem.c | 1 + drivers/gpu/drm/virtio/virtgpu_ioctl.c | 2 ++ drivers/gpu/drm/virtio/virtgpu_vq.c | 3 +++ 6 files changed, 12 insertions(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c index 22513d7f895c..2d1b25630c0e 100644 --- a/drivers/gpu/drm/virtio/virtgpu_display.c +++ b/drivers/gpu/drm/virtio/virtgpu_display.c @@ -96,6 +96,7 @@ virtio_gpu_framebuffer_init(struct drm_device *dev, { int ret; struct virtio_gpu_object *bo; + vgfb->obj = obj; bo = gem_to_virtio_gpu_obj(obj); diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c index 49a3d8d5a249..5d21433b1cdf 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.c +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c @@ -54,6 +54,7 @@ static int virtio_gpu_probe(struct virtio_device *vdev) static void virtio_gpu_remove(struct virtio_device *vdev) { struct drm_device *dev = vdev->priv; + drm_put_dev(dev); } diff --git a/drivers/gpu/drm/virtio/virtgpu_fb.c b/drivers/gpu/drm/virtio/virtgpu_fb.c index 15d18fd0c64b..b933cbba0685 100644 --- a/drivers/gpu/drm/virtio/virtgpu_fb.c +++ b/drivers/gpu/drm/virtio/virtgpu_fb.c @@ -127,6 +127,7 @@ int virtio_gpu_surface_dirty(struct virtio_gpu_framebuffer *vgfb, int left, right, top, bottom; int i; int inc = 1; + if (!num_clips) { num_clips = 1; clips = &norect; @@ -172,6 +173,7 @@ static void virtio_gpu_3d_fillrect(struct fb_info *info, const struct fb_fillrect *rect) { struct virtio_gpu_fbdev *vfbdev = info->par; + drm_fb_helper_sys_fillrect(info, rect); virtio_gpu_dirty_update(&vfbdev->vgfb, true, rect->dx, rect->dy, rect->width, rect->height); @@ -182,6 +184,7 @@ static void virtio_gpu_3d_copyarea(struct fb_info *info, const struct fb_copyarea *area) { struct virtio_gpu_fbdev *vfbdev = info->par; + drm_fb_helper_sys_copyarea(info, area); virtio_gpu_dirty_update(&vfbdev->vgfb, true, area->dx, area->dy, area->width, area->height); @@ -192,6 +195,7 @@ static void virtio_gpu_3d_imageblit(struct fb_info *info, const struct fb_image *image) { struct virtio_gpu_fbdev *vfbdev = info->par; + drm_fb_helper_sys_imageblit(info, image); virtio_gpu_dirty_update(&vfbdev->vgfb, true, image->dx, image->dy, image->width, image->height); diff --git a/drivers/gpu/drm/virtio/virtgpu_gem.c b/drivers/gpu/drm/virtio/virtgpu_gem.c index 92fb27753b9e..0f2768eacaee 100644 --- a/drivers/gpu/drm/virtio/virtgpu_gem.c +++ b/drivers/gpu/drm/virtio/virtgpu_gem.c @@ -124,6 +124,7 @@ int virtio_gpu_mode_dumb_mmap(struct drm_file *file_priv, { struct drm_gem_object *gobj; struct virtio_gpu_object *obj; + BUG_ON(!offset_p); gobj = drm_gem_object_lookup(file_priv, handle); if (gobj == NULL) diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c index 5720a0d4ac0a..86243f131fc1 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c @@ -83,6 +83,7 @@ static void virtio_gpu_unref_list(struct list_head *head) struct ttm_validate_buffer *buf; struct ttm_buffer_object *bo; struct virtio_gpu_object *qobj; + list_for_each_entry(buf, head, head) { bo = buf->bo; qobj = container_of(bo, struct virtio_gpu_object, tbo); @@ -478,6 +479,7 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev, int ret; struct virtio_gpu_drv_cap_cache *cache_ent; void *ptr; + if (vgdev->num_capsets == 0) return -ENOSYS; diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index 9eb96fb2c147..16c05bc34bef 100644 --- a/drivers/gpu/drm/virtio/virtgpu_vq.c +++ b/drivers/gpu/drm/virtio/virtgpu_vq.c @@ -62,6 +62,7 @@ void virtio_gpu_ctrl_ack(struct virtqueue *vq) { struct drm_device *dev = vq->vdev->priv; struct virtio_gpu_device *vgdev = dev->dev_private; + schedule_work(&vgdev->ctrlq.dequeue_work); } @@ -69,6 +70,7 @@ void virtio_gpu_cursor_ack(struct virtqueue *vq) { struct drm_device *dev = vq->vdev->priv; struct virtio_gpu_device *vgdev = dev->dev_private; + schedule_work(&vgdev->cursorq.dequeue_work); } @@ -852,6 +854,7 @@ int virtio_gpu_object_attach(struct virtio_gpu_device *vgdev, if (!obj->pages) { int ret; + ret = virtio_gpu_object_get_sg_table(vgdev, obj); if (ret) return ret;