Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp169431ybb; Thu, 19 Mar 2020 19:03:27 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvxwfwphIwh+1rlvxahNu/e0J5KU/ZB1BfD5LaSXxSF/ezGrExRukNBDmM2nuhtFM5KHi8v X-Received: by 2002:aca:5345:: with SMTP id h66mr4868278oib.110.1584669807616; Thu, 19 Mar 2020 19:03:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584669807; cv=none; d=google.com; s=arc-20160816; b=U1vVldA/XtGGJ/hUV9c1D7iXuVqrAXgUS3z5td2bCmvrKeWBfG6ZpuHCIgFsyLjaOF xoCfY84J6qj0F1oHiUQrhDZGJaDrVYZj4TBgl+4+Poa54ilKxo/GvNO/2gn5wJlnuOhO eOVpq8K/ktBOZziRoVWJdvEZxn8Mb9/RAeF7MQFwUq/8eS2Sy2kXBx1Wern2iyste6DI DGc+/meYRyUxT4Wx/9rHzcAwPeUb2kXbx7ccEBql/ygbh9Gw5D92QRFiq3ONjdo3cdpj IM+zPRrEG3VR4EIJAQGuQy5Gsler7zVF1qD80XTTaOpmGMq/wLrUq/wds5hnLZxBSBzA ihsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=AeGhU+XJtuOPs3cRLNFViNTkzOH17jcA/a34LgeIkSw=; b=zLTyHXO69HSG3x3jmhws3rqX95Lj8xgtiDzcCnNfCkzhukKhocimimu07e6L/2k8/o wcJQ544ugcNfCG9L1WkmOHZmbJHGdu/ekBTSjkynzWy9H5g+83Svd0JRNIqAEkSaknNP 5ozPye2ORcFC+Dbkoq/GtbXQ3WcfVrn5yxu0QWQPzV/aKDIGm5bQ82RsFtOr07Ahl4EQ JQKqrYQpCXN5o/lNrCFxwXksFMZzRuBtSSNAdufA62ydrBW/GR2TeWbkLrPuhjylCqLf pq4wg/UiK0DTJT+yS3y/vwz1fCX1JLa5lp6xRmIp2uVU46E2lTeDgYg0+djCpvyykujg KEYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l65si2014325oig.156.2020.03.19.19.03.15; Thu, 19 Mar 2020 19:03:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727677AbgCTCBY (ORCPT + 99 others); Thu, 19 Mar 2020 22:01:24 -0400 Received: from mail-qk1-f181.google.com ([209.85.222.181]:43435 "EHLO mail-qk1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727389AbgCTCAd (ORCPT ); Thu, 19 Mar 2020 22:00:33 -0400 Received: by mail-qk1-f181.google.com with SMTP id x18so5376578qki.10; Thu, 19 Mar 2020 19:00:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AeGhU+XJtuOPs3cRLNFViNTkzOH17jcA/a34LgeIkSw=; b=aq4OHE/phBWP1IjK3aZCrnawXgjFXaWfTifotFP7BuXGd2TSc3K2gfLzel3p9rN6y8 CHjYypIJ3s7MifasLxUVGqOdHnSV9vhzcIPaKyIQOpkPTuORtvUoMqcNanzoYzzwwflk fFFQd0w5w6HgRKHfclgj89U0Axu15OPh/vdrB5jtSkgui2zGmWdC+UDuwb5Bn8Z+775h dDRVOd1Ly8nvbh4IWoy6wOo2/RK52N+g6r+DLxPkedgFjnXToe16EIQphUMPluccd9gG lPrdoux7212Swb4OPiuYd1Q7RXpcoLDsos0HjhrUlaqa7XhFDTuZJpLCmoR4tjXXfOeI Dpqw== X-Gm-Message-State: ANhLgQ2ry76fn9D7aFdIPoEam585NgQjHb0+1StlXmYv2LLbomA4cSdL P7d1z+6+pONOTWi6abLuTvs= X-Received: by 2002:a37:7e82:: with SMTP id z124mr5776266qkc.360.1584669630572; Thu, 19 Mar 2020 19:00:30 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id n46sm3342198qtb.48.2020.03.19.19.00.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2020 19:00:29 -0700 (PDT) From: Arvind Sankar To: Ard Biesheuvel Cc: Hans de Goede , linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 00/14] efi/gop: Refactoring + mode-setting feature Date: Thu, 19 Mar 2020 22:00:14 -0400 Message-Id: <20200320020028.1936003-1-nivedita@alum.mit.edu> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200319192855.29876-1-nivedita@alum.mit.edu> References: <20200319192855.29876-1-nivedita@alum.mit.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series is against tip:efi/core. Patches 1-9 are small cleanups and refactoring of the code in libstub/gop.c. The rest of the patches add the ability to use a command-line option to switch the gop's display mode. The options supported are: video=efifb:mode=n Choose a specific mode number video=efifb:x[-(rgb|bgr|)] Specify mode by resolution and optionally color depth video=efifb:auto Let the EFI stub choose the highest resolution mode available. The mode-setting additions increase code size of gop.o by about 3k on x86-64 with EFI_MIXED enabled. Changes in v2 (HT lkp@intel.com): - Fix __efistub_global attribute to be after the variable. (NB: bunch of other places should ideally be fixed, those I guess don't matter as they are scalars?) - Silence -Wmaybe-uninitialized warning in set_mode function. Arvind Sankar (14): efi/gop: Remove redundant current_fb_base efi/gop: Move check for framebuffer before con_out efi/gop: Get mode information outside the loop efi/gop: Factor out locating the gop into a function efi/gop: Slightly re-arrange logic of find_gop efi/gop: Move variable declarations into loop block efi/gop: Use helper macros for populating lfb_base efi/gop: Use helper macros for find_bits efi/gop: Remove unreachable code from setup_pixel_info efi/gop: Add prototypes for query_mode and set_mode efi/gop: Allow specifying mode number on command line efi/gop: Allow specifying mode by x efi/gop: Allow specifying depth as well as resolution efi/gop: Allow automatically choosing the best mode Documentation/fb/efifb.rst | 33 +- arch/x86/include/asm/efi.h | 4 + .../firmware/efi/libstub/efi-stub-helper.c | 3 + drivers/firmware/efi/libstub/efistub.h | 8 +- drivers/firmware/efi/libstub/gop.c | 489 ++++++++++++++---- 5 files changed, 428 insertions(+), 109 deletions(-) base-commit: d5528d5e91041e68e8eab9792ce627705a0ed273 -- 2.24.1