From patchwork Tue Nov 27 22:46:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10701561 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E9EC7109C for ; Tue, 27 Nov 2018 22:47:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB45C2B6C3 for ; Tue, 27 Nov 2018 22:47:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CEE6F2B6DB; Tue, 27 Nov 2018 22:47:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 918232B6C3 for ; Tue, 27 Nov 2018 22:47:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 76E8B6E09F; Tue, 27 Nov 2018 22:47:03 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw1-xc42.google.com (mail-yw1-xc42.google.com [IPv6:2607:f8b0:4864:20::c42]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3DA5C6E09F for ; Tue, 27 Nov 2018 22:47:00 +0000 (UTC) Received: by mail-yw1-xc42.google.com with SMTP id d190so9871239ywd.12 for ; Tue, 27 Nov 2018 14:47:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aEHY8Jpb0Yl4KBqq9tV4WKNeVQq0/DXsou66Lwsm058=; b=NqqPWO8iKnMDiQXOz2HidRHyFStQ1uL/ACUgyNcePQBWwfNHTS821hrpvkrcvhdmcH 5Vp73Fy14E04pHYrTFiTKbXSslSAET93vOMikWhYp795XnyxCCbVc8N8p67qrM7HuVpU RMelkTIK50pN3Um9IZvCxxBQq8ksc0pl+KmAFz1ZUtnHWrvHZvgYEJLvviWyGRi0jXYq qhL6+WIVXir8skGV+1TEHcphaQqukbw/OUEgHBA0SR3yo1ykKEmCq0OkM41ym2PrLVtO G9zeTAEeR88XmU3+C/MsOw/LT1draCO+/88f5LOMgT5aAWO6KhwLx+G45X09P4ja9v7Z GSfA== X-Gm-Message-State: AGRZ1gJDiVxe+RamgPuIhPPOEcUtBTMLYjjiE2WPYLgFZgyc08Yf1pIz sL1uS6TY1mVvuV2KLehvuipbAGeqgKtC3Q== X-Google-Smtp-Source: AJdET5cEt3vnUfzbln0CQlKg0msCeVTej164xZ/WmAdREiP7ppd5U2bN3HJNtGqJpF58WGOKt1uNdw== X-Received: by 2002:a81:b619:: with SMTP id u25mr36492492ywh.129.1543358819303; Tue, 27 Nov 2018 14:46:59 -0800 (PST) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id r193-v6sm1615157ywg.32.2018.11.27.14.46.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Nov 2018 14:46:58 -0800 (PST) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/3] drm: Move atomic_state_put after locks are dropped Date: Tue, 27 Nov 2018 17:46:39 -0500 Message-Id: <20181127224654.48331-2-sean@poorly.run> X-Mailer: git-send-email 2.20.0.rc0.387.gc7a69e6b6c-goog In-Reply-To: <20181127224654.48331-1-sean@poorly.run> References: <20181127224654.48331-1-sean@poorly.run> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Ripard , David Airlie , Sean Paul , Sean Paul Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Sean Paul drm_atomic_state_put doesn't require any locking, and this makes things easier for switching to modeset_lock_all helpers in a future patch Cc: Daniel Vetter Signed-off-by: Sean Paul --- drivers/gpu/drm/drm_atomic_helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index fe8dd8aa4ae40..15a75b9f185fa 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -3286,9 +3286,10 @@ int drm_atomic_helper_resume(struct drm_device *dev, drm_modeset_backoff(&ctx); } - drm_atomic_state_put(state); + state->acquire_ctx = NULL; drm_modeset_drop_locks(&ctx); drm_modeset_acquire_fini(&ctx); + drm_atomic_state_put(state); return err; }