Message ID | 20230305221011.1404672-8-dmitry.osipenko@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1559293wrd; Sun, 5 Mar 2023 14:45:27 -0800 (PST) X-Google-Smtp-Source: AK7set+0oeL3bWaZxkoGT6I0cO9X5+5LbTppzzKD4nXRD3Zxd58uwhdTJlVXM3bQEXMZ8ZkZOf7R X-Received: by 2002:a17:906:99d4:b0:908:1164:6358 with SMTP id s20-20020a17090699d400b0090811646358mr10225723ejn.21.1678056327689; Sun, 05 Mar 2023 14:45:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678056327; cv=none; d=google.com; s=arc-20160816; b=owZHTMVtS3Yd+k9bg9WLVyElXJ/uLsGHFVg0w8jygkB71v2Nl+u9j+6dzQcEZ/NXsh oVHjdrHu8PRNlZlW/mEDc4If9zjEdC1HmCkeYNdVmlnlIPE+yoJXZvUz60zCvFy6ZGF8 8IflMKtnDicElVwpHi8Ti1QSKlSrOpqreAOoDgN4EQ5/GrDIzlckFyA8B+aLhvypTa1e NduhFOwrGr2h1+vltoVL9xkiijv9KaeYNeWGLCr487EDGgyaNv0tSufrEw7ITpI1zueV qkzllTopVkxl4Ply70r5VB881kh5hFinmgRyPTkrqS1UbgoZnpix2j+mOit+lqwlVsVI 9jFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qnxFq4AIPOO7fMBj1JH0lIxmEGmro+xO0nQJT/9MAN4=; b=PI9OtV4ePzqJBjT+sQ95Wcw5YD61siDdsrN7VZwuhEW02yJCDQ2vR177mN4P5rkJ24 x1iRsnYgExiiOyl/cGb5CR9/TD7dv+I5PMgr2juqh8hUbBSuhEMBQ03B5IRNeU9/aAHq fVUFr4MJGuqDJtc3rTOA2sJKKEHqWAlzKJ8/pITfgG3vAiAaVTxNGLB48wuW+TuwMv4h GXTZuJxj8rjjn2zoFl5J9W/kzs7FMHRrhq7K9NbURVFFdQf5EVjvBsylDWf3PUFYR7LG ia+IcRfuIJGV2ejg5p41fe4u6OjewtLdJTvWFaCDrsDj5uDDeD37GDbO1fWsNXonWLN+ FY0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=SgBBunb7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gu25-20020a170906f29900b008d65603e880si7920939ejb.583.2023.03.05.14.45.03; Sun, 05 Mar 2023 14:45:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=SgBBunb7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229958AbjCEWMA (ORCPT <rfc822;carlos.wei.hk@gmail.com> + 99 others); Sun, 5 Mar 2023 17:12:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229923AbjCEWLu (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 5 Mar 2023 17:11:50 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CAA2199EF for <linux-kernel@vger.kernel.org>; Sun, 5 Mar 2023 14:11:41 -0800 (PST) Received: from workpc.. (unknown [109.252.117.89]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id 19D3D6602097; Sun, 5 Mar 2023 22:11:38 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1678054299; bh=ISC36TkNc9haEWhcJAT3q9O/61C6bxozUHrOmfEIoWA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SgBBunb7sVuHC+UUa8VRAEFPRU36EM+jkg1DexAKOfxPs+UEp218r+xIpSer+vxzz aEkrTpfRZ3Nn+2Ad4qud/Z8TzgXcPYPIyjspDGlzdyZLzghC+jG6R0WHurZLBSht9Q yQZY3ik0kw7nh4bkNjPGSkyEin1Y+BYbxfLmhaR8DXS3icH3M7snKksT1mOPQH0HO3 h1AqB9jhp2LLnY5YLzOmOknLfZ7nk+wC3kISK987uo7AL+mOu/Qu/xMjKW69d6J6BK qP3BBLU4CwrM2i2Wxvb/bp6afqoVNc64XXv8nrB5TKltszSDOXZv+IqRC4o460o8Dc d6iOgTgqtcnSA== From: Dmitry Osipenko <dmitry.osipenko@collabora.com> To: David Airlie <airlied@gmail.com>, Gerd Hoffmann <kraxel@redhat.com>, Gurchetan Singh <gurchetansingh@chromium.org>, Chia-I Wu <olvaffe@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Daniel Almeida <daniel.almeida@collabora.com>, Gustavo Padovan <gustavo.padovan@collabora.com>, Daniel Stone <daniel@fooishbar.org>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, Sumit Semwal <sumit.semwal@linaro.org>, =?utf-8?q?Christian_K=C3=B6nig?= <christian.koenig@amd.com>, Qiang Yu <yuq825@gmail.com>, Steven Price <steven.price@arm.com>, Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>, Rob Herring <robh@kernel.org> Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@collabora.com, virtualization@lists.linux-foundation.org, intel-gfx@lists.freedesktop.org Subject: [PATCH v12 07/11] drm/shmem-helper: Remove obsoleted is_iomem test Date: Mon, 6 Mar 2023 01:10:07 +0300 Message-Id: <20230305221011.1404672-8-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230305221011.1404672-1-dmitry.osipenko@collabora.com> References: <20230305221011.1404672-1-dmitry.osipenko@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759569591407062148?= X-GMAIL-MSGID: =?utf-8?q?1759569591407062148?= |
Series |
Add generic memory shrinker to VirtIO-GPU and Panfrost DRM drivers
|
|
Commit Message
Dmitry Osipenko
March 5, 2023, 10:10 p.m. UTC
Everything that uses the mapped buffer should by agnostic to is_iomem.
The only reason for the is_iomem test is is that we're setting shmem->vaddr
to the returned map->vaddr. Now that the shmem->vaddr code is gone, remove
the obsoleted is_iomem test to clean up the code.
Suggested-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c index e47cc45f39a1..b814352aae33 100644 --- a/drivers/gpu/drm/drm_gem_shmem_helper.c +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c @@ -432,12 +432,6 @@ int drm_gem_shmem_vmap(struct drm_gem_shmem_object *shmem, if (obj->import_attach) { ret = dma_buf_vmap(obj->import_attach->dmabuf, map); - if (!ret) { - if (drm_WARN_ON(obj->dev, map->is_iomem)) { - dma_buf_vunmap(obj->import_attach->dmabuf, map); - return -EIO; - } - } } else { pgprot_t prot = PAGE_KERNEL;