Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp445428pxb; Thu, 9 Sep 2021 04:46:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8tSHZkQybiD7fXP9Fx5wVPgkAQRSwb0wjuqscicHFkdvVI/aiLyfyyrC7Qef36FZYYAGp X-Received: by 2002:a02:6d10:: with SMTP id m16mr699451jac.60.1631187982887; Thu, 09 Sep 2021 04:46:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631187982; cv=none; d=google.com; s=arc-20160816; b=OYvwsPQMP3ULhUU1/r5yuSGAGrrlYkXdEyABYPD8lXkfXTbvJZ9vOEF85vEhjTR+v2 hDJPuVMOVVcZvV8DbTQtEG/RqR7oUPyHazVxB/5HFkpGFniz4xGRLk0UsF/mpjUyGGOU ycykFdw8ofG1dQKQP14w4ITtJnDtSsb8afBPPlU/GrJSN2P9hmB3jvKdZZKcx1+OR/zl HLP/AaKO9haKutG2Z8ZZVJCRzjU04D7DssaXuZaye4OkiQ5RjZc7++E6p/Pwuxt7o4FU jXeB0f+GIi6oypxYcXMPSp7pc0q9yv+mZLsYuF5qQtQLhKjY33+zxZgbfXAB/39DXJF4 3ULg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wHAqHxHkUatxtrZL6eGqVKrUuPm07x5IiB4vMKZDJ7k=; b=xmiEzlY6Vw4k1JA5ZvW12yDAsxJetog/QLUAUzStoR3CCL/gcBtNCOw5mNZWA2Xlaj oAFQZPG0YKpdwFzZv9o2DEgL0ctv6GtEXOcV49xLVHVOs04uc5xS7Sux5BdRHqg3MgVd 4cu6obKXBn46jMUmpY5ZlHlAT6lL1bANzLwLXZfFGkod1u3uLObVLKT8eAcJMU9TikF7 VOmV0dpm55w9Aux+U/KUcZ57OG/3nbACM19y4+p++VOKVwANcM4TU58fAK86LUEFeDi0 COB/2ifGZ7qto17/kGdZaVFG1mzVmI9pGzAtFdnnpourhN2x/ikh03EPle35hOLyu/DC R6+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pVk9GK0V; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m16si1523804ilc.181.2021.09.09.04.46.10; Thu, 09 Sep 2021 04:46:22 -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=@kernel.org header.s=k20201202 header.b=pVk9GK0V; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240975AbhIILqc (ORCPT + 99 others); Thu, 9 Sep 2021 07:46:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:47268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239676AbhIILoR (ORCPT ); Thu, 9 Sep 2021 07:44:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 34584611ED; Thu, 9 Sep 2021 11:42:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631187748; bh=ulbsb48wRT2W0GQ5i+5xZwCH0E2xEHJwsmVEZAmn/xM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pVk9GK0Vwtnkz1rks8ZIoEeRbHPjg3jumgMBBqWmvexu2j9pCgdTUDeC6cB34DyuB Bk7RYmUy8GL4x8omviIYr8zaBZq2XDf/H+oSS7lnIHmnFiD4fgFggiqcivn57nHNt+ Euj4u9MlY/pIwGw3lhImlJL+4L0uGBIGPL94sxUCtxhT2y3dvevZhUHXcqm2KrwKgd z3jd6RE6FTmMfxiHkeTrUVF1qqIooI1aQkz1u787Oqp/w7pqtqlKYaPCx7E3i11HEj veM6xk2hzToakiBEdrolWaRWXN1x/JzTYx0q/BUjeERG5myT29mhsGFySTo5Fl0k+w FBepAmDdCR3OQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Anson Jacob , Harry Wentland , Alex Deucher , Sasha Levin , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.14 063/252] drm/amd/amdgpu: Update debugfs link_settings output link_rate field in hex Date: Thu, 9 Sep 2021 07:37:57 -0400 Message-Id: <20210909114106.141462-63-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909114106.141462-1-sashal@kernel.org> References: <20210909114106.141462-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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