Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3163303ybl; Fri, 20 Dec 2019 05:02:10 -0800 (PST) X-Google-Smtp-Source: APXvYqxue/09EM3CdPAzKtP8W0RI9aSXbwVsw0BIefv2KPGhuRsW5ESioVpndoZvQG1EsWl3cVs6 X-Received: by 2002:aca:2b0a:: with SMTP id i10mr3781638oik.137.1576846930089; Fri, 20 Dec 2019 05:02:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576846930; cv=none; d=google.com; s=arc-20160816; b=s1tGOGPIWXDG+tbG6eswvqatnOUfw1yv1rzpK9m7xqRJfFpLl7fU2i6AJPOKJblbjz E7h7WbcU6SqaPj1080pKbNBpXk46mCLrQVlhyXzT+ar60K6jPms/jzXhirsRGK1dGbqT vHos5hhEYKUJ/QjPksPBPRtAI82Yj3CrOYZ2mZDhv8xRerIouoILQ8PtuXMHMl4PBKo0 OlOa72CuhdagKMuQwkHWeU3r8HcMWVzVog22rUMOsvwO+lmJw0JrQyH8ZzNVSupgMB6b vBQMo2wPLRxuqtzUthgCdFoCa+ooN/7i+oZqozIzft6G824wK9XGJQSyJiXXn4YVWfq0 jGFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=xeUreLt6va9L8SCH3nGSjnsigirIJ1dymwMuYGQ0eIA=; b=hZSAGBxvrEXSfJN7kSUVI5k4koa/Z3vMa7xB6G8TDCenr86IJ41l7PJLoejVHthgu5 iGXFYbJdqmVg578tM1nZ2O5rg16wLTASl1co8HpYClrS2qvVTEw/JrBGiYwlvitfOE/b zlmm7/p8ST5wyueE1nBM2DrDMm/EZ75XfIjWyoHt4D5lTH32Zb4E0Q5zlEtQhiq6xH/i 7JaKkdVS7wTWugHu884SJ1htmVJyu8jqNe7t2habbuHRPEpEokoEcApa6/Dpm20larTJ LiufzQ8J6qYbKLpO5X9kvlDrOSpcuPZsi6zSVBgF3GnVid3xQu7xLEfWHaucf0V9l2SV ZtiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NcQOfR11; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y6si1058514oih.217.2019.12.20.05.01.56; Fri, 20 Dec 2019 05:02:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NcQOfR11; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727370AbfLTNA5 (ORCPT + 99 others); Fri, 20 Dec 2019 08:00:57 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:42788 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727344AbfLTNA5 (ORCPT ); Fri, 20 Dec 2019 08:00:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576846856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xeUreLt6va9L8SCH3nGSjnsigirIJ1dymwMuYGQ0eIA=; b=NcQOfR11QuPp6kxffQd2TfkSQYi9QxwyD2nT1CBQQ+srrqpbWhwkgA7Mzi1aIgLDEPBd+r uWziCK+aXV8WSedAH/HDbcz9vyNuXXfcKbbiCu2VNNeLyfHDdCADOtnWLokzkLDR5LiMDx Bv0XpxoWAy+b6unHePofHkrF7CJ2wOQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-322-x_iIbmquNkeT2-BPzY-dDA-1; Fri, 20 Dec 2019 08:00:45 -0500 X-MC-Unique: x_iIbmquNkeT2-BPzY-dDA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CF8728024DB; Fri, 20 Dec 2019 13:00:43 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-98.ams2.redhat.com [10.36.116.98]) by smtp.corp.redhat.com (Postfix) with ESMTP id B59CE70383; Fri, 20 Dec 2019 13:00:26 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 638F69DA5; Fri, 20 Dec 2019 14:00:25 +0100 (CET) Date: Fri, 20 Dec 2019 14:00:25 +0100 From: Gerd Hoffmann To: Frediano Ziglio Cc: dri-devel@lists.freedesktop.org, David Airlie , open list , "open list:DRM DRIVER FOR QXL VIRTUAL GPU" , Daniel Vetter , "open list:DRM DRIVER FOR QXL VIRTUAL GPU" , Dave Airlie Subject: Re: [Spice-devel] [PATCH 4/4] drm/qxl: add drm_driver.release callback. Message-ID: <20191220130025.maasx7xfb7rtadgd@sirius.home.kraxel.org> References: <20191220115935.15152-1-kraxel@redhat.com> <20191220115935.15152-5-kraxel@redhat.com> <57755373.16738363.1576843760950.JavaMail.zimbra@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57755373.16738363.1576843760950.JavaMail.zimbra@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 20, 2019 at 07:09:20AM -0500, Frediano Ziglio wrote: > > > > Move final cleanups to qxl_drm_release() callback. > > Can you explain in the commit why this is better or preferable? It gets called when the drm device refcount goes down to zero. It's needed for a proper cleanup in the correct order. > > Add drm_atomic_helper_shutdown() call to qxl_pci_remove(). > > I suppose this is to replace the former manual cleanup calls, > which were moved to qxl_drm_release, I think this could be > added in the commit message ("why"), I don't see much value > in describing "how" this was done. The call is part of the shutdown sequence for atomic drm drivers and wasn't present in qxl for some reason. > > Reorder calls in qxl_device_fini(). Cleaning up gem & ttm > > might trigger qxl commands, so we should do that before > > releaseing command rings. > > Typo: releaseing -> releasing > Why not putting this in a separate commit? Was this behaviour > changed? It does not seem so to me. Yes, I can make that a separate commit. No, behavior didn't change. qxl_device_fini() is simply broken without this. cheers, Gerd