From patchwork Fri Nov 16 18:42:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10686837 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 4AC231747 for ; Fri, 16 Nov 2018 18:44:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C5502895F for ; Fri, 16 Nov 2018 18:44:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 30DB028E12; Fri, 16 Nov 2018 18:44:13 +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 E361E2895F for ; Fri, 16 Nov 2018 18:44:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 35DEF6E846; Fri, 16 Nov 2018 18:44:11 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yb1-xb42.google.com (mail-yb1-xb42.google.com [IPv6:2607:f8b0:4864:20::b42]) by gabe.freedesktop.org (Postfix) with ESMTPS id C092C6E844 for ; Fri, 16 Nov 2018 18:44:09 +0000 (UTC) Received: by mail-yb1-xb42.google.com with SMTP id t13-v6so10147228ybb.8 for ; Fri, 16 Nov 2018 10:44:09 -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=Yq5wHqVxEBV+c7Rxa+DYhT4l3Dxk9X2jtxjHuYL3O0k=; b=QvGMsB/wqJVffDX84ySu8hwm3o9DGj68/j7HAZOa1UXpzRvpztKejbgUSxXqD9CrQi Xfh4xIsqliB5vyMjwOa83Qje1Ygd84hXZJR0Dg+zauxPfuNUJ7ErWafPF4aPkngfHkNN 4Ea9UMYErX0nskY1KYaHJrsIiixBPCOiYk9TH3tn+fvBScCbytJMxkaA5IOlCezxSe8t NVuOxy+ymkPtoXpF1MmSIOmSdW/kcaTg85KSVWSD5mMRj5cJJgG+7eRswzp0Bu1SN92m /CYo1fZv+UasyA9yriDZ7rIjvwCulNM0t3Ern0iWkqr4vXiruSRdZfib0g09UyOyVCy0 AuzQ== X-Gm-Message-State: AGRZ1gIB3Wk5dB7SnWCKfP76qvGcaRIzIxZIUS09FzsdZ6lJu8j+pqE0 AvlORR3vKtDe0gsBIGir4VG9Wbtm4cJFXg== X-Google-Smtp-Source: AJdET5d4nR4r8Rk1mnv/8/WCi4sWH439xVq7fSLAPdV2AwOtYiC3LfOnpvU1aH4+OdU0wR9xDqsgSw== X-Received: by 2002:a25:3bd7:: with SMTP id i206-v6mr11225240yba.491.1542393848809; Fri, 16 Nov 2018 10:44:08 -0800 (PST) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id b144sm5359134ywa.33.2018.11.16.10.44.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Nov 2018 10:44:08 -0800 (PST) From: Sean Paul To: dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 13/24] drm/msm: dpu: Don't drop locks in crtc_vblank_enable Date: Fri, 16 Nov 2018 13:42:23 -0500 Message-Id: <20181116184238.170034-14-sean@poorly.run> X-Mailer: git-send-email 2.19.1.1215.g8438c0b245-goog In-Reply-To: <20181116184238.170034-1-sean@poorly.run> References: <20181116184238.170034-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: Sean Paul Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Sean Paul Now that runtime resume is handled in encoder, we don't need to worry about crtc_lock recursion when calling pm_runtime_(get|put). So drop the lock drops in _dpu_crtc_vblank_enable_no_lock(). Changes in v2: - None Signed-off-by: Sean Paul Reviewed-by: Jeykumar Sankaran --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c index 9be24907f8c1..80de5289ada3 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c @@ -777,10 +777,7 @@ static void _dpu_crtc_vblank_enable_no_lock( struct drm_encoder *enc; if (enable) { - /* drop lock since power crtc cb may try to re-acquire lock */ - mutex_unlock(&dpu_crtc->crtc_lock); pm_runtime_get_sync(dev->dev); - mutex_lock(&dpu_crtc->crtc_lock); list_for_each_entry(enc, &dev->mode_config.encoder_list, head) { if (enc->crtc != crtc) @@ -805,10 +802,7 @@ static void _dpu_crtc_vblank_enable_no_lock( dpu_encoder_register_vblank_callback(enc, NULL, NULL); } - /* drop lock since power crtc cb may try to re-acquire lock */ - mutex_unlock(&dpu_crtc->crtc_lock); pm_runtime_put_sync(dev->dev); - mutex_lock(&dpu_crtc->crtc_lock); } }