Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1309807rdd; Wed, 10 Jan 2024 15:51:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IGllbNDLFAlpBR8i7245ssOC3mTRLG/4yhQ4WidHTb0fxgJbWWV6FUyPfYTohfi0haPCuZy X-Received: by 2002:a17:906:75a:b0:a2c:178a:fe7 with SMTP id z26-20020a170906075a00b00a2c178a0fe7mr184774ejb.25.1704930662775; Wed, 10 Jan 2024 15:51:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704930662; cv=none; d=google.com; s=arc-20160816; b=rFzwiEfnQ60cPjBZIlNr9s/Tsz65+QjGnRXqOCWXo5GoXqd19R4JIaMntMSbf8DbZ1 xOIPMNuBkWzSYedoDYqFj6zuhe/Rfra5M5WjZNFawI9eRiL2i+6OhUN239ZnAKvsC0qW iMgNvxdhrW1IF1asI4EgTXdNpjmhv7+0jpYNK5IGm16Vs9emGeKmqV+w4UdzMofwS5Ca 6QPLSmUuX0mw9aWTq/qd/nU+bDjiwDZtlyO7VLJ5itgVwaeMdjnqeyiHL5nZQfM29HMW 6T3V5HClmJSSmYqgROut70XRtqcGVP7Wl6l5vV9qKGx0dvjS4t+Drztr+JXDSpKkXY7O 74Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=IY2WHo656dlJft78J6VUeykbQH3OBUSeMuyIpTpTn1Y=; fh=Iu05yrOKhRyKBOIps2Mjvip7s5lelUzP4uL09HFczko=; b=OqV/7BdTS3D2dNOBSN3O9iUVXZPHltqsNqRZy52ZzCYOApkRHbjdMgCFN3W/KxKO6G oCzvD4Y7AD7N7shUxocTKWQ7PHa5EQjNnFV31QSklJd7fv5RcEQzztgjp/DggleV1FMt IHlMg8X0LHjI/Ww9NaeHjvWF3lcWT7yK6B7VnheIfMT20bOjuO8KxKgRTMdjLhPs9tf6 1zabsO4x23oCEgY1R+VWyaKihA6mKyX1MjMgt2LCwBs94SXxbdpU69WWaoKRPw3+BWv5 61sAvgiiUJB852XgHlzihjt50uIkQoaEl7sr5jhak0BdxZ6k6TmvOxpxn0MOBcRJDeGb nrJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Bmo+oYOS; spf=pass (google.com: domain of linux-kernel+bounces-22896-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22896-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id dx20-20020a170906a85400b00a28a7f4e172si2155544ejb.985.2024.01.10.15.51.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 15:51:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22896-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Bmo+oYOS; spf=pass (google.com: domain of linux-kernel+bounces-22896-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22896-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 24DE81F22021 for ; Wed, 10 Jan 2024 23:51:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B33F84F8B0; Wed, 10 Jan 2024 23:50:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Bmo+oYOS" Received: from mail-yb1-f169.google.com (mail-yb1-f169.google.com [209.85.219.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 61BF84F883 for ; Wed, 10 Jan 2024 23:50:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f169.google.com with SMTP id 3f1490d57ef6-db3a09e96daso3895055276.3 for ; Wed, 10 Jan 2024 15:50:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704930648; x=1705535448; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=IY2WHo656dlJft78J6VUeykbQH3OBUSeMuyIpTpTn1Y=; b=Bmo+oYOSaJ0xZ16vSCdSpMyXzm5gawk84S0rDaHGmBG6nUqLh2QUliuy/Ciwl83hfZ pOwx76LQFrCxRdc5aenk7sW2+2w7NI7H5y92f371xaoNUrjWkIseY+Pi6gC1PgcSRbhO AwQKiQAAYspqERWNpNBloPKn76f/xeX96UWsgUGaE+Y3pUErP9noqI13bJIBY6wcPWnP Ezik3MyFwNqgXxgar+teYEw0oHMHciPou675m9qY73vo9pr+j52mBWbzD5kdQkLlsTku N1ByQ32B9VZO/g3npNTkWo7gljN9J3Yttty/1ngd0qcwhZ8PohWX3W03uTG7X1D3TNZ5 vepw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704930648; x=1705535448; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IY2WHo656dlJft78J6VUeykbQH3OBUSeMuyIpTpTn1Y=; b=AgyWcb2CAMy6O53LnmeoOZ2zDl7RrF+Dww5UhXxHgKx38EHelgHxK0u/puNNCfigcq /pEi+aS33ER2gfbkBlb4wLG5J4KP62IoptHp9Rk+kromRmHpHupqETkMgwP8wJwwjjJH CC8he5zwt9FCCuxAHAimoUlGq5yZolrxqaS2dpQ+zxm+4/Qwh7+bgomKog+WmxMuZt5Y NGocL5cLR88StVC/NbWqwNHG/o/m9fN+/1udXToW5VRfysOhCOoAwkeE3dFMe/aQfOP1 y69rwQeKiJ0mtNbXOt/lzP3g2Jq6CHk+tNXpsjeQUdifjethsXDJM9KLV1/XEspJY2IG 8gOA== X-Gm-Message-State: AOJu0YxHq7Ukt7p7e87fcm46+bLKLzgtCKdDHcY53XjcIlq1lBSqjmMO 7qCg8TKDbD/fo+198qq1u0hYX4h0dPFTtCQy2k0e0sFBSLjuIA== X-Received: by 2002:a5b:651:0:b0:dbd:b17c:802 with SMTP id o17-20020a5b0651000000b00dbdb17c0802mr409911ybq.52.1704930648185; Wed, 10 Jan 2024 15:50:48 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <1704917931-30133-1-git-send-email-quic_khsieh@quicinc.com> In-Reply-To: <1704917931-30133-1-git-send-email-quic_khsieh@quicinc.com> From: Dmitry Baryshkov Date: Thu, 11 Jan 2024 01:50:37 +0200 Message-ID: Subject: Re: [PATCH v1] drm/msms/dp: fixed link clock divider bits be over written in BPC unknown case To: Kuogee Hsieh Cc: dri-devel@lists.freedesktop.org, robdclark@gmail.com, sean@poorly.run, swboyd@chromium.org, dianders@chromium.org, vkoul@kernel.org, daniel@ffwll.ch, airlied@gmail.com, agross@kernel.org, andersson@kernel.org, quic_abhinavk@quicinc.com, quic_jesszhan@quicinc.com, quic_sbillaka@quicinc.com, marijn.suijten@somainline.org, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Wed, 10 Jan 2024 at 22:19, Kuogee Hsieh wrote: > > Since the value of DP_TEST_BIT_DEPTH_8 is already left shifted, in the > BPC unknown case, the additional shift causes spill over to the other > bits of the [DP_CONFIGURATION_CTRL] register. > Fix this by changing the return value of dp_link_get_test_bits_depth() > in the BPC unknown case to (DP_TEST_BIT_DEPTH_8 >> DP_TEST_BIT_DEPTH_SHIFT). > > Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support") > Signed-off-by: Kuogee Hsieh For the patch itself: Reviewed-by: Dmitry Baryshkov Additional note. Since this made me look at how DP_TEST_BIT_DEPTH is handled in the driver, I stumbled upon dp_link_bit_depth_to_bpc() vs dp_link_bit_depth_to_bpp(). These two functions look pretty redundant. Since the former one is used only for the debugfs, please consider sending a patch that removes it for the sake of using the latter one and /3 in dp_test_data_show(). -- With best wishes Dmitry