From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 30 Jan 2023 19:23:50 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pMYop-007spf-Mp for lore@lore.pengutronix.de; Mon, 30 Jan 2023 19:23:50 +0100 Received: from bombadil.infradead.org ([2607:7c80:54:3::133]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pMYom-0001Kx-HG for lore@pengutronix.de; Mon, 30 Jan 2023 19:23:49 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HrWq+SIvQGGLnVuAe+pmvE1z0iQekd4ONge5++oZiVc=; b=aK0n4ljebmPgs+QH/NX3fpYb2J wPd7PFI7nnyfh29xjMnY1vkY0FQVu0OvnTkfyKqbyGmtUMKJ83QzPUiCn8YQtNP4O6DKTOHIU0NL6 kR81L9dA1QGSBiRt8h1VhFnI0//6EYcMAhzzgDpworj+Wgaj0t5C4xjs7MfQzbPATEvuRTvd2rei/ GDSFUjUklplwPGEDKVJNfb9kMt3hYEfzi6UKm8KL0Jpkrt9E86GKltUnrXOTlUMFgXhfWeLAcPgb6 HvPHQopOq8eTTQkYw7ApBeXTzGjrOQBhbeuTIbl7TLRIOD/8+RHQxBvpLmugeM1qsIbVW82VSQT0D 0fmStSrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pMOZd-002XfP-My; Mon, 30 Jan 2023 07:27:29 +0000 Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pMOZS-002Xcw-EO for barebox@lists.infradead.org; Mon, 30 Jan 2023 07:27:20 +0000 Received: (Authenticated sender: ahmad@a3f.at) by mail.gandi.net (Postfix) with ESMTPSA id 8ED531C000B; Mon, 30 Jan 2023 07:27:16 +0000 (UTC) From: Ahmad Fatoum To: barebox@lists.infradead.org Cc: Adrian Negreanu Date: Mon, 30 Jan 2023 08:27:07 +0100 Message-Id: <20230130072707.2423294-5-ahmad@a3f.at> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230130072707.2423294-1-ahmad@a3f.at> References: <20230130072707.2423294-1-ahmad@a3f.at> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230129_232718_770537_0A754867 X-CRM114-Status: GOOD ( 22.61 ) X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "barebox" X-SA-Exim-Connect-IP: 2607:7c80:54:3::133 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-5.2 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: [PATCH v2 4/4] video: add support for QEMU ramfb X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.ext.pengutronix.de) From: Adrian Negreanu QEMU's ramfb is a very simple Qemu fw_cfg protocol, where the guest need only write a video settings structure to /etc/ramfb to get DMA from the framebuffer working. We don't yet have FS support for fw_cfg, so we use the character device interface. As barebox display mode handling only supports selecting predefined modes and has no accommodation yet for arbitrary resolution support like on QEMU, for now we just provide a fixed 640x480@XRGB8888 mode. Tested with: qemu-system-aarch64 -M virt -vga none -device ramfb \ -kernel images/barebox-dt-2nd.img -cpu cortex-a57 -serial mon:stdio Signed-off-by: Adrian Negreanu Signed-off-by: Ahmad Fatoum --- v1 -> v2: - rebased on new /dev/fw_cfg API - remove Kconfig resolution setup as no other driver does this - replace own PACKED definition with __packed - use