Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1548161rwr; Wed, 3 May 2023 17:34:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6T9qKh1I2TPEowV0sjHwT35+iukGdXPmAIY2wwh2mPLqNA5WYpZwi2z1u+XecnxppfL+ZD X-Received: by 2002:a05:6a20:7d8a:b0:f2:bfe1:4867 with SMTP id v10-20020a056a207d8a00b000f2bfe14867mr589557pzj.17.1683160486418; Wed, 03 May 2023 17:34:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683160486; cv=none; d=google.com; s=arc-20160816; b=AT54ggW3/aiyozdlDNWiY21oCM+L7UBc9UAS6dwLVBaM93G08bHzPJRB52Mu16JDew yljk/EIpCRPTp8RfSy7Wrvyp41W58HGaCTPjn8QvhxXxuszWjWP9r0oXgEBH7zjdwXDu x5VC75sxPk9gs75fF9BWKkdoSvwjyFtR86vcRmjwK7e1LBo1RA/5+1J+rsMUKvxd17nG YrXOvpd3YlM8mbWK1fyn5vy9FxWAZ1xujZ/Zh+yBJqlyxCsEv2MkE0BjwuhMwsorBqCg Isl0HrkXQjCbNPk72oPb0LYAEYP+yln7lHtrNYnhexV93NKnpDoSPOCq0JCsg5BZR4dO 23Dw== 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=1PMEx4qztYJUIIAqUTHBKZp8gI0LBm434DtrOFHPIpg=; b=DbA4REH8sgLTalZJehco0Oe1yhDsRgVleOe4b4+NlN10AcfkEXLkjBwE7e+zVYji1B iH6ylLwo/xIGGh8dYDHdNS9Sn50sx2ZtFFrIDsaaL9VBXIz65Jy0L2l/ZM9D6YcFFgR1 pNAWSz7l7tGWPWFwiw7s7SeGhBzSb5Vwe96HMGoRBCNQi9uwMa1/8DI+nzwPzK2S44pS Z06MLqL72qI8NvR3Y5UpVJRTwqcbtwN6CFwa3HgmG3P8i2Dy1qpBifUKaN9g3nhimt6b EU1+1Prp8RprcwkAhnwotZij0FloPhSamf+YSSboo83mBFViVMieR1nTdnJChRgVROVI 0Low== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=GdNd1ILL; 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 s8-20020a637708000000b0052c688e6608si2222801pgc.505.2023.05.03.17.34.28; Wed, 03 May 2023 17:34:46 -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=GdNd1ILL; 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 S229619AbjEDAJ7 (ORCPT + 99 others); Wed, 3 May 2023 20:09:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbjEDAJ5 (ORCPT ); Wed, 3 May 2023 20:09:57 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B1B65B89; Wed, 3 May 2023 17:09:56 -0700 (PDT) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 343Njgsc004088; Thu, 4 May 2023 00:09:50 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=1PMEx4qztYJUIIAqUTHBKZp8gI0LBm434DtrOFHPIpg=; b=GdNd1ILLCHzwh7WY+J+D7sFF4qtaJyb++Mz0ze+zaN2QbBEny1H1U344zOs629dmTk+R bEue4jlbBllsoDVrm8xu81dHd/cGNwijZbWvMU5mBu3U4vFswDFEFCipaS65vsW9cvcf LjsUnYHSLNoU5AQ3q5bjkyoZsq7vBybH1WTzYZjwbjLmcOgy/NxRATGdefTh/bWH9KDN gTZTT05tbtfDxkomRapLL3x3b+aNeTVnPI6r7uJfaOWFUS7wHm5fhH3PVL56c//2y9Es 2TtXai9Boy8mL79csG45/LAH4Q83Ig6wX7KdeDDM+y3IYH5g3ETj73s7O2Su/VRrOYhj 6w== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qbsr41199-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 May 2023 00:09:49 +0000 Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 34409maA010054 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 4 May 2023 00:09:48 GMT Received: from [10.71.110.193] (10.80.80.8) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Wed, 3 May 2023 17:09:48 -0700 Message-ID: Date: Wed, 3 May 2023 17:09:47 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH 4/4] drm/msm/dpu: Enable compression for command mode Content-Language: en-US To: Marijn Suijten CC: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter , Konrad Dybcio , , , , References: <20230405-add-dsc-support-v1-0-6bc6f03ae735@quicinc.com> <20230405-add-dsc-support-v1-4-6bc6f03ae735@quicinc.com> From: Jessica Zhang In-Reply-To: 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 nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: SQTdqx9OSGdl1hjOI6cM5gMnEWsM_S6P X-Proofpoint-ORIG-GUID: SQTdqx9OSGdl1hjOI6cM5gMnEWsM_S6P 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-05-03_15,2023-05-03_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 bulkscore=0 phishscore=0 adultscore=0 suspectscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 lowpriorityscore=0 impostorscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2305030206 X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 5/3/2023 4:00 PM, Marijn Suijten wrote: > Hi Jessica, > > On 2023-05-03 12:04:59, Jessica Zhang wrote: >> >> >> On 5/3/2023 12:28 AM, Marijn Suijten wrote: >>> On 2023-05-02 18:19:15, Jessica Zhang wrote: >>>> Add a dpu_hw_intf op to enable data compression. >>>> >>>> Signed-off-by: Jessica Zhang >>>> --- >>>> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 4 ++++ >>>> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 7 +++++++ >>>> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h | 2 ++ >>>> 3 files changed, 13 insertions(+) >>>> >>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c >>>> index 74470d068622..4321a1aba17f 100644 >>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c >>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c >>> >>> Can we have INTF DCE on video-mode encoders as well? >> >> Hi Marijn, >> >> Currently, there's no way to validate DSC for video mode as I've only >> made changes to support DSI for command mode. We are planning to post >> changes to support DSC over DP, which will include changes for video mode. > > Okay, but then mention so in the patch description (which is rather > short in this revision). Acked. > > > >>>> #define INTF_CFG2_DATABUS_WIDEN BIT(0) >>>> #define INTF_CFG2_DATA_HCTL_EN BIT(4) >>> >>> These should probably be reindented to match the below... And the rest >>> of the defines use spaces instead of tabs. >> >> Fair point, though I think fixing the whitespace for these 2 macros >> specifically might be better in a more relevant series. > > Yes, I have many patches to start cleaning these up, as well as all the > broken kerneldoc comments, but it's an uphill battle. Not sure if I'll > get to it any time soon if at all. > >> With that being said, I'll change the spacing of the DATA_COMPRESS bit >> to spaces instead of tabs. > > Thanks, that seems to be the most common format. > >>>> +#define INTF_CFG2_DCE_DATA_COMPRESS BIT(12) >>>> >>>> #define INTF_MISR_CTRL 0x180 >>>> #define INTF_MISR_SIGNATURE 0x184 >>> >>> This does not seem to apply on top of: >>> https://lore.kernel.org/linux-arm-msm/20230411-dpu-intf-te-v4-10-27ce1a5ab5c6@somainline.org/ >> >> Seems like I'm missing some patches from that series on my working >> branch. Will rebase on top of the full series for the v2. > > Thanks, but do discuss with Abhinav/Dmitry which series will land first. > >>>> +static inline void dpu_hw_intf_enable_compression(struct dpu_hw_intf *ctx) >>> >>> Why inline? This is used as a pointer callback. >> >> Acked, will remove the inline. >> >>> >>>> +{ >>>> + DPU_REG_WRITE(&ctx->hw, INTF_CONFIG2, INTF_CFG2_DCE_DATA_COMPRESS); >>> >>> dpu_hw_intf_setup_timing_engine() also programs INTF_CONFIG2. Is it >>> double-buffered, or is that config **always** unused when DSI CMD mode >>> is used in conjunction with DSC/DCE? Otherwise this should perhaps OR >>> the bitflag into the register, or write the whole thing at once in >>> dpu_hw_intf_setup_timing_engine()? >> >> For command mode, INTF_CONFIG2 is unused aside from setting >> DATA_COMPRESS for DSC. >> >> Since setup_timing_engine() is only used for video mode, the >> corresponding changes will be made in the DSC v1.2 for DP changes. > > Ack, that makes sense. However, is this a guarantee that nothing else > will write INTF_CONFIG2 in the future, or will we solve that problem > when it happens? I'm afraid more config-bits get added to this register > in the future and might possibly race/overwrite each other. That's a fair point. There's no guarantee that nothing else will set INTF_CONFIG2 for command mode in the future. I think it would be better to add a register read now instead of having to fix that issue in a future change. Thanks, Jessica Zhang > > - Marijn > >