From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B3A3C83F3E for ; Thu, 31 Aug 2023 20:30:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347395AbjHaUaZ (ORCPT ); Thu, 31 Aug 2023 16:30:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243698AbjHaU34 (ORCPT ); Thu, 31 Aug 2023 16:29:56 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CF39E65 for ; Thu, 31 Aug 2023 13:29:53 -0700 (PDT) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37VIm8Iu007717; Thu, 31 Aug 2023 20:29:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=jtA7MgF16ETidfJOUcFKtwvY9eSvyi8hxKqwgxHcV1Y=; b=k6RiPGoAcNMYqY5KRE4GF8/No5iDlefX1IJ0u/p7z9/KIDdeqz/TYL0QDSYJ9IGgo4dn +dNmgLw17eKsX5rpSU6louUtJkycNN1hGmSvv5r45C4AWwk90Y/xG32rQEWsi/J1kk5B DehSHQM7vK5ohHP8LkDK48xcWVrg+V69ySTdlqVwOd6wcO7KzxD9S2aEoUS8G+zu8YzD 34/m6H9GuWX6eNNxGAFNjLugX7UdhMZW0VvuwZP9h6ztaJFA2FQDIzMqAH9OKohJFCWz pIkN2JlYoNcpqEN3EQtIG2q/I38WergXNN+2OoYRx2Hsn2Bmphq5Ync8PxTjC5jB/d0B 5Q== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3stku2a6d1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 31 Aug 2023 20:29:46 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 37VKT8SO015317 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 31 Aug 2023 20:29:08 GMT Received: from [10.71.108.94] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.36; Thu, 31 Aug 2023 13:29:07 -0700 Message-ID: <388ccc1f-9185-31ba-ebe2-0375423c7825@quicinc.com> Date: Thu, 31 Aug 2023 13:29:07 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 5/7] drm/msm/dp: Simplify with drm_dp_{max_link_rate,max_lane_count}() Content-Language: en-US To: Stephen Boyd , Rob Clark , Abhinav Kumar , Dmitry Baryshkov CC: , , Sean Paul , , , Vinod Polimera References: <20230829184735.2841739-1-swboyd@chromium.org> <20230829184735.2841739-6-swboyd@chromium.org> From: Kuogee Hsieh In-Reply-To: <20230829184735.2841739-6-swboyd@chromium.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: kgmgT6I1A58k3ITt6RfA0PNQDVcMMMGU X-Proofpoint-ORIG-GUID: kgmgT6I1A58k3ITt6RfA0PNQDVcMMMGU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-08-31_18,2023-08-31_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 lowpriorityscore=0 mlxscore=0 malwarescore=0 spamscore=0 phishscore=0 bulkscore=0 priorityscore=1501 adultscore=0 suspectscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2308310183 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/29/2023 11:47 AM, Stephen Boyd wrote: > These are open-coded versions of common functions. Replace them with the > common code to improve readability. > > Cc: Vinod Polimera > Cc: Kuogee Hsieh > Signed-off-by: Stephen Boyd Tested-by: Kuogee Hsieh Reviewed-by: Kuogee Hsieh > --- > drivers/gpu/drm/msm/dp/dp_panel.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/msm/dp/dp_panel.c b/drivers/gpu/drm/msm/dp/dp_panel.c > index 0893522ae158..97ba41593820 100644 > --- a/drivers/gpu/drm/msm/dp/dp_panel.c > +++ b/drivers/gpu/drm/msm/dp/dp_panel.c > @@ -58,8 +58,8 @@ static int dp_panel_read_dpcd(struct dp_panel *dp_panel) > major = (link_info->revision >> 4) & 0x0f; > minor = link_info->revision & 0x0f; > > - link_info->rate = drm_dp_bw_code_to_link_rate(dpcd[DP_MAX_LINK_RATE]); > - link_info->num_lanes = dpcd[DP_MAX_LANE_COUNT] & DP_MAX_LANE_COUNT_MASK; > + link_info->rate = drm_dp_max_link_rate(dpcd); > + link_info->num_lanes = drm_dp_max_lane_count(dpcd); > > /* Limit data lanes from data-lanes of endpoint property of dtsi */ > if (link_info->num_lanes > dp_panel->max_dp_lanes)