Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1405775pxj; Fri, 21 May 2021 13:28:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyO/rbTVPjLM57sunjXKLt4/iccdMJ9f1Nc6msUXcsDrtJdd62o61V1SxE8hgGKRmYnb57W X-Received: by 2002:a17:906:60d6:: with SMTP id f22mr12055806ejk.177.1621628917731; Fri, 21 May 2021 13:28:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621628917; cv=none; d=google.com; s=arc-20160816; b=RXUJlmtcoTl7GkwjdzroaB+DjjgDpdgPjn6fj9SkColWfWexhhEBPwVlAv1CJ/fVuQ 1zp7tjw5ii0EPH+LYDF+uYn2HAEi+eq+QXuY7F0l987gS4pkGC0Kabx5oFZkbdaMF8EO k61Jd3aWzD6bTbA4ytbg/SE0aRNTDE/NwvrAzWnblL6Z/ncxo4ZA8aFP3yushLupDaBw a48fBNiFwC1oRvzWj0DS8+Y70zCjgBLf48xJxbfTJLEPMP3zCTu2rkT8vk+tAnZB8pl9 d1mYxWHrkBty3xIxiMeoixffAVheG7cE5Y2PZGZrsSToR2w6bGDOSMPLrMdcKmrBwwjT dy8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=W/zi/LtHS0XDym1cIKLNS5P4Tl2hUYuQ3Q4oc605Ruc=; b=0eozmOpALFHr49iYeeys28XO5fZf/AeIGarbwELWizXU9mYm+gc1Ktyu7J/q3h28Vr A5BBrb8xbZZ7JIDyb41sc2reWGR1kW84hskowkQSiYuvD5jpyWqlTi3cvZWr08Yc4SKQ 1ftod/pHj/8OjQdqcE49LVIZk23rQcgodWqrdpMs8XC7JFviI20NJQR77d5ZwNtYrBc1 2WRp5s9UB3latqtT2QP+7zvqBpsYGgzdRHHHsHEa1WXT6W488kbzqLqHYR/3RGFRM8Hv 5P6cRDiCdJbt3Iw8AJy128krKgs4oOIi63VNxFRJbeAhW8Mc0DFQA3GaXr0kc7ADhWn5 Rw/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WbWoRry5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ca24si5959122ejb.289.2021.05.21.13.28.14; Fri, 21 May 2021 13:28:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WbWoRry5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230526AbhEUTbM (ORCPT + 99 others); Fri, 21 May 2021 15:31:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:20616 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233915AbhEUTbL (ORCPT ); Fri, 21 May 2021 15:31:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621625387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=W/zi/LtHS0XDym1cIKLNS5P4Tl2hUYuQ3Q4oc605Ruc=; b=WbWoRry5olkobyvisfXDrjy1jOgWBoap15a3NtexQoqSsp1a+QLRw77NcxUVvVtYglVzqE LJVM0wGKlVj+7+k1Ohidy4hdtWXsX+iflDDnbgAuDNip7agZSdOFDdJHopBlhyD1g7s6Ji mdA5zxA3wfWjKdaUW5zb3BUS6c5ghT8= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-223-5VEm9NYgOBGg1vfzK35oyg-1; Fri, 21 May 2021 15:29:46 -0400 X-MC-Unique: 5VEm9NYgOBGg1vfzK35oyg-1 Received: by mail-wr1-f69.google.com with SMTP id q15-20020adfc50f0000b0290111f48b865cso6379305wrf.4 for ; Fri, 21 May 2021 12:29:46 -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:mime-version :content-transfer-encoding; bh=W/zi/LtHS0XDym1cIKLNS5P4Tl2hUYuQ3Q4oc605Ruc=; b=iUZrFegN0lzCnnl2ABZEhAAYiispVYn3A/1yyEWUFpznqXGweDGI1u3C1pgayA+CiN xXHdodXy7BMqovmwm0MZHn1w+gTwVpJ3A0LVCSkGI3xCZEEEBf7EiUtHe5ub56g2mTp9 k7P2EFCL/rDikVKobMLJcPRtL1aaonD2bI5ct4jtWy4gOo5jvpPbeBWGyyfiDlrNN04H skj5O7hwgc6jBwe2ttm77LaSHrp2A6FGQ9COfncWpQdd6NcuB4YlHM9z4vaZ5dGzq/6h MmMi0XWmk9pPcpnc1MTONCIFdaOzoEK2TFYf6QniEYGkDxd4BuHoRUJOreZfrllOU6kj 96DA== X-Gm-Message-State: AOAM530Y8vk6OvwaYa9JwJ0LYyeDC2Pqjv20qaJA0Z1FJy2rBgBfpyHg +HTcs86O7fCa/xPp9q76Ksu9kKeoFAWz9SmsVIXZGMcFgjQHXClMmsmZTfspN/0YpOQdaV5PJ7y YfL3KdcLNpil+DAPTxhZdKHlFVimN8/N2FK1p+XAGq4Oiphj8ZA3LyjEgg0xJRbMX1oILHwWqiJ A= X-Received: by 2002:a05:600c:4b92:: with SMTP id e18mr10110502wmp.71.1621625384808; Fri, 21 May 2021 12:29:44 -0700 (PDT) X-Received: by 2002:a05:600c:4b92:: with SMTP id e18mr10110469wmp.71.1621625384534; Fri, 21 May 2021 12:29:44 -0700 (PDT) Received: from minerva.home ([92.176.231.106]) by smtp.gmail.com with ESMTPSA id s7sm434402wmh.35.2021.05.21.12.29.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 May 2021 12:29:43 -0700 (PDT) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, Daniel Vetter , Peter Robinson , Thomas Zimmermann , David Airlie , Hans de Goede , Javier Martinez Canillas , Albert Ou , Ard Biesheuvel , Borislav Petkov , Catalin Marinas , "H. Peter Anvin" , Ingo Molnar , Palmer Dabbelt , Paul Walmsley , Russell King , Thomas Gleixner , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org, linux-riscv@lists.infradead.org, x86@kernel.org Subject: [PATCH 0/2] allow the sysfb support to be used in non-x86 arches Date: Fri, 21 May 2021 21:29:04 +0200 Message-Id: <20210521192907.3040644-1-javierm@redhat.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The x86 architecture platform has a Generic System Framebuffers (sysfb) support, that register a system frambuffer platform devices. It either registers a "simple-framebuffer" for the simple{fb,drm} drivers or legacy VGA/EFI FB devices for the vgafb/efifb drivers. Besides this, the EFI initialization code used by other architectures such as aarch64 and riscv, has similar logic but only register an EFI FB device. The sysfb is generic enough to be reused by other architectures and can be moved out of the arch/x86 directory to drivers/firmware, allowing the EFI logic used by non-x86 architectures to be folded into sysfb as well. Patch #1 in this series do the former while patch #2 the latter. This has been tested on x86_64 and aarch64 machines using the efifb, simplefb and simpledrm drivers. But more testing will be highly appreciated, to make sure that no regressions are being introduced by these changes. Since this touches both arch/{x86,arm,arm64,riscv} and drivers/firmware, I don't know how it should be merged. But I didn't find a way to split these. Best regards, Javier Javier Martinez Canillas (2): drivers/firmware: move x86 Generic System Framebuffers support drivers/firmware: consolidate EFI framebuffer setup for all arches arch/arm/Kconfig | 1 + arch/arm/include/asm/efi.h | 5 +- arch/arm64/Kconfig | 1 + arch/arm64/include/asm/efi.h | 5 +- arch/riscv/Kconfig | 1 + arch/riscv/include/asm/efi.h | 5 +- arch/x86/Kconfig | 27 +----- arch/x86/kernel/Makefile | 3 - drivers/firmware/Kconfig | 30 +++++++ drivers/firmware/Makefile | 2 + drivers/firmware/efi/Makefile | 2 + drivers/firmware/efi/efi-init.c | 90 ------------------- .../firmware/efi}/sysfb_efi.c | 79 +++++++++++++++- {arch/x86/kernel => drivers/firmware}/sysfb.c | 42 +++++---- .../firmware}/sysfb_simplefb.c | 31 ++++--- .../x86/include/asm => include/linux}/sysfb.h | 34 +++---- 16 files changed, 182 insertions(+), 176 deletions(-) rename {arch/x86/kernel => drivers/firmware/efi}/sysfb_efi.c (84%) rename {arch/x86/kernel => drivers/firmware}/sysfb.c (70%) rename {arch/x86/kernel => drivers/firmware}/sysfb_simplefb.c (82%) rename {arch/x86/include/asm => include/linux}/sysfb.h (68%) -- 2.31.1