From patchwork Tue Oct 1 16:17:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lipski, Mikita" X-Patchwork-Id: 11169227 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 4CE5F1709 for ; Tue, 1 Oct 2019 16:18:04 +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 34B2620679 for ; Tue, 1 Oct 2019 16:18:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 34B2620679 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 94BB56E854; Tue, 1 Oct 2019 16:17:48 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM04-SN1-obe.outbound.protection.outlook.com (mail-eopbgr700083.outbound.protection.outlook.com [40.107.70.83]) by gabe.freedesktop.org (Postfix) with ESMTPS id EA5D26E854; Tue, 1 Oct 2019 16:17:45 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lWeYOiY5EwlJHSJ9a52VaxH2q00gU95XYlY2le2B1r9Fe2A0nQ680/gOeYPwPblQXy7P2khbmcmt7liIwrISmHEasRBsZv4oSR+Wqc6HNuOibIhv0FSJD3StATrvhZ9bRVgTMoPvYkicnKzhEwUMDW3m8BoFxuPqdmfrJmC3psZAiyVQs1W6dq4nrc07Czqe0/tqkj5kMO1+z1Sklun40lA/BuewDLiBp85F5noH3FcyTeENTVN1z58DxV3xsOzoT16t22hDX3ZcJJUqjuUdRTMJtfxKyutHAZtZfRu1Zc7ZClQgcEdqZ5vZ2nOgdFqPaqilgyIJV2qRZ8X9yr+lbw== 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=SVaMFDOQSBxKpQTKMme+U0AE0D/gdZKtujd6CZT8a90BRD96UMNv32OH47nKGp7mFe/cigCfTgmU1T3qfDDanqxs8Eu4XxFjkigkDiPVeJiDWVAN5de29I5zCP5TnfbQHzAyFZwU6IWD/8698a+lfJpvUMtcivbMX7dVvbfAVkMiq8MPMXIFuh6Q9gCszI6VUvtCOKNSOhPni5ldRIQSv6KbYQmLvT8JSiXu47fR7+mHfKXqMYc+/BHGksj4V8VQclboyJRwI2gxXL3KOufqaFAnxx3x1D2KPUp3XGSjxW9o5lDegZhu9rAIOtRg5/s8bbnFJl9WBsFaH6R+YVynpA== 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 DM3PR12CA0101.namprd12.prod.outlook.com (2603:10b6:0:55::21) by DM5PR12MB2358.namprd12.prod.outlook.com (2603:10b6:4:b3::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2305.15; Tue, 1 Oct 2019 16:17:44 +0000 Received: from CO1NAM03FT051.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::208) by DM3PR12CA0101.outlook.office365.com (2603:10b6:0:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2305.17 via Frontend Transport; Tue, 1 Oct 2019 16:17:44 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV02.amd.com (165.204.84.17) by CO1NAM03FT051.mail.protection.outlook.com (10.152.80.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2305.15 via Frontend Transport; Tue, 1 Oct 2019 16:17:43 +0000 Received: from mlipski-pc.amd.com (10.180.168.240) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server id 14.3.389.1; Tue, 1 Oct 2019 11:17:35 -0500 From: To: Subject: [PATCH 09/14] drm/amd/display: Initialize DSC PPS variables to 0 Date: Tue, 1 Oct 2019 12:17:16 -0400 Message-ID: <20191001161721.13793-10-mikita.lipski@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191001161721.13793-9-mikita.lipski@amd.com> References: <20191001161721.13793-1-mikita.lipski@amd.com> <20191001161721.13793-2-mikita.lipski@amd.com> <20191001161721.13793-3-mikita.lipski@amd.com> <20191001161721.13793-4-mikita.lipski@amd.com> <20191001161721.13793-5-mikita.lipski@amd.com> <20191001161721.13793-6-mikita.lipski@amd.com> <20191001161721.13793-7-mikita.lipski@amd.com> <20191001161721.13793-8-mikita.lipski@amd.com> <20191001161721.13793-9-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)(396003)(376002)(136003)(39860400002)(346002)(428003)(199004)(189003)(336012)(186003)(11346002)(1076003)(450100002)(426003)(5660300002)(86362001)(305945005)(446003)(2616005)(53416004)(2351001)(50466002)(26005)(4326008)(6666004)(356004)(6916009)(48376002)(54906003)(51416003)(50226002)(486006)(8676002)(8936002)(2876002)(2906002)(126002)(81166006)(81156014)(76176011)(70206006)(47776003)(36756003)(16586007)(316002)(70586007)(478600001)(476003)(7696005)(16060500001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB2358; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 90de3c1c-9076-472c-ad96-08d7468ae41e X-MS-TrafficTypeDiagnostic: DM5PR12MB2358: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:345; X-Forefront-PRVS: 0177904E6B X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3Wt2lCMHbN2Q+S6tTLL4KV/uiIqHAKwIOiKDuVDavdCEzOqyooLIW6j+4b6mVkwdoVw0+1HiqtDIGN+eL7TUL9YKsmhXIBV0fm/ynO7wsn8nyw2XSCXf4r/gcg3aPzFehEMB8rN2ofv5K2CTiOqX/P+q6dQDIyxiTrVk5J47g8pnoUaQnBOv9h7yfw+uU4ulZlfD0rVmnDsdjcTzXwxXfYs7GBjkt6iVIKXctvpF5FuFBiVTj4BvRcUad8qYFy1cKZ6houAXSOOwJU2/JnoARo3PdipdXdy8lgCdN01cCtk2mBHSOecxRHNvtwjoy7R2cU0bCu2bKP9PdrFNX8dQR2G0iD5nZxYKjvXnb0vyzI4vwvCrybTLqL6PGKfVBI7pSCuePLITAkO1VVr1prSNu1sEWyMRtRLLvTKaaz5I+cE= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Oct 2019 16:17:43.2173 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 90de3c1c-9076-472c-ad96-08d7468ae41e 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=[SATLEXCHOV02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB2358 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=ETsvTXo/clTKTvllM9irsbOttEoKOSeZLUtIpojZcyzl+xA5JoooHMAjkHpuouQSD0E2k/dKU7a1Iaw8bV0l238R7gcO0w0KhmaNS0NsT8/SHqXHiQzVZ8b2JWQve4Lhcvy2ftJTT+L4GFaRrPcx54t9NqmSo2DAwWyb+hmLWYA= 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):");