From patchwork Wed Jan 11 15:41:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 13096890 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 1B3F0C67871 for ; Wed, 11 Jan 2023 15:42:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5394810E783; Wed, 11 Jan 2023 15:41:47 +0000 (UTC) Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9BF5110E777 for ; Wed, 11 Jan 2023 15:41:34 +0000 (UTC) Received: by mail-wm1-x334.google.com with SMTP id i17-20020a05600c355100b003d99434b1cfso12990767wmq.1 for ; Wed, 11 Jan 2023 07:41:34 -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=2dVHGsRGAtc8yC6r+7bI8QFfhEvYdoERWC1PQCrm1tw=; b=I4+Xr0vcrHPi2zx8cnusy5qj5UkH4ZEMi/VSE9jNNkYnEsukNwrnfB9Iurz3G5dgcf 76QuwtxZbjRwvvCqspLSFHr8XB3P1q2RF2Y5eWrxoFMskwYTX1IWSdJ6WiZU1henB7u7 962tRp+8jbVpmWIs5v3fymXrn6cX2yJfS+ahs= 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=2dVHGsRGAtc8yC6r+7bI8QFfhEvYdoERWC1PQCrm1tw=; b=542SxqM8qsZa5Rb1+ETfjTO1DTcLjlMkUqy+rCslGmwWm5NSflGeyTFc2s987tpWLk Ifg8+erG897rGrgTx0FxB5/NvzJeREdOR80oUGf7PJM4pjSf0OY3quEi7solx0FW1+hZ tqEixowJRtvRLP1LOYQoCxWDefy4v4MveHVfYUPPAhSwNDHqvC315S+72FcXI0p9Oy+r M/pQtsEsd4gC1E8UGR3g4zIkaKTJeuPMy2UMJUQ7j1UCpGLBdtHg+uJbsObEU9PCigFJ EyVfufpfFDNNfpui+aXP6f9/C6ddeZSkpO7Mlorzc0Ack7z9hLoiQVzO2SZxpgolCSGG 4J5A== X-Gm-Message-State: AFqh2krr5eKVIZezHf9wrxHa3v+APhhvuLcca36EOopHCcjTAR+NMnWq 4W0MEqUjvDed47DdOqkYg5rFvf4cz1FGE9u4 X-Google-Smtp-Source: AMrXdXvdiLsi4d/83lNa5SYYvtdYD0duEsEs1acqx+5zQwLQxSDtPPplhJfZOW7rOwY+MD6kGrfBcw== X-Received: by 2002:a05:600c:1c20:b0:3d2:2f48:9443 with SMTP id j32-20020a05600c1c2000b003d22f489443mr52172779wms.15.1673451694167; Wed, 11 Jan 2023 07:41:34 -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.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 07:41:33 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH 10/11] video/aperture: Drop primary argument Date: Wed, 11 Jan 2023 16:41:11 +0100 Message-Id: <20230111154112.90575-10-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-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-fbdev@vger.kernel.org, Daniel Vetter , Intel Graphics Development , Javier Martinez Canillas , LKML , Thomas Zimmermann , Daniel Vetter , Helge Deller Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" With the preceeding patches it's become defunct. Also I'm about to add a different boolean argument, so it's better to keep the confusion down to the absolute minimum. Signed-off-by: Daniel Vetter Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: Helge Deller Cc: linux-fbdev@vger.kernel.org --- drivers/gpu/drm/drm_aperture.c | 2 +- drivers/video/aperture.c | 7 +++---- include/linux/aperture.h | 9 ++++----- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/drm_aperture.c b/drivers/gpu/drm/drm_aperture.c index 697cffbfd603..5729f3bb4398 100644 --- a/drivers/gpu/drm/drm_aperture.c +++ b/drivers/gpu/drm/drm_aperture.c @@ -168,7 +168,7 @@ EXPORT_SYMBOL(devm_aperture_acquire_from_firmware); int drm_aperture_remove_conflicting_framebuffers(resource_size_t base, resource_size_t size, const struct drm_driver *req_driver) { - return aperture_remove_conflicting_devices(base, size, false, req_driver->name); + return aperture_remove_conflicting_devices(base, size, req_driver->name); } EXPORT_SYMBOL(drm_aperture_remove_conflicting_framebuffers); diff --git a/drivers/video/aperture.c b/drivers/video/aperture.c index 03f8a5e95238..ba565515480d 100644 --- a/drivers/video/aperture.c +++ b/drivers/video/aperture.c @@ -43,7 +43,7 @@ * base = mem->start; * size = resource_size(mem); * - * ret = aperture_remove_conflicting_devices(base, size, false, "example"); + * ret = aperture_remove_conflicting_devices(base, size, "example"); * if (ret) * return ret; * @@ -274,7 +274,6 @@ static void aperture_detach_devices(resource_size_t base, resource_size_t size) * aperture_remove_conflicting_devices - remove devices in the given range * @base: the aperture's base address in physical memory * @size: aperture size in bytes - * @primary: also kick vga16fb if present; only relevant for VGA devices * @name: a descriptive name of the requesting driver * * This function removes devices that own apertures within @base and @size. @@ -283,7 +282,7 @@ static void aperture_detach_devices(resource_size_t base, resource_size_t size) * 0 on success, or a negative errno code otherwise */ int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t size, - bool primary, const char *name) + const char *name) { /* * If a driver asked to unregister a platform device registered by @@ -328,7 +327,7 @@ int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *na base = pci_resource_start(pdev, bar); size = pci_resource_len(pdev, bar); - ret = aperture_remove_conflicting_devices(base, size, primary, name); + ret = aperture_remove_conflicting_devices(base, size, name); if (ret) return ret; } diff --git a/include/linux/aperture.h b/include/linux/aperture.h index 442f15a57cad..7248727753be 100644 --- a/include/linux/aperture.h +++ b/include/linux/aperture.h @@ -14,7 +14,7 @@ int devm_aperture_acquire_for_platform_device(struct platform_device *pdev, resource_size_t size); int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t size, - bool primary, const char *name); + const char *name); int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *name); #else @@ -26,7 +26,7 @@ static inline int devm_aperture_acquire_for_platform_device(struct platform_devi } static inline int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t size, - bool primary, const char *name) + const char *name) { return 0; } @@ -39,7 +39,6 @@ static inline int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, /** * aperture_remove_all_conflicting_devices - remove all existing framebuffers - * @primary: also kick vga16fb if present; only relevant for VGA devices * @name: a descriptive name of the requesting driver * * This function removes all graphics device drivers. Use this function on systems @@ -48,9 +47,9 @@ static inline int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, * Returns: * 0 on success, or a negative errno code otherwise */ -static inline int aperture_remove_all_conflicting_devices(bool primary, const char *name) +static inline int aperture_remove_all_conflicting_devices(const char *name) { - return aperture_remove_conflicting_devices(0, (resource_size_t)-1, primary, name); + return aperture_remove_conflicting_devices(0, (resource_size_t)-1, name); } #endif