Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp881158pxk; Thu, 17 Sep 2020 20:12:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlFJI11LsPZ/WzufCnRh2APeM/ib1f/gd816+BL4tNPjnAb85QXxpKL0VQTAH4f97m3MtG X-Received: by 2002:a17:906:b756:: with SMTP id fx22mr32754005ejb.245.1600398772124; Thu, 17 Sep 2020 20:12:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600398772; cv=none; d=google.com; s=arc-20160816; b=IDdaWyflnTsM3uXxoeUWTyRU8o9Hv6leHoroPMDi/6671jWYfLFzmQfimIFzekPQzo nqMF4DcbQrgeaQHKL5q9rOguZIY+vEIQPfDa2+k8+Qo0CVHo9H8VtIly4MrkIsms1eXK uRKkPZXy6EsMg2RxFnUneMk8mmyTEU1cHPBe97xQ1RkBG9Wx6LZKINynZ09m+mNJRMfc 2sbhJdyDVd8ErJIpmWQD0PFkKETZDHicOB0QAKpxOghEaBi+muCyCGU5AxDSHjGxV8qr nSYG+RV2KSHnJefELx96SCdsBe16ytb2rLxvx3ldtziXM8NA7ZNOBRAOr0q2tiauBRqi 9l7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=aGCUzQUX1VoQcv5ESoQ+rYN8sgaykWd2+qHRMtb+kLM=; b=deqZOxIzSwjzT/rcGzefgzGWBLhaYU9WBD3JtrljgKlSVlN/7zgTUwxOZjAu1nXdmD iIvkObfuvpVAShc7e5WlXRbmfJeGEUYjkcJXafWXNaMbhL1U/wM4UGSZU0rsxy44OSK/ PC3CfVNY48UILks7M4M5QA7ZDX6zFjuSxb+XL77zf4E+VGDpMnOfJ6Hsi33WvOcioxa8 VzVsJGjcVDr03021626m5m15xS8Es3m4hwO0/0WO6ZKQbLCkdCnEdJL/wvcM8kw8y3AM a7JSvU5Goi6cCu8vcPCsj2o9qYpkZBmoJkDg/e7JSksPwfc5ZuEanirvJYtfle9zwIKR lXzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=a8HSnMpO; 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 z19si1261924ejb.651.2020.09.17.20.12.28; Thu, 17 Sep 2020 20:12:52 -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=a8HSnMpO; 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 S1726991AbgIRCDL (ORCPT + 99 others); Thu, 17 Sep 2020 22:03:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:49082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726980AbgIRCDJ (ORCPT ); Thu, 17 Sep 2020 22:03:09 -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 425AB21734; Fri, 18 Sep 2020 02:03:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394585; bh=OzleeDIta0QfHtPpyIbCwpHJnZGHsVVa7sJkl6FetZo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a8HSnMpOPpULYEQxr9atXQSMeKJ4+WZ4xoL9sQykVS56016Fo7qdpkC6QIh1aniJe WuDYwzOPU9TIFPbOENkg6cG3FOHEtbj9ACaGGWCFlMwNxy8sVx787RFrdcZmVaQ6lI kD/QJ/geDgHm6V85+ISLj581WovOTByq4THFYH4E= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: David Francis , Nicholas Kazlauskas , Mikita Lipski , Alex Deucher , Sasha Levin , dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.4 094/330] drm/amd/display: Initialize DSC PPS variables to 0 Date: Thu, 17 Sep 2020 21:57:14 -0400 Message-Id: <20200918020110.2063155-94-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020110.2063155-1-sashal@kernel.org> References: <20200918020110.2063155-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Francis [ Upstream commit b6adc57cff616da18ff8cff028d2ddf585c97334 ] For DSC MST, sometimes monitors would break out in full-screen static. The issue traced back to the PPS generation code, where these variables were being used uninitialized and were picking up garbage. memset to 0 to avoid this Reviewed-by: Nicholas Kazlauskas Signed-off-by: David Francis Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 3 +++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c index a519dbc5ecb65..5d6cbaebebc03 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c @@ -496,6 +496,9 @@ bool dp_set_dsc_pps_sdp(struct pipe_ctx *pipe_ctx, bool enable) struct dsc_config dsc_cfg; uint8_t dsc_packed_pps[128]; + memset(&dsc_cfg, 0, sizeof(dsc_cfg)); + memset(dsc_packed_pps, 0, 128); + /* Enable DSC hw block */ dsc_cfg.pic_width = stream->timing.h_addressable + stream->timing.h_border_left + stream->timing.h_border_right; dsc_cfg.pic_height = stream->timing.v_addressable + stream->timing.v_border_top + stream->timing.v_border_bottom; diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c index 1b419407af942..01040501d40e3 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c @@ -207,6 +207,9 @@ static bool dsc2_get_packed_pps(struct display_stream_compressor *dsc, const str struct dsc_reg_values dsc_reg_vals; struct dsc_optc_config dsc_optc_cfg; + memset(&dsc_reg_vals, 0, sizeof(dsc_reg_vals)); + memset(&dsc_optc_cfg, 0, sizeof(dsc_optc_cfg)); + DC_LOG_DSC("Getting packed DSC PPS for DSC Config:"); dsc_config_log(dsc, dsc_cfg); DC_LOG_DSC("DSC Picture Parameter Set (PPS):"); -- 2.25.1