Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1089978rwr; Thu, 20 Apr 2023 09:49:06 -0700 (PDT) X-Google-Smtp-Source: AKy350ZhEb8ab03qyJ0C+yoX8+un/Q/YfsnGNJmLOPjVmrlBAfXmlstOb7i4Qr9oh6oQS1LJEyAW X-Received: by 2002:a17:90b:1906:b0:23d:54e8:3bb7 with SMTP id mp6-20020a17090b190600b0023d54e83bb7mr2388352pjb.17.1682009345943; Thu, 20 Apr 2023 09:49:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682009345; cv=none; d=google.com; s=arc-20160816; b=k3dxXVf/tJg2U0CgfRVJg6o8ASYQL9ufDbhWGgYxNz/SA32mAwCbZC13zboJfYPAfd LU5aQa0yb0IXZ40LmhhzjcA8MJo9bazfpu/FK3D6WAzeop6u0vTWN7FE7JrRyBnVBmnA pePTR9ym35HtoUANCcW6+lnMJ/94mYBHiVtm6PWdAfhYK/3sLq3HHbsTQc58DDsambtm jCN1M1fqd0ZlfYlzdOMxjCPy1sd4nooiAOsiz7zB5V2+FVglKdHgl7kkkO8qdrhNFdNL NyxA5h7xftGoA/PQVZLp6El++t17L2GWe+/h2b/NqOS8g3vkjpjZJ4+yHMFbg12ecdhP p9ZQ== 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=x+gGbv4XV+UinHVEkKDe3ZvwO/XqDZK/7M0uSOoHZzU=; b=jro1a3wHYI+38JA1LHyUh+zJvvtsOJC0/+Xz08Q2YKhdtwqmS5NWqJ99CJcp2KaPvS 4z8XJuvnE0HxeZoUyvt0CBDEzLiSv2F72a5U1j+iAfXRd7MbIxvh2KXGpT8nACTYRi2W TM1fQoyG4+satB5CDK7B386h9NXeR6zrfbEtUq8ViXyz9/iOmk6v+bfX7+upsWrGw/dz IlweQYWZG9rL7ubqn6aQS3MoXj840xZHI3na+0HJu3REtVKjPbXnnMWxm88Rt3MQ0xjP pJoH10tqxeT3auPWEvBitG6JQE0Q6Qn52ZSGJtBLA/tKBEV0Sjgl6qz+lM8hzOOirVqG doNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Rus60apT; 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 c10-20020a17090a674a00b00237155f2303si2271115pjm.136.2023.04.20.09.48.47; Thu, 20 Apr 2023 09:49:05 -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=Rus60apT; 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 S231840AbjDTQkm (ORCPT + 99 others); Thu, 20 Apr 2023 12:40:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230200AbjDTQkj (ORCPT ); Thu, 20 Apr 2023 12:40:39 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15E21106; Thu, 20 Apr 2023 09:40:38 -0700 (PDT) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33KAorKu021662; Thu, 20 Apr 2023 16:40:27 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=x+gGbv4XV+UinHVEkKDe3ZvwO/XqDZK/7M0uSOoHZzU=; b=Rus60apTeyv95JQuoNuQzkQtKbbopykx9l78VDSZXUSsECuUxqpDEyo+4YrWFfdHdA5p R0zh36fd/1xFflfAXsg6/FkQLBzXyK1tZbgfNPdol9s5kO+zvu3IniVaRMfixFBRy9IO +I4136ut7qL39bzCnmK58sGxf4ohx/54EbalD6nhcQ+EAY00e+QsYCzM/Ce52Ubd8L8a ZCqFDnvHizS/iqZ1K/u/k0NNSc2T3QBKBcRTwpfvDeK+ANTGsrlGPR1T4QhIasbuRJQN NJa7Dyjru+rjF5dz/aedpH3Sgcp7/F63ZdH+gCmkESZ6wW+ITE7nFWFTXinrF8xDKlTZ DQ== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3q2uh3j1uq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Apr 2023 16:40:26 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 33KGePGj023041 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Apr 2023 16:40:25 GMT Received: from [10.110.74.190] (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.42; Thu, 20 Apr 2023 09:40:24 -0700 Message-ID: <29df3564-ade2-fda2-1843-8438e7d01669@quicinc.com> Date: Thu, 20 Apr 2023 09:40:23 -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] drm/msm/dpu: always program DSC active bits Content-Language: en-US To: Dmitry Baryshkov , Marijn Suijten , Kuogee Hsieh CC: , , , , , , , , , , , , , References: <1681490777-15351-1-git-send-email-quic_khsieh@quicinc.com> From: Abhinav Kumar In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit 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-ORIG-GUID: qeYWn78qhPKcX2kFIdwv5rc1FtgnuiVK X-Proofpoint-GUID: qeYWn78qhPKcX2kFIdwv5rc1FtgnuiVK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-20_12,2023-04-20_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 malwarescore=0 clxscore=1015 impostorscore=0 lowpriorityscore=0 adultscore=0 mlxlogscore=864 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304200138 X-Spam-Status: No, score=-4.5 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,T_SCC_BODY_TEXT_LINE 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 Hi Dmitry / Marijn On 4/20/2023 7:03 AM, Dmitry Baryshkov wrote: > On 15/04/2023 02:02, Marijn Suijten wrote: >> On 2023-04-14 09:46:17, Kuogee Hsieh wrote: >>> In current code, the dsc active bits are set only if the cfg->dsc is >>> set. >> >> This is the old sentence from v1 again, did you accidentally send the >> wrong patch as the improvements from v2 are missing? >> >>> However, for displays which are hot-pluggable, there can be a use-case >>> of disconnecting a DSC supported sink and connecting a non-DSC sink. >>> >>> For those cases we need to clear DSC active bits during teardown. >> >> At least teardown is one word again, v2 had "tear down" which is wrong. >> >>> As discuss at [1], clear DSC active bit will handled at reset_intf_cfg() >> >> discussed* as pointed out by Dmitry, and make it clear that this is >> about clearing CTL_DSC_ACTIVE (and CTL_DSC_FLUSH?) specifically.  Once >> that is moved to reset_intf_cfg(), this patch should be reverted as >> there is no need to write the registers once again when cfg->dsc equals >> 0. > > Kuogee, can we please get a proper v4? With all the relevant changes > from v2, with the changelog, etc. > > Otherwise the present Reviewed-by tags are just incorrect. > After looking into the DPU DSC changes internally which will be posted today/tomm, that piece of code is again touching this block, so I am now also not convinced this change should be made right now because it was again touching flush programming, so that again leaves only the active bits which as Marijn mentioned will be applicable for a use-case only with hot-pluggable display which we dont have till we land DP DSC. I think this is what we will do: -> post DPU DSC changes -> post the patch to improve reset_intf_cfg() to handle DSC -> post rest of DP DSC changes -> post rest of DSI DSC changes I think that way, we all are aligned. Apologies for posting this patch a bit ahead of time but if i had foreseen that DPU DSC changes will again touch the flush code, i would have held this patch back too. >> >> - Marijn >> >>> Signed-off-by: Kuogee Hsieh >>> Fixes: 77f6da90487c ("drm/msm/disp/dpu1: Add DSC support in hw_ctl") >>> Reviewed-by: Abhinav Kumar >>> Reviewed-by: Marijn Suijten >>> >>> [1] >>> https://lore.kernel.org/linux-arm-msm/ec045d6b-4ffd-0f8c-4011-8db45edc6978@quicinc.com/ >>> >>> --- >>>   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 7 +++---- >>>   1 file changed, 3 insertions(+), 4 deletions(-) >>> >>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c >>> b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c >>> index bbdc95c..88e4efe 100644 >>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c >>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c >>> @@ -541,10 +541,9 @@ static void dpu_hw_ctl_intf_cfg_v1(struct >>> dpu_hw_ctl *ctx, >>>       if (cfg->merge_3d) >>>           DPU_REG_WRITE(c, CTL_MERGE_3D_ACTIVE, >>>                     BIT(cfg->merge_3d - MERGE_3D_0)); >>> -    if (cfg->dsc) { >>> -        DPU_REG_WRITE(&ctx->hw, CTL_FLUSH, DSC_IDX); >>> -        DPU_REG_WRITE(c, CTL_DSC_ACTIVE, cfg->dsc); >>> -    } >>> + >>> +    DPU_REG_WRITE(&ctx->hw, CTL_FLUSH, DSC_IDX); >>> +    DPU_REG_WRITE(c, CTL_DSC_ACTIVE, cfg->dsc); >>>   } >>>   static void dpu_hw_ctl_intf_cfg(struct dpu_hw_ctl *ctx, >>> -- >>> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora >>> Forum, >>> a Linux Foundation Collaborative Project >>> >