Message ID | 20230314022659.1816246-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 v21csp1532957wrd; Mon, 13 Mar 2023 20:04:12 -0700 (PDT) X-Google-Smtp-Source: AK7set8//lTEQwC3MmaExh2PGrE8UNZ3dfRxDDFaAnLqzEFUi3V27HPph6oG1CjQjhhBpgF2DAIn X-Received: by 2002:a17:90b:4d83:b0:23d:3264:16bf with SMTP id oj3-20020a17090b4d8300b0023d326416bfmr1598238pjb.0.1678763052626; Mon, 13 Mar 2023 20:04:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678763052; cv=none; d=google.com; s=arc-20160816; b=q9nSwyNRNnG/LIHSTQTAylq23D7ULGlIJegob/f0XPOW9sRxdGCh7u5V9fNP69KxIg G0q3ztLgJ/nZKrb/FS/aUcl9q8V2snI25OvPdCD0/esTKQBsDMhDMjO3VG/jK+rnaOse zdVj6CWi7ALiQUT3p5eF8/P46IEt4zpySB4HUrIkJyfkFqNgPwn8WRZw89Uy7KPo9+QR GgGhtb3Rqayz8V1eEl1qJFOMbZV/EeUOrukj6oRgPiE8OvC7bPzaN5yYeKje7cwCyEJr FwQFkdjQxrmKxFNzzl1KRguR+9GaPjZgxQjRyTi1tF+22bbjbwJbDTHbriZ7gZ9NuMzq Mo4w== 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=+cgCQJDc/2TsolxlGbNkMm/agi+R2j6MLz52s0DaJMw=; b=cPPFkz5B90M5rKKgL69v6RlXdu+1lUVzZcWC44OmgoCRP1BRTNbbMe465aAXgwEe6r FS9hVb6CJQB1HV21620wmas3J6isG/XwS0iR2uA0wnUY2k9Qa4vVX/TbJBxiA5xkh5Mj vs6Du2rZjXLAN7UY62vSypib3g3J5MANImcT0rQVv7YrVdfPtloE5pQlXaMuR07mAKX3 JMl/12gwYBiYCvaatSwxD++GCagzqw5P91+ikUgNaR/T4weuvMqkd8twiXi+kDhHtBIY smiMR/5MgmfjGNMSPECw7q4KGuqc/EDHQUp5gz8L4PD8ReAM14gLQ4RYwAL85qWcYIwD P5Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Cpi3l88g; 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 p19-20020a17090b011300b0023676a8e1b0si1308717pjz.82.2023.03.13.20.03.58; Mon, 13 Mar 2023 20:04:12 -0700 (PDT) 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=Cpi3l88g; 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 S230045AbjCNC2v (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Mon, 13 Mar 2023 22:28:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230119AbjCNC2b (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 13 Mar 2023 22:28:31 -0400 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 5943E94F6A for <linux-kernel@vger.kernel.org>; Mon, 13 Mar 2023 19:28:21 -0700 (PDT) Received: from workpc.. (109-252-120-116.nat.spd-mgts.ru [109.252.120.116]) (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 66DB0660308E; Tue, 14 Mar 2023 02:28:18 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1678760900; bh=/0B/Gvt+XzcmXa2dz3mV2+2TZchur7pJD1BN8+9L7Ww=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cpi3l88gdptoP9z5juaEOv+1FTJ7gU6LGZAHCOwCugrokhKjeMpXb9dOIcleQMSYV RuCOjdpo9uBHBizvCMijcCCS784Jzi7Mb7uwtx3p9lQUt5+Ar1Z3EV2uGcWX/8uvTy 5XXn/AX1HU4Q5QX7u573aEmIKsuIpc05HM4vE7Lane6epewwDtkaA9G3JPrRzy10I4 2qSHI0sLJAZB6J7S5dFe9TiwOn46zIJFE1UQxHvnWsZoxMdu305g2QYR4OCKT6jTZo T8JFtem3YNViRYMiPMfG7Cv32AdanwD/UoK7GwsLCBYXZUpAvzLJq74V7EfjUMrthV hKSNeZSelh6hQ== 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 v13 07/10] drm/shmem-helper: Remove obsoleted is_iomem test Date: Tue, 14 Mar 2023 05:26:56 +0300 Message-Id: <20230314022659.1816246-8-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230314022659.1816246-1-dmitry.osipenko@collabora.com> References: <20230314022659.1816246-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, URIBL_BLOCKED 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?1760310646652657517?= X-GMAIL-MSGID: =?utf-8?q?1760310646652657517?= |
Series |
Add generic memory shrinker to VirtIO-GPU and Panfrost DRM drivers
|
|
Commit Message
Dmitry Osipenko
March 14, 2023, 2:26 a.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 a02377a5131b..9e94652a141c 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;