Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3820692rdh; Tue, 28 Nov 2023 05:01:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IE+66khnxXIBxN/2y1I6uTyZzts+k2kQ2OU/33YSr0Q5JK8yTIu2CmW63kGIYAk7ShoSKS0 X-Received: by 2002:a9d:69c9:0:b0:6d7:ea6b:947f with SMTP id v9-20020a9d69c9000000b006d7ea6b947fmr8137726oto.1.1701176490495; Tue, 28 Nov 2023 05:01:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701176490; cv=none; d=google.com; s=arc-20160816; b=X2j6J3t/S7fMSzdajSoy3onfNH0B0ePfLHd65R1q8h5OglbP1bzSXtulQssZP/dW2f tDqKdpeUxn7OFeV91dj2rtOKLeREWl8jzYPukUUgzHOWGahWd1JCS2bqKvFIN5m2MzdC Zh6ZdxZpWijJbBVKuRdKGsE9HZYM2muk+JiYgBHfhvwvbTq9WntwJfpiEtl5ywRjNkRT 9Bb+yj56OCUmVdCSwq3JOUn8RLtpxAfm6yoD9QikxpOhRxMGJo74RC4Zf9UrBl2Nzud2 CZtfjJj2pwqJ/VG63UWsc07C9j8hXFvGJvzXJQP/BF8jv8pstv56q7wsufeOSgT1ur9m 7D6g== 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:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=f2hZk8fZKkvAIUTv+6znPqWM38Sq6FqaoIAoot9eniQ=; fh=+9B8pDoow6Ly8ty9RpPXS8A/F1KZ6NQ9Q2IODC05p7Q=; b=sJKJs8OJBx8sllz7LS7H9Je2IEErs/7ZwnCqHBfWLgpY4G7h+fjpHJY7+1I7dMYXH6 u1MvCWLEj3Kc3oFlBSiIyYIq+pP0WIZhCUQ5oG8tztnOridXrUJ6IagEDoU6MIlf/1Bj ZAzviUm2EsQ/RiYYb6n9Zju400Llb425K0faDVL/ETZIrP8KWok+cXxqK6WiUNZdyYXq /i9og9EChYpEnZDPkxgrCNIdTJxlkzc7vIIkn2GauA5M2OBhAz68HOe0I7W8NX7Sm+EG o+0Ix2dYW3Th7G7SCh1sqjnk7mvc/XN95JY/2FYS/+FT0mgaYSiP7XNLqKxQmooPdG5W itzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aXVlGl51; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id d15-20020a4a918f000000b0058da6ab9971si918539ooh.31.2023.11.28.05.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 05:01:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aXVlGl51; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id BE20E80B8223; Tue, 28 Nov 2023 05:01:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344980AbjK1NBI (ORCPT + 99 others); Tue, 28 Nov 2023 08:01:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344924AbjK1NA5 (ORCPT ); Tue, 28 Nov 2023 08:00:57 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1212019A3 for ; Tue, 28 Nov 2023 05:01:04 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55219C433C7; Tue, 28 Nov 2023 13:01:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701176463; bh=cno0wrTciQcAWVSsnIZ43dCdMCLvNvzuyANDvYgnksw=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=aXVlGl515Dfgo5/K1KozTP82iuF3KvDFwv+ZDaBUl+zAblgkAnP4MYltZlGXrQX4S GHKUtwhG8dEviY9RQEO/ECqcW/ICgiIstWLe4kdomhHILClEBjQ49mmkY0Jzi6O0ue X5qzBMKUs2wDqPwjoFRT7Vb1/bvzuRfaJcbV0CLri3FQjJ9KsWzeHfmcXXY/lHRk3w VNQqE3waXpplg99R7nRF0RNF+eIMnf2pZOK2ls7jYED82nCFda0xS9LYWBi2B0Vhjm 0d/ikYHDDRsSBfYwtPr5uv5qWvzgjTmU5dMeWH7Vyo9AXBECKvGq2QtdwcOMD6bvmp aajCxQJuF4gFg== From: Maxime Ripard To: airlied@gmail.com, daniel@ffwll.ch, frank.binns@imgtec.com, donald.robson@imgtec.com, matt.coster@imgtec.com, sarah.walker@imgtec.com, Danilo Krummrich Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org In-Reply-To: <20231124233650.152653-4-dakr@redhat.com> References: <20231124233650.152653-1-dakr@redhat.com> <20231124233650.152653-4-dakr@redhat.com> Subject: Re: (subset) [PATCH drm-misc-next 3/5] drm/imagination: vm: fix drm_gpuvm reference count Message-Id: <170117646120.2825698.16047207632231408028.b4-ty@kernel.org> Date: Tue, 28 Nov 2023 14:01:01 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 28 Nov 2023 05:01:28 -0800 (PST) On Sat, 25 Nov 2023 00:36:38 +0100, Danilo Krummrich wrote: > The driver specific reference count indicates whether the VM should be > teared down, whereas GPUVM's reference count indicates whether the VM > structure can finally be freed. > > Hence, free the VM structure in pvr_gpuvm_free() and drop the last > GPUVM reference after tearing down the VM. Generally, this prevents > lifetime issues such as the VM being freed as long as drm_gpuvm_bo > structures still hold references to the VM. > > [...] Applied to drm/drm-misc (drm-misc-next). Thanks! Maxime