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: 13309129 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 E8874EB64DC for ; Tue, 11 Jul 2023 16:53:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 26A5F10E40B; Tue, 11 Jul 2023 16:53:46 +0000 (UTC) Received: from out-21.mta1.migadu.com (out-21.mta1.migadu.com [IPv6:2001:41d0:203:375::15]) by gabe.freedesktop.org (Postfix) with ESMTPS id AE79110E401 for ; Tue, 11 Jul 2023 16:53:32 +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=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 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 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: Tvrtko Ursulin , linux-fbdev@vger.kernel.org, Sui Jingfeng , kvm@vger.kernel.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, Rodrigo Vivi Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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