From patchwork Fri Jul 7 08:31:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13304570 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 E31ADEB64D9 for ; Fri, 7 Jul 2023 08:35:02 +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=6+/fzpA9GygxaVAqeBw7PBZEmAkkiQwc1uYqBcud50g=; b=O0j1N5nCx4DV82 r3fdCDnxeFgVJyv1fbP7NGF+hxCW+TPGnI5c0UHsCaItScneWR6hXuLMWhfcp9bBhxO6SZyQI2Hip 5zmVcydY9AOATsnaKD+ekLbNfKLoxg41WlS7HV0uR0FJrcyscmqImNouKKpRrmwhXkQ6IGzznJvkY xqBBRWdXBLvIa75cotgGSp/wGPecHnfEEuptWQjx1eLHHe69azXT1m/VoW+C5KXttpRyofVnME4/L lGsL4rO6BxAE8YJbnZ9Iv+NtTne50xzfsVJciSk0KHgHbpFOy3PVLq6tE0Dd2qCud30WFKZYxY+46 SLC+pmg5rKTSH3q/zwzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHgv9-0040Mo-20; Fri, 07 Jul 2023 08:34:31 +0000 Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qHgv6-0040Kc-30 for linux-arm-kernel@lists.infradead.org; Fri, 07 Jul 2023 08:34:30 +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 71F95227BF; Fri, 7 Jul 2023 08:34:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1688718867; 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=KMwLIko/n0DlYoocrVnbzMjwujsIFsQzXunnsYrfOew=; b=ZTgvS2Hnu5DfHwlerwmCmX/X/rN3wSxLrGOo50U3pVZbebV6lsaa4CGtxXDKyXrfkJzUfC A9pODJuUuIQoBXaorEz3cNAr9dhI/aXiFB8I3v5YTxvXTIi3igAi7Gp/FbZ2R37A67pkKV c+0fL8VEfXJUusF8IJh2Mz97w7R43k8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1688718867; 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=KMwLIko/n0DlYoocrVnbzMjwujsIFsQzXunnsYrfOew=; b=y9QgbtOFwty2wuxsMqAeTPaQHu/VGEM7f3J+JoFxhlrN9q8tySeyveOSdS+Ft/JQF6WOz/ /06SkcDmyRH4A3Dw== 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 376931346D; Fri, 7 Jul 2023 08:34:27 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +D6FDBPOp2RdQAAAMHmgww (envelope-from ); Fri, 07 Jul 2023 08:34:27 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-fbdev@vger.kernel.org, Thomas Zimmermann , Thierry Reding , Mikko Perttunen Subject: [PATCH v3 04/12] drm/tegra: Set fbdev FBINFO_VIRTFB flag Date: Fri, 7 Jul 2023 10:31:55 +0200 Message-ID: <20230707083422.18691-5-tzimmermann@suse.de> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230707083422.18691-1-tzimmermann@suse.de> References: <20230707083422.18691-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230707_013429_137131_E033A7A5 X-CRM114-Status: GOOD ( 10.56 ) 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 Mark the framebuffer with FBINFO_VIRTFB. The framebuffer range is in DMA-able memory and should be accessed with the CPU's regular memory ops. v2: * drop FBINFO_DEFAULT Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Maxime Ripard Cc: Thierry Reding Cc: Mikko Perttunen Acked-by: Thierry Reding --- drivers/gpu/drm/tegra/fbdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/tegra/fbdev.c b/drivers/gpu/drm/tegra/fbdev.c index 82577b7c88da..d8460c5dc91e 100644 --- a/drivers/gpu/drm/tegra/fbdev.c +++ b/drivers/gpu/drm/tegra/fbdev.c @@ -132,6 +132,7 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper, } } + info->flags |= FBINFO_VIRTFB; info->screen_base = (void __iomem *)bo->vaddr + offset; info->screen_size = size; info->fix.smem_start = (unsigned long)(bo->iova + offset);