From patchwork Wed Sep 18 20:26:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lipski, Mikita" X-Patchwork-Id: 11151235 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 C89CC13BD for ; Wed, 18 Sep 2019 20:28:06 +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 B075F21920 for ; Wed, 18 Sep 2019 20:28:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B075F21920 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 3EBB072B0A; Wed, 18 Sep 2019 20:27:39 +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-eopbgr730088.outbound.protection.outlook.com [40.107.73.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 13B5472AE0; Wed, 18 Sep 2019 20:27:34 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BJx/g3A7Ai8dxyvaRO/QW6lyIt3q2fhram6Fjpx3q/sPNu140nffwHOpmUef9IQuZDl7Ah3lsNIEnj9NZH6Utr8eMeFFv7Hzz4zhMuna1xPh4w2kOZGQdNjq8DdH+BOGuK1bhvJudzT6ZnijZIxih1RErTTXUW3Sm1A8VRAqtSaWfgkR5xtmx4AlYl7o0h9tu3rgTRNkPUudgBPVnzUNMMe6mO47U2exkjwRF+tX285aoIVlSR06pKnMdnqDhHkL/QFhcxCbFCd01OdXtCxss9AeEgfWQ3pY/nuuBA0CU50qj+KL/RmDFj8qHMNyXatQ8ORpLGPSqXF8Iy2pEaSvTw== 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=oHeiIi6p6DEB0LEv42o919j1L31cP72x9aZ8ITxZL18=; b=gUpICTSyZX7HQsOELCKh3SPh3jdvdQ2dwO2QN9lyY/POHKujgHjU7FfM8kZvhjUnQ+ZhS/Sk4twUGG2IPf3eG/IXwg7ZFRdrUwRLF2UOsDGT9iFdzJLubC6tUpNklNb8yYShsBGTedtSI2iYOd23hXNYlBs5tnve7jdkP1sx7a9Nu8Wv3KDOfCz92kgy4yNWwEEnIwYaLlHr1W/xSVzYIV+G60yifjvIpUqMLA0LV+drxZOobR8oAj0W9+34pxJ5xhOMv0FmL/IOmixpWIxHClj+4tG2oXmlZzDQ85OnmlhcR3k1o7G2Oti5SSEt2AF6cK1b/O/mba8rzD4dGNTVdA== 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 CH2PR12CA0008.namprd12.prod.outlook.com (2603:10b6:610:57::18) by CY4PR1201MB0086.namprd12.prod.outlook.com (2603:10b6:910:17::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2263.17; Wed, 18 Sep 2019 20:27:32 +0000 Received: from DM3NAM03FT014.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::202) by CH2PR12CA0008.outlook.office365.com (2603:10b6:610:57::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2284.19 via Frontend Transport; Wed, 18 Sep 2019 20:27:32 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV01.amd.com (165.204.84.17) by DM3NAM03FT014.mail.protection.outlook.com (10.152.82.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2263.14 via Frontend Transport; Wed, 18 Sep 2019 20:27:31 +0000 Received: from mlipski-pc.amd.com (10.180.168.240) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server id 14.3.389.1; Wed, 18 Sep 2019 15:27:31 -0500 From: To: Subject: [PATCH 11/15] drm/amd/display: Initialize DSC PPS variables to 0 Date: Wed, 18 Sep 2019 16:26:48 -0400 Message-ID: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: 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)(39860400002)(396003)(376002)(346002)(136003)(428003)(199004)(189003)(336012)(86362001)(316002)(48376002)(76176011)(51416003)(50466002)(7696005)(118296001)(8936002)(81156014)(6666004)(356004)(81166006)(8676002)(2906002)(70586007)(70206006)(2876002)(186003)(5660300002)(478600001)(305945005)(47776003)(450100002)(486006)(6916009)(446003)(4326008)(53416004)(2351001)(50226002)(126002)(2616005)(54906003)(26005)(476003)(426003)(11346002)(16586007)(36756003)(16060500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1201MB0086; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1aa2fa36-e61d-4880-a9d9-08d73c76a1f6 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600167)(711020)(4605104)(1401327)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328); SRVR:CY4PR1201MB0086; X-MS-TrafficTypeDiagnostic: CY4PR1201MB0086: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:345; X-Forefront-PRVS: 01644DCF4A X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: OxDC69tia7HUNC2RRN5M3F9LaqOuamW5jIyhDXBAnjAa1nbTxA/bhc4uN/MDnLq/2BjUq8PPqQCOtLP5Z/x6AZK/BZM+XMDQU1OvYgx0XZSL9K3FpIDyLFXEvQsE0QQkT4zaGQVLHW0aaPms1zmVnA5TgtB8tlmIROzYwdIJL0dzN9DecBbbliUk3dMmTHVXWJOP6/nq7Z3b6VwPgZg3HQM3lo9nkpeTT+zH7oyiECgd6TmoaYQ7mJ7eAF+x84DWAuPWVPf8xzgi4X7oQpVFOzyX7v3S7pYDq4p+eu9lJI8l4LqBgC3gGAHlhBLfrHQWGrXTNWIA0moKdj9KVTWGHAHfN44Uqjp9cNXnKNwsfkeMz+hknHnluAp5wnoCFd2H/G7j3WBtIJUEU4fyEBTnIs/qduUGPH1ILNm3V38iCDg= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2019 20:27:31.6338 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1aa2fa36-e61d-4880-a9d9-08d73c76a1f6 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=[SATLEXCHOV01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB0086 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=oHeiIi6p6DEB0LEv42o919j1L31cP72x9aZ8ITxZL18=; b=H/VC2kO2RQkEj7Ko8gFoJ/9h455sa3OQb6igAJxvBM8jFSLCo6vW67jdmhC5RM2PV8eIBPIi+b5RMSAcyUeMJj/kJkzIs9nCC42YXdXkooEMk1hM/3/KWhRVR10zMKgqFXa3QUDMyjSyGSEDUewGcQbn09b1Wpt23DqLbjn5eLA= 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 Signed-off-by: David Francis Reviewed-by: Nicholas Kazlauskas --- 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):");