From patchwork Tue Jul 4 15:50:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13301435 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 D044EEB64DD for ; Tue, 4 Jul 2023 16:02:31 +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=RV4fh5Gy4o1hnTTfh5Og2u3OqIsP0aohTHqtWcb5tT4=; b=PuFl3qezh83PJn 6GGhreBZTzfN2CRFNVs2Y60ilXz1mEyo5zd/6SaeEVXzUjcOgjUC63oZdxQdCbwzg/syXEIp70q6E JM3veCOj1SkSQN1L8izIP3myt913iy9AcO8RSWpNA8sKY5m0YDGMhlApq7WkzcsGfUKa8asG/88gZ VTMSr96n7jpEW+UrxV1CCqWdKrFu3wj9HUCywCGHeDQqq9WHKpRwg21WCseCm5vFeB7FxCaG0RB6i fq1QO4CHHc4Oc9QBpJGwj63fwmRC8Fef+jX+yGGUuafHVUU6Crj2WewaOR4fFkOY1OR6vYA1f4fPp wyuYP8/pEc1SN29zhhbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qGiTL-00Dki8-2H; Tue, 04 Jul 2023 16:01:47 +0000 Received: from smtp-out1.suse.de ([195.135.220.28]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qGiTG-00Dkbk-0O for linux-arm-kernel@lists.infradead.org; Tue, 04 Jul 2023 16:01:43 +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 298B1228AF; Tue, 4 Jul 2023 16:01:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1688486496; 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=ckVHReRisnJ+7Edbypsv59JntS0oPCQ/YOl8IC0RY5c=; b=Zvd75MJg3ZOlTYJfyXF5ZQGxEem9yjDFvwsCwJLlON8YJ8DJunXBRFKBBE2o25+1aze2Jk qTCXkTTvnLM1Al2EhjRs21lFJPyyOe6dd02sCx3NNheEUmxKCU3p1kh9FvVc46XwlsNRL1 aLjzBYPHgatbx8pFZmApKmeamwUTXgk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1688486496; 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=ckVHReRisnJ+7Edbypsv59JntS0oPCQ/YOl8IC0RY5c=; b=iYDpY+hkmVGlNQL7l7FBkO623kFGawvtm4TS3af1tg2wzU6LX9RhWnhdyCyneq65Hz2Im9 9pwt/equs88KBbCA== 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 E318F133F7; Tue, 4 Jul 2023 16:01:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id SH+ENl9CpGTzLwAAMHmgww (envelope-from ); Tue, 04 Jul 2023 16:01:35 +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 04/10] drm/tegra: Set fbdev flags Date: Tue, 4 Jul 2023 17:50:01 +0200 Message-ID: <20230704160133.20261-5-tzimmermann@suse.de> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230704160133.20261-1-tzimmermann@suse.de> References: <20230704160133.20261-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230704_090142_354889_AF3CA1E5 X-CRM114-Status: GOOD ( 11.40 ) 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 Set fbdev default flags FBNFO_DEFAULT and 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. Signed-off-by: Thomas Zimmermann Cc: Thierry Reding Cc: Mikko Perttunen Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/tegra/fbdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/tegra/fbdev.c b/drivers/gpu/drm/tegra/fbdev.c index 82577b7c88da..8074430c52f1 100644 --- a/drivers/gpu/drm/tegra/fbdev.c +++ b/drivers/gpu/drm/tegra/fbdev.c @@ -103,6 +103,8 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper, return PTR_ERR(info); } + info->flags = FBINFO_DEFAULT; + fb = tegra_fb_alloc(drm, &cmd, &bo, 1); if (IS_ERR(fb)) { err = PTR_ERR(fb); @@ -132,6 +134,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);