From patchwork Thu Nov 29 15:04:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10704747 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 438A517F0 for ; Thu, 29 Nov 2018 15:04:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1DA792F4BB for ; Thu, 29 Nov 2018 15:04:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BCB12F4BC; Thu, 29 Nov 2018 15:04:42 +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 3ED1C2F4C4 for ; Thu, 29 Nov 2018 15:04:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5C8176E425; Thu, 29 Nov 2018 15:04:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw1-xc41.google.com (mail-yw1-xc41.google.com [IPv6:2607:f8b0:4864:20::c41]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7DC856E425 for ; Thu, 29 Nov 2018 15:04:35 +0000 (UTC) Received: by mail-yw1-xc41.google.com with SMTP id x2so869870ywc.9 for ; Thu, 29 Nov 2018 07:04:35 -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=wI1RElausYuQbqJz2Bti2J/W1ROMWLuUcRqbO7N/UdM=; b=Y7pzwNrzUeOUi7S65uAh2WByo8FW1D760VvSx7lXd6Swcgz0c2cyqthAgkNgkGGY0J BIOj2skCMS94/ZH5b4AsspJv9sYivDAPT9WCtxoAbMnGn8HAbq+vJDCKslcXFhMgYp4P 3Vb/EEGiEypEXgMb5FQBfZJnEV3YFoldjaqc0zNCFYgR3++3ewJ79GL8IwdGTZPIbA5f jatmULJir1s4yoGjahIOdPxEoxCd0v6hzQlhhU5Js/16VDryezxAfdLR/gtkcC9XiwiI s2oM+MVASNEmkNn9LCGlNBKQKsJV1eA1YzhXnPh450+Fz3Oh0QPdXN/323uSDglzGTlt YHVA== X-Gm-Message-State: AA+aEWagwbEZx/Z864i3cOn6QFEy5y4S9uxKOaOFuAuWZbo9SjmiuTPH WJTi8iESL06DUsmIosowazWJ9SsiSrVatg== X-Google-Smtp-Source: AFSGD/VvS4S+ILzmuyD170sJKlYSIUuLyBQV+Wgd5NM35JGQNCYExkIyX+9bznNNkMT8BEBBIdx7iw== X-Received: by 2002:a81:65d5:: with SMTP id z204-v6mr1700657ywb.68.1543503874414; Thu, 29 Nov 2018 07:04:34 -0800 (PST) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id r20sm2434656ywa.13.2018.11.29.07.04.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 07:04:33 -0800 (PST) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 3/4] drm: Move atomic_state_put after locks are dropped Date: Thu, 29 Nov 2018 10:04:16 -0500 Message-Id: <20181129150423.239081-3-sean@poorly.run> X-Mailer: git-send-email 2.20.0.rc0.387.gc7a69e6b6c-goog In-Reply-To: <20181129150423.239081-1-sean@poorly.run> References: <20181129150423.239081-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 Changes in v2: - Moved state->acquire_ctx clear to a separate patch (Daniel) Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul --- drivers/gpu/drm/drm_atomic_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 5e03bebc7f9e6..43e129eee244a 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -3290,9 +3290,9 @@ int drm_atomic_helper_resume(struct drm_device *dev, drm_modeset_backoff(&ctx); } - drm_atomic_state_put(state); drm_modeset_drop_locks(&ctx); drm_modeset_acquire_fini(&ctx); + drm_atomic_state_put(state); return err; }