From patchwork Mon Dec 19 16:05:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13076937 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 42865C4332F for ; Mon, 19 Dec 2022 17:43:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=e3A9+gXWEx1ECTOUmHXdz5OBYwN0MQTTNoaAU/SwKCY=; b=i4T7uF19EBlxgQ Pt6xO00eetg5eI3VJju3/rI5RubGiCaDyX+NWnwCSZ/jP9pAZjO0HANSIk/wI8JiIKvc5atoggAnP bKjRlPcykk52EqHchkA/JodHc6HSgUB+KuPQbXnSrNnMgzLiRWrOHp+luM90C2Qs5T5QrAMcOlf+k LTa5mVgRVcEBonficd332HnHJYM4GLcHXGnc1uUTGL+v5axM5/+HL3PgOzExMxBtlElGJ1sngnwnr Yciec2vxFDJJw4uCL6AUa1qACthjt2PIcEpf6TDtmfh6WFL0X7bGxqHrLxF2PxKXma2zmINllszy/ pnSv69rMPoRDJvXxm3+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p7K9s-00Gw70-7N; Mon, 19 Dec 2022 17:42:36 +0000 Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p7Idp-00FmwL-Ac for linux-arm-kernel@lists.infradead.org; Mon, 19 Dec 2022 16:05:31 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id F2E2738149; Mon, 19 Dec 2022 16:05:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1671465921; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=obTd6Vm1en8QYigHEu9RhDcL5tb/CmpPkDgnKAoQ5jE=; b=b4K4FAar1WgYMZX5pfZnzCVcF80GxF/BuZdANPvIPGZthi5DRao3/arOXSSrCzmw+/YfIu DkFh6mfpuAErsioiYMFs06ZKz2+V2DVmkQA/tHWYwslk5m/ZgqIWKw4b6LELWED4hBlVJq 1O/aqwBiAkBpVH844qCWXsHTJU1MG4w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1671465921; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=obTd6Vm1en8QYigHEu9RhDcL5tb/CmpPkDgnKAoQ5jE=; b=472H4JvHPod2/eeTkuU93yA7QE5pwbZ5rhmYSoL7HgEUeRiKO1eB//pWB5b5OYjMvvrDAE xRpEqrP5VJVl4uAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B7D6213911; Mon, 19 Dec 2022 16:05:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id SMr4K8CLoGPeZwAAMHmgww (envelope-from ); Mon, 19 Dec 2022 16:05:20 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, intel-gfx@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-hyperv@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 10/18] fbdev/efifb: Add struct efifb_par for driver data Date: Mon, 19 Dec 2022 17:05:08 +0100 Message-Id: <20221219160516.23436-11-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221219160516.23436-1-tzimmermann@suse.de> References: <20221219160516.23436-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221219_080525_695048_55BD1D02 X-CRM114-Status: GOOD ( 12.68 ) 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 efifb_par structure holds the palette for efifb. It will also be useful for storing the device's aperture range. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/video/fbdev/efifb.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c index 16c1aaae9afa..694013f62781 100644 --- a/drivers/video/fbdev/efifb.c +++ b/drivers/video/fbdev/efifb.c @@ -49,6 +49,10 @@ static u64 mem_flags = EFI_MEMORY_WC | EFI_MEMORY_UC; static struct pci_dev *efifb_pci_dev; /* dev with BAR covering the efifb */ +struct efifb_par { + u32 pseudo_palette[16]; +}; + static struct fb_var_screeninfo efifb_defined = { .activate = FB_ACTIVATE_NOW, .height = -1, @@ -351,6 +355,7 @@ static u64 bar_offset; static int efifb_probe(struct platform_device *dev) { struct fb_info *info; + struct efifb_par *par; int err, orientation; unsigned int size_vmode; unsigned int size_remap; @@ -447,14 +452,14 @@ static int efifb_probe(struct platform_device *dev) efifb_fix.smem_start); } - info = framebuffer_alloc(sizeof(u32) * 16, &dev->dev); + info = framebuffer_alloc(sizeof(*par), &dev->dev); if (!info) { err = -ENOMEM; goto err_release_mem; } platform_set_drvdata(dev, info); - info->pseudo_palette = info->par; - info->par = NULL; + par = info->par; + info->pseudo_palette = par->pseudo_palette; info->apertures = alloc_apertures(1); if (!info->apertures) {