Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp530374pxk; Sun, 30 Aug 2020 12:47:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEMdHD5hPHr4qM8WAr7XmEF1b78DSjBQbEEBiw2ZLDVGGSJAuOn/KLlLeh8fQFCx5lKv30 X-Received: by 2002:a17:906:81d3:: with SMTP id e19mr8780266ejx.51.1598816858834; Sun, 30 Aug 2020 12:47:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598816858; cv=none; d=google.com; s=arc-20160816; b=CVFfM73V1SoUd0lQG+C2lBOacezR+9hh93kpB2qZ6zB1TKO3CWjk1gp+ReGUmpM3rp TQTk7o5JmO071VrO8u35/w9UTzYDWWTquWa1we/eZTc4rwg3miaFI4Pf2YX30Mb07si/ KbXhSQ8fnIShXnFSEOQwumHX7DZ3Q90SLAnAPBhpkcm+DSUaoHNg/aObALHZdIzZ08Y8 P1oyIGHn2iqOssxb7MnG4AHQlyZaAwFBWDilw1Xi2xPqtZA1m8Utlz4Vx5qanRbvRB0l KB9VKH0RvxG18eSWhmQjDxyc0Aray48DeiG0vBlI6xN0tnpm5blBskSl5XP1RUkBWJEL lW/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=w2b3uQ3grQuHzLpPQOfEHno6ki6zY9r+UONQurulOvI=; b=KKj2yLFMGoWR0gmIO24rQvoopoS/N97AKxgU2u3RvHy8XJGltVAPd2bqjiNXQ7v/gV 9l7LNhRDlfMpQITuwduRsKKlx0kQ0VftlACCuk/pJLyr1Hz1R8F+LXjP8CyoChyjweEN 0T+iw70Wj4H0PhxjYi1qTykIsgacH4l+22nHWwSMwsOWVoqr6z+bagNLmoNW3+IieDSP mjBrUMmNKifHBff1qSOm6Fr4uva340WINPQ2MbkQaUdlxlk5WLwmdHaBzW8XOxGYtimo eXuFtk1ps2uveuJQ6saN+TFt29vk0yhQcytGDEfVczEVhz9bsoIwd1YeVSRizChfZnL7 CEGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fhzf3GQj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id s25si4165686edi.140.2020.08.30.12.47.15; Sun, 30 Aug 2020 12:47:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fhzf3GQj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726527AbgH3Top (ORCPT + 99 others); Sun, 30 Aug 2020 15:44:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726150AbgH3Tom (ORCPT ); Sun, 30 Aug 2020 15:44:42 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 708DEC061573; Sun, 30 Aug 2020 12:44:42 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id c2so229856ljj.12; Sun, 30 Aug 2020 12:44:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=w2b3uQ3grQuHzLpPQOfEHno6ki6zY9r+UONQurulOvI=; b=fhzf3GQjA1EtS/4zAwotNBVfEP5BgQC/vHh7NlqVuoqdj7ROn0tVvewLZVBzxTj4Pv 4uAEsVCRdvMO7MN38yRhvjx55DRhviVUp+DeySquLtSENxd8LUNUq5mIKtUDp7268hWj EiAUYpoHBSpKqaW7iOB+cqshvXFhudBmVbsI7vuQfku+8lEdvR++g+KmaUBIrqUudFxn W8bUy8KkEXDCgYhxAAGz+7w9KmUMEitnB8JF5nbRsi/deNwUInd6AYGqmk3s0Ib8ljbl l0EyB1+767rr0k5EB5hEav1tXcXzg8p3RaCj4yuxNRG9oCWCo1/o1xG6lEcvfnnZFy/d 3pcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=w2b3uQ3grQuHzLpPQOfEHno6ki6zY9r+UONQurulOvI=; b=leG/wgtrMJFH5J1J6VxTS5Hd9aNg/sD84usrjAA03Y1WiJFHL4z0fproDJoB7tZcAL 64na/53cO6FqPjD53NATlKU+XdzYTqaZK6RXa5Tzy/xcHKDjRrmc1FwbKQ0alVVFyx1l rUciuBZv4gnUyPPz95rSjHMUOwjfMxcLqt1KrEbWowTn5W/NQLmeq8nYdsxxZ319OF5V HdHM5iyf0h4q1Z6QO0wEx8cEHseIRCq6bUp+ZNkg+3wZrQWED/tbQOXW3dHOW2y5UWB5 TkWkcCJOypZMplVCrlU6gWw1a+GlGk0roCnk6JjsbxNd0OcjMXmYy21aRkSfK4ebEzgD 3Xxg== X-Gm-Message-State: AOAM530wrMXZiGXqjocBQznwdUCvRy6X8lg5eIBDvQkGtFfKVewLDvZT NcfpDvUyAuhtxtARDPDNifjjow+d+5c= X-Received: by 2002:a05:651c:11c5:: with SMTP id z5mr3132694ljo.74.1598816680601; Sun, 30 Aug 2020 12:44:40 -0700 (PDT) Received: from [192.168.2.145] (109-252-170-211.dynamic.spd-mgts.ru. [109.252.170.211]) by smtp.googlemail.com with ESMTPSA id e8sm1114886lja.93.2020.08.30.12.44.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 30 Aug 2020 12:44:39 -0700 (PDT) Subject: Re: [PATCH 16/18] staging/media/tegra-vde: Clean up IOMMU workaround To: Thierry Reding Cc: Robin Murphy , hch@lst.de, joro@8bytes.org, linux@armlinux.org.uk, will@kernel.org, inki.dae@samsung.com, sw0312.kim@samsung.com, kyungmin.park@samsung.com, m.szyprowski@samsung.com, agross@kernel.org, bjorn.andersson@linaro.org, jonathanh@nvidia.com, vdumpa@nvidia.com, matthias.bgg@gmail.com, yong.wu@mediatek.com, geert+renesas@glider.be, magnus.damm@gmail.com, t-kristo@ti.com, s-anna@ti.com, laurent.pinchart@ideasonboard.com, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-mediatek@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org References: <3535c205b9bce52556abbf2f63384fb38e009df9.1597931876.git.robin.murphy@arm.com> <07135a55-cbc9-83e5-60dc-731282192554@gmail.com> <62a72187-442b-2103-46c3-39d3cd999f54@gmail.com> <20200827155446.GB1660457@ulmo> From: Dmitry Osipenko Message-ID: Date: Sun, 30 Aug 2020 22:44:38 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200827155446.GB1660457@ulmo> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 27.08.2020 18:54, Thierry Reding пишет: ... >> The Tegra DRM has a very special quirk for ARM32 that was added in this >> commit [2] and driver relies on checking of whether explicit or implicit >> IOMMU is used in order to activate the quirk. >> >> [2] >> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=273da5a046965ccf0ec79eb63f2d5173467e20fa >> >> Once the implicit IOMMU is used for the DRM driver, the quirk no longer >> works (if I'm not missing something). This problem needs to be resolved >> before implicit IOMMU could be used by the Tegra DRM on ARM32. ... > I do have a patch lying around somewhere that implements the mapping > cache that was referenced in the above commit. Let me know if I should > dig that up and send it out. Hello, Thierry! It certainly will be interesting to take a look at yours patch! I think that the caching shouldn't be strictly necessary for keeping the current workaround working and it should be possible to keep the code as-is by replacing the domain-type checking with the SoC-generation check in the Tegra DRM driver. In general, IMO it should be better to stash the complex changes until we'll get closer to adopting the new UAPI as it will certainly touch the aspect of the per-device mappings. But if yours patch is less than 100 LOC, then maybe we could consider applying it right now!