From patchwork Sat Nov 16 22:01:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lipski, Mikita" X-Patchwork-Id: 11247753 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 55AD113B2 for ; Sat, 16 Nov 2019 22:02:11 +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 3D2842071E for ; Sat, 16 Nov 2019 22:02:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3D2842071E 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 3D9876E228; Sat, 16 Nov 2019 22:01:47 +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-eopbgr730066.outbound.protection.outlook.com [40.107.73.66]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2BBD26E1DE; Sat, 16 Nov 2019 22:01:43 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y+4u/+Hzhmm0d7qBFDA/IPWDeqdnUfPVQLpWXGLxaTKOPr3Yn3DbMhBWRmaO5afpIhvzx3+yZszyLFGai0bVab/w/zTuFxTr4/M9h+DWoOQVE8rLGou35Ad8XEc50qJg0ccz6YIj51EPCMJN7LMRGtQ6+KqW+zI2UVK5GwVWntEInwI58CHq0a31g8o70tPvwxTLWJuaRGKSBT8kYJ5FGZZcKFv+aXhG7pX5wzg6io4K09gz9j6YU5DQXmBNX8EMznbLzf7FgH+/IDie9+b9Q1KPnYHux5dvsmyTTkUV5Nux7aJ0vu1/FkBHy6kx/gx/PFJEtMvQuztT5aGBUWsZOg== 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=rGffw++GcIoVH9cDtEblgrFCmSbULbwOTaXVlSsslHA=; b=GIOv81XuO/yj7Zkh0MUcLc40rWNrPGRWPaHexR0/xWxrSM/KQ41+EPqPp+UWl036rg3j+bMsHMW5xSRxaD8GwT8qbJ/gTw3XzF003IDY22CeRemkyoCj/2kpBBejBFoJYbv6A6e7DMBg3mThAnD8NRMusYboIefaeLXl+DQKWAFaiRsJS8Wgr3hFsbpVGWmpzkjg7R/R+GYLPlLuN/9EakcZ3Gqe5sKdaIW6EoinwOeazMibzjNKnzQmOXj8OaMWKeaCUARtGjBEIRu++K3ACzYm4mHi89IWe0fV1S3O5RqN6V8XTlPpR8HNdGZuyrkIwMSuDN7HLElXNInpgMWW/w== 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 CY4PR1201CA0017.namprd12.prod.outlook.com (2603:10b6:910:16::27) by BYAPR12MB3285.namprd12.prod.outlook.com (2603:10b6:a03:134::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.30; Sat, 16 Nov 2019 22:01:38 +0000 Received: from CO1NAM11FT025.eop-nam11.prod.protection.outlook.com (2a01:111:f400:7eab::200) by CY4PR1201CA0017.outlook.office365.com (2603:10b6:910:16::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.23 via Frontend Transport; Sat, 16 Nov 2019 22:01:38 +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 CO1NAM11FT025.mail.protection.outlook.com (10.13.175.232) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2451.23 via Frontend Transport; Sat, 16 Nov 2019 22:01:38 +0000 Received: from SATLEXMB01.amd.com (10.181.40.142) 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; Sat, 16 Nov 2019 16:01:35 -0600 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; Sat, 16 Nov 2019 16:01:35 -0600 From: To: Subject: [PATCH v7 07/17] drm/amd/display: Initialize DSC PPS variables to 0 Date: Sat, 16 Nov 2019 17:01:18 -0500 Message-ID: <20191116220128.16598-8-mikita.lipski@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191116220128.16598-1-mikita.lipski@amd.com> References: <20191116220128.16598-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)(396003)(136003)(39860400002)(376002)(346002)(428003)(199004)(189003)(2876002)(305945005)(316002)(2616005)(476003)(1076003)(6916009)(446003)(126002)(7696005)(51416003)(76176011)(11346002)(6666004)(2351001)(486006)(47776003)(356004)(86362001)(4326008)(8936002)(36756003)(478600001)(50466002)(5660300002)(50226002)(53416004)(8676002)(81166006)(81156014)(186003)(2906002)(48376002)(54906003)(336012)(16586007)(426003)(70206006)(26005)(70586007)(16060500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR12MB3285; 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: 6dd975db-d7eb-4bf4-5775-08d76ae08e2c X-MS-TrafficTypeDiagnostic: BYAPR12MB3285: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:345; X-Forefront-PRVS: 02234DBFF6 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: v8ykuuUmVB7BtLpxecMZppWudLvSquezHj+i6Ito1JBPxYlrJ02F6vLDt/AlDPUqopj+7zF2HSpbLIohtLcKGjnxPekTf4CCIIrVtl7QpZLcxpdFlaAqG7yCFDhKY58KdLNg6cdmarEJ/B4CihE0hFVTNXfpyxpuc9F5vo7SR1DGCHeK9xRdrgtwV1vCXAXWYSrkgpOqkdRfZPuNQmjnKtDtA7OCTLkiKEeRNI7EMWOjdKKGLC7sGtFae//KElRif1/0YJv0fh50NhoKTkrOsfkxfWOEKa1wSDYOwrz/c4kxJCJFyE117r4QnjWMl48h62A71dBf4A8puzVSXDnDdSDrp5cU77tYhHdIf9imrI5i0yTgisnfdaGZEa45qmF/OoRVXJ/GyB4ObKKpbI5PT7lKns7xPx3V8PjqgyJ88aG2E+A8ZjZZa73UDGABu+QQ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2019 22:01:38.5118 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6dd975db-d7eb-4bf4-5775-08d76ae08e2c 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: BYAPR12MB3285 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=rGffw++GcIoVH9cDtEblgrFCmSbULbwOTaXVlSsslHA=; b=NJxIE6BW+zwUouuq3oHgR4DWLtVpMtwWXMM++YzMOIXseDOyNrVLwZWQtVE7FimeqhufcOgIKvANIgZV9RSd5i59nYpoGYn+tE3U5gCSTTA02lhJ46jTk3lKgz5vYk9m0/hZ1yZazE3iD/2s5uAFYsNjc+tNiGlwfYnwOdM5H1E= 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 , Mikita Lipski , 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 Signed-off-by: Mikita Lipski --- 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 bb1e8e5b5252..a7f3a9ecc626 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 @@ -526,6 +526,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 0111545dac75..6bdfee20b6a7 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c @@ -206,6 +206,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):");