Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp121779ybg; Mon, 8 Jun 2020 18:13:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxw7TUMlR8y+1l0axHei+JpDafa+Dz2UnYqvkXZFLQ8x4/3HTG0dLEjzKn26+S4NVPeaU9B X-Received: by 2002:a17:906:7247:: with SMTP id n7mr13633925ejk.105.1591665180700; Mon, 08 Jun 2020 18:13:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591665180; cv=none; d=google.com; s=arc-20160816; b=Nc/pBQtVqHtUNVY9yukrffEYfdDKdMK2CTn3X8TYuMp+ANcCBd4FUbe7FddvhTssX/ ftEIsoU+cZPJn2G309NA20e8D5FfY8AWkSZI0wlMQqWOWYOHYGOqhAxBp9usx8MQTnMW Wsoh37CtcrZG0+AmYDDXiyEKtXu+nUpRqDBkYB47EkP1J/7zCnac3cABRskicsDB4npE Ml1lA+izroSpksZ25gAG2qbJH/O5uV7JAVi8o5ggt29RfaD7hZtuBnGv9KQoq+pI828V GIpCHJrT9ZxBKAHB9SJiFjbJfyZvbLW9VvWq+Bk1wacV9qD1HfXX1QjGVWcWADA/pYJ9 /e/A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UeNJ8AVKERhNUYV7e0L6lATgl6oesP5RUXxEPovxJas=; b=klr+rVeuEmZ4AV8U+MGgBjcRuEoMerEGMFAU93jiuh32ZVcmUs3N0SyT5e/PANTPsJ LP7pYN9rSscfz/PI9oTzLX33jIPkaDYeWpaQaLpwnQMuwQKAlVQmOvxZbix+BfDBRMR2 W+q/S2tT9UTwXGjehHNDdPu/mjAI8shhURK8dShkHnmxx8awPl3ehb4aFtGfILXmlhj3 EPq8P/18BzjGH7+yZpnPye8VqL5Feznuba1cDCWvK++9mLue/QibXfLc7GI6NXXf4UmX SiKCLi00q4XuoJ+er3VLoLVv8ZmH/e3j03KDo8yRgjGzeEpOalDpzUYqsdnURpH48eLn LjZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mtAsqnww; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z9si2051900ejw.212.2020.06.08.18.12.38; Mon, 08 Jun 2020 18:13:00 -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=mtAsqnww; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727035AbgFHXGh (ORCPT + 99 others); Mon, 8 Jun 2020 19:06:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:49576 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726993AbgFHXG2 (ORCPT ); Mon, 8 Jun 2020 19:06:28 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 166602078C; Mon, 8 Jun 2020 23:06:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591657588; bh=UCFZxBdhCTtSOkMISHI4v+UNZnsH2SbHB6zuHhVW3k0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mtAsqnwwW8w0PJZJ/QPy3ydNyMHWR1vbtLSzpCWvTPMBbM6HBKCBxN1rzRJYONT29 uGirI0Op+8T0D7FmcXXRpm7lWiF4Kt++dWwROywi1XhxwdMxMERe+6CwYWc4IKeCdz ogNNw9aTGkaoY+StqgtprTwNJ+CAN09Hp326017k= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Joshua Aberback , Jun Lei , Rodrigo Siqueira , Alex Deucher , Sasha Levin , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.7 016/274] drm/amd/display: Force watermark value propagation Date: Mon, 8 Jun 2020 19:01:49 -0400 Message-Id: <20200608230607.3361041-16-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org> References: <20200608230607.3361041-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joshua Aberback [ Upstream commit 868149c9a072cbdc22a73ce25a487f9fbfa171ef ] [Why] The HUBBUB watermark registers are in an area that cannot be power gated, but the HUBP copies of the watermark values are in areas that can be power gated. When we power on a pipe, it will not automatically take the HUBBUB values, we need to force propagation by writing to a watermark register. [How] - new HUBBUB function to re-write current value in a WM register - touch WM register after enabling the plane in program_pipe Signed-off-by: Joshua Aberback Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 5 ++++- drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c index a023a4d59f41..c4fa13e4eaf9 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c @@ -1478,8 +1478,11 @@ static void dcn20_program_pipe( if (pipe_ctx->update_flags.bits.odm) hws->funcs.update_odm(dc, context, pipe_ctx); - if (pipe_ctx->update_flags.bits.enable) + if (pipe_ctx->update_flags.bits.enable) { dcn20_enable_plane(dc, pipe_ctx, context); + if (dc->res_pool->hubbub->funcs->force_wm_propagate_to_pipes) + dc->res_pool->hubbub->funcs->force_wm_propagate_to_pipes(dc->res_pool->hubbub); + } if (pipe_ctx->update_flags.raw || pipe_ctx->plane_state->update_flags.raw || pipe_ctx->stream->update_flags.raw) dcn20_update_dchubp_dpp(dc, pipe_ctx, context); diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h b/drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h index f5dd0cc73c63..47a566d82d6e 100644 --- a/drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h +++ b/drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h @@ -144,6 +144,8 @@ struct hubbub_funcs { void (*allow_self_refresh_control)(struct hubbub *hubbub, bool allow); void (*apply_DEDCN21_147_wa)(struct hubbub *hubbub); + + void (*force_wm_propagate_to_pipes)(struct hubbub *hubbub); }; struct hubbub { -- 2.25.1