From patchwork Wed Jan 11 15:41:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 42061 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp3391438wrt; Wed, 11 Jan 2023 07:42:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXsrTmFnZdZEWz9LIMfVTzxUYQg5/vjqmcYwoU7FtFGR5TZkPtKEOartj+RqR1TqkmE7hGsf X-Received: by 2002:a17:902:b192:b0:193:2d53:3fc9 with SMTP id s18-20020a170902b19200b001932d533fc9mr10514040plr.6.1673451748801; Wed, 11 Jan 2023 07:42:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673451748; cv=none; d=google.com; s=arc-20160816; b=yGAVrrAQ0wUuLG8lmkcGviD2sMwwZfNBKRh0NuoVQ+2G/EstMaQ3eevIbogi/n7eND tXWrU58dpy3J2/qYYcb4VjgAIQvXyQc+2WBizkwBFedtYnKpncdBntdb+O0/AJc+5m2A TOKryjVi67LVHD7s2JCR7z4PV7e07H4BoZ/1ZpmVukogJG+GFTT3RN7HpCLCeNmKqjUN PzVu4MEEHdyeqzpYVKrbSptQwq8/h4Qldrc7kyHCJ5g5xkf7ldnw0BQoOs3TMOmlu0jI 9Pgqu1n6RsbLV4bNkybpd6QDFmMeMs0Phb0ssJl1Pf8p/QGZZbFpEnLtfhL5glZFMwAx KZhg== 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=okH8AsNmtLn+Xev5OTCMqwCCcQgJeFP0KaGCnceKOFQ=; b=RlCEbI6UYJAjXA2BOMK2D9NRtsNlQN1pUTdM/flcpoPoiz2jtLTy1bm7Njozfnedh2 mVztNIHK4a9jMUH+Cg58MCK/7fbV86nwfvrjJoJtp6y8AvH9vbpu3Wqa4UMJ1iEW4RZ9 LRHe6DdeSojPs/uEmsRV/REvoYwrGnWOp+frrlh/bVrjMJwxy8hLobXuihX5gqI8nImB B30t0i0jRxyWgg9tkf3kBFWPJSWqX7OlXZb3jCHXEWws3w9NwY0OHjTULGXvGiMsSlNK AO9FCKZA896p54Lb82F9+L1oNRroZl/0EsBkD8l+pG4WK9gaTw7aH7I57cmox+ymJw3B c5Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=e3QgYRhA; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z5-20020a170902708500b00192a2923f63si13489094plk.464.2023.01.11.07.42.13; Wed, 11 Jan 2023 07:42:28 -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=@ffwll.ch header.s=google header.b=e3QgYRhA; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239000AbjAKPmD (ORCPT + 99 others); Wed, 11 Jan 2023 10:42:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235295AbjAKPlb (ORCPT ); Wed, 11 Jan 2023 10:41:31 -0500 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB7BB2E0 for ; Wed, 11 Jan 2023 07:41:29 -0800 (PST) Received: by mail-wm1-x32a.google.com with SMTP id p1-20020a05600c1d8100b003d8c9b191e0so12970636wms.4 for ; Wed, 11 Jan 2023 07:41:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=okH8AsNmtLn+Xev5OTCMqwCCcQgJeFP0KaGCnceKOFQ=; b=e3QgYRhA/FauY7S29GhmvTbp6mhIVjL3kUKyk/aiNJTXGHtP9m5oMyVm5h+bchf5VB 5Ozpe8kode9PPOMtykJJWS4wCtMq4JeTqLZWhNsrNNrrwUmqJgCj6729094+1wKf7qV8 SfwbZApVC/cUEh7SexrqejM4npd5PFpvVRP4I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=okH8AsNmtLn+Xev5OTCMqwCCcQgJeFP0KaGCnceKOFQ=; b=7LxQFHcmqk3oeufFgmgwt/NoLkhG5P2Z1Hv/geOQC1W2IZ6nqzRRuq55upDtjPxuUz 2UWp5MmhzqVaZzXCgBEto1owCa+YPSJE8KF464s5OUAj+oRxbHfKyzIXyjwsVx/LqcFx k82cEI7rMgAMVvAY3uggT7/1CC7Tb8ENxaG/R4T/arf9YUou0FKNvVR/ZS1l/jXcZcRC A6zoENEwrG1zQ0acQrkSonSYpJCa5qL8krb016YgD8K25GDqu1V2TSUOhkB0vuqlDROK 52uKwjfrtuJUVcplNjrIw/6nq2KR9HuqtHhXjUYr4HfFvYUabvto0U3FnArwI/1NV5sA pE/g== X-Gm-Message-State: AFqh2koen4opR2qYhx4YAM+I3ESGoQRakEndxdtd7fm/TL1vJ1l2pQuT dbPSk0aOXTVGvh1tbbjX/dmmnw== X-Received: by 2002:a05:600c:3d05:b0:3d3:5c21:dd94 with SMTP id bh5-20020a05600c3d0500b003d35c21dd94mr54680019wmb.9.1673451689538; Wed, 11 Jan 2023 07:41:29 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id t9-20020a05600c198900b003d9e74dd9b2sm15936149wmq.9.2023.01.11.07.41.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 07:41:28 -0800 (PST) From: Daniel Vetter To: DRI Development Cc: Intel Graphics Development , LKML , Daniel Vetter , Daniel Vetter , Benjamin Herrenschmidt , linux-fbdev@vger.kernel.org Subject: [PATCH 07/11] fbdev/radeon: use pci aperture helpers Date: Wed, 11 Jan 2023 16:41:08 +0100 Message-Id: <20230111154112.90575-7-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230111154112.90575-1-daniel.vetter@ffwll.ch> References: <20230111154112.90575-1-daniel.vetter@ffwll.ch> 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,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE 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?1754741340964857508?= X-GMAIL-MSGID: =?utf-8?q?1754741340964857508?= It's not exactly the same since the open coded version doesn't set primary correctly. But that's a bugfix, so shouldn't hurt really. Signed-off-by: Daniel Vetter Cc: Benjamin Herrenschmidt Cc: linux-fbdev@vger.kernel.org --- drivers/video/fbdev/aty/radeon_base.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c index 657064227de8..972c4bbedfa3 100644 --- a/drivers/video/fbdev/aty/radeon_base.c +++ b/drivers/video/fbdev/aty/radeon_base.c @@ -2238,14 +2238,6 @@ static const struct bin_attribute edid2_attr = { .read = radeon_show_edid2, }; -static int radeon_kick_out_firmware_fb(struct pci_dev *pdev) -{ - resource_size_t base = pci_resource_start(pdev, 0); - resource_size_t size = pci_resource_len(pdev, 0); - - return aperture_remove_conflicting_devices(base, size, false, KBUILD_MODNAME); -} - static int radeonfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -2296,7 +2288,7 @@ static int radeonfb_pci_register(struct pci_dev *pdev, rinfo->fb_base_phys = pci_resource_start (pdev, 0); rinfo->mmio_base_phys = pci_resource_start (pdev, 2); - ret = radeon_kick_out_firmware_fb(pdev); + ret = aperture_remove_conflicting_pci_devices(pdev, KBUILD_MODNAME); if (ret) goto err_release_fb;