From patchwork Sat Dec 4 14:58:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 12658005 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A7998C433EF for ; Mon, 6 Dec 2021 10:23:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 454D473E2A; Mon, 6 Dec 2021 10:20:05 +0000 (UTC) Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 01D356E1FB for ; Sat, 4 Dec 2021 15:00:53 +0000 (UTC) Received: by mail-lf1-x12d.google.com with SMTP id k37so13925123lfv.3 for ; Sat, 04 Dec 2021 07:00:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ETAflowsA15kKoaqCuu5WiBP3VN5nTWIEJDu/Mrms4I=; b=Um09SsRlWojymvZWb/yxjCx9ZfaQWkaSS4IIcONST7M2t0keriYTvJ1g6+f4vu8heK BEX5CrsZWn4bo+KoigUCdkY1tiGq3LeiDQ6SUczsrWZ3Tifn1TW5815nMdSa9ju+//E5 74CEd+7j7BzYrLaWT1IdPuQNa8xbPmPvAZUDKnhWwE1BUyHEcTBLursndKX7ofbtLA51 lAIPAmP6whu+VeHMRIw5SFF68hzp8xCalEfa0UhntR//jqzF0/VV8Gh1KxfcPrcicjpm L2DIdUr1Vrg0YLsHC2gUFEPbF2uaojlj27V+jZiZWBqDsIMiyHvxGWxERPA9POyTY9Rh rjDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ETAflowsA15kKoaqCuu5WiBP3VN5nTWIEJDu/Mrms4I=; b=uwZidVyDCghSXdC7lX3VdQa4beOuV90Mi8/aNjx3QuxNhpGngw2VY67tLG2f6O5XWr Mi77MaATGc0ABNeZV0/MI/gkGnVrWLqeF2ypytOkioSKvgQ0A9EuGfZNK+O/VOLZxG1M kw+Z9NSTNbs78zDrpeuSGo1dKPlEClG6BNZKGwJ+eVY8nt73cxpwt+PL1/CoI/JkE2Cf 3cBheqfZKiq/Nn6b7f+CVgVxEzQHneNae0Ef/pEPzOfaLrloxG07/GpcExUqrB4hrkU0 YG/OjR7zYqcgRFQuvX85VPrAEeLUPrBdCbNuIcRePLykC7hI5wDZH+4s7z6Hl0296/Bb bxXg== X-Gm-Message-State: AOAM531J9VRoka5IitxJsTYwWUrFHzAgh+v8joK6H27X9ZJn3tXgQ5r5 XAOfgbvAnCuVK+pCubrInr8= X-Google-Smtp-Source: ABdhPJz/8jwitQJfh/jI12U78QqY0xtz+vktaV7hEnQfMpou3Va97sCyj5vHEVm22k71JG7nLuD6kw== X-Received: by 2002:a05:6512:b10:: with SMTP id w16mr25057836lfu.223.1638630051388; Sat, 04 Dec 2021 07:00:51 -0800 (PST) Received: from localhost.localdomain (94-29-46-111.dynamic.spd-mgts.ru. [94.29.46.111]) by smtp.gmail.com with ESMTPSA id t4sm859185lfe.220.2021.12.04.07.00.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Dec 2021 07:00:51 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Mikko Perttunen Subject: [PATCH v1 0/2] Fix broken DRM and Host1x drivers when CONFIG_ARM_DMA_USE_IOMMU=y Date: Sat, 4 Dec 2021 17:58:47 +0300 Message-Id: <20211204145849.4034-1-digetx@gmail.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Tegra DRM and Host1x don't work properly when CONFIG_ARM_DMA_USE_IOMMU=y, i.e. in case of multiplatform ARM32 kernel. The simple workaround is to detach devices from the offending IOMMU domain. This is a resend of 9 months old patches which we lost and forgotten. The problem still persists. I rebased patches on top of recent linux-next and improved commit messages. Dmitry Osipenko (2): gpu: host1x: Add back arm_iommu_detach_device() drm/tegra: Add back arm_iommu_detach_device() drivers/gpu/drm/tegra/drm.c | 15 +++++++++++++++ drivers/gpu/host1x/dev.c | 15 +++++++++++++++ 2 files changed, 30 insertions(+)