From patchwork Mon Feb 27 06:02:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 61742 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2256045wrd; Sun, 26 Feb 2023 22:07:43 -0800 (PST) X-Google-Smtp-Source: AK7set/4Av3YshSiapR3AFUwR52YC8jmGzOkJHNzYuFcUXAXF3KtXgprMdeaUUXG24LThp3Ic3n7 X-Received: by 2002:a17:906:490b:b0:8b1:3a8f:a51 with SMTP id b11-20020a170906490b00b008b13a8f0a51mr26504315ejq.15.1677478063345; Sun, 26 Feb 2023 22:07:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677478063; cv=none; d=google.com; s=arc-20160816; b=wb/MXLVL+m9sxkQuE+3BgNa9HNRyOfN2HxzKAXY9Erc56tQb+WJCtfLvEAX3+QODw3 moWiZ6zViu+VaA/zC8Vc4JibJLpf/KJKGxk0TA8M3cI3/vENu6Re4HyVoVVs033mcpbF nJuR6lhwze2AgH26bGjpjLakWIHmYX7UiwWxuHu2EPbdrn2LkTuWRL2XjX1QzC3lTlfI oxgWjOZpJ1iEN/AHsS6yZi2oYVb1R1Fu6CtQGWP5nziRkVATNLAozSBi7fPWtvlYkxPh sMDWZGxCKqaeVy8NMog9vXfQfTAJHDstk90fIEimZHfqFAXT9tbyCrWAb7K1s9eICyTh 8htg== 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=461nQz22EafY/n1dY84BcJai/PEblHYYimeG3MZd7qs=; b=MYYtdRgddUe2HX+sJagbpuIRTEbE/GI4QDKfraA+BBaQFRK3N9nPhZt2RCoNibGIym urIaDO94HULsnv5ltdn4vyAlKYKAkTz4bg0TCWaPagqFnh4OQ1VG4QB3qBwLIeYFHb15 TOrmKEImOKnhIuCezMTA1+3JVl7nx83l9Pe5seAkqYvUk+7p8zvGX4klMf+ze0bj+Eca iw4diZrMtDvh89WebmOGnJ1ouZMgzbJsxht9bmeRaVrDGrXub2Ox1oT12x2fGEglFePw Z6N0iUuwsU91che55qliOKpIP7Np1wphbCPeLR1Dt++WwqZnBGuDA7CPhEJgVRdK8KJd L7kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=AwsZeqDi; 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=REJECT sp=REJECT 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 hp21-20020a1709073e1500b008d0bfa97b4fsi8632558ejc.802.2023.02.26.22.07.20; Sun, 26 Feb 2023 22:07:43 -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=AwsZeqDi; 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=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229886AbjB0GDe (ORCPT + 99 others); Mon, 27 Feb 2023 01:03:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229868AbjB0GDY (ORCPT ); Mon, 27 Feb 2023 01:03:24 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8205CE050 for ; Sun, 26 Feb 2023 22:03:14 -0800 (PST) Received: from workpc.. (109-252-117-89.nat.spd-mgts.ru [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 D67176602E52; Mon, 27 Feb 2023 06:03:11 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677477793; bh=kSakoXUglyl/y87Gkd3ABWuXpWvJ9Z8kIhJnjOMedVc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AwsZeqDin8Oo3gx+Qlpbw40+FTFZK+yD1pQmpfxYAmt8n1rpnUPvU2xatDZGBLhkM 0Fj8jOdOmkHqE5CwwVrNUONXXOGLm/DLoa8QAFLZJB+jr/eOy1VH02B9WKX6gDjbGQ hiWivZTrUdMD/Qtxp/+7fESKwd3juw1YK1FEu89RBbvTUUFHg6smG6U2JGmlOMeSH8 umntaAU/xGVCxZAYk8rJcHarn9Z2DZOFtMS10p9mSmSRaDjlsjFTf1Xf6hJu9U2y2r T4L85TyRjZDKIFZEtHeTXdiMu3HDrxsZpio6gDePBHWa3zF7RtnM3p1XQ0KQ3T+j3r hXpPPzH9ZcmXA== From: Dmitry Osipenko To: David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Daniel Almeida , Gustavo Padovan , Daniel Stone , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Sumit Semwal , =?utf-8?q?Christian_K=C3=B6nig?= , Qiang Yu , Steven Price , Alyssa Rosenzweig , Rob Herring Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@collabora.com, virtualization@lists.linux-foundation.org Subject: [PATCH v11 06/10] drm/shmem-helper: Remove obsoleted is_iomem test Date: Mon, 27 Feb 2023 09:02:15 +0300 Message-Id: <20230227060219.904986-7-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230227060219.904986-1-dmitry.osipenko@collabora.com> References: <20230227060219.904986-1-dmitry.osipenko@collabora.com> MIME-Version: 1.0 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758963237722081815?= X-GMAIL-MSGID: =?utf-8?q?1758963237722081815?= 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 Signed-off-by: Dmitry Osipenko --- 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 56de12bb28b1..ba1db7c5659c 100644 --- a/drivers/gpu/drm/drm_gem_shmem_helper.c +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c @@ -409,12 +409,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;