Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp482940imw; Fri, 8 Jul 2022 06:30:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uRhXgMTLCWhFNf/HOL8xWZBOXgtUlQN6xKyh5o1RHcArifCwUnJTVKC6u7t6NsV6QI77Co X-Received: by 2002:a17:903:447:b0:16c:9a:7a0c with SMTP id iw7-20020a170903044700b0016c009a7a0cmr3689788plb.137.1657287034732; Fri, 08 Jul 2022 06:30:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657287034; cv=none; d=google.com; s=arc-20160816; b=xyLAvL1LJV9dUOw/uVkFWQ86rf507KndskFes0TjtgSf1i4eoworb1JBgMIzYrPPXE 6+G4a13Ju0gPkUQxmNi9e0U9HLVDUE8MUZUxYyZp87SU2jOrtCvL93kscOJqcqXtCOcN v0lbGeoC1AHj94mL/pa6wT0PsUMTwMqZpvfBIucnTjrp4/FKqX/YUh4WCRYwXGe68/UA 8H+q9NCvhd2FA73jc93xCgLByG6YBtUeHj0apmWw991KRS9pFlUN/YeopQAH59fxdCbo B3L/dYR5QJ982Fyk06oIIYsiKoO0G/ODDNy0kJcVS8DyAIZrH7SnDVCTTQ0AFHMV4F98 CQXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=FNEkIYH3Ubdehh54LHEv6D2fRSt+Ga+FYjc2XEJD8/s=; b=06T77UD7vBjqUEN2Kko/P5SQgNhC856s8PJeOQldcZI2woTE04KWAVNaNj49t11Qu/ 2C+tRjjr3bcyoAwedIYgVGPT9jDQaK+Xb7kwTe2ZnZhlHXG8Jq0ZBbTxjtTuQZK2UvQj is25J44FoZuSVRl8yIpkNxCwg9hP81K4GxvoIM3FduKjFCyjNdYX5Kn9Qs9lBe72/ytJ g7zEKmux8b/JDoHHsIx8l7oNpSjY4vPlxw2KezBeHhvmhNiQsM8uxFxv8T8s+db23eSU 668Fob2Ln+yMpIpfYW8Ndw/Hnp1+fWl1EbarYbZkrjfkJ9E3lAjUZap28IIMnowbhcCC TVoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LqCq9JLJ; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ev14-20020a17090aeace00b001ef66b30dc0si2655054pjb.33.2022.07.08.06.30.21; Fri, 08 Jul 2022 06:30:34 -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=@intel.com header.s=Intel header.b=LqCq9JLJ; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237970AbiGHN1V (ORCPT + 99 others); Fri, 8 Jul 2022 09:27:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231287AbiGHN1U (ORCPT ); Fri, 8 Jul 2022 09:27:20 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1A7A2CC80 for ; Fri, 8 Jul 2022 06:27:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657286839; x=1688822839; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=l9IHZQoctXuefILwa08DrWHT1twoVyGQpEM+ac2JZDQ=; b=LqCq9JLJHwHtnH4ueAFuRhwrAm/JqFDj96FpRNSUGPDzV4v8zY6aGhix l9sqdwIrvQUp4loOUEhmDYFE9Qq+5VplqHoDYzPvm4jexvUkwCAy22jZQ gTYBkAp5m7HcWMa4EuioeKpOglw3yQnkPR77YPjAmBt3CRrm5ZdolflJE RF9EM9q160ynExnekfxdOSIr/7KLi8Bhdu0iNA65V/dOc5aUueY9xJmNo g/xAgZsEcf6L3t32ZP6wi5Aezk2RAX3F77nvFo73qUFNpKBIqaxNSm5ZO xsC5PUedwkfEHrC3WfshMFXh5Xr4+YGLxNbOTRpjxODpdo1jJW+PhmvmJ A==; X-IronPort-AV: E=McAfee;i="6400,9594,10401"; a="267310013" X-IronPort-AV: E=Sophos;i="5.92,255,1650956400"; d="scan'208";a="267310013" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2022 06:27:19 -0700 X-IronPort-AV: E=Sophos;i="5.92,255,1650956400"; d="scan'208";a="661771827" Received: from cmchugh-mobl.ger.corp.intel.com (HELO [10.213.229.21]) ([10.213.229.21]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2022 06:27:16 -0700 Message-ID: <68231920-8eef-1e10-df40-ac8cd0dd0802@intel.com> Date: Fri, 8 Jul 2022 14:27:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.11.0 Subject: Re: [PATCH v10 04/11] drm/i915/gem: selftest should not attempt mmap of private regions Content-Language: en-GB To: Robert Beckett , dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter Cc: =?UTF-8?Q?Thomas_Hellstr=c3=b6m?= , kernel@collabora.com, linux-kernel@vger.kernel.org References: <20220707200230.1657555-1-bob.beckett@collabora.com> <20220707200230.1657555-5-bob.beckett@collabora.com> <6e387f90-dce3-486d-83e9-26a975777265@intel.com> <08d33248-be80-15ab-d245-a6e23fe55423@collabora.com> From: Matthew Auld In-Reply-To: <08d33248-be80-15ab-d245-a6e23fe55423@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, SPF_HELO_NONE,SPF_NONE,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 08/07/2022 14:22, Robert Beckett wrote: > > > On 08/07/2022 08:53, Matthew Auld wrote: >> On 07/07/2022 21:02, Robert Beckett wrote: >>> During testing make can_mmap consider whether the region is private. >> >> Do we still need this with: 938d2fd17d17 ("drm/i915/selftests: skip >> the mman tests for stolen") ? > > huh, I guess not. That wasn't in my tree. I guess I should rebase. > > Looking at it, my patch would have been preferable initially I think. > Each location of the additional checks in that patch first call > cam_mmap(), which I think is the most appropriate place to make the > decision. It fails at the object_create() I think (on small-BAR I mean), which is before we can call can_mmap(), passing in the object. > > I could do a replacement patch that reverts that one if preferred, or we > can leave it as is and I will drop this patch. > > >> >>> >>> Signed-off-by: Robert Beckett >>> Reviewed-by: Thomas Hellström >>> --- >>>   drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 3 +++ >>>   1 file changed, 3 insertions(+) >>> >>> diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c >>> b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c >>> index 5bc93a1ce3e3..76181e28c75e 100644 >>> --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c >>> +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c >>> @@ -869,6 +869,9 @@ static bool can_mmap(struct drm_i915_gem_object >>> *obj, enum i915_mmap_type type) >>>       struct drm_i915_private *i915 = to_i915(obj->base.dev); >>>       bool no_map; >>> +    if (obj->mm.region && obj->mm.region->private) >>> +        return false; >>> + >>>       if (obj->ops->mmap_offset) >>>           return type == I915_MMAP_TYPE_FIXED; >>>       else if (type == I915_MMAP_TYPE_FIXED)