From patchwork Tue Jul 11 16:43:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sui Jingfeng X-Patchwork-Id: 13309121 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 BDC45EB64DC for ; Tue, 11 Jul 2023 16:53:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232975AbjGKQxj (ORCPT ); Tue, 11 Jul 2023 12:53:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230155AbjGKQxe (ORCPT ); Tue, 11 Jul 2023 12:53:34 -0400 Received: from out-43.mta1.migadu.com (out-43.mta1.migadu.com [IPv6:2001:41d0:203:375::2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C84510E7 for ; Tue, 11 Jul 2023 09:53:32 -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=1689093831; 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=Pi4iM6wkxmiCh7Toa8pia5vdqJbo9NSOCLkxp70eYG0=; b=FliLSndwDYIjP8JiUu8QT/T5KCdyHxGgYsO5BSzr4LgcOctrmmgGeB2MyfEdilZAYRJv+v u3Uk68mEPVZMQj92hxvLpVlcbsTe/5SyMdk4JvIYgXe1kFibyRM+OhpLNqtBWj+Xc/IUGP UNEGIHiX/bggBEDYF1XrTClNUQr51WA= From: Sui Jingfeng To: David Airlie Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, kvm@vger.kernel.org, linux-fbdev@vger.kernel.org, Sui Jingfeng , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , Daniel Vetter , =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= , Lyude Paul Subject: [PATCH v3 7/9] drm/i915: Add an implement for the is_primary_gpu hook Date: Wed, 12 Jul 2023 00:43:08 +0800 Message-Id: <20230711164310.791756-8-sui.jingfeng@linux.dev> In-Reply-To: <20230711164310.791756-1-sui.jingfeng@linux.dev> References: <20230711164310.791756-1-sui.jingfeng@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@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 | 30 +++++++++++++++++++++++- 1 file changed, 29 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..465ac61e2fd9 100644 --- a/drivers/gpu/drm/i915/display/intel_vga.c +++ b/drivers/gpu/drm/i915/display/intel_vga.c @@ -3,9 +3,12 @@ * Copyright © 2019 Intel Corporation */ +#include #include #include +#include + #include