Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp64801ybi; Thu, 1 Aug 2019 14:43:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqz61f7OojIkse260d24OAgKnx3joAdoqwXo2OLcIb6OrWqMUu8ACkD4XXeAsohiD59VTRwP X-Received: by 2002:a17:90a:6546:: with SMTP id f6mr879803pjs.11.1564695817982; Thu, 01 Aug 2019 14:43:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564695817; cv=none; d=google.com; s=arc-20160816; b=zKG38JAsEUQhBhN+8dh56E4H6qZZHUlN07bb1HEbUjceTCBlv8/pipXFg18HKZS71S tsuas5ECc4eGtOoaYba3T1kUbGB1ym97ZgEodKUbEWcZGh+pb4eC94TosYoUgIA7m9lN hx4octOLtpPG12Sw6ZkQokC3uvRlftRbcn0zhptnRRTB8JmWSEWFMUPWm7zLnL4qNiM4 V4J/MaDqqQcD02yXeDYbnuATVJoiwW4CuKWo+hpVQGaZnlFW+Wox1Xtut2zGQ76FIVVu aKiEFYYCW5SvclrakZzj9/u2eWzOm+BhkRXmE8PNffMZCBHJlqowv+okpUDlCKWcI3vQ X8dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=8bv7pMvKKkwIVkPngNqkQL32dHUrGECTsk1mbuiRZ6Y=; b=rjJiMq2740HphgxwOIQVMMgj0gdrYgKxEdiB9yw8QzmI457rlVS9VZMxBQbnqqy8Hi Hc8fNlntzPfRpvHHUGY6XncpmSwmpt+dCExvke7guWDbLotgLF7lX7uPKuIGy95FApIu b8mTghwlXQi56k/fmvdE0MmFuWwaVvpWNxZfFcuDIgkAdxhXPFHChypq6Sk/xAdkn1eI 12oe1crCTkoZAoDq7kf75lJ64jjIYFXv4WpH6aXXdh7cVa7EfhWQwY3NFeRNV4t50DzO UOLe6pfrl81A0iwxWiqEaz37JjVB35ujr3A6VIekKggZwFm5GpxfsQFvSykFMBGEdqRb VhMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cpQYBnfE; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si24938237pgr.196.2019.08.01.14.43.22; Thu, 01 Aug 2019 14:43:37 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cpQYBnfE; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732609AbfHAQDZ (ORCPT + 99 others); Thu, 1 Aug 2019 12:03:25 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:35041 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731613AbfHAQDY (ORCPT ); Thu, 1 Aug 2019 12:03:24 -0400 Received: by mail-ed1-f67.google.com with SMTP id w20so69650298edd.2 for ; Thu, 01 Aug 2019 09:03:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8bv7pMvKKkwIVkPngNqkQL32dHUrGECTsk1mbuiRZ6Y=; b=cpQYBnfEwZGYGSuEI2Ta4BNuagzeeveyUz78G9FTN/tEe0rihxa0KsOcTqnGSxQNRf dj4Cf9pzh7oWs8AYlaBz0ofguT7UGDU7TtKIT+WpbHaYXrC9s89pSKJ2WGlYdnQ7lOY/ KRAOd4GNhuLR+xbgjoWetjCgl//kZ55tckwtc0oHXCm8GCu7b+fG5t//mOtL5IrAb1bC 0LfUCA691M+CFnBBDYy48eNc4LflS+Oxz5WO4h4mO40KGl8daErq80zimXP8vyo65gox FDvsLqNFNUo6YlMFC+Vke9U3nG6yVZBhdofiu2gdUP5cpecifP7ZOsqxar3TS2/rS9qK Onlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8bv7pMvKKkwIVkPngNqkQL32dHUrGECTsk1mbuiRZ6Y=; b=QXVUWzIAFQu7vnBfYymCHh4XpAAAkHQ832eF2t6sWMco2x2mxPB2OFrSuYCh9Moo6V P/i6jSoZPa7XoDAUPTl/+s07pkf883cRaCAbvmnAuZoE0yRobBlxUHo6XKYcuKUyNiP2 JWq7hW7jkFUHkLebOOa5R+3UXCBm0n64MPc1ej7AJsPlR0k9qhGVSIuy/FdTbz+K/dwF JvFau8OGKPPqooUOVA+O4nnRgJmePYuFoeFl/BlWIqYttAZieRgeFEdk8kvyjZYX+tNU wP7BqNut6/cpmxwGr5te2eLDMS/GjaW2gGGRKOu/BF1o/I1iIA9KwAn9WVHRjZQTq42k AMTA== X-Gm-Message-State: APjAAAX/hdqWOO8AMjjabir5CsY2/2UwFAtSqbCjRh5X4pCbdGjhlMeJ 1ISeubGxPCvJ4Sg4WDTXc0QoQGXg0YNm6NkDVBs= X-Received: by 2002:a17:906:6bc4:: with SMTP id t4mr103366912ejs.256.1564675074054; Thu, 01 Aug 2019 08:57:54 -0700 (PDT) MIME-Version: 1.0 References: <20190717211542.30482-1-robdclark@gmail.com> <20190719092153.GJ15868@phenom.ffwll.local> <20190731192331.GT104440@art_vandelay> <156466322613.6045.7313079853087889718@skylake-alporthouse-com> <156467364918.6045.9820603183181141608@skylake-alporthouse-com> In-Reply-To: <156467364918.6045.9820603183181141608@skylake-alporthouse-com> From: Rob Clark Date: Thu, 1 Aug 2019 08:57:42 -0700 Message-ID: Subject: Re: [PATCH] drm/vgem: fix cache synchronization on arm/arm64 To: Chris Wilson Cc: David Airlie , Deepak Sharma , Emil Velikov , Eric Anholt , Eric Biggers , Imre Deak , Rob Clark , Sean Paul , Thomas Zimmermann , dri-devel , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 1, 2019 at 8:34 AM Chris Wilson wrote: > > Quoting Rob Clark (2019-08-01 16:18:45) > > On Thu, Aug 1, 2019 at 5:40 AM Chris Wilson wrote: > > > > > > Quoting Sean Paul (2019-07-31 20:23:31) > > > > On Fri, Jul 19, 2019 at 11:21:53AM +0200, Daniel Vetter wrote: > > > > > On Wed, Jul 17, 2019 at 02:15:37PM -0700, Rob Clark wrote: > > > > > > From: Rob Clark > > > > > > > > > > > > drm_cflush_pages() is no-op on arm/arm64. But instead we can use > > > > > > dma_sync API. > > > > > > > > > > > > Fixes failures w/ vgem_test. > > > > > > > > > > > > Signed-off-by: Rob Clark > > > > > > --- > > > > > > An alternative approach to the series[1] I sent yesterday > > > > > > > > > > > > On the plus side, it keeps the WC buffers and avoids any drm core > > > > > > changes. On the minus side, I don't think it will work (at least > > > > > > on arm64) prior to v5.0[2], so the fix can't be backported very > > > > > > far. > > > > > > > > > > Yeah seems a lot more reasonable. > > > > > > > > > > Acked-by: Daniel Vetter > > > > > > > > Applied to drm-misc-fixes, thanks! > > > > > > But it didn't actually fix the failures in CI. > > > > Hmm, that is unfortunate, I'd assumed that silence meant latest > > version was working in CI.. > > Ah, takes a intel-gfx@ for CI to pick up patches atm. > > > dma_sync_sg_* doesn't work on x86? It would be kinda unfortunate to > > have vgem only work on x86 *or* arm.. maybe bringing back > > drm_cflush_pages() could make it work in both cases > > I think it stems from the expectation that vgem provides "device > coherency" for CPU access. From the testing perspective, it's nice to > emulate HW interactions; but maybe that is just beyond the general > capabilities and we cannot simply use vgem as we do currently. That > would leave a hole for mocking prime in CI that needs filling :( yeah, being a "fake" device makes things a bit rough.. (I wonder if there is some way to do a VM w/ both virgl and i915/gvt to get some more "real" testing?) OTOH, I kinda want to make drm_cache work on arm64, since dma-mapping is already problematic, which would make this patch unnecessary. (I'm still not entirely sure what to do about 32b arm..) BR, -R