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: 10686833 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 C08521747 for ; Fri, 16 Nov 2018 18:44:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B37A82895F for ; Fri, 16 Nov 2018 18:44:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7DA228E12; Fri, 16 Nov 2018 18:44:10 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 574012895F for ; Fri, 16 Nov 2018 18:44:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727832AbeKQE5l (ORCPT ); Fri, 16 Nov 2018 23:57:41 -0500 Received: from mail-yb1-f193.google.com ([209.85.219.193]:43812 "EHLO mail-yb1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727539AbeKQE5l (ORCPT ); Fri, 16 Nov 2018 23:57:41 -0500 Received: by mail-yb1-f193.google.com with SMTP id h187-v6so10132320ybg.10 for ; Fri, 16 Nov 2018 10:44:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poorly.run; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Yq5wHqVxEBV+c7Rxa+DYhT4l3Dxk9X2jtxjHuYL3O0k=; b=L53ManfrJcSFsJdYRQ7TIxI2/k0SLnOvb+Ds1oZfnd9CixcP8aA8jskJ1GQHbtOniu gpy4rL/7xWLi+GI/EaCRUZ0UORPMW2BBr2r4h1lm+ND7lsVffCFuL1JsSxHod2lAjSnM MiO/1HPB02PJB9hwlqFsMm6rjR+8NiUz5gV1/MlFjm2lN4KkWmBEXCgpHw2kW/2t9QqN 4cUI+Nh6hCMfxzwtoy2CCTYdFcgWU1U352GS/z51UuGGlLLEGCvQrzgu9TD6rKGk+Nhk ugJowExFLAtOkMGwGRyazEn9STdj6gmXjKgrhbiRHNwA9ZW/x29eY2I7uYLPHUMLneYr j+6g== 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=YyoT93V9OqXFhknmfPKd0ZcdKBxsEM2EJMMW/gC9fu9avC3HWRGn6nojDpOiTh8ZGx Dt/Vy/nsrjfpAiEZpDmyEomjjW6G/9JtaNEmDgyfB5BK6PZxV/PK0VcxSlPpSmni8pAM 0Y+EfBldzN5BAAhP+Ng8IvU0/k4VH5S/aYD//qg2J3tvTBRRb2x35JOK28IYrD6Svtro G6EvgIm7dNYzEiQeRZpfY+bvILbYo4uy4HxKHJl8LN3pSLjvC3B/dtneq4dsQEid5gl1 3M55cAwbQabJERFU1UripFdyE7g+SzlGpt7yBAQuwB3HV/FRAJKIVcTxxVXhdiVqH7Ie uasQ== X-Gm-Message-State: AGRZ1gJKPHxPtGkQMLeUL6hwtdRKMpe8oRJkmivogsP/01bn1zxA6sUc MjsG7tpfS915xWCmCms/7D62AQ== 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 Cc: robdclark@gmail.com, jsanka@codeaurora.org, Sean Paul 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 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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); } }