From patchwork Tue Dec 3 14:35:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lipski, Mikita" X-Patchwork-Id: 11271419 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 990CB138C for ; Tue, 3 Dec 2019 14:36:09 +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 8134620661 for ; Tue, 3 Dec 2019 14:36:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8134620661 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 AD95E6E7AC; Tue, 3 Dec 2019 14:35:50 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-eopbgr690070.outbound.protection.outlook.com [40.107.69.70]) by gabe.freedesktop.org (Postfix) with ESMTPS id DD44A6E799; Tue, 3 Dec 2019 14:35:47 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b+vt881Q80bC/QuefAlu0cwUJ3MltGvp3iq3eGJDUUDSJrGBCjYV+DJ/F59tRMykrbNnaMHhBFqvNpo5kE4Fz4Dd9Z2VF7T0N+rU/h12Og7Z1uf0erR5DP/WGrq6L5rUh0J//45rKbTa+zlfTojIBA4tkDQXQp5lXU5BY0XZcZ6chTS8FKgigNPFv/3ndEUAUsIish9exZO1nCZrN4wTr5htRAelfCp9dZKQqofddVcQMP9060zrOgRwQ9o3CFEIaaAzK1rcIBJFGoxxbAer/6N+Qhe5/Od2h/m7EPxyXlIEs1xZ+7Pkwv3sEOUwmGj4ztA68pFpaeBJu91naocVHQ== 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=Z+f8m0uh705q7QZfT2qSRJKtZTwW6LnEwSwMKYGKG7+vXeidBjhIbDL02V2xdwXxcdxhyEu3X4kC5bXo9VSQCvzK9uiVGyIs8dsrYzlL1FxDJDaqVkrBrZBr6DIqJ4jnT6eqe2kW3a4DGQvguCHzWYL8nHHmR/JBltoIEDmm5iGkCmuCJx0DKVdMzBBuJuxbd3H+6QNup7sgHqjys5MiJyNyM3APY2jD2xfR3YV13blD/h9HoFCdH6p31mjP1RjQKHSJy0ET+2Q9Nhd5vimimaCBdnJuwjDMHKHobq/X/rTYjGBdC8Yhszc0l9LkdKZefAALJ5t7Nc/GrLIMNu9geQ== 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 DM6PR12CA0022.namprd12.prod.outlook.com (2603:10b6:5:1c0::35) by BY5PR12MB4097.namprd12.prod.outlook.com (2603:10b6:a03:213::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.17; Tue, 3 Dec 2019 14:35:46 +0000 Received: from DM6NAM11FT054.eop-nam11.prod.protection.outlook.com (2a01:111:f400:7eaa::205) by DM6PR12CA0022.outlook.office365.com (2603:10b6:5:1c0::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2495.18 via Frontend Transport; Tue, 3 Dec 2019 14:35:45 +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 DM6NAM11FT054.mail.protection.outlook.com (10.13.173.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2451.23 via Frontend Transport; Tue, 3 Dec 2019 14:35:45 +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; Tue, 3 Dec 2019 08:35:43 -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; Tue, 3 Dec 2019 08:35:43 -0600 From: To: Subject: [PATCH v8 07/17] drm/amd/display: Initialize DSC PPS variables to 0 Date: Tue, 3 Dec 2019 09:35:20 -0500 Message-ID: <20191203143530.27262-8-mikita.lipski@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191203143530.27262-1-mikita.lipski@amd.com> References: <20191203143530.27262-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)(376002)(396003)(39860400002)(346002)(136003)(428003)(199004)(189003)(336012)(2876002)(426003)(446003)(2906002)(11346002)(2616005)(50226002)(76176011)(8936002)(51416003)(8676002)(81156014)(6666004)(7696005)(26005)(36756003)(86362001)(48376002)(478600001)(50466002)(450100002)(186003)(6916009)(4326008)(53416004)(81166006)(356004)(305945005)(2351001)(316002)(5660300002)(16586007)(54906003)(70206006)(1076003)(70586007)(16060500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY5PR12MB4097; 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: 963132a6-88b8-42ea-b99b-08d777fe155a X-MS-TrafficTypeDiagnostic: BY5PR12MB4097: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:345; X-Forefront-PRVS: 02408926C4 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AuIGmi/ZeWE3yxU/qKpJ4qqPjtGXnq0dTJNQSjOGMH/uMmH7Q29pBKiAU+WMuWPQEArpREenGhR8QOgemg+DW6Yn5FunQLZNF4z1Y2vUJ8XiMvwExW6r2dnSyXRAVvdKhLsR24Me/oGe2Oh+RjAocRqMucJAi0cIY5PWoRvSjNEDkNJdRmCDW0OcgQDhrJlvBJr//fbLnkCmjwf3BPHRbNA75GUnq3KBE89YbAZwdHe+CAC8FeAiK71Fw9MIsy0CDdGQzNprvF41yBqkQGqfwgCiXAfAbMlFItFAmy/GGUiGKmV1ZYdgaNNGlpRZX2zVhnitdGMvbaZ0mpo79Bt6wSbcdWyKZ59MPiwH0COa9WkWl96xNS/ppZuElrj/lV80OYuILxqfyg+Bp6CLLmhNtKNzWoe7AfTNytGYGhBv1boDzez2Nxk+j04vMIrTxMXH X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2019 14:35:45.9049 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 963132a6-88b8-42ea-b99b-08d777fe155a 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: BY5PR12MB4097 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=OSurU5ZAPESr6u18Pkf2pSqpvHcEB6yFZZm9L5MKO7LnvEeGrXk5t58k1Sbaeje8+H6BVMYIVstn7OMrKtG/kWboRNxwfpaaiQQEPBnhD2QgL/9D8mhx9ss4FUJQK/9WM5LLJqxgwG12NkfZgLarX65KbDaXUEEF+bdwx/AU9z4= 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):");