Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4721796iog; Wed, 22 Jun 2022 04:41:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sF3yj1CS8Kb/EGctGw3etSMwt+n89yLxcs9vtNf40eJ3B1UnMI1Tp5HmqN4NPPIVEPu5Gi X-Received: by 2002:aa7:c38d:0:b0:435:9257:99a5 with SMTP id k13-20020aa7c38d000000b00435925799a5mr3671399edq.204.1655898096917; Wed, 22 Jun 2022 04:41:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655898096; cv=none; d=google.com; s=arc-20160816; b=Nf2LwvIRIHozHwUtGodUOdON9I6vGT9UoaBZWbnUOgiRwJQKi0Azg/bcYjD3+UF7EP AGq+0nMXSt94vDKwDsnUBEQxsWtaF/FXvgRBlKPgLnnQDZPOBLfyfRtFpVq2IvS8khf6 0ufXbBcdOe8SiXxkKWXtAdBtrX6llWfdyDHJ5TMDhoTI/kUshQKsUygXeiwBG9vLJlB4 GVY4OFEbpdEDLBP4PTBcmgwqoF3YKt+jnEN4T/ObQWnq9Q1oO4eHk1DOS/TtagSwbTtB umsqUo2l2eAZ4E2L8yNy8BR1MVVQpZui9lui4h/lLD3/vI92UqJqJedxNdBMlfaLmrd5 MrPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=ade5YPsT/mwu4xZZrE10HabiVrIf1ZkhTOHX2NF4+bA=; b=gUeIVtGVLdc6puTCOcPHvmUAsBBo1QtLy4OHGGJUgUIUg/Rl7CcSnvB5KevlTpTvhc YWOrx1aTzYQ+ue7nMrFUzc9AJszyMJrPvYw3EJzuzb3sWNiKOBuXRD+qkiW9ihcqupnN eFP70rbCb6fDkwR8D8o+O30hX+fLA2CFP0bc+oGkBQSGvHP//zNDBk3fyEStFtoIsYBF D/lU0ofqvyk1uiB3MsIxGIL3tY3NGZMgGLpIfdqHR0XrkkoXYcKSf2tBj/UAXqihEpLs +2MV2lrlUE8fiHFp0vLDiNPSP0tNXezO41GVR1k1Xh4Q3MjmRI/Jw+ObiaAPHOKScr9B zHKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZcHVA72w; 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 a21-20020a50c315000000b0043569bbf2f5si2308327edb.285.2022.06.22.04.41.08; Wed, 22 Jun 2022 04:41:36 -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=ZcHVA72w; 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 S244937AbiFVLh0 (ORCPT + 99 others); Wed, 22 Jun 2022 07:37:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233017AbiFVLhW (ORCPT ); Wed, 22 Jun 2022 07:37:22 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 185073B3FB for ; Wed, 22 Jun 2022 04:37:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655897842; x=1687433842; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=MtU2Y8dBdDnHq8H7yBgFCvaWxAPQx9yCl1KzbmITiaU=; b=ZcHVA72wMRQv6n2p+0qgUGhhm7gmH1q8Xs+iu5NR7/hTHXXrirP+Qb0V eSBb2qke1qzAaCDqmgiwwtl1gXk3IJ+8nOITw4UfgDIYd+3L4KcRG4n6W pGOlqLDcCDZTM8ECAijqXwsNu45YZgdJGg4hKg+X7egPQDhd/u99aA5bM v/0VeJgfITxThFEnHu9u/M8t6D/H9uIIKkKCdQnd97SvC43w3b7U8Q8mX 8Jl/0meuXtNvQsRcc7lG2pnl95hVDoLxJ/aJ+fNR5iW0jwXoTaDoJGpOL 7C6j2W+F05b7WXTChjgeFamy2ZX3PAwxv6f2uO0ChjqQoRuuGR6uLwTU1 w==; X-IronPort-AV: E=McAfee;i="6400,9594,10385"; a="366716617" X-IronPort-AV: E=Sophos;i="5.92,212,1650956400"; d="scan'208";a="366716617" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2022 04:37:21 -0700 X-IronPort-AV: E=Sophos;i="5.92,212,1650956400"; d="scan'208";a="690457834" Received: from wterliko-mobl.ger.corp.intel.com (HELO [10.249.254.201]) ([10.249.254.201]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2022 04:37:19 -0700 Message-ID: <5a190fb8c2e31ae434940f0d942debd32807b262.camel@linux.intel.com> Subject: Re: [PATCH v8 04/10] drm/i915/gem: selftest should not attempt mmap of private regions From: Thomas =?ISO-8859-1?Q?Hellstr=F6m?= 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: kernel@collabora.com, Matthew Auld , linux-kernel@vger.kernel.org Date: Wed, 22 Jun 2022 13:37:16 +0200 In-Reply-To: <20220621200058.3536182-5-bob.beckett@collabora.com> References: <20220621200058.3536182-1-bob.beckett@collabora.com> <20220621200058.3536182-5-bob.beckett@collabora.com> Organization: Intel Sweden AB, Registration Number: 556189-6027 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-5.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Tue, 2022-06-21 at 20:00 +0000, Robert Beckett wrote: > During testing make can_mmap consider whether the region is private. > > Signed-off-by: Robert Beckett LGTM. 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)