Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp483003imw; Fri, 8 Jul 2022 06:30:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uLqtSWexV+5zHQP2Kk922FbQC50/T1uifqwL3Yk2nfnhiB+8d/jVKLnI4MV8ovY9clwkqY X-Received: by 2002:a63:4502:0:b0:412:3287:2adf with SMTP id s2-20020a634502000000b0041232872adfmr3264755pga.345.1657287037247; Fri, 08 Jul 2022 06:30:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657287037; cv=none; d=google.com; s=arc-20160816; b=b8L+Jed4xxZ3y2O6y0pzGWVnE9KSLmmdBHmGMOKj154UIsCDzgT9wiGETOuyfwbv8s kMZ47MhgM+PGZKuPKt+CXJHjEl7Vgc5Aw8gYviBMEmWCJ9hOPlUNnhWBpDNiCaIkOt9o EEGMypbWYjSowVNNhP1tzKv/P66Az0AloYyfgvl47ETAKf45dlddPmqwtYkubzjxHLoN ikxUeuwceiizQX/xqMp9yO7L2c3znBJ5CpuF0IXFEGnqJ/EbmbN+jjFYtEGE2ptXapod EEuhBVMuGoYpsgjPjaaYq16+wIZzqwGW7B/eh8nPZBVeSSIWrPk2e+2zr9nqT2AH3eHy IIKA== 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=16YXKO92Y17VrUmMZmIikuj/1n+uK70an1XVGcn6dOg=; b=VEa+3oWBVFnwSHZBPtP33G7Au5Woeef8B1ypNukUF/J4VMRAY+HoS7shHW9otibCz3 kYyRsVrrPPlaJHErO3A80pTu34MWL423GC3ZpZsIFcGvqX2lFvY1bhOsrwhiiQXH+DaN s7pv+NDIb2OBKRevWcbcrVbOmFPILbNZgGO91DumTwRZPI9uSPgQ8XptrNGyVDIptm5M Go+ujB322mTNwyOvb3jfXRVFXq32vl8Nk8+vnIW6/7GTKId8Zta0VjdeRrmQB0d6fYJX 8/RuaYG9yNilsq4x33EDXoHK50Ic6u4SzHwWImbXseaL0Gyi1ccuyGmwyKiSD0VJklC+ C8VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=cJ3qTgIO; 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=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d19-20020a63f253000000b0040c9e0a1ef5si3526646pgk.516.2022.07.08.06.30.24; Fri, 08 Jul 2022 06:30:37 -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=@collabora.com header.s=mail header.b=cJ3qTgIO; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237934AbiGHNWQ (ORCPT + 99 others); Fri, 8 Jul 2022 09:22:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231890AbiGHNWP (ORCPT ); Fri, 8 Jul 2022 09:22:15 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E3102A425 for ; Fri, 8 Jul 2022 06:22:15 -0700 (PDT) Received: from [192.168.178.53] (82-71-8-225.dsl.in-addr.zen.co.uk [82.71.8.225]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbeckett) by madras.collabora.co.uk (Postfix) with ESMTPSA id 5B56E66019BB; Fri, 8 Jul 2022 14:22:13 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1657286533; bh=92AcTQpvwBEXxmF+03+cU6InX535v6B3nuv1srwuTJc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=cJ3qTgIOLPkH6HJPkiSp3VQ4y4td8Il5ll0ISHiuaA4Mzzhc/O+IJWQqmU7h18YNE FcJGyeTdmRBGNavuRPIGuDQuuOkPpfRqpPsz+B88/CVV4G6oTRVV1ic++zhPkNaapC 3e7s91DM4cP2TFKgWt9G9bDTkDroMjC+WO5t793gyIo71nCTjIoCvnnOSa1WaN9dbc hjI2vguW9VLY+2bl0SiphbjTAgIZJuCkOZIDTjpXmw4RUecrKpL7F26LnTB0i99geO DWahEEivn+V3BSFxwfSxsemoYQ7Fb0a/lbuN/Sv5VLutJSFY5tptPig4axjgCnnyGu ZyvxKxhHV696Q== Message-ID: <08d33248-be80-15ab-d245-a6e23fe55423@collabora.com> Date: Fri, 8 Jul 2022 14:22:10 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v10 04/11] drm/i915/gem: selftest should not attempt mmap of private regions Content-Language: en-US To: Matthew Auld , 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> From: Robert Beckett In-Reply-To: <6e387f90-dce3-486d-83e9-26a975777265@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 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. 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)