From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 465ABC433E1 for ; Sun, 26 Jul 2020 17:53:05 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1341E2065F for ; Sun, 26 Jul 2020 17:53:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hWs8Jkt6"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gerhold.net header.i=@gerhold.net header.b="jp78BAio" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1341E2065F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gerhold.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Mq0IUfUdFG4pU/bBEYDKQrJMXm+wTxKp281jLVWSDZs=; b=hWs8Jkt6fa93Z+l+7UL31VPsO X3iEqYwCwVTelFjOrvGcuQ4y5w4/Uc8508dDlc6wN5YEgvhc9ZhcnSfrbjtvG4BTxEkP2hefdQfRc V5mmcf4A7twqZuOEtd+nWcsfaSBK13BZvrNN/hlkCR9ufQd/GnYrHhOQnoXDSDNK6POaot1wnEhbd bcyPaZZVfpUR+wldP8ipZJgZVVYwZ2gLOg/xZVaj54gDSfeVqcScFClIynXad7DkLFFG6J1x+GPM8 Hs/le/fJ3ILL1bdmkR1RVy+RwGCarHNEQ+JklIF4/QV/bgkfhnIWfjFeddvkhiD/Hgwq6VJLrDKgu i3+WS0fsw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jzkoB-0004yC-6Q; Sun, 26 Jul 2020 17:51:35 +0000 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.51]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jzko8-0004x0-HZ for linux-arm-kernel@lists.infradead.org; Sun, 26 Jul 2020 17:51:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1595785884; s=strato-dkim-0002; d=gerhold.net; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=sgrIlsRu3tTV7/SFO/NsvidkS88USSPVoIq5RUCV9cY=; b=jp78BAiobqe8mntPCTvpyZ3ySz1E9lUQIo8tQs9jByqJbY5U6q5JiRsjeifqj6hUq/ MzxcYTFNmBqp28jSI7hUjH77GLxvOFzUW5WB9EZreN+Yii9xwbdQZXnL3sMyul2PzsQ7 rN5Ssa7SSlHRoyhdYnMg0tx5/pD8Lk8tAhqtWVwxwh0dMk/qoVBZsf/aPF2tNB3m6ZDE KRq4upmcCfl/NTMepUBuaRJMeTkmNVUvAFFnfloifXp3u1clJ3wlad0XHpCyVjf4Tt0p oRJZBacoyWp/3GzEE7grooAxb0UFi1Buezq1jmrmO+QibE+7YkzXVSdeICXWQGjjQ8AU MdYw== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQ/OcYgojyw4j34+u26zEodhPgRDZ8j8IcjDBg==" X-RZG-CLASS-ID: mo00 Received: from gerhold.net by smtp.strato.de (RZmta 46.10.5 DYNA|AUTH) with ESMTPSA id Y0939ew6QHpII7L (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sun, 26 Jul 2020 19:51:18 +0200 (CEST) Date: Sun, 26 Jul 2020 19:51:11 +0200 From: Stephan Gerhold To: Linus Walleij Subject: Re: [PATCH] drm/mcde: Fix stability issue Message-ID: <20200726175111.GA5343@gerhold.net> References: <20200718233323.3407670-1-linus.walleij@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200718233323.3407670-1-linus.walleij@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200726_135133_019015_5459B704 X-CRM114-Status: GOOD ( 23.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, Maarten Lankhorst , stable@vger.kernel.org, Maxime Ripard , Sean Paul , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Jul 19, 2020 at 01:33:22AM +0200, Linus Walleij wrote: > Whenener a display update was sent, apart from updating > the memory base address we called mcde_display_send_one_frame() > which also sent a command to the display requesting the TE IRQ > and enabling the FIFO. > > When continous updates are running this is wrong: we need > to only send this to start the flow to the display on > the very first update. This lead to the display pipeline > locking up and crashing. > > Check if the flow is already running and in that case > do not call mcde_display_send_one_frame(). > > This fixes crashes on the Samsung GT-S7710 (Skomer). > > Cc: Stephan Gerhold > Cc: stable@vger.kernel.org > Signed-off-by: Linus Walleij > --- > drivers/gpu/drm/mcde/mcde_display.c | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/mcde/mcde_display.c b/drivers/gpu/drm/mcde/mcde_display.c > index 212aee60cf61..1d8ea8830a17 100644 > --- a/drivers/gpu/drm/mcde/mcde_display.c > +++ b/drivers/gpu/drm/mcde/mcde_display.c > @@ -1086,9 +1086,14 @@ static void mcde_display_update(struct drm_simple_display_pipe *pipe, > */ > if (fb) { > mcde_set_extsrc(mcde, drm_fb_cma_get_gem_addr(fb, pstate, 0)); > - if (!mcde->video_mode) > - /* Send a single frame using software sync */ > - mcde_display_send_one_frame(mcde); > + if (!mcde->video_mode) { > + /* > + * Send a single frame using software sync if the flow > + * is not active yet. > + */ > + if (mcde->flow_active == 0) > + mcde_display_send_one_frame(mcde); > + } I think this makes sense as a fix for the issue you described, so FWIW: Acked-by: Stephan Gerhold While looking at this I had a few thoughts for potential future patches: - Clearly mcde_display_send_one_frame() does not only send a single frame only in some cases (when te_sync = true), so maybe it should be named differently? - I was a bit confused because with this change we also call mcde_dsi_te_request() only once. Looking at the vendor driver the nova_dsilink_te_request() function that is very similar is only called within mcde_add_bta_te_oneshot_listener(), which is only called for MCDE_SYNCSRC_BTA. However, the rest of the MCDE code looks more similar to MCDE_SYNCSRC_TE0, which does not call that function in the vendor driver. I wonder if mcde_dsi_te_request() is needed at all? Thanks, Stephan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel