Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp664881ybb; Wed, 25 Mar 2020 07:21:05 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsH0B2amrBxUIJqrrNq+EXoQSgX+aIcGCX2XPlU2+e8v1xP5mcQ0x1ijb+ttk3zN858uLI5 X-Received: by 2002:a9d:6c4c:: with SMTP id g12mr2451423otq.351.1585146065852; Wed, 25 Mar 2020 07:21:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585146065; cv=none; d=google.com; s=arc-20160816; b=vfW2zBUItXg7+B/LFVcPVMY8nlm7ObNQxrWSjbciltdp9M1K6E/0L2WUyO59vW2dcv sAiUJ6P516e94qZotMEI/XWFpPar5EKhR4f4CjcZAn/46UXzxYkeRmAMGLPHhl+9Vuey ie9OgqcZxBbmCgZJFIEvqhK+AzM2O/M88XMv4CiGlN+yEF+tdRIp8FMncg/ggopLS9w9 nz7Eay+i8DeT41bs0tRvekbe+9eIayAHxfkY02Xh3vR25B2H9CzSNQd2rzhTwiAwJ4fT KVfwEUacbIZcIknuwx1FWu2f2ZO0Al3z8YrUwzgyaZzeW8bZ7YPBsBh03dDsGYqQpbYj qwWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=axo1diXl0tKjqaE3O9GtGhi7chA/2w4WHkAGhtW0QH0=; b=AlJ4wqKFq5TFKmt3anQKAelhlx+J1Hv25Sp/1Rq9PC+xO+/kmo2hFrSoE8cl9Kx0UK CEjERk2am/+p5oYY2yoP+45yJ2Kyb+Fxnp0jhU5vHx28aS+hcv7ZmwSsDVJ6eik9Bg36 5GgFCf+lTIrxTPTmytQjn1j1RJayceEmdXAj8BoJquoOaOwvyFhUorYXbLY5kubRVQqL IVX2H/SutuyL3GH0B8v1kcoRP1niSkp6xPkP56wNRNhuiIb3flAAczT/NyUeIV6n7P/F dvtPV3vTYIeRAmQSgHGj9GkF0ex98Kl9lgziNVTphvyBl0ikJ3/foj+Bf9ox0XetH2Mn gVHQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6si6267955otf.248.2020.03.25.07.20.51; Wed, 25 Mar 2020 07:21:05 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727854AbgCYOTu convert rfc822-to-8bit (ORCPT + 99 others); Wed, 25 Mar 2020 10:19:50 -0400 Received: from mga02.intel.com ([134.134.136.20]:29870 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727848AbgCYOTu (ORCPT ); Wed, 25 Mar 2020 10:19:50 -0400 IronPort-SDR: U35KYOhV18z2VqeqbYyxbB5tpKXuSYBAZnB1cWgX6q2naR0L7n2JvbA2ZH4rASSnRQIwGASoe/ P58pEZrwQGJA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Mar 2020 07:19:48 -0700 IronPort-SDR: XS6LI5XnckcHTf5zP+rVjmfqI2VY0FD2NSScpEi9NFm4cUlytCe0p7mRQSsFRjOrmiUtNLbg2H HbPJ9wZxpw4w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,304,1580803200"; d="scan'208";a="250420335" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga006.jf.intel.com with ESMTP; 25 Mar 2020 07:19:49 -0700 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 25 Mar 2020 07:19:48 -0700 Received: from fmsmsx107.amr.corp.intel.com ([169.254.6.38]) by fmsmsx118.amr.corp.intel.com ([169.254.1.221]) with mapi id 14.03.0439.000; Wed, 25 Mar 2020 07:19:48 -0700 From: "Ruhl, Michael J" To: Shane Francis , "dri-devel@lists.freedesktop.org" CC: "airlied@linux.ie" , "linux-kernel@vger.kernel.org" , "amd-gfx-request@lists.freedesktop.org" , "alexander.deucher@amd.com" , "christian.koenig@amd.com" Subject: RE: [PATCH v4 3/3] drm/radeon: fix scatter-gather mapping with user pages Thread-Topic: [PATCH v4 3/3] drm/radeon: fix scatter-gather mapping with user pages Thread-Index: AQHWAoUBcNgIkBIx5kKMIMnKtZMniKhZW20g Date: Wed, 25 Mar 2020 14:19:48 +0000 Message-ID: <14063C7AD467DE4B82DEDB5C278E8663FFFBD48B@fmsmsx107.amr.corp.intel.com> References: <20200325090741.21957-1-bigbeeshane@gmail.com> <20200325090741.21957-4-bigbeeshane@gmail.com> In-Reply-To: <20200325090741.21957-4-bigbeeshane@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.1.200.107] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >-----Original Message----- >From: dri-devel On Behalf Of >Shane Francis >Sent: Wednesday, March 25, 2020 5:08 AM >To: dri-devel@lists.freedesktop.org >Cc: airlied@linux.ie; linux-kernel@vger.kernel.org; bigbeeshane@gmail.com; >amd-gfx-request@lists.freedesktop.org; alexander.deucher@amd.com; >christian.koenig@amd.com >Subject: [PATCH v4 3/3] drm/radeon: fix scatter-gather mapping with user >pages > >Calls to dma_map_sg may return segments / entries than requested "may return less segment..." ? ^^^ >if they fall on page bounderies. The old implementation did not >support this use case. > >Signed-off-by: Shane Francis >--- > drivers/gpu/drm/radeon/radeon_ttm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c >b/drivers/gpu/drm/radeon/radeon_ttm.c >index 3b92311d30b9..b3380ffab4c2 100644 >--- a/drivers/gpu/drm/radeon/radeon_ttm.c >+++ b/drivers/gpu/drm/radeon/radeon_ttm.c >@@ -528,7 +528,7 @@ static int radeon_ttm_tt_pin_userptr(struct ttm_tt >*ttm) > > r = -ENOMEM; > nents = dma_map_sg(rdev->dev, ttm->sg->sgl, ttm->sg->nents, >direction); >- if (nents != ttm->sg->nents) >+ if (nents == 0) > goto release_sg; This looks correct to me. Reviewed-by: Michael J. Ruhl M > drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages, >-- >2.26.0 > >_______________________________________________ >dri-devel mailing list >dri-devel@lists.freedesktop.org >https://lists.freedesktop.org/mailman/listinfo/dri-devel