From patchwork Mon Aug 3 12:18:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 247378 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp1187001ilo; Mon, 3 Aug 2020 05:55:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyD42VYWpUicLvGRfARjhwsWWRvLjKZK33zbC8f3zuD0LHwl3QwWE/ySZ9xMlZXKXeF06kA X-Received: by 2002:a17:907:20b7:: with SMTP id pw23mr2216955ejb.148.1596459355862; Mon, 03 Aug 2020 05:55:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596459355; cv=none; d=google.com; s=arc-20160816; b=SaS+J8R9eCEMZ9NJiR/Rh5G05kU0nttRZNrE7sm0KoaZTu9yjjrLfNk7KYGsI8HxPk FObr3nErQ30eJF2ROOm59pnPFJUSVE1fJnaL5QpzUN0+z88aZb5PHjdkGb+8UWBAc2YB ca+y6QvFPzAZlyqRsyu11Vdg4b80b90wDkiJA4wK4vLtOUdg20Je02llji0Vn3lJw/sE lczjjhb9pjRhqbYTW/7Y03H9FHLxuSo1X8lrBXb1l4v6KzoKGaBPI01yNwd4uoT/NgLn h6yYsHepIewQr58dMENim8Lt1BB+e6DN0UEK151rsdzS9K30jjREb4BgnCLAVSCbQKpI Pc4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UhuCfwPLeXy07U9pV/H6V39/zkxf1EbXf1ntP+icX2Q=; b=PwGlKyFOIlZjsNH6cZUGev6pFGOsZ+HtJnjKlh/z5KtHeaX4fhgawRjKQ9ansukJdH 4AQTFQF2KGL2zMgrzeZC+98XgOV/e+mDP2g3t3VhGh/4U6gfVgrQnKUraQH/+msurvP4 CpszISnuBl4sUYo4lREm7KxrPmkJIK8I60DMlphSLknvWTwiuCCkoddrX3IgZxu43aBT ky7njMirw76R6vC5itbAnX0mAS1nxihCJlo+JNDWtHfZ2p2gA3s9VA6qQTgjZEVY2iMu kSAD6M9nNutUfhaxxgHAte5xuxKraxEBHOgPpobJzi0hOzQz+Kb+Nu2iSWxDG4UrFLlV r+hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2Jh8i7Ad; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id by17si11553053edb.369.2020.08.03.05.55.55; Mon, 03 Aug 2020 05:55:55 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2Jh8i7Ad; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729062AbgHCMzd (ORCPT + 15 others); Mon, 3 Aug 2020 08:55:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:46100 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727001AbgHCMW2 (ORCPT ); Mon, 3 Aug 2020 08:22:28 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9FCBB2076E; Mon, 3 Aug 2020 12:22:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596457347; bh=4y2n0jy/N97pc+QEFGNpXS+JrtHgv7CaUW3acs2G54A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2Jh8i7AdZehGmf/f0EoItYD0cUHdMwhaO/nlrGSZLE5fdU7dN7Ryt6oaYxMVE7Cx0 u0g8D5ZnfWknBfvShI87oQ6mdxOmxE3G7dGflumGjN6MaAaLxm9jJ+dXqjU2WlTjCg TCI/RUL23hes2g1ygd6eGRnqJhepFyGjCLOVtWKY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Linus Walleij , Sam Ravnborg , Stephan Gerhold Subject: [PATCH 5.7 027/120] drm/mcde: Fix stability issue Date: Mon, 3 Aug 2020 14:18:05 +0200 Message-Id: <20200803121904.168818490@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200803121902.860751811@linuxfoundation.org> References: <20200803121902.860751811@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Linus Walleij commit aa7bf898d4bf921f61fab078040e8baec3f28126 upstream. Whenever 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 continuous 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). Signed-off-by: Linus Walleij Acked-by: Sam Ravnborg Acked-by: Stephan Gerhold Cc: Stephan Gerhold Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20200718233323.3407670-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/mcde/mcde_display.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) --- a/drivers/gpu/drm/mcde/mcde_display.c +++ b/drivers/gpu/drm/mcde/mcde_display.c @@ -1060,9 +1060,14 @@ static void mcde_display_update(struct d */ 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 { /*