Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2349017pxb; Mon, 20 Sep 2021 19:42:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzG3G3lrvwMU2pw4b8KObty7DAakM+1KdQS5qIz3H2178SI7rlBoBJlXERQTkYQ0yx1cSgW X-Received: by 2002:a05:6638:2606:: with SMTP id m6mr9506843jat.50.1632192130919; Mon, 20 Sep 2021 19:42:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192130; cv=none; d=google.com; s=arc-20160816; b=0LXTMwDjKsqBxb3KTA/vFCBuo0VSkJ2MQ+KTxDAGqJaQDvadkdDCo2Kp+8UwmZJmsj zqv5MzmJNG5i01Skf4+1iwnhoFuU0h10JbnSUnjxOT1BjNEDro85Gf/BspFjrPLK/EvB qkM4lVJfQ3y48Lyh1eZqzgaxOY59eoAY9CVmgZNUjP/0yK9qaXzdzt7rsFWmP7A0+2Y9 QrXcyBm8CzB5zD238u6avQ54w1O66f0GrVkteqw19ZW4xfIGPggqk/dAmGptb2jQbPVJ 2SxBzSltXnW4Mxap5s8ZwD4atZEqzHmSFGPLSy+KfATEGZ3POJiI71enL4VBZit8kv5d zSTQ== 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=bU1mgJdpUZHChAqqGdwIEZT3GeXYriETRWjvmnC3qPk=; b=pTMJ5Uh08u9hoA7J6HWPSGOWvQ+6oPFlGX1DSjojmqSiN6AxSAjzUOv5XLtZOxLbzh mcxhfKjpdBXwfEMzC1rTMfO3P0QnBYCUTjGwokQM8fBZVLygZ5Tmqlk39FimPKeHJ8po 8tb5EzZMOCKWDNWlZvz+yKFEfhz4w4eOG5jXtC7ThEwaaA7MZXC7clMDn7Qs1k5Io6Bm 24T4QpJ9FfLB+/IRFmK2GmQ/OTtvwJRotJv/0Qtlrhz0V6DPpyw5ShGZD+w3a07sd5cl gh8z4mCzMP6bXrfIoQ7PSZGkrTmcCr0eqW0OjSgiMnkM6o31L38H4YdnCBVFqji3EnyT R/Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rjLsGfYV; 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 y12si1676760ilv.168.2021.09.20.19.42.00; Mon, 20 Sep 2021 19:42:10 -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=rjLsGfYV; 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 S1351405AbhITSTI (ORCPT + 99 others); Mon, 20 Sep 2021 14:19:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:33078 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358691AbhITSH0 (ORCPT ); Mon, 20 Sep 2021 14:07:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6FF3A61A3B; Mon, 20 Sep 2021 17:18:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158303; bh=d0uy1H7o0uVaDv4n6hI95+QyaQXObdt0zxBWx+1kk+o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rjLsGfYVBEySBJS1awuF2VRdGyl9c2m5WWsACzrLU8umI/Qlm144HrovpsQtUtwSZ fsAqVG0x48wJUHcY+Gfxk2YyUii4ej7RlPBQ2C5e08MD/YPYOejGwHk6kJC0wOufr3 Xaad+StclBJ3XKRf/3UZqf04VDVf7tsC4H64mFkw= 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.4 095/260] drm/amd/amdgpu: Update debugfs link_settings output link_rate field in hex Date: Mon, 20 Sep 2021 18:41:53 +0200 Message-Id: <20210920163934.365928386@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163931.123590023@linuxfoundation.org> References: <20210920163931.123590023@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 f3dfb2887ae0..2cdcefab2d7d 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 @@ -95,29 +95,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