Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1125885ybi; Tue, 16 Jul 2019 10:00:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8cgaTyv+oSB//ij688tDPtNxg0DttoKwXXy0V7H5Zphrc6QUhPdqrLFt7BRoWAN5/PP61 X-Received: by 2002:a17:90a:2041:: with SMTP id n59mr36554851pjc.6.1563296452972; Tue, 16 Jul 2019 10:00:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563296452; cv=none; d=google.com; s=arc-20160816; b=JPGzF8XUdZCEcWncWnN6G5OG2xcBivUM+VMxQpX2pcHOgRJIoyGJyW2EB+Zlo0XZ4D sTkTI7h/RStEPNbKoOkUVDyTcjO7ONtoljYyfkb/K/bSyM9SQ+58Os7Vj9I0VUKxC1sb qc2X3OqAHjUDK+bS4nwD5jR1Kai9RWXZghc5JfzBi/gLx0A1nG3iO+caW7pe2qx/uCVc Gky/hwgSD2E9i2DI8ra1OPPXqehpoBEoxnE5Cp/dEi2+x0G/CkgrL2ojsPAcQK42SA0G Lfjy/mqaz38R3P2kzASzZxcrhh+/EqL/2b8Z0ZarWepys6N7RC+UjpYxHfhj3cMx/4KF As9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version; bh=dtFGpSTC99oKtzianY/bSf62zkAkMP2B6yfrJX7/+P8=; b=QdkVlJXJw8Rmfo3Q8UARi7jlSTNlZ1eNls/5yas7LAL8n57J9AXRdatgzClpRzWS+d SKWmjV0vBCIP/fKsOyG4ajW9NNsJyA9tCWJx4DMEQOwSBHOzHt6tQNGG8LfcSB91njOL zXWxrk61lUAYeG6XNGLYW6p4bsqpSSTOQG+LLbRHT7+fvyJ61zxtGM4LWa3LdzIqp43l JC7E1fcOG2WkKZtt5WpP7tywzLE68+lH81TNxjDTp7nQNYBna+XRYH8XDg0YOkpj+sYm bf0QUdiHxXdPAbx4B0xIUwxCLMK74Bec168JqQxqi4N2V9+hZDzOAHhtCStqvmxgEMx0 PD4g== 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 f92si20444288plb.330.2019.07.16.10.00.36; Tue, 16 Jul 2019 10:00:52 -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 S2387782AbfGPQ71 convert rfc822-to-8bit (ORCPT + 99 others); Tue, 16 Jul 2019 12:59:27 -0400 Received: from mail.fireflyinternet.com ([109.228.58.192]:60625 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728124AbfGPQ71 (ORCPT ); Tue, 16 Jul 2019 12:59:27 -0400 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from localhost (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP (TLS) id 17347807-1500050 for multiple; Tue, 16 Jul 2019 17:59:19 +0100 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT To: Rob Clark , dri-devel@lists.freedesktop.org From: Chris Wilson In-Reply-To: <20190716164221.15436-2-robdclark@gmail.com> Cc: Rob Clark , Deepak Sharma , Rodrigo Siqueira , Eric Biggers , David Airlie , linux-kernel@vger.kernel.org, Thomas Zimmermann , Emil Velikov References: <20190716164221.15436-1-robdclark@gmail.com> <20190716164221.15436-2-robdclark@gmail.com> Message-ID: <156329635647.9436.7142001798245279241@skylake-alporthouse-com> User-Agent: alot/0.6 Subject: Re: [PATCH 2/2] drm/vgem: use normal cached mmap'ings Date: Tue, 16 Jul 2019 17:59:16 +0100 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Rob Clark (2019-07-16 17:42:15) > 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. > > Signed-off-by: Rob Clark > --- > Possibly we could dma_sync_*_for_{device,cpu}() on dmabuf attach/detach, > although the ->gem_prime_{pin,unpin}() API isn't quite ideal for that as > it is. And that doesn't really help for drivers that don't attach/ > detach for each use. > > But AFAICT vgem is mainly used for dmabuf testing, so maybe we don't > need to care too much about use of cached mmap'ings. Sadly this regresses with i915 interop. Starting subtest: 4KiB-tiny-vgem-blt-early-read-child (gem_concurrent_blit:8309) CRITICAL: Test assertion failure function dmabuf_cmp_bo, file ../tests/i915/gem_concurrent_all.c:408: (gem_concurrent_blit:8309) CRITICAL: Failed assertion: v[((y)*(b->width) + (((y) + pass)%(b->width)))] == val (gem_concurrent_blit:8309) CRITICAL: error: 0 != 0xdeadbeef and igt/prime_vgem Can you please cc intel-gfx so CI can pick up these changes? -Chris