From patchwork Sat Jul 18 23:33:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 11672077 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A2B8B1510 for ; Sat, 18 Jul 2020 23:35:17 +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 765732173E for ; Sat, 18 Jul 2020 23:35:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KEXETvHg"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="wZWp6Chj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 765732173E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.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:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=q1Nn9T3QTGOpNOS6A2DpD1M/0vRvYxwC/cRZLCfdiiU=; b=KEXETvHgV9ZEP2taeGznhiEbo3 MuSawzGL90FB9FSckG0MgVBChNayCU2XBic9ICIHAESFofQsHLLstaeYtdOaVKkzAaefN7K3keXPV m/B9K3r/TxZ5j8TwPqlok4kSqyMrypT6ki9/yduqJa5T5CQb9lk2/LtHpz7XIWdgMqEGqx2qrnbSe m+tmAzlCgMkj51PqerJQGKqKw7/b2HkxvW53RCxvKa8bBdPmeGx24+AE0NjIWkPSq1xuFZgvZA542 u+8cInIJ2e0FsfAQqOFJMjCotVMa0b04Be3hTN7gP6fCohzLPerAexdIgdR8RAOADzGZ04f15DT45 Z/N0FsrQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwwKo-0007T1-SS; Sat, 18 Jul 2020 23:33:38 +0000 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwwKk-0007RY-Go for linux-arm-kernel@lists.infradead.org; Sat, 18 Jul 2020 23:33:36 +0000 Received: by mail-lj1-x242.google.com with SMTP id b25so16516544ljp.6 for ; Sat, 18 Jul 2020 16:33:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/uOHqtO1l7zkVQ8bbrjF3EFuuScxemsHl8Jv5NCr0Zs=; b=wZWp6ChjpBomhs7feoixsNH6mvZLKAYA8u/pFpS6/4nXNwsMmcWx1WrkYAa6kpeyhw ut1SO2AgAFg6va3LkF4XlPm8dhKGm8IRhMu+s/52INWp8R2v5f777thEv9Z2BmsFva+p tbvz0Dfvyrb8M8PNIGClarnUhD8glzwj4RxsQrH7DGmoWQ3hG0zA4kfDhYXULDfUifqC 6Pia5lWZ07e49ux85FjYMggGYJFae0DeZVbbW9cDHIWz+9lxFMj4jk06rPuJ4jOchqBf ZBJdLaWhjbhZ6ngabbnkjbl4hEiOPNOjbJsipvegjgu17Hme8z1GhDtB5FCw/Wpor4GQ Wm7Q== 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:mime-version :content-transfer-encoding; bh=/uOHqtO1l7zkVQ8bbrjF3EFuuScxemsHl8Jv5NCr0Zs=; b=A7zodyLcdC2/kXOaAt8yJYvOsIgxErrMy6Bn11sG5PqFRMFa2JJV09ydsKREex0Nro sICt6QwhHbbY/gVqI/LlMpeS9v/SXksRAi64ceEGw8Zl4c9R9vDDyZwqhirZFwe5LYZi axXZfFhgLAw7PhJPXt0InU0zvlB5HM2R+XqvLMVfAwGljo1YrknU1TvLQvtesiL0Wzfq VqNSO6n2Tpi4ze0h3e4veXDgu6KQAyJnXWGQCpndKi8/zEMaLwto69fLX92LnpWCAZKW ncqPz4SR2tgPgthA15GZcR9+BGEPDXwW96QmXyCq+70k2vN7H7KKHjBaBnHU0knwm8zm mOvA== X-Gm-Message-State: AOAM53115pEtBT2wZYkTWKOg2WqPG57a8DKE9NMAOX9l8OnD88SuhjIX g+foexvNIF+rrWWdqdlLDIfxVQ== X-Google-Smtp-Source: ABdhPJzM97xRZHLijv/cmF6LPcoOA2S7d7QGKXpHi41IClGjjZvS6hGjF7P3ul7SN5iMTYkM1sHJgw== X-Received: by 2002:a2e:978c:: with SMTP id y12mr7173559lji.270.1595115205664; Sat, 18 Jul 2020 16:33:25 -0700 (PDT) Received: from localhost.bredbandsbolaget (c-92d7225c.014-348-6c756e10.bbcust.telenor.se. [92.34.215.146]) by smtp.gmail.com with ESMTPSA id d22sm2014139lfs.26.2020.07.18.16.33.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jul 2020 16:33:24 -0700 (PDT) From: Linus Walleij To: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , Sean Paul Subject: [PATCH] drm/mcde: Fix stability issue Date: Sun, 19 Jul 2020 01:33:22 +0200 Message-Id: <20200718233323.3407670-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200718_193334_965572_D87EE18B X-CRM114-Status: GOOD ( 12.40 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:242 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 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: stable@vger.kernel.org, Linus Walleij , Stephan Gerhold , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 Acked-by: Sam Ravnborg Acked-by: Stephan Gerhold --- 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); + } dev_info_once(mcde->dev, "sent first display update\n"); } else { /*