Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp837212ybi; Fri, 12 Jul 2019 05:28:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwW56RTRWQBK8kVARcGb9DGfqjzyyDIlPVlVXEAQjtThVsfva5RO33FmYZYJJCa5uEqu9nt X-Received: by 2002:a63:e53:: with SMTP id 19mr10455391pgo.137.1562934528859; Fri, 12 Jul 2019 05:28:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562934528; cv=none; d=google.com; s=arc-20160816; b=oJVBkqzCuwSWH1lcb7NxVDhQw663ZwkzLinfKIT1oiKJYUsnCqJqb2avJXgoENauq2 oU6BtQowV9mhLvPRIo57A9uTQtrdEHzJxUYkzGq0F5zGmhxS/c7LY+0JmVsT6p8Oj/Bh SCOkrma/Ub0FY3jHH/IV8APEBDp6jixaLxPIWLw4dU0kwpNU2Sv7QGXmzpAYe1kYNHZt QDppHdNCz6KzKMN0QI/3EpCPFu6d52F311zloV0bZg8ai5P2cQnyKcFlXzU6WiZ2YtlO j5jxUhFJAn6NLWFeb0a/y+TI/5j7LWo2hYRaGJdRCaCMqc8iNoEa+PjD5eLPQ17xYISQ Wy6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=X+IICuEj/4fC8wYvuRNrddyZya0UCgMhm47oJiFOlfs=; b=eYcg7CQpfXQHBziDeTgosWeLUAhExxDwz7N657Urkz5SzJK6+RYIa34PPLj42/qhc+ 4elHK3SVk0aw9+9jsbo2JLGh7AWBbDrRh8YpqKogkcZQSXX4lCv0qquo58iu3N5K20Wl nk/m5QTEC9PjRThFpzWpDjb39YTQXKTQvyg8KPnjr50m3Buz2ZBbybTL8NPtIdlwMjcP kJ1HVeyr+YMQeIk5qx7U8ODsaP+4/2LMxTgWklUjqGN41qjYHWgJ/LghD+CYoUT/Pt4m ZMt8XjZzrDd098odWyF58o+ZB52GboDWOn7idtweHqwahh6Ye2tnOaIjTzIftm1NmBx3 O+qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FA7uho6w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r24si8402893pgj.342.2019.07.12.05.28.33; Fri, 12 Jul 2019 05:28:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FA7uho6w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728524AbfGLM04 (ORCPT + 99 others); Fri, 12 Jul 2019 08:26:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:38656 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728511AbfGLM0x (ORCPT ); Fri, 12 Jul 2019 08:26:53 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DC5F42084B; Fri, 12 Jul 2019 12:26:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562934413; bh=DoG72Nfc0RQcz3NtXIh9AoIZZhvXmqT8MCtawtZqwm0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FA7uho6w/LygISJeZx95adokDWrQjyDKN/2as89QcJ1CjEai/Dggqn9n2UQS7m6cW IR3RTvR/weWuBb3xm1xy0O/fo3o2CRorBGvOQJMtfWU633AlQxZOPAAPy6Kqqw2xC6 Lk5mekeebEi3/ZdZkpLw4fTSMXDvcH4D0JEOP+7I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Qian Cai , Thomas Hellstrom , Sasha Levin Subject: [PATCH 5.1 047/138] drm/vmwgfx: fix a warning due to missing dma_parms Date: Fri, 12 Jul 2019 14:18:31 +0200 Message-Id: <20190712121630.470885017@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190712121628.731888964@linuxfoundation.org> References: <20190712121628.731888964@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 39916897cd815a0ee07ba1f6820cf88a63e459fc ] Booting up with DMA_API_DEBUG_SG=y generates a warning due to the driver forgot to set dma_parms appropriately. Set it just after vmw_dma_masks() in vmw_driver_load(). DMA-API: vmwgfx 0000:00:0f.0: mapping sg segment longer than device claims to support [len=2097152] [max=65536] WARNING: CPU: 2 PID: 261 at kernel/dma/debug.c:1232 debug_dma_map_sg+0x360/0x480 Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 04/13/2018 RIP: 0010:debug_dma_map_sg+0x360/0x480 Call Trace: vmw_ttm_map_dma+0x3b1/0x5b0 [vmwgfx] vmw_bo_map_dma+0x25/0x30 [vmwgfx] vmw_otables_setup+0x2a8/0x750 [vmwgfx] vmw_request_device_late+0x78/0xc0 [vmwgfx] vmw_request_device+0xee/0x4e0 [vmwgfx] vmw_driver_load.cold+0x757/0xd84 [vmwgfx] drm_dev_register+0x1ff/0x340 [drm] drm_get_pci_dev+0x110/0x290 [drm] vmw_probe+0x15/0x20 [vmwgfx] local_pci_probe+0x7a/0xc0 pci_device_probe+0x1b9/0x290 really_probe+0x1b5/0x630 driver_probe_device+0xa3/0x1a0 device_driver_attach+0x94/0xa0 __driver_attach+0xdd/0x1c0 bus_for_each_dev+0xfe/0x150 driver_attach+0x2d/0x40 bus_add_driver+0x290/0x350 driver_register+0xdc/0x1d0 __pci_register_driver+0xda/0xf0 vmwgfx_init+0x34/0x1000 [vmwgfx] do_one_initcall+0xe5/0x40a do_init_module+0x10f/0x3a0 load_module+0x16a5/0x1a40 __se_sys_finit_module+0x183/0x1c0 __x64_sys_finit_module+0x43/0x50 do_syscall_64+0xc8/0x606 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: fb1d9738ca05 ("drm/vmwgfx: Add DRM driver for VMware Virtual GPU") Co-developed-by: Thomas Hellstrom Signed-off-by: Qian Cai Signed-off-by: Thomas Hellstrom Signed-off-by: Sasha Levin --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index 9d2e1ce5c0a6..b77374ea3825 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c @@ -747,6 +747,9 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset) if (unlikely(ret != 0)) goto out_err0; + dma_set_max_seg_size(dev->dev, min_t(unsigned int, U32_MAX & PAGE_MASK, + SCATTERLIST_MAX_SEGMENT)); + if (dev_priv->capabilities & SVGA_CAP_GMR2) { DRM_INFO("Max GMR ids is %u\n", (unsigned)dev_priv->max_gmr_ids); -- 2.20.1