From patchwork Fri May 24 09:23:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Sven_P=C3=BCschel?= X-Patchwork-Id: 13672930 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 3ADC7C25B79 for ; Fri, 24 May 2024 09:26: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: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=sZPYfk82CBeieqGVSCzUcFRNqc/mvow6DqJRFOTE96Q=; b=gv2asKO/CXpsUd Bl4x8d3TNWb5Lnk0FJH6aXNSsONPHfd15BKSK2+4na4YP21cmr1m4sx5WXgwrDqxmL+5qWv+y8s83 CuXEfAaol0NQTo2ATkQMXwxC0JXmfSDfJg6fZZwgkJ3qJrWloMtgWlHGE9AJCM2JwLVNhq8f40olZ kl69PwO02/rxZL2agfnRIC/snuLLpkhkZwG4lsPtXstvpezKk311qtjM5kL6mX78hiivVCJkWyoye Zcp/8GCAmaS4P1u9Y8nzEzzw9UP54IJ5Za/m+0WGqkQhe6933vNazy6i/5qDN1GswQkqAOOH8JXww OFJ6ZNMPTAhv+9ciD4Sw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sARBV-00000008Y0p-0Pvk; Fri, 24 May 2024 09:25:57 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sARBS-00000008XzE-2P0h for linux-rockchip@lists.infradead.org; Fri, 24 May 2024 09:25:55 +0000 Received: from dude04.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::ac]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1sARBB-0007SY-J8; Fri, 24 May 2024 11:25:37 +0200 From: =?utf-8?q?Sven_P=C3=BCschel?= To: hjc@rock-chips.com, heiko@sntech.de, andy.yan@rock-chips.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Michael Tretter , =?utf-8?q?Sven_P=C3=BCschel?= Subject: [PATCH] drm/rockchip: Set DMA max segment size Date: Fri, 24 May 2024 11:23:59 +0200 Message-Id: <20240524092400.2019587-1-s.pueschel@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::ac X-SA-Exim-Mail-From: s.pueschel@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-rockchip@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240524_022554_613361_149206FC X-CRM114-Status: UNSURE ( 7.53 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Michael Tretter There is no reason to limit the DMA max segment size for the Rockchip VOP and VOP2. Set it to the maximum. This prevents the following warning when DMA API debugging is enabled with CONFIG_DMA_API_DEBUG_SG=y: DMA-API: rockchip-drm display-subsystem: mapping sg segment longer than device claims to support [len=208896] [max=65536] Signed-off-by: Michael Tretter Signed-off-by: Sven PĆ¼schel --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 ++ 1 file changed, 2 insertions(+) base-commit: 39bc27bd688066a63e56f7f64ad34fae03fbe3b8 diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index ab55d7132550..0f93efd1a8fa 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c @@ -67,6 +67,8 @@ int rockchip_drm_dma_attach_device(struct drm_device *drm_dev, } } + dma_set_max_seg_size(drm_dev->dev, UINT_MAX); + ret = iommu_attach_device(private->domain, dev); if (ret) { DRM_DEV_ERROR(dev, "Failed to attach iommu device\n");