Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp764385ybb; Wed, 25 Mar 2020 09:09:09 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsOimJSJNc5r0C1nlq6K7Y4gr//8juw7zj9YvAPN0Y+koPbgrjpDyu6jzRdLRxWT+zNW2ZK X-Received: by 2002:aca:c608:: with SMTP id w8mr3057114oif.163.1585152549101; Wed, 25 Mar 2020 09:09:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585152549; cv=none; d=google.com; s=arc-20160816; b=VVrjtIajwED+GDC9zQn/T44jzFZO0RURqLtLjg3meBH36c0w4lRRLAcPqrh0WwHDVF H3wXf2u0Gj+UJxYqbpvxEuEYrUMZL4Dco+DFReiwW2CIoG4L6GUvVX2hclwPSh50TSay +qWoyH5gptf6qjup3MRz8ogiRRwrchCordlInjg3RFwSKaor/p33zjejrQV7m3M+xiQW R7PCjhKXmALlBQ+GmvwbJScZJ72JRHBDqnVj7Qi0/BSQnBlmKSVM6ykCHxvGgdYbSkXV nEH0bquu5FitAsroWKVqeSPDeZ0dVEG01VN43cAclsLo+ylodDLU4b+FKr+w5+AmSRs2 GnBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ixbROLOmeLq0mO6PeYIhR3XCaB7opkScZZtzUhky/AU=; b=HWksYkqXkaepB0K34+nrh0U9rXXtFlhjJoqHMWN2f8zmb/vpssTXmLvnrsNYCQU+W1 D+iWvxXpXFGGGTD5mRLdNHC31Jw/yzFf15SiYdXeiq5ay5Q8YoyPQU48gAPJgoWeAe/3 sf6WxBFzKZhkX4/0NcdKvI3esJt9AGZn9VLoOdJr0X6Nq9U4VbzDiUGNLTIEzDPHROko alanYZFFZYxHfIm0t8AVV2AIPb1PF25viyZeNgYequYxzjbyEIgnxznavvWV3vLBJi6c if1zN3y5iKttbe9m5nWK0fhAkakbIFO2oIPvQ+tYNdYN6FkOl6D6HnWLCCL+euHIBMUH PSNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ov3F0xX7; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v130si10960163oib.115.2020.03.25.09.08.45; Wed, 25 Mar 2020 09:09:09 -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=@gmail.com header.s=20161025 header.b=Ov3F0xX7; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727975AbgCYQIO (ORCPT + 99 others); Wed, 25 Mar 2020 12:08:14 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:39883 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727953AbgCYQIM (ORCPT ); Wed, 25 Mar 2020 12:08:12 -0400 Received: by mail-wm1-f66.google.com with SMTP id a9so3345957wmj.4 for ; Wed, 25 Mar 2020 09:08:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ixbROLOmeLq0mO6PeYIhR3XCaB7opkScZZtzUhky/AU=; b=Ov3F0xX7WSaaviMCXK0Dc2jrJMmWPM2VVdqHBzQZJGmP6HtdrGenkjnmRVyigWy17E HXPW/SLWbeXv4klht679yeL3jmXHl15tKHIGwN5hWbrY+TkDUX7dpGG1n9mLD5tI0Vrs 6eX19Y8vn/EeDYvEJpevNchth9OA1mwqPdvYVQ1fgF5hgFpUTiZF0EwZCkGlHga8qD+F QecnjvDt1IFv5iNA15MRo0FBW7GDAudi+PHFdwjogaeGVb5/4wcV+IhiGpNq7P01ie98 kDHnVp5Am0xQtI8ieiift6CbcLHmPAgMwyNwhFWkHrO+anFH7o/TlkF0l6OgtsOHpX8X VkKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ixbROLOmeLq0mO6PeYIhR3XCaB7opkScZZtzUhky/AU=; b=i9D7wT3NcJ5r5vl+5C2eT+AbeRawYsUTXYFCuJPDLE5MMoLu4a0DQU7v3/WUlgQLbg QuwzPRbpQOUAvOPUyYeKoi96OsO99hRyFPieUl3T6DGqD7GwxE14lAI5+UCsNlMbbI4Z zsVUaheGnxNnnSgH0/7Fh9rQBQvFNBe0/ELy5jerKO3ugDRVU/I84r2oy4empeviKiEL MzrIHR2SyigYgwvJTtGwXjCkyZ+Wbz9XMxNDNEuZWqNrc6im04rliCTondOeb8kami4y wzUahRB/K32LQJBY1m5zD99A1dI+unMmBRGQddMlFA6URI/PXDnoFe4DVKhIUDdXXmNd YgFg== X-Gm-Message-State: ANhLgQ32FHKPGKx5RSuaXHUQSS37psZ9X48r8oPupxfgWzrQCb4Xe4+3 eb19Tlj/TYddQQgJyLFdNy5cmk3L+bBEjWNgNNg= X-Received: by 2002:a1c:cc11:: with SMTP id h17mr4136098wmb.39.1585152491439; Wed, 25 Mar 2020 09:08:11 -0700 (PDT) MIME-Version: 1.0 References: <20200325090741.21957-1-bigbeeshane@gmail.com> <20200325090741.21957-4-bigbeeshane@gmail.com> <14063C7AD467DE4B82DEDB5C278E8663FFFBD48B@fmsmsx107.amr.corp.intel.com> In-Reply-To: From: Alex Deucher Date: Wed, 25 Mar 2020 12:08:00 -0400 Message-ID: Subject: Re: [PATCH v4 3/3] drm/radeon: fix scatter-gather mapping with user pages To: Shane Francis Cc: "Ruhl, Michael J" , "airlied@linux.ie" , "linux-kernel@vger.kernel.org" , "amd-gfx-request@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" , "alexander.deucher@amd.com" , "christian.koenig@amd.com" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 25, 2020 at 11:54 AM Shane Francis wrote: > > > >-----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..." ? > > ^^^ > > I will reword / fix the highlighted issues with the text and send a updated > patch set later today. I'll fix it up locally when I apply it. Thanks! Alex > > > > > >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 > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel