Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1534658pxb; Thu, 16 Sep 2021 09:24:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQtH19/2ZZlPvuX/2jWuPztIvaceNSXGw0yLTRPy5w9E5cwI7N1z15g0U2U4k5ERvEv6UG X-Received: by 2002:aa7:c38c:: with SMTP id k12mr7446866edq.45.1631809470616; Thu, 16 Sep 2021 09:24:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631809470; cv=none; d=google.com; s=arc-20160816; b=AuDCh3M6rP2MOL1vKF3YI0UUPFfN/ndSimsUHsQkYzZG1E7k5Ufs1JKyfscBDZVon6 yIbf8Goin7so22j6H3q7c5DRXYCFTRHgfAUG6RZ032chs5IqOqnb4Zc7BCfsK4sL0FQk kH0pRh8R+TQ9IPEt1FL+1ryDR5XGk+9MHhoxDJlyUvUq1beyA3wOAdYLlwNpK1Bk+Rud eA5A2jyWQnhQpLghn18F5+Zy6m89rXfdRlmUe/vrJyluv9TbPc0+m694gzZYk4Jz5eUW CupmEQShz3lqCbKF12QiX6vxFpaKsoTpn+6d6rOCAyc+iY52WJEY9pUCZjG936LtLY6o T+1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7j0zJ5HOpyQE5A+VKxOec4ZgcFUc9mb1PYNNSDBFpPM=; b=KA0q7vyXQEdZb26Im0RjWlAg31iZ/Qtp1nrxhF2vH4umRmJ1ujyiTPMnGhEt3+/XhN y4usGgN4aEb0YsWkOccMeuEXvLmSdMAlVsouXr+wXfRiC/eDvNk1ekGzRrEIZtch9aHD +hxVpqRNmTNAy1hLHyrtQHeYgLnLyhULXpqLB+LPbSXOB4/PmHZcy0p68vhGd8dRKGJn 4cfA7BcK9QRDQJmh9TR9FdF3FE9yD9Z+1/7o7kBfei6NjYqThxorI4kaJLLSr5o3HDhY WnL+ic0gNQoru/PVgB6PmvV5obC3gGssnwGZrM4BU3G1xrQ58EznUt8+2bMwef5r8qFe jjBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vDZe+Uwo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s4si3560764edy.486.2021.09.16.09.24.04; Thu, 16 Sep 2021 09:24:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vDZe+Uwo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240493AbhIPQXl (ORCPT + 99 others); Thu, 16 Sep 2021 12:23:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:48798 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237857AbhIPQNM (ORCPT ); Thu, 16 Sep 2021 12:13:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D99746139D; Thu, 16 Sep 2021 16:09:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808589; bh=NFrGmOjQVLMvV/HpF5LMSqtHkHIDEbEEUZZB9yULr2g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vDZe+Uwob24n+Fx/vOqxx9iDjbeCVaNrsc+lxP0G5DQgmNkO2JV5Yhu0YZEBjZ/6F tczAGgVh7samShkGWnD3fbJ+4KzG5Bc2RX5+JWFThIFpOr56EgJsWYqe/fJMGeaBwq SH74b8ipw2gL1n4yMahhdhVclCx18O8HZ/g1vYec= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Anson Jacob , Harry Wentland , Alex Deucher , Sasha Levin Subject: [PATCH 5.10 149/306] drm/amd/amdgpu: Update debugfs link_settings output link_rate field in hex Date: Thu, 16 Sep 2021 17:58:14 +0200 Message-Id: <20210916155759.138442895@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anson Jacob [ Upstream commit 1a394b3c3de2577f200cb623c52a5c2b82805cec ] link_rate is updated via debugfs using hex values, set it to output in hex as well. eg: Resolution: 1920x1080@144Hz cat /sys/kernel/debug/dri/0/DP-1/link_settings Current: 4 0x14 0 Verified: 4 0x1e 0 Reported: 4 0x1e 16 Preferred: 0 0x0 0 echo "4 0x1e" > /sys/kernel/debug/dri/0/DP-1/link_settings cat /sys/kernel/debug/dri/0/DP-1/link_settings Current: 4 0x1e 0 Verified: 4 0x1e 0 Reported: 4 0x1e 16 Preferred: 4 0x1e 0 Signed-off-by: Anson Jacob Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c index e02a55fc1382..fbb65c95464b 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c @@ -197,29 +197,29 @@ static ssize_t dp_link_settings_read(struct file *f, char __user *buf, rd_buf_ptr = rd_buf; - str_len = strlen("Current: %d %d %d "); - snprintf(rd_buf_ptr, str_len, "Current: %d %d %d ", + str_len = strlen("Current: %d 0x%x %d "); + snprintf(rd_buf_ptr, str_len, "Current: %d 0x%x %d ", link->cur_link_settings.lane_count, link->cur_link_settings.link_rate, link->cur_link_settings.link_spread); rd_buf_ptr += str_len; - str_len = strlen("Verified: %d %d %d "); - snprintf(rd_buf_ptr, str_len, "Verified: %d %d %d ", + str_len = strlen("Verified: %d 0x%x %d "); + snprintf(rd_buf_ptr, str_len, "Verified: %d 0x%x %d ", link->verified_link_cap.lane_count, link->verified_link_cap.link_rate, link->verified_link_cap.link_spread); rd_buf_ptr += str_len; - str_len = strlen("Reported: %d %d %d "); - snprintf(rd_buf_ptr, str_len, "Reported: %d %d %d ", + str_len = strlen("Reported: %d 0x%x %d "); + snprintf(rd_buf_ptr, str_len, "Reported: %d 0x%x %d ", link->reported_link_cap.lane_count, link->reported_link_cap.link_rate, link->reported_link_cap.link_spread); rd_buf_ptr += str_len; - str_len = strlen("Preferred: %d %d %d "); - snprintf(rd_buf_ptr, str_len, "Preferred: %d %d %d\n", + str_len = strlen("Preferred: %d 0x%x %d "); + snprintf(rd_buf_ptr, str_len, "Preferred: %d 0x%x %d\n", link->preferred_link_setting.lane_count, link->preferred_link_setting.link_rate, link->preferred_link_setting.link_spread); -- 2.30.2