Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp794221ybb; Wed, 25 Mar 2020 09:42:42 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuwoAj0AJAw9VwYsj082+ED4dNo27sDxHAHxXF5ZGS82U9HwQfmbJgz5uT3f5x0g2A1ODtm X-Received: by 2002:a9d:7d8d:: with SMTP id j13mr3175402otn.166.1585154562393; Wed, 25 Mar 2020 09:42:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585154562; cv=none; d=google.com; s=arc-20160816; b=njIhrSd6WTW9OQVoY8uNgLE4n2RQW91ceY23CnnD0qKvF5JxMtaLtcFhH99tmMUB+L Eo8Rtt0HueHmyJDgmvO5I54MvTdcOnmxgU4tu3kCRXy6hWBKoEyUsVcHSMgCIcObTMTZ NXfvJQgXsMhaMrRDTlpmtSwOCzZsYORqJNJmeUlKwpRH+WthMgeatedKC0z8icLLq/RE qWXdF5NZ6+Uo83zia2Cn9GuUfRjjjhKgfpql8H5DituVWCdh/F1f+0RO8OiUNAN4s5DX FNiJZr/V0nSEHfb+MPxEfeRGoZARt3AwLFpxEKJjoYZ7Dpbu36tjkk4RSiJjIjRCZpRx jHzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=9MK5/RTD4FroJc7jrhBFB2el0zvP28B+N/JmrO1d9yU=; b=EYFEDcnfaMjxo6sBH7XdUI6EKSz74Mr16CEXgkBbph99OpkRSV4vBQ5MCIvGqIHWKQ L789JoehyEuKLYwAvWJXk5RcINnRBm+6Od96ndea53NJ07y3PrZUWjPPplInWYGsvSau 5zh0Jvw1nfh6lvKLngbXcz318I9Che+TTRz1i2ttRtFoU4dKIE8YLm/OSTUgLQWlOorj Oz8AVqBEky1zoKZD1antiZVZguLbdvifh/4YqWBZkyBBlvFjxmldT7IXxONJWaQXpJP1 w6jeBMue5ZLIvh037uBM08/uLIeDNjvMpCI3ZRhib+5juHDusW9XjonccEey8ZLlIzmd Cg6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wNQncXlQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l3si26244oie.6.2020.03.25.09.42.28; Wed, 25 Mar 2020 09:42:42 -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; dkim=pass header.i=@kernel.org header.s=default header.b=wNQncXlQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727504AbgCYQl5 (ORCPT + 99 others); Wed, 25 Mar 2020 12:41:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:40772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727281AbgCYQl5 (ORCPT ); Wed, 25 Mar 2020 12:41:57 -0400 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 335232073E for ; Wed, 25 Mar 2020 16:41:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585154516; bh=yRf3oNqMwM2iTG7pyGx5Rsiqc2MPxpMsUz50QFD55ic=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=wNQncXlQb/kPiwpu/mNOFphhaZSdu97fZPMktrBI7ULMMXkPdoyM8nhLcnyLdX/rF 0K7Ar8NSbvT49k4sqi0+3CcxQyMV26BwaVwShTFQHaevvIOen/kfKLhTT5Dd5x0x8l xzefK26AVtCdsvDcHKGeToClSagQaDx2iO16yAcw= Received: by mail-wm1-f51.google.com with SMTP id a81so3494084wmf.5 for ; Wed, 25 Mar 2020 09:41:56 -0700 (PDT) X-Gm-Message-State: ANhLgQ0IisdLjohdU4nBp9xW+uk9KHMQ4E1hNrhSszB3rVz3xYaKbVgf Fjz+CM+6rUJURI+fE6r1NVXEF/xKMmL+9/x4hc3DZQ== X-Received: by 2002:a7b:c050:: with SMTP id u16mr4608096wmc.68.1585154514613; Wed, 25 Mar 2020 09:41:54 -0700 (PDT) MIME-Version: 1.0 References: <20200319192855.29876-1-nivedita@alum.mit.edu> <20200320020028.1936003-1-nivedita@alum.mit.edu> In-Reply-To: <20200320020028.1936003-1-nivedita@alum.mit.edu> From: Ard Biesheuvel Date: Wed, 25 Mar 2020 17:41:43 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 00/14] efi/gop: Refactoring + mode-setting feature To: Arvind Sankar Cc: Hans de Goede , linux-efi , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 20 Mar 2020 at 03:00, Arvind Sankar wrote: > > 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. > These look good to me. The only question I have is whether it would be possible to use the existing next_arg() and parse_option_str() functions to replace some of the open code parsing that goes on in patches 11 - 14. > 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 >