From patchwork Fri May 21 19:29:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 12273637 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5785EC4707A for ; Fri, 21 May 2021 19:32:00 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D7F3060FE7 for ; Fri, 21 May 2021 19:31:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D7F3060FE7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=hJO2ZWJy0+L38esVhT56gaswNSGGhDxU7r7Os+4f0WE=; b=Nm8bx0DpmziQver3dksUp/1rC8 QctDuLVa5KcldFs11oSaA30mVXz/lYzF/vGrx3V2jYdaL08F3UBhRJ67++lQbQc5iafSvmamOrNE6 pg4WMAmBcptJn0KPYWNFDG+/RCyGyjRQ5l3G7U8Ff24Uls8zdc/wUeWGj5WgV2i9nFCpICo4G2Knf RNQd0XllkTp9XZgAncFkEwhZ+zCIZFpuQ6c9zjeGlSMPus+w90Jdi54EeskI/K/zVW2OD4Pg0tte0 6Qu+Mc0/ugsLtRcF4Vw1tR5OlMqf+TdNeY22guRR3MdVglzNZ3F8YZ0zipXq79j9YAkcVsveYML2d 53WK2IQQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lkAqR-000rd9-R9; Fri, 21 May 2021 19:30:04 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lkAqH-000rbj-4T for linux-arm-kernel@desiato.infradead.org; Fri, 21 May 2021 19:29:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type: Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:Content-ID:Content-Description:In-Reply-To:References; bh=W/zi/LtHS0XDym1cIKLNS5P4Tl2hUYuQ3Q4oc605Ruc=; b=PPgmS8fDmQqy1PVgy95szBSgEd 4yvveC7Pv1e56z7zKRP8sREUyUCgCh5idzqH0O6oYz587/Dq3w2b+jv2hNa6v4Ha5kvoOCOueCmVW izMfFsrVsRnccs+KyWrypjpVpwKNX7FpR4M4HWIIZZsjSniCWQp0YzSNsnleZh04Uzpl1hT4M0rKW Fta36+dikuJGnNf4wRZQK1Io4986JPRI4mz3WD4CXE/bLsf8lNBOegGKBwXV+T3cGVNcUguXcpFA8 74yX1mknNirGOGLBRHqb6wn7+ySmPYTzfxb5W/z+8G5WLUhPadHicN5bGOZDmqcKpAMfK5J4aEXB5 qMV+R1IQ==; Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lkAqE-00HNaN-FL for linux-arm-kernel@lists.infradead.org; Fri, 21 May 2021 19:29:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621625388; 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; bh=W/zi/LtHS0XDym1cIKLNS5P4Tl2hUYuQ3Q4oc605Ruc=; b=RzkCAQ0bVS9m5jJ02wln8ieO5a3sJBq2avzx77AbCTErLcNoSl8zCJ0kP5SR2R15RscDzZ QYAj+ItWlVibML0NqNkc+w6DfRtudRZDRMffmWWsb1/TE2P0t+rm+aKnKflH5+laVUqoKv yTo8Ij5xvUTEYX9NSWflC8KGvk/969o= 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-444-Jl22H8e7MqW6WA2MwxHTsw-1; Fri, 21 May 2021 15:29:45 -0400 X-MC-Unique: Jl22H8e7MqW6WA2MwxHTsw-1 Received: by mail-wr1-f72.google.com with SMTP id j33-20020adf91240000b029010e4009d2ffso9879566wrj.0 for ; Fri, 21 May 2021 12:29:45 -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=Cx0Bk6Ft6oZTkQkb3ppepxkBf9rBWy6RCs6sGjSOCxTnVFAL51Q6HAt7NLTFbAZRYZ vQPVnOvoyWMVUOBGmmdX0kzOoqFTwzla5xdkBjebLapO79SHaifh9ku35yWQBsw8dKgH g8sRGE1DG5b6SWjVYmqTDqrnJk7QRCPRdwj6FcfAXYzf9b55fOfrSxMtV8tBTKbDE9om 2xbElC1jP3bEYsKT0v/1DMuGe+EP0hK3stNfUfPySQ6msrPJXrmGZX6jPXGgwTEXEPRu Q1HJaaRKolYzcPa3HWnldSEO/DoauCESdc4uPYV5p9KQS3ea6BjXbi4/1YGgL6/z3gjy YcGQ== X-Gm-Message-State: AOAM532sChldniyQUPfq0RwRAnVcCHev6ExnnQjC4GcKoHYnOx1vGQPH ODBEMpWIP0sXa6gSDyQOCD0+eRUyZcuy7ogf6fItB117Q3X6HtkxAPFDblOHUNQfPSVk1idXWTw CZAbptJmphCPsQhW+gvEm7Kt5G580jP4qwgs= X-Received: by 2002:a05:600c:4b92:: with SMTP id e18mr10110484wmp.71.1621625384766; Fri, 21 May 2021 12:29:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/OyYpeLIFQQtA9P7euza3ZHBvS4POGpr3Wcj1AR1IOx4wP4WYkmEu/V4dSruhwNMjfWVl2Q== 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=javierm@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210521_122950_614101_E36D9147 X-CRM114-Status: GOOD ( 14.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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%)