From patchwork Fri Nov 16 18:42:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10686835 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 CFB211747 for ; Fri, 16 Nov 2018 18:44:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2DC22895F for ; Fri, 16 Nov 2018 18:44:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B768128E12; Fri, 16 Nov 2018 18:44:11 +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 6D85A2895F for ; Fri, 16 Nov 2018 18:44:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728039AbeKQE5m (ORCPT ); Fri, 16 Nov 2018 23:57:42 -0500 Received: from mail-yb1-f196.google.com ([209.85.219.196]:33097 "EHLO mail-yb1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727539AbeKQE5m (ORCPT ); Fri, 16 Nov 2018 23:57:42 -0500 Received: by mail-yb1-f196.google.com with SMTP id i78-v6so10171387ybg.0 for ; Fri, 16 Nov 2018 10:44:10 -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=KwnqYKHiLqK1HEtYgbqRQX1FRs+4170PLKZlY4iHlTw=; b=G0o9IX4h4UIN8AFDLLt5pi2AxHlX0dpDEZzD1htYaZXonXHNVBpvBuFTPhu9WTNv4H NSUFHz66Ugo85RhNrP+HbTKj/QDBCLNYqjozHEqCqSl1Ii2RssoX7L4y/uu/LLkbJxtG rNsSwlOBd1AccpLWs+K72cANSefiift4U+X5oZZv+BHe5PXSMpOFsqxN/klCpaSnuAg8 9efxYYtF7U+KHjT+lKxTpU9Ufy+Xo/eTqIuATIL40y6+ua4h3ZOGkrQ6WwqLJ6WMaqcK rMmh8b2Sb292VVAMW9wRO0Qg9fPAUHaNk40L48Ipx05oQ3oi4wFGH/wv/TistqdYPZwU ZAqQ== 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=KwnqYKHiLqK1HEtYgbqRQX1FRs+4170PLKZlY4iHlTw=; b=mldOkkE/iGs2xEay5PHXlK/EREAGdU01VCcTWbEEmzVA6dM4Q/T4Nd4kPi1Uw+1ipp 9JqcvGGPZcLafIcrjmfTNdA/c2FuXuhlL3gMPG7H57agwJcqkXmqUtJTfUUjEXtXsiAj ekGab7u0yundskSa8cQZhEgbhJeQaizAKFsvEjl3pAkemTnNm6X1PmPmAkjoUZh657MT gkqBZwBY24tkb4Y9nFJXYNKBdRt2X0/sdIkJagpv+v5BIFUr/GzzUE1noxLrpuq8OGi8 KK3CrCAm8xTLM35C2ov/5vCiB2fUfX/5MkQVzGNez4K4lYW7up1IrelpRx4Ms4GKvL+W ZYlA== X-Gm-Message-State: AGRZ1gKSdhHKxRIdsUMrufsUrKbsKFdrV0Es35/1lkhaOTq6I/xpgIlX /Hr8YyBP5gStlsuPwhAVYCM+IA== X-Google-Smtp-Source: AJdET5d0ixI51bI8JEcjubQ2mO2eBgw3d89FKkx8lo1jSQ9cOVaNxNgpuoMbWr1BKfIWnbdLMi7MQA== X-Received: by 2002:a25:80c7:: with SMTP id c7-v6mr11229779ybm.8.1542393849905; Fri, 16 Nov 2018 10:44:09 -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.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Nov 2018 10:44:09 -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 14/24] drm/msm: dpu: Grab the modeset locks in frame_event Date: Fri, 16 Nov 2018 13:42:24 -0500 Message-Id: <20181116184238.170034-15-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 This patch wraps dpu_core_perf_crtc_release_bw() with modeset locks since it digs into the state objects. Changes in v2: - None Signed-off-by: Sean Paul Reviewed-by: Jeykumar Sankaran --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c index 80de5289ada3..156f4c77ca44 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c @@ -335,7 +335,9 @@ static void dpu_crtc_frame_event_work(struct kthread_work *work) /* release bandwidth and other resources */ trace_dpu_crtc_frame_event_done(DRMID(crtc), fevent->event); + drm_modeset_lock_all(crtc->dev); dpu_core_perf_crtc_release_bw(crtc); + drm_modeset_unlock_all(crtc->dev); } else { trace_dpu_crtc_frame_event_more_pending(DRMID(crtc), fevent->event);