From patchwork Sun Jul 2 18:27:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sui Jingfeng X-Patchwork-Id: 13303699 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 C1DB5EB64D9 for ; Thu, 6 Jul 2023 13:18:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2711D10E033; Thu, 6 Jul 2023 13:18:30 +0000 (UTC) Received: from out-7.mta0.migadu.com (out-7.mta0.migadu.com [91.218.175.7]) by gabe.freedesktop.org (Postfix) with ESMTPS id B882C10E153 for ; Sun, 2 Jul 2023 18:28:34 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1688322512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3gdqYsSHavNjy6uu6OI5/B6vHhjDXBQp6xohAWX8uZE=; b=m25TPTQophaiDUZ//UGt3Os2cQOocfRXNRltUvkgGKUmmO1Z9ZWC0+jbrfZCCmk5ZDhcWG RwWTo0rs4bnl6YWCbMPzsuPUmdOIrtmtok5pZW7Bwy9cqQ4Ab13vfqjcUiKXmWEE53TSZU DBeEwVD0D5LNY0mxMcaZN1DBsAGHjbk= From: Sui Jingfeng To: Alex Deucher , David Airlie , Daniel Vetter , Thomas Zimmermann , Maxime Ripard , Jani Nikula , Lyude Paul , Bjorn Helgaas , Mario Limonciello Date: Mon, 3 Jul 2023 02:27:43 +0800 Message-Id: <20230702182744.755467-6-sui.jingfeng@linux.dev> In-Reply-To: <20230702182744.755467-1-sui.jingfeng@linux.dev> References: <20230702182744.755467-1-sui.jingfeng@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Mailman-Approved-At: Thu, 06 Jul 2023 13:18:28 +0000 Subject: [Intel-gfx] [PATCH v2 5/6] drm/i915: Implement the is_boot_device callback function X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Sui Jingfeng , kvm@vger.kernel.org, nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, Rodrigo Vivi , dri-devel@lists.freedesktop.org, linux-pci@vger.kernel.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Sui Jingfeng This patch add a function to identify if a device is the default boot selected by the firmware, it require the GPU has firmware framebuffer driver support (such as efifb). If a specific hardware doesn't have firmware framebuffer support, then the introduced function will just return false. But even in this case, it still do no harms. Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: David Airlie Cc: Daniel Vetter Cc: "Ville Syrjälä" Cc: Lyude Paul Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/i915/display/intel_vga.c | 31 +++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_vga.c b/drivers/gpu/drm/i915/display/intel_vga.c index 98d7d4dffe9f..7a0ba677c932 100644 --- a/drivers/gpu/drm/i915/display/intel_vga.c +++ b/drivers/gpu/drm/i915/display/intel_vga.c @@ -6,6 +6,8 @@ #include #include +#include + #include