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: 13299433 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B994EB64DD for ; Sun, 2 Jul 2023 18:28:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229851AbjGBS24 (ORCPT ); Sun, 2 Jul 2023 14:28:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230114AbjGBS2v (ORCPT ); Sun, 2 Jul 2023 14:28:51 -0400 Received: from out-46.mta0.migadu.com (out-46.mta0.migadu.com [IPv6:2001:41d0:1004:224b::2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB0F3CD for ; Sun, 2 Jul 2023 11:28:34 -0700 (PDT) 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 Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-pci@vger.kernel.org, kvm@vger.kernel.org, linux-fbdev@vger.kernel.org, Sui Jingfeng , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , =?utf-8?b?VmlsbGUgU3lyasOk?= =?utf-8?b?bMOk?= Subject: [PATCH v2 5/6] drm/i915: Implement the is_boot_device callback function 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 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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