From patchwork Tue Oct 29 13:52:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lipski, Mikita" X-Patchwork-Id: 11217961 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8D7FA112B for ; Tue, 29 Oct 2019 13:53:32 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 739352087F for ; Tue, 29 Oct 2019 13:53:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 739352087F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 702806E406; Tue, 29 Oct 2019 13:53:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM05-DM3-obe.outbound.protection.outlook.com (mail-eopbgr730074.outbound.protection.outlook.com [40.107.73.74]) by gabe.freedesktop.org (Postfix) with ESMTPS id 94A266E3C6; Tue, 29 Oct 2019 13:53:01 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hRx7dDXYD7qygGoeCaNXTyhjUIEMEwVJJav3tzUZ0SCMQ2F/EjrVYW3qae4XhsMNlJ/HihwCbgaUkR8AfUtYBKFvEsXQyRFdF0ldBcfLvls4j10yG0473SDmwq1yjKKsUR0B2FP1qUE2XDrsf8i3wKxrniOZMG3s2GbJe5bsILvkgEAn/aQFNJz2/KW5g04QWcv80iamhIGxB+kgpoc+H6nCYH/9vziVr7yvvJ2zcLuKVLa1cn0JvHCzEyjYhPgd7n4B7FBpEuRmcreVv1l1JM2ho3IKAdfysbSpomyaSZ9zXmsmyYleui35tAbhdLctnKrklvOZt5ecDkYS/JjmdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YtUHwiSB+5ThPSMYYFafCbyqjBOcl+keepUKwIkBAYA=; b=d1ty3TA0pINd4w+UmGOCoM1VtDoktevITPorO603EB5Rwy3mTRx1Jo7FTCaKuIPuFY4KxkaDgl4uer4i55xlSD8g2s/LpMTlYtOqlqTnULEGRdNak3G5OyHAR8bhie2xlhgxQfPjtq4G5/26QY+YoaDP45a5kbqgcV+f0/Eq7R63JGOY+Vr3Nx8NqSyFg5QXQUf0ntl15aLukT4rCEdzzyuW2KNnlb2l83QT8Nb/qte8LFI789mOxOCZ7ouWhJEIPsCvjXaOxFVcSTXlYsFOnFVs+lHb1l0ZJRFEXFwe+NIzXnY+yseDX2yRuOImiURuShyDEs0ptsQMkSLE2HSSmQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=permerror action=none header.from=amd.com; dkim=none (message not signed); arc=none Received: from BN8PR12CA0017.namprd12.prod.outlook.com (2603:10b6:408:60::30) by MN2PR12MB3408.namprd12.prod.outlook.com (2603:10b6:208:cd::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.24; Tue, 29 Oct 2019 13:52:58 +0000 Received: from CO1NAM03FT040.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::205) by BN8PR12CA0017.outlook.office365.com (2603:10b6:408:60::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.23 via Frontend Transport; Tue, 29 Oct 2019 13:52:58 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXMB02.amd.com (165.204.84.17) by CO1NAM03FT040.mail.protection.outlook.com (10.152.81.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2387.20 via Frontend Transport; Tue, 29 Oct 2019 13:52:57 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) by SATLEXMB02.amd.com (10.181.40.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 29 Oct 2019 08:52:57 -0500 Received: from SATLEXMB01.amd.com (10.181.40.142) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 29 Oct 2019 08:52:56 -0500 Received: from mlipski-pc.amd.com (10.180.168.240) by SATLEXMB01.amd.com (10.181.40.142) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Tue, 29 Oct 2019 08:52:56 -0500 From: To: Subject: [PATCH 08/13] drm/amd/display: Initialize DSC PPS variables to 0 Date: Tue, 29 Oct 2019 09:52:40 -0400 Message-ID: <20191029135245.31152-9-mikita.lipski@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191029135245.31152-1-mikita.lipski@amd.com> References: <20191029135245.31152-1-mikita.lipski@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(346002)(396003)(39860400002)(376002)(136003)(428003)(199004)(189003)(76176011)(86362001)(6666004)(8936002)(356004)(51416003)(81166006)(2616005)(446003)(486006)(336012)(186003)(1076003)(7696005)(11346002)(126002)(36756003)(426003)(47776003)(476003)(305945005)(26005)(5660300002)(81156014)(8676002)(50226002)(4326008)(316002)(54906003)(16586007)(2351001)(6916009)(48376002)(2906002)(478600001)(70586007)(53416004)(50466002)(70206006)(2876002)(16060500001); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR12MB3408; H:SATLEXMB02.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3d48cfce-24ae-43bf-7974-08d75c774e65 X-MS-TrafficTypeDiagnostic: MN2PR12MB3408: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:345; X-Forefront-PRVS: 0205EDCD76 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EVONEadECK8YbBv+NsNECl1LM5AMstEmdbd4bbm+V7jtvqFki4k1Qp9T1o7Y4ZkmXHfFJTN52pzGzipzw5DcJu48i1H7WR5pRplJT/SvX7uoiKryCsB5dPnzmgBDR9rEFJZfQcppQyu/yQgctBZyaJpSSz2swhuQ29SMSOf7C3QEMbAqMSUh8rYup7cGwWLrRccjAP1ZhZsdQnJZ72Eyg6k/x5gQ26R1xHPtw68EDuuk0R+TbqygR0WCY070KzyBIlZztv0lvHWc99A5fvxLcEmBSF/7VgPv/q9NtcaoGEQtEq6hRKzc43PHNELUP0Y7OHNXIvX3lIn/clfduNIzbhWGjQImpFfmPOI084C6jrogJVf5BklVGNt6R5b04WZ5/Y89xjQ+ot63zt07WT1gt7BMkFyTaHuuXrfszoXLAClEUDC/ZJmRNEo5qoL8VyHs X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2019 13:52:57.9168 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3d48cfce-24ae-43bf-7974-08d75c774e65 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3408 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YtUHwiSB+5ThPSMYYFafCbyqjBOcl+keepUKwIkBAYA=; b=YCNZSai4SMplhzuA+NncOyM8r9+U8yFddlKBUBOMlWPIJoeMMrrd9FN2hzC+WFuviGKnaGRAEBJCU08QOmrmhVYsvdHDJrG1y/ddQ9v8DSmcrwt6wo8vmuBLyLo9Nj80vErHKbRtZT8DiCJMoSS0iHgLfYH3OgzevafvDjivbvo= X-Mailman-Original-Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=permerror action=none header.from=amd.com; X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Francis , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: David Francis 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 --- 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 a519dbc5ecb6..5d6cbaebebc0 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 63eb377ed9c0..296eeff00296 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):");