Received: by 10.192.165.156 with SMTP id m28csp1744489imm; Thu, 12 Apr 2018 02:46:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx48K2pM5fcdqk30MriuEZOEXH+wxjAiQmX7IU7ENU4E9iunFS8bUwsaCvtWDuArUe+W9BYNq X-Received: by 10.98.202.212 with SMTP id y81mr7052311pfk.227.1523526383428; Thu, 12 Apr 2018 02:46:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523526383; cv=none; d=google.com; s=arc-20160816; b=v9a9JZ54Pb++miC3ZFF1hfb0Njz569NEXB1qXk7N8iJKw7dXYvoLpKvLGdQBbg7B2S TtgyHUCqzg3lvPgtSZ0Ch+rk3JIJLmNNoQw/09BkHsq+6HRZ6Z+nL1bFthd19TQHcMxf ERxYQV4WpQPryGFGQBu/4NPpKJOCDmwVMcveMNPHrS4GeP1E8upxRjXqIvVWVPHsQmjo liT3sb3mlyPpG1GIgL4gjevuXRYKp+RivDta1FirH5hgt9/NMHrq0WwpXOwhAWzyNC5y 6FTt+XSyuLF0TnO7PzmJyO9gkM3e52K9niPKJAPsSoUXXW3AaJ5iCMhIrYV4NRM5Wmui FtZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=plXw2xh2ztPqy7ioYF4cYdm33bfGOxS9UsEvZt6DySo=; b=P5nZi788NCuCNxmi288hkidaW2EAwsrX49ayojOI6RfsUiZMwBKtih/SSqpZ7GNwKy LdMXL4CN5NCdx4CaAmOHUJqYWjVF0+OWbD3dIfMzz+sl+nZ2N86LL+IMbPy9VgIJQH93 pmWcqe0EDwJneYSpA4ctv9I1/FnR6+Bw0fBaero8ZwOEeDAmiiS6uSF7ggyNB4E84tQO AvME27PIWAPgLXCMoes8c33ASZOyBiHOPUCdBaykzH/EywTrjYwO496Sdel3x9B4WNKS 5DRXQ5JZJXwtML84VhqFjw1w/fAmYC7yMjX3t3CdxLNtYctfHKPVpCoJURqjIPZjhJlk 7clA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=3Hhg6Wu+; 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 s123si2273540pfs.234.2018.04.12.02.45.46; Thu, 12 Apr 2018 02:46:23 -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=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=3Hhg6Wu+; 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 S1752736AbeDLJmx (ORCPT + 99 others); Thu, 12 Apr 2018 05:42:53 -0400 Received: from mail-cys01nam02on0045.outbound.protection.outlook.com ([104.47.37.45]:63872 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751589AbeDLJmu (ORCPT ); Thu, 12 Apr 2018 05:42:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=plXw2xh2ztPqy7ioYF4cYdm33bfGOxS9UsEvZt6DySo=; b=3Hhg6Wu+HMa858ymQM9TT3d4IChLlaO3gwQ8siJS7Fv92nvLC9Xld9VuOCzbNVqNKxk8sqXMUuC6d5kMeAIKwteWJfBt0WfBy/NGg8WJEynPZ6D171IMMz6p6dqHRvtXTPko9yRWjeIyFM2+wlCV0qKubYTnsloiKNAj7jbQ9BQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Christian.Koenig@amd.com; Received: from [IPv6:2a02:908:1257:4460:1ab8:55c1:a639:6740] (2a02:908:1257:4460:1ab8:55c1:a639:6740) by BN6PR12MB1713.namprd12.prod.outlook.com (2603:10b6:404:106::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.675.10; Thu, 12 Apr 2018 09:42:44 +0000 Subject: Re: [PATCH V2] drm/amdgpu: limit DMA size to PAGE_SIZE for scatter-gather buffers To: Christoph Hellwig , Robin Murphy Cc: Sinan Kaya , amd-gfx@lists.freedesktop.org, timur@codeaurora.org, sulrich@codeaurora.org, Tom St Denis , "David (ChunMing) Zhou" , Emily Deng , David Airlie , linux-arm-msm@vger.kernel.org, Felix Kuehling , open list , "open list:DRM DRIVERS" , David Panariti , Jim Qu , Huang Rui , Roger He , Monk Liu , Feifei Xu , Alex Deucher , linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org References: <1523394001-4615-1-git-send-email-okaya@codeaurora.org> <32b82296-bba5-b5f1-266b-45c1ed66da94@arm.com> <20180412062600.GB30499@lst.de> From: =?UTF-8?Q?Christian_K=c3=b6nig?= Message-ID: <6802bd0c-7da6-659a-7e34-8f05d7c6422c@amd.com> Date: Thu, 12 Apr 2018 11:42:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180412062600.GB30499@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [2a02:908:1257:4460:1ab8:55c1:a639:6740] X-ClientProxiedBy: AM5PR0701CA0005.eurprd07.prod.outlook.com (2603:10a6:203:51::15) To BN6PR12MB1713.namprd12.prod.outlook.com (2603:10b6:404:106::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603328)(7153060)(7193020);SRVR:BN6PR12MB1713; X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1713;3:h6uw3MXz9F+FjQqjIOQ3Fl8Ntj5C7cBPxcVhJ3DayTzpr5iCi/g99TIPVmSE58dP+TXZE8rTNiq87H0s3yijQhZUyofxqQwQblwQgjAutXCqMI2O9s/2PqG30ycwguNryLS6/5+87+O+OZfH5ZHGr/GNgh/mHb+ITjHTHSbbot7YyFakoWMFbu2A+k6EOZwDbzJDBnytSQHN0m7VJ5r6DmM5uvp0KsVibFUfREOxK7ms3zHUuLWfZ4zX6ob4EMCn;25:YL4jNkPGApbdt6Xp/6ZrwvysgfwLb2r4+9vrZwPt7G6tRDVqKe+6B/ttZZPUqcPRlP/rnkR0m2tB78ZflL+pFGJpVEQ2+BbMeetWyKWjiIrCrHpaSaBnzRV2ZI7Zrgn02S8ScwlAtJqYYT3o28ziuRbz/y8xC9It66TjdqbrcEuw9pNFMlBP8I/lYEI6zt+0XgqNj1aN22XHFDziXFEP05OfPx/rPv67AJyDlSmNLXIdHnUCrJ2w++JPvkJdOZS8CQQpDVi9SNq9iOug0WomRT2QzRxuuO3BYktj5KagcTA/cTb/Ym91NK19mBGGT4DBeJVVVrj5HCtbKFvE0I9qJQ==;31:owwhFi3usj0bojGkF/Mkkd9pSx3o12YP9FEFcO6iuHy52i4R6PEzu54GmCCbM2Ntl1k5UpDfumGruOwCpe8Ahi1UtrQbnmn8tOUX4QKDbzUg1jItSufJeIo/TR3RDBHk4Id4tgo163nAQ6ZNEk806+MTW0bspMY8BuhKR7xVPAGZ63w4tKHGXyTnIJuxhZT2AV74TeDmmxxiRY5lx6zQw1Fx0QxznqhNCnV+xCevJkc= X-MS-TrafficTypeDiagnostic: BN6PR12MB1713: X-LD-Processed: 3dd8961f-e488-4e60-8e11-a82d994e183d,ExtAddr X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1713;20:ZqiDqvxEvaomUHLSs/aQENZ91lOjQU3Gz9djsRFw6FdHD9+Ha9M8mw8Jfq7B9vFpOMZrnPMoamIWkT1l+arYGBPpy7zBLqw1HS9I1ClXz0ZHa4m9NWFmAljRT1Js0HHZXMNpvDbTaYbRqHlbfrJmsYYW0ZvFYj6SAJo/UDEyPAsnbfVfaIRt0Q1T+D7xjtJcOrMKsr0V7XOPsJydem7HB5XywHDXaTcDh6ubM7hIRrgtccUsXKkIEWtmHBeOH/PzWEKh/yGVjbeqIQ3u1xL1/pSFHfqlpWQyMLyAlXjfHhhe2EHcRusPjIfZhbj5FAJCAepYWarT9uq01aKzuqKExj4k5gBWwi2rFIvQ8T1S2nowIOx7hqSP86LsYp0epvlG9Rfr2mMmTYzjbOQphswLJBTFKRBEm4EOPRfN7dLDCfcWOnf7kTvZJUsRfpKQz5Ff/5G0BvDaIiVzmH2lx0RAQE69Ydnd3HKbBpNzZVxEE9KeoZEsDxrZklAsyQl8kero;4:tearl0i6qEDt3MrDGQQvh56Ndg7IsZPG5+MzG8YAqdmoIcZWE/nqGpXO1/6/owdq583/9LaysfR7fMKsuGWg3ap2hSbfPGoELOlPPaXoUKIQcIvlADU4aVqkH0/58hFjSn43pT/xgCCNW09ZY8QthhOBCcoBN2MewqQ+9JxhXKYnW8N2Hku4z0f2Yl3y4zGNx50McC+OoVsb+17n8qYdBgK8QJahSLa18dvvc9OdZjr7bj0ccVu8q8xBa1xRxV0lQPC1VyBJMHV1xFBLT93hWVenTDSLtC1v+YYrTL5r0kROPPawwyJpzzS3Egui0Tq5 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(190756311086443); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501327)(52105095)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123560045)(20161123558120)(6072148)(201708071742011);SRVR:BN6PR12MB1713;BCL:0;PCL:0;RULEID:;SRVR:BN6PR12MB1713; X-Forefront-PRVS: 06400060E1 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(366004)(376002)(39380400002)(346002)(39860400002)(396003)(189003)(199004)(86362001)(478600001)(50466002)(53546011)(6246003)(2906002)(65826007)(25786009)(386003)(31696002)(68736007)(8676002)(65956001)(6666003)(65806001)(230700001)(59450400001)(6116002)(229853002)(5660300001)(106356001)(64126003)(7416002)(6486002)(47776003)(76176011)(105586002)(11346002)(23676004)(52146003)(36756003)(2486003)(31686004)(97736004)(54906003)(4326008)(305945005)(186003)(52116002)(52396003)(53936002)(7736002)(81166006)(72206003)(81156014)(110136005)(46003)(446003)(476003)(486006)(316002)(58126008)(67846002)(8936002)(2616005)(1706002)(16526019);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR12MB1713;H:[IPv6:2a02:908:1257:4460:1ab8:55c1:a639:6740];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjEyTUIxNzEzOzIzOkpzWW4zNk9lTzJEZ1NYeWIvZWZCRklwZFZX?= =?utf-8?B?WW1RbFpzQW1VYVo2ejI1dzJSWS9GaVBFM3NNNHh3SnVvVmRWdHB4UVhRd3R4?= =?utf-8?B?NlZjUE55dTNoZmZZYkkvVHRxS2JHQkcyVXk2aDZzcnpqcjNEMU9wclZNN2d2?= =?utf-8?B?SHdZc2JoTmVEU1FYeEwrM2duUHB6bHFUU3ZoRzVkZ2kxREhZblhjQzhNM01K?= =?utf-8?B?TDBm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MzavGuCWh9DLo173YfjmyggAvU8Jq9fTEqOaQ/Ig0GsUAnHYz1a38d/c1YNaCpjqZ+G5t6dd1GfgfUBr2v7ssdfpqhDkHJcgBMKNnR8xRmDKRczf9l+2BlFiG+koYu9BOG/tYUDPIo7t3yLJddGrdTGeQ8QgeBbBgBt52VEiigvuboGaoSB79LadbiVzX+HBW2O+p;20:4i7ZRAWMM7v2fh/CuLs0/d103hS0a90n5jc5UoVVgMuqGhN3XC6Ll8nLMAgcv9kQTiGecVLYV/6Nuep+T58uFbO72+bFSW7soFeOFPRDdBPSyBZHU5PMUPdB9/cgN0UoZmUh9ztB9TnF/ew8z6GtUwL/0rHvqlE7cMKx8qizvP2Tu00vQ8H+5ycNL/HHvLVY89kdEVlKiHgCtTIUwK9vvDa8REPphp+6SeVVthcfRCoqaEa1UPOtiFM9XpeYlr+a X-MS-Office365-Filtering-Correlation-Id: 700a9435-d8b9-4e13-db90-08d5a059bffc X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2018 09:42:44.8377 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 700a9435-d8b9-4e13-db90-08d5a059bffc X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1713 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 12.04.2018 um 08:26 schrieb Christoph Hellwig: > On Wed, Apr 11, 2018 at 01:03:59PM +0100, Robin Murphy wrote: >> On 10/04/18 21:59, Sinan Kaya wrote: >>> Code is expecing to observe the same number of buffers returned from >>> dma_map_sg() function compared to sg_alloc_table_from_pages(). This >>> doesn't hold true universally especially for systems with IOMMU. >> So why not fix said code? It's clearly not a real hardware limitation, and >> the map_sg() APIs have potentially returned fewer than nents since forever, >> so there's really no excuse. > Yes, relying on dma_map_sg returning the same number of entries as passed > it is completely bogus. I agree that the common DRM functions should be able to deal with both, but we should let the driver side decide if it wants multiple addresses combined or not. > >>> IOMMU driver tries to combine buffers into a single DMA address as much >>> as it can. The right thing is to tell the DMA layer how much combining >>> IOMMU can do. >> Disagree; this is a dodgy hack, since you'll now end up passing >> scatterlists into dma_map_sg() which already violate max_seg_size to begin >> with, and I think a conscientious DMA API implementation would be at rights >> to fail the mapping for that reason (I know arm64 happens not to, but that >> was a deliberate design decision to make my life easier at the time). > Agreed. Sounds like my understanding of max_seg_size is incorrect, what exactly should that describe? Thanks, Christian.