Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp97094rwi; Wed, 12 Oct 2022 16:42:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6PbMlyIrA9Lc47YKeFM1EDnswhyFQ6iv03WvoTunJuKEKcOsvmXUYhmfzq7NFB1jPzZT/m X-Received: by 2002:a17:907:2d2c:b0:78d:d289:7efd with SMTP id gs44-20020a1709072d2c00b0078dd2897efdmr9100278ejc.166.1665618144354; Wed, 12 Oct 2022 16:42:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665618144; cv=none; d=google.com; s=arc-20160816; b=g76Kh+jdpVVj4jjOdo8XJqLulcDj5Igw6NU40Q4sgusipKtv8V2pQdIhTrAhtJG4ZB Lx81R9TCTTG6LTxxs39xm0stours6uA0T+aWaUPNrBUKmRfXE174ulAGa3y04b7xtEsM 8LGUkDnMTOwjeifvIpaLEo16LfFrpdzqlB5YxibLR5jlVmOsosInFKIrNjI/FtZJy9nQ 3/I8OMvgaCX9e/JQOXtmIXZh1yjmrZESzGk1u7RW316xaGmfC/C0qBFiEubdgqE1zQoB H4G4eAmBle/lRcR7Sp1BBsZsH713nBCb4QgzdgnsE+PY1AlcGvmyjckZy0g3aKP/hHeP yyAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Z/00gzl0chtUGKnk6+6a/IXc4W8BOyQEfDKkrrKaGSQ=; b=fwayMA7C8Kpe8sA3SHz+M3BhvGbR7Cjv5U8cXNFL7DUuYICu14iDgnYYTW20ZfralS jT31T8t/18Pl7ESObm/cctI89KlDzl90APIzFWOYIYqLYkincuRY50Yp8P52qq9C60AM HUW1LVh5uKJFmha7VU06VxrzJX24WBlqUoBGO59PyjttBYhjJ0GLrKbzvAU3o38nL5Wn Qjd60vqIAfockLoNm9kMQDD78JMuCW6FSDeDVuyZBL8P4dD87Mu85FOfQJXMaoIb9Mhc mdQC2wwWQxfbyCdi0mOwlb0PnPFkN8h6SjcpBdTLruf4CbpmShG8Gg0AG4fOVmN75tlw cfyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=oJVJWdue; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb37-20020a1709071ca500b00782e1a663dcsi3254403ejc.435.2022.10.12.16.41.57; Wed, 12 Oct 2022 16:42:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=oJVJWdue; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229496AbiJLXD1 (ORCPT + 99 others); Wed, 12 Oct 2022 19:03:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229559AbiJLXDY (ORCPT ); Wed, 12 Oct 2022 19:03:24 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6195F6558; Wed, 12 Oct 2022 16:03:23 -0700 (PDT) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29CMrZxB005011; Wed, 12 Oct 2022 23:03:14 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=Z/00gzl0chtUGKnk6+6a/IXc4W8BOyQEfDKkrrKaGSQ=; b=oJVJWdueAjXeq7YTnFXzasDhoH9cAMAmDJvvLlOz8GGT8IewOkMN3fMJViRY2NymCZN4 2EQ2Sv+wnZlsWgWGd71npfJsIqH0j0zhCz3LInTvhm1GbGDzBXhqPNbeYaksuVLnurGN NMWiLJDLY4LBWlAZP51TfBjhL/3Ehve9XwmUefeG2qWAhSBj8NZRD9fXmMY4C04fxXi+ LnM3hiIe+xXBTRNM/jETD7Z8zgdR/kBVGxHT/F/8ArWpz0FAV0TYqfiUu0OmtN1RcOqX jvwjST+hm3zpddWT6fbHZRBD+/RQDf3QBMLoY6s1/HKS9jpfMEMPQqjNhv4Bhwd1mNU8 nA== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3k5eh339xb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Oct 2022 23:03:14 +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 29CN3CJQ016486 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Oct 2022 23:03:12 GMT Received: from [10.38.241.12] (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.986.29; Wed, 12 Oct 2022 16:03:09 -0700 Message-ID: <5c178d7e-5022-f5e5-791d-d3800114b42b@quicinc.com> Date: Wed, 12 Oct 2022 16:03:06 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: [Freedreno] [PATCH v3 06/10] drm/msm/dsi: Migrate to drm_dsc_compute_rc_parameters() Content-Language: en-US To: Marijn Suijten , CC: Vinod Koul , Jami Kettunen , David Airlie , , Vladimir Lypak , Konrad Dybcio , , Douglas Anderson , Rob Clark , Martin Botka , <~postmarketos/upstreaming@lists.sr.ht>, Daniel Vetter , AngeloGioacchino Del Regno , Dmitry Baryshkov , , Sean Paul , References: <20221009184824.457416-1-marijn.suijten@somainline.org> <20221009185058.460688-1-marijn.suijten@somainline.org> From: Abhinav Kumar In-Reply-To: <20221009185058.460688-1-marijn.suijten@somainline.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) 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: ja0Tr9aJJVlp9CqstugiLkStvUu3-yFr X-Proofpoint-ORIG-GUID: ja0Tr9aJJVlp9CqstugiLkStvUu3-yFr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-12_11,2022-10-12_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 bulkscore=0 adultscore=0 clxscore=1015 priorityscore=1501 mlxscore=0 phishscore=0 mlxlogscore=999 lowpriorityscore=0 impostorscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210120144 X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/9/2022 11:50 AM, Marijn Suijten wrote: > As per the FIXME this code is entirely duplicate with what is already > provided inside drm_dsc_compute_rc_parameters(), and it is yet unknown > why this comment was put in place instead of resolved from the get-go. > Not only does it save on duplication, it would have also spared certain > issues. > > For example, this code from downstream assumed dsc->bits_per_pixel to > contain an integer value, whereas the upstream drm_dsc_config struct has > it with 4 fractional bits. drm_dsc_compute_rc_parameters() already > accounts for this feat, and the sole remaining use of > dsc->bits_per_pixel inside dsi_populate_dsc_params() will be addressed > in a separate patch. > This is a nice cleanup! Thanks for doing this. I would actually like to move towards the drm_dsc_compute_rc_parameters() API. But I would like to hold back this change till Vinod clarifies because Vinod had mentioned that with drm_dsc_compute_rc_parameters() he was seeing a mismatch in the computation of two values. slice_bpg_offset and the final_offset. The difference between the upstream drm_dsc_compute_rc_parameters() and dsi_populate_dsc_params() causing this was not clear to me from his explanation earlier. So this was left as a to-do item. I would like this to be re-tested on pixel3 and check if this works for vinod. If not, i think its the right time to debug why and not delay this more. Thanks Abhinav > Fixes: b9080324d6ca ("drm/msm/dsi: add support for dsc data") > Signed-off-by: Marijn Suijten > --- > drivers/gpu/drm/msm/dsi/dsi_host.c | 64 +++--------------------------- > 1 file changed, 6 insertions(+), 58 deletions(-) > > diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c > index 83cde4d62b68..68c39debc22f 100644 > --- a/drivers/gpu/drm/msm/dsi/dsi_host.c > +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c > @@ -21,6 +21,7 @@ > > #include