Received: by mail.netbsd.org (Postfix, from userid 605) id 6FEBC85614; Thu, 9 Mar 2017 08:27:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id CFD06855AF for ; Thu, 9 Mar 2017 08:27:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id yFSnnfrHymR7 for ; Thu, 9 Mar 2017 08:27:18 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 7010084CE1 for ; Thu, 9 Mar 2017 08:27:18 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 6AE00FBE4; Thu, 9 Mar 2017 08:27:18 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Thu, 9 Mar 2017 08:27:18 +0000 From: "Maya Rashish" Subject: CVS commit: src/sys/external/bsd/drm2 To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20170309082718.6AE00FBE4@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Maya Rashish" Mail-Followup-To: source-changes-d@NetBSD.org Module Name: src Committed By: maya Date: Thu Mar 9 08:27:18 UTC 2017 Modified Files: src/sys/external/bsd/drm2/dist/drm/ttm: ttm_tt.c src/sys/external/bsd/drm2/ttm: ttm_agp_backend.c ttm_bus_dma.c Log Message: Clarify ttm state transitions tt_unpopulated<->tt_unbound<->tt_bound. Assert it, too, and don't handle other cases. We can add the assertion to ttm_agp_tt_unpopulate because it is called by {nouveau,radeon}_ttm_tt_unpopulate, which is generically called ttm_tt_unpopulate. And the sole caller to ttm_tt_unpopulate (ttm_tt_destroy) only does so if the state is unbound. the other caller is in a !NetBSD block. We can add the assertion to ttm_agp_tt_populate and avoid handling the !unpopulated case because the sole callers are {nouveau,radeon}_ttm_tt_populate both of which return early in the !unpopulated case. We can change the assertion on ttm_tt_wire because it is solely called by ttm_bus_dma_populate, which already asserts that it is the unpopulated case. from riastradh To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/ttm/ttm_agp_backend.c cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/ttm/ttm_bus_dma.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.