Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1431982pxb; Fri, 1 Apr 2022 13:20:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzde5slgOYfS0Ql1hGMGRjfDOsZdJRO4jnk5sPVu2c5CsPIXFFd0QhpWGNGm7AJiALUgvfO X-Received: by 2002:a17:902:e881:b0:154:b33:f30c with SMTP id w1-20020a170902e88100b001540b33f30cmr48237912plg.161.1648844451609; Fri, 01 Apr 2022 13:20:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648844451; cv=none; d=google.com; s=arc-20160816; b=YLBPNlO8N5cF+Y7MaTaFrN3lUvmaVrOFxs7/bzM+PCXRzg/ftr75qqPxgPvOWIw9Fu VUdrA6ZpFyq+lQP12i00Y2yb8kUzBc4yGQPO+HPOKlY06po/CE/H00mZDmGjR8OTVqjN LM6Mm4iS/It+JOb7TubngA92yaJGvHZpYdT7z6fUa9b6+/9Z9QXMsXLT673M495RleOj 7Tk63VmBoL8kA7T6vcsQz0nwl6XIw0iiB0F2cpsmkIbmuWFGtYle6EYXL0zKrhlAt8lm UPgjJi66CkucykR+pf593nQySVhV8SgIgaq1uB5F1jwLtaIZ5i93LvwW91YsLF9kSbcb Enog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=y+woCqSRN/iPJPDhXido2RTys7AhCgzJm7RlMHPDtp4=; b=bfOX6AfKBednly3D4kfb0MQkWyV2ZIHKN9f9T0xyfV9h2NhI6IJ7Oa/1dmgiqo6CcJ YO2wE/dCmyir5iDYpXEpf7dyM842c/gNTw9ffx6dMTxIkcfiEHcfZoNkpcAZSR9A/Yxe N5Pb6ZH/I4ZVqKvbLTM869rqMpqz1sexZGSkxLEEh5QPaJMMibbO+Lm/tBzUR46jaOe+ mMCQu6z7s4MUi/YJcdSBkPpv0DP5ppGbRbBTUUFJLA7972shxtkd3HxgLrv1iZ8BcDO0 Fuk4hcSKCMp5giSbRF9cs2BNRdoi7OEKL1gpdA89H5nLk4BStPSo4CIEUiCyEuYXwccI 14wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=L8zzTUHI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h23-20020a63f917000000b00385f424b6e6si3349807pgi.865.2022.04.01.13.20.36; Fri, 01 Apr 2022 13:20:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=L8zzTUHI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S241068AbiCaT4K (ORCPT + 99 others); Thu, 31 Mar 2022 15:56:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234828AbiCaT4H (ORCPT ); Thu, 31 Mar 2022 15:56:07 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9A2960A84; Thu, 31 Mar 2022 12:54:19 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id c7so1335542wrd.0; Thu, 31 Mar 2022 12:54:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=y+woCqSRN/iPJPDhXido2RTys7AhCgzJm7RlMHPDtp4=; b=L8zzTUHI02LY2DUF6K1iFRY9ZUoFqty0Mfod+IdwlXRT49VTPLlTNtr6gUjNfio+lH UeIfRaTUOb8BICGNlKrumSq8EjzTMrf9tTcPciDWG0CFitmHeCl3gLLQNaG4q8KmCjZv UYcLumBp3/XXoj4KVE3vnJ1N8Bf1HAqnNFxUXcnB/xir0UFlooFLKIAOhS/FY59k1jLi 7sYFTZSWsLgeaxm6RJ/8EKZtiJSEc8bJI1AwxAOJqIoG2AXOIRoFoWDZC2TSDfXYgbyZ 0ukisy7tdPxLp4C0VX04Hg3zt0igZbMvSCezV/rV2akbZBgoL4XBJucJBGMO0FXseGb1 5Qhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=y+woCqSRN/iPJPDhXido2RTys7AhCgzJm7RlMHPDtp4=; b=epphDhGNKZMrSo5lEATJY17jEAR9aruTdh2wqofI6WguOK9+yJ6bIubzAem/eGKEW4 yn+ifRJeGYv4GngkphBV3lQy6bkq9PTplXHtAOmAV6xIPgjklKAf53+eKuvTb1aTcNNI hp1Bp8UKWMH1h4zwAxfwH7u0ptQdDlGH3rQF2ngPiVHbseo+S2GoFRoNlRf23iMu1y0/ FpUxSLz4JG0LxNixYJ2FaCv3ywJ590y9yRmc3cmY34E255sN8WFKNGZm9IDsCqa9nuDY NoCAOuhvDFvx2Tkb58gQfVJ+kkmaMY7CHqXcGgEr/7awkewh7L6WZyNqDAwfl1NQ33wQ pXwg== X-Gm-Message-State: AOAM531k0BHYztW2S3b9WJUh/0wJF2gYkrkrgP41A80QCtaMHnsSQagJ gTJWhjHYGkuFjtZcoBWu4d/4TJ1W3Jk5mFYgM5s= X-Received: by 2002:adf:f20f:0:b0:203:fc73:a9a0 with SMTP id p15-20020adff20f000000b00203fc73a9a0mr5302332wro.418.1648756458095; Thu, 31 Mar 2022 12:54:18 -0700 (PDT) MIME-Version: 1.0 References: <20220330204804.660819-1-robdclark@gmail.com> <20220330204804.660819-11-robdclark@gmail.com> <22d9a9ff-1c44-ed41-6ae1-59a1f965ab6c@collabora.com> In-Reply-To: <22d9a9ff-1c44-ed41-6ae1-59a1f965ab6c@collabora.com> From: Rob Clark Date: Thu, 31 Mar 2022 12:54:06 -0700 Message-ID: Subject: Re: [PATCH v2 10/10] drm/msm: Add a way for userspace to allocate GPU iova To: Dmitry Osipenko Cc: dri-devel , freedreno , linux-arm-msm , Dmitry Baryshkov , Rob Clark , Sean Paul , Abhinav Kumar , David Airlie , Daniel Vetter , Akhil P Oommen , Jonathan Marek , Jordan Crouse , Emma Anholt , Dan Carpenter , open list Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 31, 2022 at 12:41 PM Dmitry Osipenko wrote: > > On 3/31/22 22:02, Rob Clark wrote: > > On Thu, Mar 31, 2022 at 11:52 AM Dmitry Osipenko > > wrote: > >> > >> ... > >>> +/* > >>> + * Get the requested iova but don't pin it. Fails if the requested iova is > >>> + * not available. Doesn't need a put because iovas are currently valid for > >>> + * the life of the object. > >>> + * > >>> + * Setting an iova of zero will clear the vma. > >>> + */ > >>> +int msm_gem_set_iova(struct drm_gem_object *obj, > >>> + struct msm_gem_address_space *aspace, uint64_t iova) > >>> +{ > >>> + int ret = 0; > >> > >> nit: No need to initialize the ret > > > > actually, we do > > Indeed, sorry :) > > ... > >>> int msm_gem_get_and_pin_iova_range(struct drm_gem_object *obj, > >>> struct msm_gem_address_space *aspace, uint64_t *iova, > >>> u64 range_start, u64 range_end); > >> nit: There is an odd mix of uint64_t and u64 (and alike) in the MSM code > >> :) The uint64_t variant shouldn't be used by kernel code in general and > >> checkpatch should want about it. > > > > one of many things that I disagree with checkpatch about ;-) > > > > I prefer standard types to custom ones. I _kinda_ get the argument in > > case of uapi (but IMHO that doesn't apply to how drm uapi headers are > > used) > > I'd understand if it was all either uint64_t or u64, but the mix.. hm. yeah, fair, we could be a bit more consistent BR, -R