Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp168409ybb; Thu, 19 Mar 2020 19:02:08 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvcX4GjzBJZSBNuw7n4WwOtE8B6kMPI7uqRtJ03DRb65zQqiSO7P+9epkte8xQW79Nem+lU X-Received: by 2002:a9d:7d8d:: with SMTP id j13mr4951540otn.166.1584669728559; Thu, 19 Mar 2020 19:02:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584669728; cv=none; d=google.com; s=arc-20160816; b=YMFofBYP87SEPv3w3Zk8h4UDFZH8ygCYUXutopEvs/ahINaf7kQBH/Gv5/rlKQ83eH FMkWcBQx5mcfnSKJXZSybA3s/WTW4hnaIwpTIw3PlqJrQgmTDkL7DTiSU9wUU5/RQskE uTwWX4j0VMOL8sHnOLtTzjkUfv3PuwJeElCWZMU/lcZp/aIkX5cGPR9tnH9dwZxsptXK VgW7r/RqY9mkiawHVMoqTZR8Am7uSID6s2xgw+R5dOjyf+Z+1y7ng9yiwP53Zl+dKdl+ YC0hL6L63S1tLQAdQG78SwJ6AmEX+aa7ciK/ce1ZT97/WfLsrvhjakakj0jYfh+1axD2 LGCQ== 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=yf/d6z5fDqSiUAa0pPPTXtMy3f41r+NjRTZ8TYCHO5A=; b=dcoPJ9ZKHQQm7xtP8D6nMG7tO0F79agrlKbwG+nfe2SVz+rqZjXistXg3KiZnBw7H2 gQN748I785aPBZEzhFvqa4wxymDkvYNz9hD4vJCVV95S1f+gp/ZUGULOTi5jF0FhCVCq juVw7b0dsTVGmCLi55U22teYXVtfNf2UJg8Jk+tlTqlayQpzxoWTB/8dcZTU6EcUF8oW cEH+WjLF0mwht8l74wmB5Im+eHR8RBiHhtuhT/pzy7TJky/6mKTpb6jKYYPyFaFv5ZCz pSdJ3yMeWw1ky3QjqdFnhycFZaRCYe5zPMR5375nCxp6vdjzkk8I2+dn5TFyoiHRTb8z wedw== 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 f6si2215028otq.50.2020.03.19.19.01.56; Thu, 19 Mar 2020 19:02:08 -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 S1727426AbgCTCAd (ORCPT + 99 others); Thu, 19 Mar 2020 22:00:33 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:38050 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727384AbgCTCAd (ORCPT ); Thu, 19 Mar 2020 22:00:33 -0400 Received: by mail-qk1-f193.google.com with SMTP id h14so5433397qke.5; Thu, 19 Mar 2020 19:00:32 -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=yf/d6z5fDqSiUAa0pPPTXtMy3f41r+NjRTZ8TYCHO5A=; b=e9Iygy4geKUotzBX/2+dB3UpBzBrYMkIJGJ/7rj7Ksc5CjEz28EzGeXHFkDwC9hoXd YDa4CASBn4VZQKNgcxrU2bmnau6lmsG9VX8GvV7rpDvUeIpCGOlYcueDtGlZ+a2brXnZ Qq/+YMorIVSL3kVbq4eyp+j25cVO1YCjjIZ0RkIZMiEAb3hwCqEkNR+3hAeRt1w4YA/p Eigns0bOYhYnn7oW4WcNqRczx3bXLrLvMyndomJurei0DlhoDyY2evFTs+KESP5/WEJF 2mc9Hz+JdhDVHkuvOhEPiDMz9n6nbBCQtvCfQvZFE5uPPMehjaim8K7aMq3730zZ4Z5U l6Qg== X-Gm-Message-State: ANhLgQ10b0MHbDDOhVwR9nKNbfq+AGw9PaXp3Ux1iZ+qck7ghFCZ9Fn3 a5bRJIxWkBvsNL9gqKHrPGo= X-Received: by 2002:a37:664d:: with SMTP id a74mr5736603qkc.256.1584669632091; Thu, 19 Mar 2020 19:00:32 -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.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2020 19:00:31 -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 02/14] efi/gop: Move check for framebuffer before con_out Date: Thu, 19 Mar 2020 22:00:16 -0400 Message-Id: <20200320020028.1936003-3-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 If the gop doesn't have a framebuffer, there's no point in checking for con_out support. Signed-off-by: Arvind Sankar --- drivers/firmware/efi/libstub/gop.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/firmware/efi/libstub/gop.c b/drivers/firmware/efi/libstub/gop.c index f40d535dccb8..201b66970b2b 100644 --- a/drivers/firmware/efi/libstub/gop.c +++ b/drivers/firmware/efi/libstub/gop.c @@ -113,15 +113,16 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto, if (status != EFI_SUCCESS) continue; + mode = efi_table_attr(gop, mode); + info = efi_table_attr(mode, info); + if (info->pixel_format == PIXEL_BLT_ONLY) + continue; + status = efi_bs_call(handle_protocol, h, &conout_proto, &dummy); if (status == EFI_SUCCESS) conout_found = true; - mode = efi_table_attr(gop, mode); - info = efi_table_attr(mode, info); - - if ((!first_gop || conout_found) && - info->pixel_format != PIXEL_BLT_ONLY) { + if (!first_gop || conout_found) { /* * Systems that use the UEFI Console Splitter may * provide multiple GOP devices, not all of which are -- 2.24.1