From patchwork Tue Nov 13 15:55:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10681063 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 780CC14BA for ; Tue, 13 Nov 2018 15:55:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67D3D283A8 for ; Tue, 13 Nov 2018 15:55:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C3EC2AB14; Tue, 13 Nov 2018 15:55:09 +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 1C7AD283A8 for ; Tue, 13 Nov 2018 15:55:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4B2CB6E397; Tue, 13 Nov 2018 15:55:06 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw1-xc43.google.com (mail-yw1-xc43.google.com [IPv6:2607:f8b0:4864:20::c43]) by gabe.freedesktop.org (Postfix) with ESMTPS id B229A6E397 for ; Tue, 13 Nov 2018 15:55:05 +0000 (UTC) Received: by mail-yw1-xc43.google.com with SMTP id g75so1506005ywb.1 for ; Tue, 13 Nov 2018 07:55:05 -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=mKI4TOQ8WgHI871t/rU9j/xWedfWj9n2A0FninD8DL4=; b=q/u4ZV4DMRVpRslH8S8gEvW8MGUaFo3BWzFq9kINpiqNwdNAemeOaMEBYkOeZsiMEL 8BrWFJ9hFSFfPvz76q6zJwD5GiFsUvuE/W3cE6ezhTYVjFn4nGH8de9oMb7rZtysvDkv plEebYUnSnK93okUTdg+Q5wS69QJqECh1E/S7YIPqoFPWSRe28/jyNxbRfpmn9HDujhz knXXvoTT6WKyV/HexXHOL5to8jce+Wrcbz6QOY7Js5rSGe6G0blGynllIx8Z/xjDz71i aKVyzCZ7GMuYXaI3cLs2WByLyU/YRe6poUs5ICMLWkvEeYrizX68sXGi1eCCr13XF3bj Xchw== X-Gm-Message-State: AGRZ1gJ6ES44MOkuG3LZh11mE6vdN9QuPRFH4bTAiOII0kedAry7Bo01 E+yyOlU7mPORSoU6/xB9vplP0WzMN7SK9A== X-Google-Smtp-Source: AJdET5c8LJkc8ji4RcaWAZXgOIvGcF7X43azi7Vv6TMXNs6858kTfpA2SiNssyJaC8B0Phu/0z+Jqw== X-Received: by 2002:a81:b84:: with SMTP id 126-v6mr5360409ywl.236.1542124504609; Tue, 13 Nov 2018 07:55:04 -0800 (PST) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id 207-v6sm5126762ywi.0.2018.11.13.07.55.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 07:55:04 -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/12] drm/msm: dpu: Don't drop locks in crtc_vblank_enable Date: Tue, 13 Nov 2018 10:55:03 -0500 Message-Id: <20181113155503.100994-1-sean@poorly.run> X-Mailer: git-send-email 2.19.1.930.g4563a0d9d0-goog In-Reply-To: <20181112194222.193546-1-sean@poorly.run> References: <20181112194222.193546-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: - Added to patch series Signed-off-by: Sean Paul --- 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); } }