Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10747144rwr; Fri, 12 May 2023 12:20:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7inT1FX6JWUhFtRBVZDm0tQsPz9agYfANvKID43T69Xc3YzPxQfUKfKMZfI93uksNENkbN X-Received: by 2002:a05:6a20:9152:b0:e5:58e6:be37 with SMTP id x18-20020a056a20915200b000e558e6be37mr30704160pzc.61.1683919234450; Fri, 12 May 2023 12:20:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683919234; cv=none; d=google.com; s=arc-20160816; b=lOyqViWkuevqvJxR0eWnT8l8/Iipmqr8nb8mQCC/uIWvblm5fTEfE+D9OoIod1DAp5 k2VAEXaIrVa7sWl/EDVrYHRVhR5P62rvOXGQBYCLAW4yDbFt9k0z8fwAKwttjH0UAi8T i22pSsKI6wN7MLtDFGZFwhpNl0V57Egul2kAn1GDb4S5aCjlCmSDoVewcSePJsF9qFIe +lNLgVEl2UoSVr9i4VS5a7hHamxS7wCMraGpaw4W0rg8EHHH2mDFu5RxcPptn8rvSl9B Y7vtDenZpR/hFYcJa5Kb+3vIlgTvcT6jzGaNxq3ssGTAJj0R52n6ENjcs3r14sMesFBE WJ0g== 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=jEtN/tDjrIlbzPkhas7R2ZIqBheXt8OE6EPlEKEa16o=; b=JTBoSw8ZG38sMH2+LqT1UZKg4d7MsxTR8JzM5YoNMuloiXSyyYVuiLYTOQ5ELrzEq0 lYoVT9lPcWutqw3bZSunUiPZ8YP5xCbaDmyhl2xG4SpWFjnogbw4Gajd4jM3MANhXuiP W4y9t56IISEMGt9Wee6QvmZDr51AJEqpC1GbcZ7L86o/OB2w1hQptIaX4IlScZhNxtND jXFV0iy/jW+k0DSSxrB0XkSyf53Fz02Ue4IU79McD9ARL+oZEaUswkMl8ISLbTz8I0Qx U6bob9O8nG6Xuh1JEzVUbFGkfJa1K+STLS07BKKlP5jIjqxkfj2exOyOBqzp89AV42FC z3bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="R/fuD4MG"; 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 i186-20020a6387c3000000b0051b59786e6csi10292404pge.300.2023.05.12.12.20.19; Fri, 12 May 2023 12:20:34 -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="R/fuD4MG"; 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 S239286AbjELTFr (ORCPT + 99 others); Fri, 12 May 2023 15:05:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231343AbjELTFq (ORCPT ); Fri, 12 May 2023 15:05:46 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFE952724; Fri, 12 May 2023 12:05:44 -0700 (PDT) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34CI1Cos012522; Fri, 12 May 2023 19:05:34 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=jEtN/tDjrIlbzPkhas7R2ZIqBheXt8OE6EPlEKEa16o=; b=R/fuD4MG5mRTKwb0T13uMMFvtvzsSCXwOZBuYj04BsB11pQrZDUnv/SciAQhkAcR+4lV +9Xs3Uh3tIER178kjSdnUMm9mNUuJly71FJraiyPpkjf7JkpEL7SqratDkyDALzYti2a CQPlkTBMsR4Q4XwHDQ3wguWe1xKazairaZaPGBvObovls3HHo2Jj0vAcpc0NpwF/sTzU N5YA6uFUTSULFS4sKrlOcFMiWlbmqMV04585GT10oeCPbYpOTtv9x/wypW+oktMDuGh0 bpZgNztNBHadZ98htFdAnCaRApFJZ0aGKyj2JwbKnEDS+fOVN/00gvSFNIRURE9wPlIO kw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qhcj1t255-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 May 2023 19:05:34 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 34CJ5XAU005680 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 May 2023 19:05:33 GMT Received: from [10.110.82.209] (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; Fri, 12 May 2023 12:05:32 -0700 Message-ID: <411b27d1-6c1d-fa7e-111a-ab8f02ab3981@quicinc.com> Date: Fri, 12 May 2023 12:05:32 -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: [PATCH v8 6/8] drm/msm/dpu: separate DSC flush update out of interface Content-Language: en-US To: Dmitry Baryshkov , Kuogee Hsieh , , , , , , , , , , CC: , , , , , References: <1683914423-17612-1-git-send-email-quic_khsieh@quicinc.com> <1683914423-17612-7-git-send-email-quic_khsieh@quicinc.com> <91f63678-aade-2f42-1311-1bc706ebdc91@linaro.org> <5319b87a-9a4c-1786-9ea9-b9015ee56357@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: 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: nP_9G0c-X7y2JpuvKzZLrSBYDJ7ix7hJ X-Proofpoint-ORIG-GUID: nP_9G0c-X7y2JpuvKzZLrSBYDJ7ix7hJ 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-12_12,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 lowpriorityscore=0 mlxscore=0 adultscore=0 malwarescore=0 mlxlogscore=932 priorityscore=1501 bulkscore=0 spamscore=0 clxscore=1015 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305120160 X-Spam-Status: No, score=-4.7 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,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/12/2023 11:50 AM, Dmitry Baryshkov wrote: > On 12/05/2023 21:47, Abhinav Kumar wrote: >> >> >> On 5/12/2023 11:21 AM, Dmitry Baryshkov wrote: >>> On 12/05/2023 21:00, Kuogee Hsieh wrote: >>>> Current DSC flush update is piggyback inside dpu_hw_ctl_intf_cfg_v1(). >>>> This patch separates DSC flush away from dpu_hw_ctl_intf_cfg_v1() by >>>> adding dpu_hw_ctl_update_pending_flush_dsc_v1() to handle both per >>>> DSC engine and DSC flush bits at same time to make it consistent with >>>> the location of flush programming of other dpu sub blocks. >>>> >>>> Signed-off-by: Kuogee Hsieh >>>> Reviewed-by: Dmitry Baryshkov >>>> --- >>>>   drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 14 ++++++++++++-- >>>>   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c  | 22 >>>> ++++++++++++++++------ >>>>   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h  | 10 ++++++++++ >>>>   3 files changed, 38 insertions(+), 8 deletions(-) >>>> >>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c >>>> b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c >>>> index ffa6f04..5cae70e 100644 >>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c >>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c >>>> @@ -1834,12 +1834,18 @@ dpu_encoder_dsc_initial_line_calc(struct >>>> drm_dsc_config *dsc, >>>>       return DIV_ROUND_UP(total_pixels, dsc->slice_width); >>>>   } >>>> -static void dpu_encoder_dsc_pipe_cfg(struct dpu_hw_dsc *hw_dsc, >>>> +static void dpu_encoder_dsc_pipe_cfg(struct dpu_encoder_virt *dpu_enc, >>>> +                     struct dpu_hw_dsc *hw_dsc, >>>>                        struct dpu_hw_pingpong *hw_pp, >>>>                        struct drm_dsc_config *dsc, >>>>                        u32 common_mode, >>>>                        u32 initial_lines) >>>>   { >>>> +    struct dpu_encoder_phys *cur_master = dpu_enc->cur_master; >>>> +    struct dpu_hw_ctl *ctl; >>>> + >>>> +    ctl = cur_master->hw_ctl; >>> >>> Just for my understanding: if we have a bonded DSI @ sdm845, should >>> both flashes go to the master CTL or each flush should go to the >>> corresponding CTL? >>> >> >> Is this question for DSC or just general question about flush? >> >> I dont see an explicit DSC flush needed in sdm845 at the ctl level. >> >> If the question is about general flush involving two control paths, we >> need to combine the flushes and they goto the master only. Please >> refer to below part in sde_encoder.c > And this is because we have a single CTL to flush on sm8150+, isn't it? > For sm8150+, yes there will be only a single CTL to flush even in bonded DSI mode so only one will be flushed. So, in general, you can refer to the function sde_encoder_phys_needs_single_flush() to decide if it needs 2 flushes or one. That accounts for the DPU rev as well. >> >> 4243     /* for split flush, combine pending flush masks and send to >> master */ >> 4244     if (pending_flush.pending_flush_mask && sde_enc->cur_master) { >> 4245         ctl = sde_enc->cur_master->hw_ctl; >> 4246         if (config_changed && ctl->ops.reg_dma_flush) >> 4247             ctl->ops.reg_dma_flush(ctl, is_regdma_blocking); >> 4248         _sde_encoder_trigger_flush(&sde_enc->base, >> sde_enc->cur_master, >> 4249                         &pending_flush, >> 4250                         config_changed); >> 4251     } > >