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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2795FC636CC for ; Sun, 5 Feb 2023 19:57:19 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5311C85799; Sun, 5 Feb 2023 20:56:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="dlpuqKVD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E5D1A85797; Sun, 5 Feb 2023 20:46:52 +0100 (CET) Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3847685798 for ; Sun, 5 Feb 2023 20:46:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd29.google.com with SMTP id q6so3788923ior.12 for ; Sun, 05 Feb 2023 11:46:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; 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=solQ8iwTNF1Td624/rDyeDAN3hSQEquu7iJDlBNCBQg=; b=dlpuqKVDAk9zhqioegGE+mPWXP4ASdQYTVfB2Z38jsmhx2Wk6iEJgHydnU7TIUcRVV gJDqSb7MwW0hh+sy13+A/lEivs9AOxaSyhx2YjTiFpP3OfwAcmNl5ca9F/ur6gHe4itd ++P9lZFpuagUjeB/Dj7r10xXchY8xlW9n3ujQ= 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=solQ8iwTNF1Td624/rDyeDAN3hSQEquu7iJDlBNCBQg=; b=1Q4WY2OhDyEgdRmKIINtx01107DnvwUHCpsrHZbCGDQWW5zI4TW1Fmud+CXlSYSA/g fwRWbfIiiOpEGKHWBwqSMijy4TcpKUd4/7gUONv71lYYR4cdMrnoMOBgyAQvU9aRWq/N dHihT4GGaH+x2wAIBzVI8VF3M9q9R50qsSGiT9Y2UWmgxh+RcVKMv5bzz0uwKcuFfmXL rCt7Zi1dh35xdxKJ8mTMPPkfVy18zsVrT9tkklP4AFCAkExe96hBAHLpSrahIKOh/UVG m5dM5qvYCtSz7VKPo/QUsYz9paxJivQzEF3eufgw+YLaWqahEq11yhpH5GDd8UFMGSL6 vsGw== X-Gm-Message-State: AO0yUKWSe+JYcD+zGDfCCoRIK70uZ1rYg6hyu1O+mNxMWAd0TE09ywz3 yH/xBUVg3gOZIQA+caQMJ2ldbbQBgpu59vzi X-Google-Smtp-Source: AK7set/BYKdJ2t7nrUffR13EQkcP1tNgbqTsVNGddb7Rh8mq51JbUMjA2FdY380SyvbjZkbX4uLiQA== X-Received: by 2002:a6b:8f57:0:b0:6df:820f:beae with SMTP id r84-20020a6b8f57000000b006df820fbeaemr11640447iod.18.1675626401678; Sun, 05 Feb 2023 11:46:41 -0800 (PST) Received: from sjg1.roam.corp.google.com (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id p13-20020a6b8d0d000000b007219624f89fsm2594282iod.11.2023.02.05.11.46.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Feb 2023 11:46:41 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Anatolij Gustschin , Heinrich Schuchardt , Simon Glass Subject: [PATCH 02/11] efi: video: Return mode info for app also Date: Sun, 5 Feb 2023 12:46:18 -0700 Message-Id: <20230205194627.203961-3-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.519.gcb327c4b5f-goog In-Reply-To: <20230205194627.203961-1-sjg@chromium.org> References: <20230205194627.203961-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean The mode info is currently not initialised for the app. Fix this by returning it from the function. Signed-off-by: Simon Glass --- drivers/video/efi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/video/efi.c b/drivers/video/efi.c index fc37a68b376..0479f207032 100644 --- a/drivers/video/efi.c +++ b/drivers/video/efi.c @@ -56,10 +56,12 @@ static void efi_find_pixel_bits(u32 mask, u8 *pos, u8 *size) * Gets info from the graphics-output protocol * * @vesa: Place to put the mode information + * @infop: Returns a pointer to the mode info * Returns: 0 if OK, -ENOSYS if boot services are not available, -ENOTSUPP if * the protocol is not supported by EFI */ -static int get_mode_info(struct vesa_mode_info *vesa) +static int get_mode_info(struct vesa_mode_info *vesa, + struct efi_gop_mode_info **infop) { efi_guid_t efi_gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; struct efi_boot_services *boot = efi_get_boot(); @@ -77,6 +79,7 @@ static int get_mode_info(struct vesa_mode_info *vesa) vesa->phys_base_ptr = mode->fb_base; vesa->x_resolution = mode->info->width; vesa->y_resolution = mode->info->height; + *infop = mode->info; return 0; } @@ -118,7 +121,7 @@ static int save_vesa_mode(struct vesa_mode_info *vesa) int ret; if (IS_ENABLED(CONFIG_EFI_APP)) - ret = get_mode_info(vesa); + ret = get_mode_info(vesa, &info); else ret = get_mode_from_entry(vesa, &info); if (ret) { -- 2.39.1.519.gcb327c4b5f-goog