Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1922145pxb; Thu, 16 Sep 2021 20:21:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXr1aZbZc5RynFYTF6k7dNXWxmYUOBncW6Wh8vPlSrvxzqaO+Jm5jf4MHUJbX8co1I/ome X-Received: by 2002:a05:6402:142e:: with SMTP id c14mr10171615edx.121.1631848896556; Thu, 16 Sep 2021 20:21:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631848896; cv=none; d=google.com; s=arc-20160816; b=tmNc47kVM65+o8ppLjPBBflxmoNeJE+GAEYrExmxikVZsm3LACPkzuBGNOZHO2GD1J q7Epw9nNtWfsl20Vmfb/Y72lp9yeLSDx5uaStebRHalHMXTi0DcoezWDLEwcWwxs1KS8 1IwCUuurMu/PY4zJB9OWHPmlC8u7ir6LRxjIrRQIHJxk2YnQ+SyIwGGpqPVizQ95ppBp s7GO73qm4qGXc43ZBBGUtgkZzeLYNjYY5fAsLglPUa2UfZ1ouIKEpszmsuZuJOcJWAci /neCE3l+z11N9ry0VqEiQQlTrpFA3UjGrrTl5RiFNYYiSVm/0yLXASxcMcMT28M96suE wv9Q== 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=wHAqHxHkUatxtrZL6eGqVKrUuPm07x5IiB4vMKZDJ7k=; b=0TllpZ9+Wieocy03Y2ArtoLTjhe6mq1xd88zfJJhVDtvqFwSmpJ40tMpe50wFNBNXD Jbkx8GKn+nLjLcbOtrq9VvIKhHpx1etN3aZw0jHF0aGLPbdpJBuiOc7OBA75RgF3zuuR 4Qr1BiAxP2pn8Avbvp2qsNbYm8drgJ80XOybFRoqNESgj5pxSGayk2OAQXIyjj3fPzyQ SpaY/9lVyIrJLr9kDeujc3vAZSHH9c26b5zcxv6OUDsuVlfKiVtRxrJ2lzDQ+qw3SNUt 9gDPihZsd4RosnPJusNCXGtj7+JSIuQw++DZ1sc2uFy7sQzeSJs5gJox3rwisy5tZvji P/hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CuPXmzP8; 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 z15si6417613ejr.28.2021.09.16.20.21.09; Thu, 16 Sep 2021 20:21:36 -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=CuPXmzP8; 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 S1353481AbhIPReC (ORCPT + 99 others); Thu, 16 Sep 2021 13:34:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:47062 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352489AbhIPRYi (ORCPT ); Thu, 16 Sep 2021 13:24:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5BF1261BE3; Thu, 16 Sep 2021 16:43:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631810638; bh=ulbsb48wRT2W0GQ5i+5xZwCH0E2xEHJwsmVEZAmn/xM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CuPXmzP8DtqpvBRbHqE6d01hJ14mJLDWjJyD3/kicypJBhR3c0sqArIDZcvkfUUaH 4BSYlCUtlfNonN2cv3YWWE9oUUDvb8vgVBnvS3BU3lPVHMHBHLUIEI7g3M1nmeNLyn c+h11Jp6WOAHxRm4KHQOGwD+rsAdBtpgHIBVzgig= 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.14 215/432] drm/amd/amdgpu: Update debugfs link_settings output link_rate field in hex Date: Thu, 16 Sep 2021 17:59:24 +0200 Message-Id: <20210916155818.126789606@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155810.813340753@linuxfoundation.org> References: <20210916155810.813340753@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 f1145086a468..1d15a9af9956 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