From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50593C11F68 for ; Fri, 2 Jul 2021 13:22:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 15C9361424 for ; Fri, 2 Jul 2021 13:22:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 15C9361424 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 96C066E16F; Fri, 2 Jul 2021 13:22:12 +0000 (UTC) Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0C2A06E16F; Fri, 2 Jul 2021 13:22:12 +0000 (UTC) Received: by mail-qt1-x82d.google.com with SMTP id g12so6558129qtb.2; Fri, 02 Jul 2021 06:22: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:content-transfer-encoding; bh=Mv4J5ys30flflh2mN4ouLTrG+fC9KjOKtKl2MgOZP7k=; b=aHlgSvHtbsWbQUbthyuKCOzCBbdub0GZz3JTB5QWk6s7di+wEXBwWmrvvXbcgEsixx aoW47sITiPWMQwWrB3n9tZEyfyr69Xn2QT5ibdiCPTVCAp3x5n+4tZc4CbbwWeymVD0z DPQXLqkw2qedDhWJ/eE/H8UnprdwBfUduq7R8LQnu3RGn2z7HFQ5/JoDhGDRTJhDUI3Y Yg/pchWniMRtmeLjG/DpvwevJlbSMm5jx4HA9SbSxlir9CjqArQLzOjSMpRtogEnpIEj EuqJ/PzJDMbmVMSqmTIVdoYNDm4siJmF5ySMFDFw+3zMgS1hOcwt2w8pdwmNto6OkX1h 6sDg== 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:content-transfer-encoding; bh=Mv4J5ys30flflh2mN4ouLTrG+fC9KjOKtKl2MgOZP7k=; b=gK/OcFq4l8EpGvD3jhaI4x32dwbBs7v/6aBkpof5c6iH1eX5u1jHrdt2d5FCRMKhRw NXYxJm7f2+ZtDRlnnRQhVIHmY6BkAlwWwRroTgw7Q/kU+75UFUPv594LRAw7OoCvxVWg mfUeUmLl30TuChv2HSf3M34ZID7gBkyjc3R2gxtn3ykF7/zaGoN4VQu63DLHZSdCuQVQ ol7SnKhnRlvGMKfhQYl4rh9Cv8/P7wwGrggDv1gzUfWgBe6BTgfFgoqNi62bnjvSlieA B9A6M7GGjdybeGtlLX2vYvMPbadRXlvIR6D5wT2sZAwvCeyicYC5s01pOTxzX4y8akG8 0M5w== X-Gm-Message-State: AOAM532Q/Qly2gz+nEuCpYxcHQ807BaMUFkFQ9XjWlwyJGv0gc5KBLNf WFcu2ich3mW/LzdESGSsn9ANZXjoQYrPE5JsWAHlrFzxl7SS1g== X-Google-Smtp-Source: ABdhPJwdQ1WbiOGCCmfH0VCB1c//Ptzt0p0kc112cythdINB9yMhPqP+3C0qVtt3ccQPVBC8JjwFeh/z3fQWVJvPLCk= X-Received: by 2002:ac8:60d:: with SMTP id d13mr5083948qth.223.1625232131188; Fri, 02 Jul 2021 06:22:11 -0700 (PDT) MIME-Version: 1.0 References: <20210701151019.1103315-1-matthew.auld@intel.com> <20210701151019.1103315-3-matthew.auld@intel.com> In-Reply-To: <20210701151019.1103315-3-matthew.auld@intel.com> From: Matthew Auld Date: Fri, 2 Jul 2021 14:21:44 +0100 Message-ID: Subject: Re: [PATCH v2 3/3] drm/i915/uapi: reject set_domain for discrete To: Matthew Auld Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?Q?Thomas_Hellstr=C3=B6m?= , kenneth.w.graunke@intel.com, Jordan Justen , Intel Graphics Development , ML dri-devel , Kenneth Graunke , Jason Ekstrand , Daniel Vetter Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, 1 Jul 2021 at 16:10, Matthew Auld wrote: > > The CPU domain should be static for discrete, and on DG1 we don't need > any flushing since everything is already coherent, so really all this > does is an object wait, for which we have an ioctl. Longer term the > desired caching should be an immutable creation time property for the > BO, which can be set with something like gem_create_ext. > > One other user is iris + userptr, which uses the set_domain to probe all > the pages to check if the GUP succeeds, however keeping the set_domain > around just for that seems rather scuffed. We could equally just submit > a dummy batch, which should hopefully be good enough, otherwise adding a > new creation time flag for userptr might be an option. Although longer > term we will also have vm_bind, which should also be a nice fit for > this, so adding a whole new flag is likely overkill. Kenneth, do you have a preference for the iris + userptr use case? Adding the flag shouldn't be much work, if you feel the dummy batch is too ugly. I don't mind either way. > > Suggested-by: Daniel Vetter > Signed-off-by: Matthew Auld > Cc: Thomas Hellstr=C3=B6m > Cc: Maarten Lankhorst > Cc: Jordan Justen > Cc: Kenneth Graunke > Cc: Jason Ekstrand > Cc: Daniel Vetter > Cc: Ramalingam C > --- > drivers/gpu/drm/i915/gem/i915_gem_domain.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_domain.c b/drivers/gpu/drm= /i915/gem/i915_gem_domain.c > index 43004bef55cb..b684a62bf3b0 100644 > --- a/drivers/gpu/drm/i915/gem/i915_gem_domain.c > +++ b/drivers/gpu/drm/i915/gem/i915_gem_domain.c > @@ -490,6 +490,9 @@ i915_gem_set_domain_ioctl(struct drm_device *dev, voi= d *data, > u32 write_domain =3D args->write_domain; > int err; > > + if (IS_DGFX(to_i915(dev))) > + return -ENODEV; > + > /* Only handle setting domains to types used by the CPU. */ > if ((write_domain | read_domains) & I915_GEM_GPU_DOMAINS) > return -EINVAL; > -- > 2.26.3 >