Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1778751ybf; Sun, 1 Mar 2020 17:57:39 -0800 (PST) X-Google-Smtp-Source: ADFU+vtia1bUY/dKWyNbozrwYEikzma2qRVxc2+KM4UjbQ6tMZPqnGkqaizy8Gm7lwHApolcJtbm X-Received: by 2002:a05:6830:1b6e:: with SMTP id d14mr3074591ote.117.1583114259282; Sun, 01 Mar 2020 17:57:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583114259; cv=none; d=google.com; s=arc-20160816; b=W5TXldLWQ2AaR1kLtlsKiHdcnPgLOl8kQeju5gVB9KpL3MCKIFmoZYDmgfSyY3oADn SoLe8J2gXWTA91W69ti9ZF2i/39kbwHl+T3aflBziGtIz92isd/kSODk+TSNNR+GrqNc vUtBdKhJKo/dulaQnfc59BZftHibRqumco+GObjensSLmMCSq47yxOPACQEYDAeslsC9 8rp1iLXX5hjkNMSHonE0mNQ0Wqrxa4nqbt9O+llXI5iq5TQUxxZhG13lRUeGppcX4KXl T6vIdACH76zeHIQ/DHdErKb6kWQMhnKhb5bE8NJsaRlzPj88ZuTLEHPzaB4jV3b1VNr5 4a5A== 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=koYzLLduUmba6eMG7bH+rQzfjIuwoi5r0ur4pym6TH0=; b=i8RWnxMXsXoksDcLpYdeadQJbY6SzCsEvJxiT1o6Qz9qLplTabFTE5JYHT7QAE5gI7 jzAp25nBqYJ/xzUCGnCHxIZddZj+5Rl09X273c8qkeC0RxBEzA6eaTctuiP6bNe0gTar DQ2ApO3dHS7WOaCCPzTIqpbyI8U43hvGpYqqjfJmwi9YJ7DjTICcyrHX+0dbHLJsLOGy s2OV/rwurIrRdRnD1WnnJJuVwYMH4eCRanzyV4o7ZO9fQoB9OsOLC5TLq+mcjCJ0ym8w 4ELkIEL1rCXQVxlurqvmVCChkqYkLA6HFt03Kc/y5Dm5tg2Ei/nls8JU31HOOjjywzpJ wqHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iMwLsgFj; 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 y184si903656oia.22.2020.03.01.17.57.27; Sun, 01 Mar 2020 17:57:39 -0800 (PST) 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=iMwLsgFj; 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 S1726872AbgCBB5F (ORCPT + 99 others); Sun, 1 Mar 2020 20:57:05 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:44196 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726614AbgCBB5F (ORCPT ); Sun, 1 Mar 2020 20:57:05 -0500 Received: by mail-wr1-f66.google.com with SMTP id n7so2591877wrt.11 for ; Sun, 01 Mar 2020 17:57:03 -0800 (PST) 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=koYzLLduUmba6eMG7bH+rQzfjIuwoi5r0ur4pym6TH0=; b=iMwLsgFj3K0eb1Lcry5D5853IFFEeaZzlN+Gm8eR6NfIjL9JBT0l09mkm3axL++kTN wwdHvxIlXCyYwTq/b/ceTWHc4NllMm193PTu4wtNnaFZtE1USN6TGxm+HAR07ForsBUF Yf3gUOfMmmJF7F1UFgqVMVFqaot0VI7oBvcWbcTobFRWxLW7OC/sSYMpEHVQwldGcxnA 3+dhVbLF/zJi/Ndzy/YhAsb6daygAHLKHN0sMqwj8CI4q20YHMqn2g4n2K8uCfI36LTl XQ1ak8cKnCeK6hBNJAwIycTbAVKJUr1UOpFM5oUlDMLuk3dwciglUu+EeGYvB1ISIs6y bPRA== 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=koYzLLduUmba6eMG7bH+rQzfjIuwoi5r0ur4pym6TH0=; b=HC8odOZRqpB0XP0DLGtp2iC5VULy5dyG6Ft3IDrLHM9EBVcIYfOii0kTVWDUbmWX/B 4bhtPOqOHNWuhpE60yzZQFFSKjazQdiY8DnXfyyH5biEoVVCbp+BklZQIiMlrSUrCkAT 7sdDlPyjGzxVTC7Ttx5ycae8F/wlw7b9e55rKb0bH5SJCiKP3EM3Q8ZNf3/URsHwDT4A TPGOVp7gHGyRjZ79wuBhfGTIjbvvSfNex/cf3TEaQinsln9IQp2gA4XR9gFbvfo8Z0z3 MklkrbNJ6Vx3klS/7xAnNoUPyPF51V/+kw345DJzFvChm+gf4gLXMHjTw5V21S0sZ0df eC0w== X-Gm-Message-State: APjAAAXNckU4aKZCUqFQeWCKYxTUV7811T7iU0Hxf9p89Y5dP2BRP7h1 HgFLGU117YVikIaZhkupuaoHU/3uEmMCArla+VQ= X-Received: by 2002:a05:6000:2:: with SMTP id h2mr13851705wrx.182.1583114223320; Sun, 01 Mar 2020 17:57:03 -0800 (PST) MIME-Version: 1.0 References: <20200226154752.24328-1-kraxel@redhat.com> <20200226154752.24328-2-kraxel@redhat.com> <20200227075321.ki74hfjpnsqv2yx2@sirius.home.kraxel.org> <41ca197c-136a-75d8-b269-801db44d4cba@shipmail.org> <20200227105643.h4klc3ybhpwv2l3x@sirius.home.kraxel.org> <68a05ace-40bc-76d6-5464-2c96328874b9@shipmail.org> <20200227132137.irruicvlkxpdo3so@sirius.home.kraxel.org> In-Reply-To: <20200227132137.irruicvlkxpdo3so@sirius.home.kraxel.org> From: Qiang Yu Date: Mon, 2 Mar 2020 09:56:52 +0800 Message-ID: Subject: Re: [PATCH v5 1/3] drm/shmem: add support for per object caching flags. To: Gerd Hoffmann Cc: =?UTF-8?Q?Thomas_Hellstr=C3=B6m_=28VMware=29?= , dri-devel , Guillaume.Gardet@arm.com, David Airlie , open list , gurchetansingh@chromium.org, tzimmermann@suse.de, noralf@tronnes.org, Rob Herring 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, Feb 27, 2020 at 9:21 PM Gerd Hoffmann wrote: > > Hi, > > > > So I'd like to push patches 1+2 to -fixes and sort everything else later > > > in -next. OK? > > > > OK with me. > > Done. > > >> [ context: why shmem helpers use pgprot_writecombine + pgprot_decrypted? > >> we get conflicting mappings because of that, linear kernel > >> map vs. gem object vmap/mmap ] > > > Do we have any idea what drivers are actually using > > write-combine and decrypted? > > drivers/gpu/drm# find -name Kconfig* -print | xargs grep -l DRM_GEM_SHMEM_HELPER > ./lima/Kconfig > ./tiny/Kconfig > ./cirrus/Kconfig > ./Kconfig > ./panfrost/Kconfig > ./udl/Kconfig > ./v3d/Kconfig > ./virtio/Kconfig > > virtio needs cached. > cirrus+udl should be ok with cached too. > > Not clue about the others (lima, tiny, panfrost, v3d). Maybe they use > write-combine just because this is what they got by default from > drm_gem_mmap_obj(). Maybe they actually need that. Trying to Cc: > maintainters (and drop stable@). > lima driver needs writecombine mapped buffer for GPU hardware working properly due to CPU-GPU not cache coherent. Although we haven't meet problems caused by kernel/user map conflict, but I do admit it's a problem as I met with amdgpu+arm before. With TTM we can control page allocated and create a pool for writecombine pages, but seems shmem is not friendly with writecombine pages. Thanks, Qiang