Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1j6ZI6-0004DI-6C for mharc-grub-devel@gnu.org; Tue, 25 Feb 2020 07:26:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55668) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ZI2-00045Z-Ln for grub-devel@gnu.org; Tue, 25 Feb 2020 07:26:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6ZI1-0006h4-9d for grub-devel@gnu.org; Tue, 25 Feb 2020 07:26:18 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:56942 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6ZI1-0006eh-45 for grub-devel@gnu.org; Tue, 25 Feb 2020 07:26:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582633576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6IhV3k/3C79yEK3ISkpF/VtbqB0UEbpF8QalGNkfNaQ=; b=HC2X/B8jOiZWERhgqqaKREbJ1xpXqaN+L7QojS8XxHAJfOalkCXvzMHGVdO57fEjzpJzM8 +PX4ZlAnFBy0/TNxlp0qmh+veQCu6VpcayDJcmhwSo3P07Gedcwv+C+TH8djKwEdKbywP2 Uw/vY90uEfU1PFqfZavubCc9pPSvv5g= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-334-FZdZeufgOpCQjKddQa6AaQ-1; Tue, 25 Feb 2020 07:26:11 -0500 X-MC-Unique: FZdZeufgOpCQjKddQa6AaQ-1 Received: by mail-wr1-f72.google.com with SMTP id m15so7177777wrs.22 for ; Tue, 25 Feb 2020 04:26:11 -0800 (PST) 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=cbeCWkVldEVLAylo2aAwP4SCCXuqxp7HQkekRzI/1NI=; b=Fq9r1kO/P5tyUFA49JDddOftSga6qZWaFZmTYk56gS2FSiCy5CN1xYFuCxp4DVPxa7 rtTWQVceCnieB3250gXagz78jk3GpW6m8uZjXBMNqJTNqjwOjFOth+/2rgxFBepXk4vD TfpE1VuL3ppOcFVo15ORzyhCeRSewx2LPLX0+RjW3JG8YWdaqU5fYA/10o7m3Hn4TT4c 7z+eQ8AZRnQy/WOY5IxlEenF8ifNn9wGSaBni9SjPowDht4pyNPLQPnwx4i4PfTZQrBP uxgLwfLzHIRh4w2hvMDwqr0kpJ/ZNN1hJ/4Ei/3i+9FmX0yoWzMlJF83fPrCQHi6l4ew c5+g== X-Gm-Message-State: APjAAAX/HOwLkOn8LBnhbgmz5+TQ05HwkVRW4YfQP4cC/VWngUNBF9pY zaqjrGM5bho7ivDq808lROTx9tHKGLwLx162DPiohmPc7uZRGVxPVdBFp3edhD8IDBSA/zn4aR2 2PJmzR8LmoTg= X-Received: by 2002:a1c:2645:: with SMTP id m66mr4974998wmm.98.1582633570519; Tue, 25 Feb 2020 04:26:10 -0800 (PST) X-Google-Smtp-Source: APXvYqyk09UY1omaq9k1QprtBLt/maBjav/vTI9JPOQ03AGAOuZDTMI8X32i8pho9Rf/PqoWwM5OUQ== X-Received: by 2002:a1c:2645:: with SMTP id m66mr4974984wmm.98.1582633570277; Tue, 25 Feb 2020 04:26:10 -0800 (PST) Received: from minerva.redhat.com ([2a01:c50f:ab80:6700:527f:85b3:5615:ff0b]) by smtp.gmail.com with ESMTPSA id q6sm17251653wrf.67.2020.02.25.04.26.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 04:26:09 -0800 (PST) From: Javier Martinez Canillas To: grub-devel@gnu.org Cc: Daniel Kiper , Alexander Graf , Javier Martinez Canillas Subject: [PATCH 06/10] efi/gop: Add support for BLT_ONLY adapters Date: Tue, 25 Feb 2020 13:25:49 +0100 Message-Id: <20200225122553.1120216-7-javierm@redhat.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200225122553.1120216-1-javierm@redhat.com> References: <20200225122553.1120216-1-javierm@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.120 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2020 12:26:20 -0000 From: Alexander Graf EFI GOP has support for multiple different bitness types of frame buffers and for a special "BLT only" type which is always defined to be RGBx. Because grub2 doesn't ever directly access the frame buffer but instead only renders graphics via the BLT interface anyway, we can easily support these adapters. The reason this has come up now is the emerging support for virtio-gpu in OVMF. That adapter does not have the notion of a memory mapped frame buffer and thus is BLT only. Signed-off-by: Alexander Graf Signed-off-by: Javier Martinez Canillas --- grub-core/video/efi_gop.c | 2 ++ include/grub/efi/graphics_output.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/grub-core/video/efi_gop.c b/grub-core/video/efi_gop.c index 7f9d1c2dfa1..c9e40e8d4e9 100644 --- a/grub-core/video/efi_gop.c +++ b/grub-core/video/efi_gop.c @@ -121,6 +121,7 @@ grub_video_gop_get_bpp (struct grub_efi_gop_mode_info *= in) { case GRUB_EFI_GOT_BGRA8: case GRUB_EFI_GOT_RGBA8: + case GRUB_EFI_GOT_BLT_ONLY: return 32; =20 case GRUB_EFI_GOT_BITMASK: @@ -187,6 +188,7 @@ grub_video_gop_fill_real_mode_info (unsigned mode, switch (in->pixel_format) { case GRUB_EFI_GOT_RGBA8: + case GRUB_EFI_GOT_BLT_ONLY: out->red_mask_size =3D 8; out->red_field_pos =3D 0; out->green_mask_size =3D 8; diff --git a/include/grub/efi/graphics_output.h b/include/grub/efi/graphics= _output.h index 12977741192..e4388127c66 100644 --- a/include/grub/efi/graphics_output.h +++ b/include/grub/efi/graphics_output.h @@ -28,7 +28,8 @@ typedef enum { GRUB_EFI_GOT_RGBA8, GRUB_EFI_GOT_BGRA8, - GRUB_EFI_GOT_BITMASK + GRUB_EFI_GOT_BITMASK, + GRUB_EFI_GOT_BLT_ONLY, } grub_efi_gop_pixel_format_t; =20 --=20 2.24.1