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: 10686847 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 F3D263CF1 for ; Fri, 16 Nov 2018 18:44:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E677F2895F for ; Fri, 16 Nov 2018 18:44:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DAAD128E12; Fri, 16 Nov 2018 18:44:15 +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 9F38128A31 for ; Fri, 16 Nov 2018 18:44:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3DB036E855; Fri, 16 Nov 2018 18:44:12 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yb1-xb41.google.com (mail-yb1-xb41.google.com [IPv6:2607:f8b0:4864:20::b41]) by gabe.freedesktop.org (Postfix) with ESMTPS id DACC86E847 for ; Fri, 16 Nov 2018 18:44:10 +0000 (UTC) Received: by mail-yb1-xb41.google.com with SMTP id u103-v6so10148037ybi.5 for ; Fri, 16 Nov 2018 10:44:10 -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=KwnqYKHiLqK1HEtYgbqRQX1FRs+4170PLKZlY4iHlTw=; b=gDuacoQ99owL5iyeH5A3WD2ZFpgbFgfyAMVEpDvqHXOsXs8sYkuj6DTuNmjnIvWoLO ZMOdnouLkTvKfC/NOt5mR+6AopH4kJb+3Auv3yU/UcdXb35hIG/Ij+pKYYVu7BaPfzbA Kr6aXVub182hKkMqwRE/NmgInN9HFVtKGcqOgvFmGyih1pkQH6fYY4x19/ZIV4tj/k5t cvLQv/5fFoDxI7GWNn3kJ1CLhj9Ea1W69t8ez2JZzOtHmATMwUHsdubvjTnxo39ZUPva i+TkoFKRsZyEsC1bNTzZOL8h2H135MjvMVwolkriscQ2uLYIQG1cc6icgfijgV7XervN fA7Q== X-Gm-Message-State: AGRZ1gIqsnDH4c156OBG3/S9Avy9lNqCirJwMJ6GSbJDGWXhquJJXbLf cE/8thK/BSrb6ztlGLVEdP23cKezrAA4EA== 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 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 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 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);