Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp83194ybi; Tue, 16 Jul 2019 16:41:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzIIghCoRa+2MMGDG7iv+LgoFPkN7u3YYpfm+c0lX1tIH+FkwYp7oh32fEPxrg/73WP6mhc X-Received: by 2002:a65:5687:: with SMTP id v7mr37825738pgs.263.1563320480294; Tue, 16 Jul 2019 16:41:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563320480; cv=none; d=google.com; s=arc-20160816; b=v+/ZLDjK6hHDfvl2LbSLAEulwVB7rhr117+nJv+yuFtWIbkTRa74qJspBfNo4bzojI rJI7L4Bj4hNx3JX/XmYMyFVZ8EbHU9IRKUI5h1pdjYvHg2/OeaaPkX03NJGGa6hQ3Qtf WEqmLqP9lznCFKPrjqcRnO5HPxyJkdN+NT4jDtiCvpYVRQtQn0ti9k7Q3qdzCPvySZUA l320FmvaN7RYdNCXoAn4pvZ9JgvtjJkRBrJd2uKjQcBAcadFt8Q/xo9MW/L8bkMtLmNM S0fCUEalfNi6hJLyHGI+2gkPopGd1lGBxBV0sYaXJefqiuD24kpnhiNfkeOsVwMflJUv lt7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from; bh=eXtoQJV56YzgNo+ka8Qk8kwegYPQDLoFNE+QJWp4Et0=; b=VwsbQbwaKHu4hrJyM3lrl/96CFto/L1XYJogL6mi510pTByxsVz9heXe5lrq5mg5pB 2bNf24EwF0usaYVx+U8ipk8l3CmRlXeLQboL2FnSAzg4RU8EGeZJ5vsZfUAr1t12EP0D FT7GCvddxnm/Mo7AJ62M7b9wtufe0DImxf8+iYkw3VgBpX0voYYJbovHN4qPcDHhi6Px 60k2rLHu+IXxEo/Q/Oo5f05tf1IsnROfGW2UFzKbPkbPs8BFtohevnSzyCaKYVGnmii2 bgbxHwctTFLGkf2FT6fwH7tiz7d+iiR8jIaG1vhdM1OnBFDEzTpqJ7BBChb08ATE1J4N UHWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ci23si19408783pjb.106.2019.07.16.16.41.03; Tue, 16 Jul 2019 16:41:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729003AbfGPXjO (ORCPT + 99 others); Tue, 16 Jul 2019 19:39:14 -0400 Received: from anholt.net ([50.246.234.109]:54008 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726446AbfGPXjO (ORCPT ); Tue, 16 Jul 2019 19:39:14 -0400 Received: from localhost (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id 9682C10A264A; Tue, 16 Jul 2019 16:39:13 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at anholt.net Received: from anholt.net ([127.0.0.1]) by localhost (kingsolver.anholt.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12F3ajGnutvd; Tue, 16 Jul 2019 16:39:12 -0700 (PDT) Received: from eliezer.anholt.net (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id 61F0710A1AE9; Tue, 16 Jul 2019 16:39:12 -0700 (PDT) Received: by eliezer.anholt.net (Postfix, from userid 1000) id 600D12FE2547; Tue, 16 Jul 2019 16:39:13 -0700 (PDT) From: Eric Anholt To: Rob Clark , dri-devel@lists.freedesktop.org Cc: Chris Wilson , Intel Graphics Development , Rob Clark , David Airlie , Daniel Vetter , Emil Velikov , Eric Biggers , Deepak Sharma , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/3] drm/vgem: use normal cached mmap'ings In-Reply-To: <20190716213746.4670-3-robdclark@gmail.com> References: <20190716213746.4670-1-robdclark@gmail.com> <20190716213746.4670-3-robdclark@gmail.com> User-Agent: Notmuch/0.22.2+1~gb0bcfaa (http://notmuchmail.org) Emacs/26.1 (x86_64-pc-linux-gnu) Date: Tue, 16 Jul 2019 16:39:11 -0700 Message-ID: <87lfwxh7mo.fsf@anholt.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Rob Clark writes: > From: Rob Clark > > Since there is no real device associated with VGEM, it is impossible to > end up with appropriate dev->dma_ops, meaning that we have no way to > invalidate the shmem pages allocated by VGEM. So, at least on platforms > without drm_cflush_pages(), we end up with corruption when cache lines > from previous usage of VGEM bo pages get evicted to memory. > > The only sane option is to use cached mappings. This may be an improvement, but... pin/unpin is only on attaching/closing the dma-buf, right? So, great, you flushed the cached map once after exporting the vgem dma-buf to the actual GPU device, but from then on you still have no interface for getting coherent access through VGEM's mapping again, which still exists. I feel like this is papering over something that's really just broken, and we should stop providing VGEM just because someone wants to write dma-buf test code without driver-specific BO alloc ioctl code. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAl0uYB8ACgkQtdYpNtH8 nugJRw/9EiWQGRfpgMVOaSPrCIjAmsQZR/yI4mMxq6i3W567axR5MUXdes8PKkJW 5LDqVM4OBs7GY/Rl76LiSO+LeMXuUH57MYAhsvzeweB4vkuPibrFjPLhzHdRz5/P augC8mcdlSuP7xZKKGlMuOHfNsMipAZR0lOT+yiVfZ+UfWLNXTky5moA33yyPT1n d3YuPIYFWUrZxwGlEQocBJUE6Us5lMieNWdfuAFk9Uhqtz47N8KwbnKPW0FkVKuF E3oedpmxIyySwWF16gJn0jwy9gYtnmxyFmSk57V2F8fNvnwGP9JWkpAZEEqv4NMy vhWf+lUHxSVj48oWg0B7jXliFA50qjeJA3cQWujXyaKusV99ujoQzWzxAWCWhDCG K/kSMHgkLTbz+hOSXfOupKLV7I0aysXZB/USQOln/wSk6AajkEzYMr6l2BxZWuko BcGoBCmt6z77yqyAbQOPWuP0LivFore0bLQyXauOSOV8fkUpmx8gNXtkUPy9drCs axR3qVp0pfLItCdFTUXhV594hX3J4aN9SMojcAW+Lfmw8/3xDwEPWM5eAR10b2uo QioDDThXBXTrc6Vx/NEIouY9zMPuD/mWknuS06x84HmLmFNj0MaD96CQU4yjy5he eg2k8an5SqjXoSVC2Pk3Cm3A3Yq4P9FHMiUh9wWtj78r0yIO9j8= =koaP -----END PGP SIGNATURE----- --=-=-=--