Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2826259imu; Thu, 29 Nov 2018 10:50:40 -0800 (PST) X-Google-Smtp-Source: AFSGD/XAnOMbOnBGOqoJ3dIH1GnFF/AkX2OhSJ23IZCoy0+4K1MniIOQqj+JM+dFSPdvL6ieOuql X-Received: by 2002:a17:902:6681:: with SMTP id e1-v6mr2531345plk.173.1543517440812; Thu, 29 Nov 2018 10:50:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543517440; cv=none; d=google.com; s=arc-20160816; b=P8hV7TDueoavdzddU4uHO4uTdNo9LXl77KoUS02sX88RUqnezyf9MfhEQzgC75SlXG wF1uPMXUfveAf18ODHbfvuJNnQZRjqdgKsFMazOCnXN6eDSfqOhDwmThRHCPRiKZsSnI 6A00vDJS0o76AGai7dS7svnIBFGIdjvsJG0kYo8iaiaSVmXSUBB6hslunp5ntNLx8Tsn bvEbht9ZKJ5JRkjVvSQN8ZRJ6/efaSoLc+ijcY3LF31nN2XeVAegxp2jcWB0bbitusPB ynFK8oTHBKVK2BL7FiAtzhbEmcX4B6T1Pen2Se1cjAFGOR9CwdLzC64VhZ0FRUkh2oJ+ mO9Q== 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=uvjZP6sODa1JrTBOtvu8z7J0VX8KAt3vb7MIKHMy7O0=; b=hmsQFNjmcEmg4GMNIWBb0fnGX3pJR798L8JU3KVIThPFGmff0Ikk1bbLUv3LMCAHow ikXSfLH+OJlf4D+nXUjaCV/E/IGbF+ZGAusBFDFruWq6Fxnan5GKyorF11gDT26y95Fp 40cqUbumHFLkq/ZEon3uSDF1iHCXVL0gP0kSO9anOhi9pRzS7MXX6wL9C/SKpwGCakJ4 ao+PCIzWb0gEZFgF6UtCoY3tuUORxr9L/7uTwzkYY8qY4Fq+UDM7qE64ezQIjtyMEX0C GE4NFvBgdSBN/kX6lyxC8T3uOuLXf2c5KFA6ufnPMcAaTmB+X/RiJlr0hzUiAfZvfQQN 2q0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=F+o1KrXd; 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 c15si2275897pgg.446.2018.11.29.10.50.25; Thu, 29 Nov 2018 10:50:40 -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=F+o1KrXd; 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 S1726622AbeK3Fyt (ORCPT + 99 others); Fri, 30 Nov 2018 00:54:49 -0500 Received: from mail-it1-f194.google.com ([209.85.166.194]:33803 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725928AbeK3Fyt (ORCPT ); Fri, 30 Nov 2018 00:54:49 -0500 Received: by mail-it1-f194.google.com with SMTP id x124so8118716itd.1; Thu, 29 Nov 2018 10:48:27 -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=uvjZP6sODa1JrTBOtvu8z7J0VX8KAt3vb7MIKHMy7O0=; b=F+o1KrXdybS/F2N20oAo/hhNYaqsKzEgnnhTKChjDYwWY3IikGFv9CBQcLrkbZleRi Q+LDvPfKkThLtaHa+UqfkQ6iyDiG9Wr5R80/p2kjWDcafIb0+zq1W+Kq4rpT3lvkISNQ 1/r1TDOW/h6zcUZXpmovMWZC4SZ1t16c7VVqFlbVSF9DIowRSyFWw6h91MCs19XiFigr hdhuHYtQzRqlK0kdB35Ut2KT3NyM1ubztm3KgZbz7QJKDs8KoIXhEGxkzX1ItQnOrLpt 3DJaeyArEofrTGOSeYu/Lg75Ytn9lRSa7qep0fOmiJIr5U5Cooqon3aLf56jmLkJH+Rw kyiA== 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=uvjZP6sODa1JrTBOtvu8z7J0VX8KAt3vb7MIKHMy7O0=; b=uR6tHQ7PS/LGERbDG/PTp0clWZ1SExie440U/QKSUAJSmdkgIenQ15LKie4M9/DoZ1 o9UpkvUWPa980dbX7ymJ2WFJIjVBuLNp0i2jXbwbBCgoGaE4HDiIPDd28TC3E27jqEJJ mgGxz2q5/R7DyaOlGCRj411PERe16JI4wtCidFKJ1Wjq3TnIC6TkdPUSjG9uaS+gq/7o aLkbafxRX7i9gQEqp6QFyJ/6fboEtFk8Ysl6LkqbLEWWpOMLM5VLuZFCYKrW8un16bTj SDRqvOniqStbwnxS+y6ttwcNwtjGAjdw05aMEusq2RKRLoFUFAZgfMAEPyC8rN6ek+yh Hqyg== X-Gm-Message-State: AA+aEWYCwbB/zJefMVywTkTimaT5BykhfrKbLedZY/vvWiCS8v+O3rGe 6MxAFbNb9qhNtZIj4r7t09kS9ybYiBCvDSdio4w= X-Received: by 2002:a24:d84:: with SMTP id 126-v6mr2662618itx.163.1543517307231; Thu, 29 Nov 2018 10:48:27 -0800 (PST) MIME-Version: 1.0 References: <20181129140315.28476-1-vivek.gautam@codeaurora.org> <20181129141429.GA22638@lst.de> <20181129155418.GB26537@lst.de> In-Reply-To: <20181129155418.GB26537@lst.de> From: Rob Clark Date: Thu, 29 Nov 2018 13:48:15 -0500 Message-ID: Subject: Re: [PATCH v3 1/1] drm: msm: Replace dma_map_sg with dma_sync_sg* To: hch@lst.de Cc: Vivek Gautam , David Airlie , dri-devel , Linux Kernel Mailing List , freedreno , Tomasz Figa , Archit Taneja , linux-arm-msm , Robin Murphy , Jordan Crouse , Sean Paul 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, Nov 29, 2018 at 10:54 AM Christoph Hellwig wrote: > > On Thu, Nov 29, 2018 at 09:42:50AM -0500, Rob Clark wrote: > > Maybe the thing we need to do is just implement a blacklist of > > compatible strings for devices which should skip the automatic > > iommu/dma hookup. Maybe a bit ugly, but it would also solve a problem > > preventing us from enabling per-process pagetables for a5xx (where we > > need to control the domain/context-bank that is allocated by the dma > > api). > > You can detach from the dma map attachment using arm_iommu_detach_device, > which a few drm drivers do, but I don't think this is the problem. I think even with detach, we wouldn't end up with the context-bank that the gpu firmware was hard-coded to expect, and so it would overwrite the incorrect page table address register. (I could be mis-remembering that, Jordan spent more time looking at that. But it was something along those lines.) BR, -R