Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp741099imm; Thu, 13 Sep 2018 07:06:06 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaVhfUOq9/q1d71m1EeFzHaoPirlWFmNgRLoeXfYANgpdcolsZ10JJ4r+FKcWFi1gAaQyOv X-Received: by 2002:a17:902:7203:: with SMTP id ba3-v6mr7613728plb.179.1536847566507; Thu, 13 Sep 2018 07:06:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536847566; cv=none; d=google.com; s=arc-20160816; b=cyW1FwAvCjgHgBcClvfLIT9MqPn85MIQgqUdN2miXbOf5eSdMKFNbzM/PJZNQxh0py /MnrkE7XonAk7QlUOFIo0JGEtSFDaxJyec/Izuf8vKo5Z4BwNZR1Uox74pRtzYLDoPEd 49rHkmp08YP4zj/ceAh7LLasiVvN/XaaNZtVRr4GjL7tavghy25CnD6RmRmCrqU8eilv FxZaHVN4zkIaz9NrIENk9kVg4KuMNjTNIY6002wHD6mApAaknENzBmacIq6V6FlRX5Xa BWP5EitZJ+10EyAf5ENPU6kAewNochHe3NGwvM8ibDTuyr86EZ9mJkn8yMKFuBJGlNuO jYWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=7jjYmxX3E1jhr9Ni1RB5HLqlSR3a4BRkWiM0l5tcpuM=; b=k2lSIQkF0xJRldScs2M31uWHx3TVp5COpJ/VGxmz9qkPJw8/TCtiDeVhj54HZabiOo hZq1gXFKXJcvs3gwAhxg2xt1e/b/oCxLjIDZR+CMc6Jp+QMAt1Fq6KcVDzsPVb/jOWmb gAQbPkCrPnTU548J8R9UV4rWnY7/azsMmcsR4pP91tuS3slhsb62yk2B1VLu7MPQEfps HylQ0aW+lPoLoXxLA1jDIukvyID0YsEkdpAxpOPQgNNbP9qNWZIvbvP8O7VHi2m8oFrr XQKPuPEVkFmljQ2uxthWR0pN43CGTuyCLXNG4bdoPr/OVWvZDRExPCzu0zEmAbiqls7q Pkow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1-v6si3800819plb.348.2018.09.13.07.05.44; Thu, 13 Sep 2018 07:06:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732044AbeIMTNZ (ORCPT + 99 others); Thu, 13 Sep 2018 15:13:25 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:35330 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728556AbeIMTNY (ORCPT ); Thu, 13 Sep 2018 15:13:24 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 3536CD32; Thu, 13 Sep 2018 14:03:45 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mikita Lipski , Charlene Liu , Bhawanpreet Lakha , Alex Deucher Subject: [PATCH 4.18 166/197] drm/amd/display: update clk for various HDMI color depths Date: Thu, 13 Sep 2018 15:31:55 +0200 Message-Id: <20180913131848.199588449@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mikita Lipski commit 81aca8e75c1b046865fb2badef95a0dcff6f73de upstream. [why] When programming tonga's connector's backend we didn't take in account that HDMI's colour depth might be more than 8bpc therefore we need to add a switch statement that would adjust the pixel clock accordingly. [how] Add a switch statement updating clock by its appropriate coefficient. Signed-off-by: Mikita Lipski Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/dc/bios/command_table.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) --- a/drivers/gpu/drm/amd/display/dc/bios/command_table.c +++ b/drivers/gpu/drm/amd/display/dc/bios/command_table.c @@ -808,6 +808,24 @@ static enum bp_result transmitter_contro * (=1: 8bpp, =1.25: 10bpp, =1.5:12bpp, =2: 16bpp) * LVDS mode: usPixelClock = pixel clock */ + if (cntl->signal == SIGNAL_TYPE_HDMI_TYPE_A) { + switch (cntl->color_depth) { + case COLOR_DEPTH_101010: + params.usSymClock = + cpu_to_le16((le16_to_cpu(params.usSymClock) * 30) / 24); + break; + case COLOR_DEPTH_121212: + params.usSymClock = + cpu_to_le16((le16_to_cpu(params.usSymClock) * 36) / 24); + break; + case COLOR_DEPTH_161616: + params.usSymClock = + cpu_to_le16((le16_to_cpu(params.usSymClock) * 48) / 24); + break; + default: + break; + } + } if (EXEC_BIOS_CMD_TABLE(UNIPHYTransmitterControl, params)) result = BP_RESULT_OK;