Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1586394ybb; Thu, 26 Mar 2020 03:42:45 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs0f/7/jScQcGbvJgdKcSdGhmRrzPH/jprLQHrFDc+c29FhS1aAnAjTDGkwUKaSGucud6YB X-Received: by 2002:a9d:6a97:: with SMTP id l23mr5608095otq.69.1585219365189; Thu, 26 Mar 2020 03:42:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585219365; cv=none; d=google.com; s=arc-20160816; b=txgM1CKNApRDIG6Q0nBNwhog+xkgKK6GU8t7OP78AAN8KrH8rH3FsmY9JNLcf1YAAQ ZLIhvtBf/+GfI2YesTEgzyApCdR4RMS/GngzPSvvpbfLyj/mJSPxK8bw6VeNnxlFZ3t4 +R4pbj68WxnK4sMjpIOVEaR8QoOUdFgONQIjWnsBUZSVpdCj7GFxpNwhkqKdZnuuHJdi atEUd4ztu9p18MwPi8pjx0Aaa8JU3XJqj1bh/yeAm30jyyOVcgSto5Ku1JI+7AD4R8Z3 WLBli9/xipf4UU81PRxwTRATGfBy5jwbOVX6dWTU3EbikfxBVLRpzp0pxRKUOj4yYzdu BQtQ== 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=R9dvQJRPeqbg52RXgn3VtwUz5ee63IADBrmWNbZIa1U=; b=KWrsj5jmf9M6d5c0S4nrLKJTyR1xhwntYHkI+BBMlqVCl7YmxZOC8ke9/5rHJdqnkb 7K5EqJCsJCTdVnFsGUVS9pXkL49WnovCX1r/sHWkPUAskvZ9vhC5Xh1deFspoPfprKG/ GPE6QMR+Tbvfs6xFkEOtbUaNoR2hDTlLQR47KjxQ/stKDudyzRPFv+c463wcyEc222sL SNIT96pXjg3RShEWye8/+fTxMwC00Owl3qUH8pmEkK6FDDjuUU1xDQbW/sDo4dEIfjYO QnRx8SAnLORUM5sd9OuJxGumZbcqujw1gmRyZ5EX5aedDZV4ZJYBnOykDKgODJ7OY5MO gvdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=APt9412E; 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 d145si877662oig.261.2020.03.26.03.42.32; Thu, 26 Mar 2020 03:42:45 -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=APt9412E; 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 S1727956AbgCZKlN (ORCPT + 99 others); Thu, 26 Mar 2020 06:41:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:35050 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727743AbgCZKlN (ORCPT ); Thu, 26 Mar 2020 06:41:13 -0400 Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) (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 29D4F20748; Thu, 26 Mar 2020 10:41:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585219272; bh=TGhiOgIo8mu4ICaKE4XoCYAUUeJUBx2f8IkX5r2oMkA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=APt9412EG6wRy1czJx85YKYi/77Br/aABhgUQO3nGf/vDkRVqLIfDl6jLQYSfyfNW O3OwE4IhxLrPPw/wzFm4tBsxa9Xu22sqiP82eg7UYJKv58fRVJZRR2sPdUmca75qIN 8eBTaKdVyC4UxFO9HZG/3NMoURPoMbPHQKBUU+PQ= Received: by mail-io1-f49.google.com with SMTP id q128so5479441iof.9; Thu, 26 Mar 2020 03:41:12 -0700 (PDT) X-Gm-Message-State: ANhLgQ2+jvHKyLeipfsbWUaqDG8pYBccKf9OFjxW/WSB/HbR7mWXSHmp e5+ertWdW1G+09W+Td1g5Y1ZmkA0fnjS3kaSN5Q= X-Received: by 2002:a5d:8b57:: with SMTP id c23mr449328iot.161.1585219271544; Thu, 26 Mar 2020 03:41:11 -0700 (PDT) MIME-Version: 1.0 References: <20200319192855.29876-1-nivedita@alum.mit.edu> <20200320020028.1936003-1-nivedita@alum.mit.edu> <20200325221007.GA290267@rani.riverdale.lan> In-Reply-To: From: Ard Biesheuvel Date: Thu, 26 Mar 2020 11:41:00 +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 Thu, 26 Mar 2020 at 00:36, Ard Biesheuvel wrote: > > On Wed, 25 Mar 2020 at 23:10, Arvind Sankar wrote: > > > > On Wed, Mar 25, 2020 at 05:41:43PM +0100, Ard Biesheuvel wrote: > > > 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. > > > > > > > I don't think so -- next_arg is for parsing space-separated param=value > > pairs, so efi_parse_options can use it, but it doesn't work for the > > comma-separated options we'll have within the value. > > > > parse_option_str would only work for the "auto" option, but it scans the > > entire option string and just returns whether it was there or not, so it > > wouldn't be too useful either, since we have to check for the other > > possibilities anyway. > > > > It would be nice to have a more generic library for cmdline parsing, > > there are a lot of places that have to open-code option parsing like > > this. > > OK, I have queued these up now in the EFI next branch, but this will obviously have to wait for v5.8 Thanks