Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2655807pxa; Mon, 17 Aug 2020 15:40:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwidyGb29BSIJ1ZO6JkVNWHrIWpb4dsDQB5w0XcJT8Yp1LKuek+v/induPvFAQEczHqDQh6 X-Received: by 2002:a17:906:1d56:: with SMTP id o22mr9944953ejh.530.1597704020029; Mon, 17 Aug 2020 15:40:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597704020; cv=none; d=google.com; s=arc-20160816; b=NOyx1jHttIbVKNmMBuEtCDcXYaMf5hSCOVoJXMgJ3x7Z3I8wi2F22EwePzsP7BHgSR gYU6jcCoGQs4e0KR9t5ZEhIBXxZ6dfFZCu65d3dXkbKRYZNIO50mYlbvxKerZeD5SQwT rV/kCr2dKCPKY9ohpjm6gAM+DToLY4Pgxj1eykt1QiqoA0axD9oDku6LyNIMpqwbfxK9 NURvnNFIfPHyMujKGqLUDMwbAnznKA4nb/XNW1ZcHJtvviJIidO1XCmOYIkHG6xIkaKI OWaRLIfa/hS3Wgc4UX2UJbB/TtvKR7e1MUJwQRAysDynJ8AEVC6eoxB7TAh+5i/ou58I Hjtg== 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=yeZ7s33mGVWlqNglsqCezme2zJLuVpuE2+4pj4vDn7g=; b=ogp2UpgArFFEaHgz8ONKhgQVhPkER4O4jEKqLLWJCw7T3/C5eSTadHKJTh2p6XCqPm RvNQdbSSWnShHWBWvcmvl7XkFT+T6aQBpkIJyONkAFFDCcw85Rh2APG9AR4jruHTXZSH YQhC+SxDWTsqIVOX0+WH3wmK9oWGDHZ+fDPBeEwSclAY7I86q7gSkDiv2pz9WbUuhF8y rzlTBQAoCKZ2QWlRho3xWkypidUMkZWA6k06XFVd7KLSYDq/8VEPghjltd6DLWKzFq1S LP/82S2XZjjLjSWWiG+f5w/Y8wBqljp5RF4xe9baPVf9xaGG8WU320cUYwRPH+OxQgaX +/xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gryMVdy4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qc14si13093081ejb.8.2020.08.17.15.39.56; Mon, 17 Aug 2020 15:40:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=gryMVdy4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390640AbgHQSOo (ORCPT + 99 others); Mon, 17 Aug 2020 14:14:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:53300 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388231AbgHQQG0 (ORCPT ); Mon, 17 Aug 2020 12:06:26 -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 AAD9520729; Mon, 17 Aug 2020 16:06:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597680376; bh=i8IA/7eMak21kEfbh371Ez3qa987IvxjDxAcvdOsJVc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gryMVdy4dWOB1MV19b0ijpmo3x5gFAwmcuB8isSqsvUSJ8WXzuoNcDp/4xzu306ue qbsZp8/Bkp98Zv9UxWP5/gzPgmKGitJotwdIfuovnBcMHQImq2e4HDx13TQHFvDNXE Kh6ZXK8Op/RGOIX2gNU3C4yHcLOhNSLT15Miw7f4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marek Vasut , =?UTF-8?q?Yannick=20Fertr=C3=A9?= , Philippe Cornu , Benjamin Gaignard , Vincent Abriou , Maxime Coquelin , Alexandre Torgue , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Benjamin Gaignard , Sasha Levin Subject: [PATCH 5.4 132/270] drm/stm: repair runtime power management Date: Mon, 17 Aug 2020 17:15:33 +0200 Message-Id: <20200817143802.365269820@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143755.807583758@linuxfoundation.org> References: <20200817143755.807583758@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marek Vasut [ Upstream commit ebd267b2e3c25d5f93a08528b47c036569eb8744 ] Add missing pm_runtime_get_sync() into ltdc_crtc_atomic_enable() to match pm_runtime_put_sync() in ltdc_crtc_atomic_disable(), otherwise the LTDC might suspend via runtime PM, disable clock, and then fail to resume later on. The test which triggers it is roughly -- run qt5 application which uses eglfs platform and etnaviv, stop the application, sleep for 15 minutes, run the application again. This leads to a timeout waiting for vsync, because the LTDC has suspended, but did not resume. Fixes: 35ab6cfbf211 ("drm/stm: support runtime power management") Signed-off-by: Marek Vasut Cc: Yannick Fertré Cc: Philippe Cornu Cc: Benjamin Gaignard Cc: Vincent Abriou Cc: Maxime Coquelin Cc: Alexandre Torgue To: dri-devel@lists.freedesktop.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Acked-by: Philippe Cornu Tested-by: Yannick Fertre Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/20200229221649.90813-1-marex@denx.de Signed-off-by: Sasha Levin --- drivers/gpu/drm/stm/ltdc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c index 3ab4fbf8eb0d1..51571f7246abf 100644 --- a/drivers/gpu/drm/stm/ltdc.c +++ b/drivers/gpu/drm/stm/ltdc.c @@ -424,9 +424,12 @@ static void ltdc_crtc_atomic_enable(struct drm_crtc *crtc, struct drm_crtc_state *old_state) { struct ltdc_device *ldev = crtc_to_ltdc(crtc); + struct drm_device *ddev = crtc->dev; DRM_DEBUG_DRIVER("\n"); + pm_runtime_get_sync(ddev->dev); + /* Sets the background color value */ reg_write(ldev->regs, LTDC_BCCR, BCCR_BCBLACK); -- 2.25.1