Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp965865iog; Thu, 30 Jun 2022 14:00:53 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u2tGz69E+Fl5yMB1zOfSCSBKF6KzLkQxZ7GXjBNMuyEvW/9V5FZ32O/InN4aqA2bk79v+w X-Received: by 2002:a17:90a:fd13:b0:1ec:7a40:3b5 with SMTP id cv19-20020a17090afd1300b001ec7a4003b5mr14110074pjb.8.1656622853568; Thu, 30 Jun 2022 14:00:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656622853; cv=none; d=google.com; s=arc-20160816; b=hmbhgEbiUq+GPZ/Zl3eH7XKTGshK5pcK8BOeLFKn0b7IBHYK1bHZ93N/W4tEK1OaAp AH9h18bTTdupGiuJnEqLteA1dwEXq/0vn1dRbsa1CPF/wwf4ANqh/llxMxjnunBI/lxe QXWhH/dlZ0qsAxCdrVK542LZqH58n6eJWHtUXVuRiN95uBTBtDpfZYcF25TsYiSgXBbR mw0DSF60JV/ROXLHHhRAsKNAZxMeAWkfGbRae19iyLo0Agb0F/LGztkD5SONl0hItW1M fodNcM/OgCwVjhkkDS0Mvarv4ZUG5+hy7P4mAKz3/6aHiew2/FRUYFT6LsE847FI2hgF 28Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=pjLzdshkHfVIkku8h1Xl91Wi9DJWQOyqv7MwJ+iI6IA=; b=YseYisrn5N/soEerk/dLuLVFA6chYSzGbk2pXsNbfBiWXACwD73IR5OWW74hqFiYru B/gvCpQshoHHDw8Nld9/1LPDpKYrjPvF4580JB6dVr9XhsCcWjxuh/nUgt0GyOgtnUoc 0gmL11MNRtbOcTaS6rHAXjiG6Sk9EpMGE+UB5QoWBMJOr9cjD9ecnoPuxhAikl3Snils cAjKOPB/6XYl/2yjDXxBGVqH3xn9D7W7Yeyd17h0rMvMxeGBRCxDz1H90qMyIS6sDkmE Z/lq4qFmYiEV2KfpPIuwpmbPAm+P67M0Fj6ukcGoBsrrOTSRcInoSBi528vESivf/0hd nlQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=I4mOxE+b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n8-20020a170903110800b0016aa0ab8fb6si5654313plh.595.2022.06.30.14.00.41; Thu, 30 Jun 2022 14:00:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=I4mOxE+b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236588AbiF3UHz (ORCPT + 99 others); Thu, 30 Jun 2022 16:07:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233722AbiF3UHy (ORCPT ); Thu, 30 Jun 2022 16:07:54 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEB544477D for ; Thu, 30 Jun 2022 13:07:53 -0700 (PDT) Received: from dimapc.. (109-252-118-164.nat.spd-mgts.ru [109.252.118.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id BC295660196E; Thu, 30 Jun 2022 21:07:51 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1656619672; bh=fQe6WVtNw91cgalOE6ap7AAoTYhUnv0DEj4h8o7y0kg=; h=From:To:Cc:Subject:Date:From; b=I4mOxE+b3FLSxEWjlF5GUcaaFgE19c4EftxLhQyBqemag+g0287kinB/kLyArR+v+ lIr182adlq+d/xUwX1iIJ8jhw+78J5C5eu1T3h5FpbrUOSTdD+VT2Q0rAca9uDWBDK RD+478eFmLtPN2wuTV29IOWC0ExD/KpIaA4EXCP7Pb4H1ZX1UlUnuIR/Gw93F3Blhc 2n2iQTJKQpPlf/r97QphltQUx1Ikbv/lGdOM2qtr367DFCvJs24sCXeySUeRLbiOr3 4L9D8rLbLdxhCaXpmcjTiWSAZYcFnxOnhrC/p4D8ETGhB83T5iBsIhNMfUJ3vDSLdZ t+8h4nyhmHDnA== From: Dmitry Osipenko To: David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Thomas Zimmermann , Emil Velikov , Robin Murphy , =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Dmitry Osipenko , kernel@collabora.com Subject: [PATCH v7 0/9] VirtIO-GPU driver fixes and improvements Date: Thu, 30 Jun 2022 23:07:17 +0300 Message-Id: <20220630200726.1884320-1-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series fixes few problem found in the VirtIO-GPU driver and makes couple improvements. The "DMA API usage improvement" patch will be needed later on when we will be about to add memory shrinker support to the driver, it also cleans up code nicely. Changelog: v7: - Factored out VirtIO fixes from [1] since I'll be working on the dma-buf locking in a separate patchset now. [1] https://lore.kernel.org/all/20220526235040.678984-1-dmitry.osipenko@collabora.com/ - Added r-b from Thomas Hellström. - Added more fixes-tags to the patches. - The part of the v6 "Correct drm_gem_shmem_get_sg_table() error handling" patch got merged into linux-next recent from another patch [2], but that patch missed to zero out shmem->pages on error. Hence I updated my patch to fix the merged fix. [2] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c24968734abfed81c8f93dc5f44a7b7a9aecadfa Dmitry Osipenko (9): drm/virtio: Correct drm_gem_shmem_get_sg_table() error handling drm/virtio: Check whether transferred 2D BO is shmem drm/virtio: Unlock reservations on virtio_gpu_object_shmem_init() error drm/virtio: Unlock reservations on dma_resv_reserve_fences() error drm/virtio: Use appropriate atomic state in virtio_gpu_plane_cleanup_fb() drm/virtio: Simplify error handling of virtio_gpu_object_create() drm/virtio: Improve DMA API usage for shmem BOs drm/virtio: Use dev_is_pci() drm/virtio: Return proper error codes instead of -1 drivers/gpu/drm/virtio/virtgpu_drv.c | 53 +++++--------------- drivers/gpu/drm/virtio/virtgpu_drv.h | 5 +- drivers/gpu/drm/virtio/virtgpu_gem.c | 4 +- drivers/gpu/drm/virtio/virtgpu_kms.c | 7 ++- drivers/gpu/drm/virtio/virtgpu_object.c | 65 ++++++------------------- drivers/gpu/drm/virtio/virtgpu_plane.c | 6 +-- drivers/gpu/drm/virtio/virtgpu_vq.c | 21 ++++---- 7 files changed, 47 insertions(+), 114 deletions(-) -- 2.36.1