Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1064055ybl; Wed, 14 Aug 2019 10:07:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqx7BTBnW6CxrN6ev6jDBwRSuVu5e5I/ptw6vNs7Mx9kuBoxaqlHgtEjBMMHw3es6wpIbptN X-Received: by 2002:a63:ff20:: with SMTP id k32mr145694pgi.445.1565802475133; Wed, 14 Aug 2019 10:07:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565802475; cv=none; d=google.com; s=arc-20160816; b=jUkrwxg55Uf9Gp0MLFYlqLmrH0gP1k1+WGMe0QZqPrNnoP0GaqUyFZzgKCOtzaghxv CK9UGEYgSYd3eLXBr1Hccyz1lRU4uCo8jEgFqIbzJbIBDKX70aL3xBNc73vCJ3zy3FXB mmPE0Rbm/QPkKNzB8zMraI9XowELGL06w2Vx7vhot2f25hCFjTuzyFq3GrZ2mlWjh9Np i98kCu4JRUeBEPcsixSwlhofSdYkGQRpN2Vo7tcfmpg3sW5bBrdFdu9t60iwo5QrRPaq JlPRi10jpa8aNEWWmOvFm+VCcL5JSuhv0bgPBBkRxdtybCwwVvBmujJsPXA95W8jP8cL AAbQ== 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=qO1H6NQDhFdFjec76MLouOfPJn9UujrDyarTNhs6Lz4=; b=Wx0C5hd6Uq+duvBbJlS1+O0S0wt+ZDzPY5pzPo9xK+pBSk+UI0LPViRhid1pA63agt deI7dUWzrhgUSK8r4soUo8oD1iSVUeKgvJev2SHFtz3DuenhWPuaYXXisG1xPFSNNN6u DODwmUh9u3FDboFJVk7JxCo6AL4dCEFaZWN8G+ggNpAaZULsx7Q/eyMhSjCmXlPtS25Q ldAyTchutek3+6D1QkvEDJ5mjLwMQfbWKzp2hoZzo+W8xjXRTciZWh3D5K0/Y9dbJBKm Zpf/kNWe8Uygp5SkoTFAKrWFJ44m94NM6QCRfqzFaliOYMohkU8HRTZE9Mo+YpoimZuj hxCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lMw9UQPL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c6si238216plo.263.2019.08.14.10.07.38; Wed, 14 Aug 2019 10:07:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lMw9UQPL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729303AbfHNREu (ORCPT + 99 others); Wed, 14 Aug 2019 13:04:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:53640 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728681AbfHNREr (ORCPT ); Wed, 14 Aug 2019 13:04:47 -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 3AF5D2084D; Wed, 14 Aug 2019 17:04:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802286; bh=+Vmb9IamE77TGDyT4IHgDRj2Pbc9meitggKVzXt6uVY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lMw9UQPLnNOXeBWU4HGVczLMEs3lz9hxQK8AWm+tpWxm2d8bXu28EvusD41KFDuAH 1yT9NRoHs3HjeZJyNix+r3KOV24zrP3fMkeutAfgyQ8qFs7cL88fllPern1w+nOG2D ApX/j/5ha/LayYvm/I+ng2LX5g/9gKiDOys9l34U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zi Yu Liao , Eric Yang , Anthony Koo , Leo Li , Alex Deucher , Sasha Levin Subject: [PATCH 5.2 067/144] drm/amd/display: fix DMCU hang when going into Modern Standby Date: Wed, 14 Aug 2019 19:00:23 +0200 Message-Id: <20190814165802.645888536@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165759.466811854@linuxfoundation.org> References: <20190814165759.466811854@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 [ Upstream commit 1ca068ed34d6b39d336c1b0d618ed73ba8f04548 ] [why] When the system is going into suspend, set_backlight gets called after the eDP got blanked. Since smooth brightness is enabled, the driver will make a call into the DMCU to ramp the brightness. The DMCU would try to enable ABM to do so. But since the display is blanked, this ends up causing ABM1_ACE_DBUF_REG_UPDATE_PENDING to get stuck at 1, which results in a dead lock in the DMCU firmware. [how] Disable brightness ramping when the eDP display is blanked. Signed-off-by: Zi Yu Liao Reviewed-by: Eric Yang Acked-by: Anthony Koo Acked-by: Leo Li Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c index a3ff33ff6da16..adf39e3b8d29d 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c @@ -2284,7 +2284,7 @@ bool dc_link_set_backlight_level(const struct dc_link *link, if (core_dc->current_state->res_ctx.pipe_ctx[i].stream) { if (core_dc->current_state->res_ctx. pipe_ctx[i].stream->link - == link) + == link) { /* DMCU -1 for all controller id values, * therefore +1 here */ @@ -2292,6 +2292,13 @@ bool dc_link_set_backlight_level(const struct dc_link *link, core_dc->current_state-> res_ctx.pipe_ctx[i].stream_res.tg->inst + 1; + + /* Disable brightness ramping when the display is blanked + * as it can hang the DMCU + */ + if (core_dc->current_state->res_ctx.pipe_ctx[i].plane_state == NULL) + frame_ramp = 0; + } } } abm->funcs->set_backlight_level_pwm( -- 2.20.1