Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp686409rdb; Thu, 30 Nov 2023 15:58:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IEe648hZN+pGXA2+pKwiIlgcpBONQ59vt3GaI7hBMIpcfdAh2CcCR9Wwhg4syNjYtKyg0Mr X-Received: by 2002:a17:90b:388d:b0:285:da91:69d9 with SMTP id mu13-20020a17090b388d00b00285da9169d9mr15361189pjb.9.1701388725733; Thu, 30 Nov 2023 15:58:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701388725; cv=none; d=google.com; s=arc-20160816; b=V/d2gwHoEyMH4MmELVQ5san8NjP7PAz3kAk+D0R1bM4MTtA0QPe/bYUG8vHUYXP8PM +7swSctza0Ow4tOzIO/qKm1rEJzqRDKWvQqZsxhyJZChHPOzfwVYu+0Xo2yse8rQ9k5K n1Ts28xxVRwLvttucqToulC7+/g/kdmVehIzobBqwZI7zxiCYDsnGOQIR4U/hQJLTVIM VWx5QXLgvRZgZjjV12DX4lde8Z+OeYsC6tfTOjgDXNCA4vh3x9lO77viyvx/kHR/wo4d X1iD3lQB/JUd5i8EeIiG8DbTwZgE0zrdCjKBZXhMzi1YEPjXabw+4Lb5qkaj+vQNQNdr SP0A== 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=yguVhYhaPgaT56vaA4oIRBB9Et0MyAZJozsteXHD2Tg=; fh=PV8mTOqHBITZfXWDdpO6auBL9NA1tybqIGg9DEXyy5s=; b=ASJfqDjrAW1bQByJSEEOdlOSsjKpoHG/TDAIh5vRgAaHS4turfBeCpvYQVZvP4cXHY UKIU4pbENkAkIWFfRNq2vv0oS7AXO2IRabtZ8zAF3TOVJui4ZC9fpIfkYchQSBOXVIoB s4lClFzb9xSw1Z1EHPmSDYlaRyJ2ujTkmmI21YouqCRJD3XOf815FuAgHUS7q5qPAoik mio36o3lSGECif12gFkC1mf1RIYI7hCntAWBBjGAcy9I1UiNnqwrG/VEYycwWUPfj28G x8AInwH3tKYwpWjoA2WS+P6JMcaf+PlnsAG7hLys23on04fpGAQqqrjxnpZqXacXZnVF B+DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Ax6goS4m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id si7-20020a17090b528700b0027d088ae385si2397646pjb.96.2023.11.30.15.58.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 15:58:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Ax6goS4m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 673FA82F9165; Thu, 30 Nov 2023 15:58:43 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377331AbjK3X6a (ORCPT + 99 others); Thu, 30 Nov 2023 18:58:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377294AbjK3X63 (ORCPT ); Thu, 30 Nov 2023 18:58:29 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8F16133; Thu, 30 Nov 2023 15:58:35 -0800 (PST) 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 3AUNPUni017996; Thu, 30 Nov 2023 23:58:26 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=yguVhYhaPgaT56vaA4oIRBB9Et0MyAZJozsteXHD2Tg=; b=Ax6goS4mIlbn31BCIec2U0RmoMNh9mH/QKGWa1hnT/Qbf+gnVqKijITsItiSUdqniFws /ExBT2lHyfHs/uNoIBE8IgPKjIXoNQRB4xFaFE0WlKmRiY11p1uC1KZhyH2wVoQc3s5a UOZBbgrA10fuOZR4XnK3FeuPZsGz0Y4Ufz9uYD8AScA8k1xr/dG4ARj+j89nlcjIRhxQ BIw2rQJMIMHcLlj5GXnbyNf8TqYYoIvqSDMhfTdo7q3KcOXk5NM1sFzSK9PGZN26b6kV CHEPjeEl2rlR4rzWFiFyUM28jr/UYP9kvminQJL2YFMwzWQWyBeHuTxw7qCW3OVGgtmz zQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3upvm1saq2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Nov 2023 23:58:26 +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 3AUNwPgD027040 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Nov 2023 23:58:25 GMT Received: from [10.71.109.77] (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.40; Thu, 30 Nov 2023 15:58:24 -0800 Message-ID: <5c16e398-4010-718b-d91d-5fc3781b9c0a@quicinc.com> Date: Thu, 30 Nov 2023 15:58:24 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH 10/16] drm/msm/dpu: add support to disable CDM block during encoder cleanup Content-Language: en-US To: Dmitry Baryshkov CC: , Rob Clark , "Sean Paul" , Marijn Suijten , "David Airlie" , Daniel Vetter , , , , , , References: <20230830224910.8091-1-quic_abhinavk@quicinc.com> <20230830224910.8091-11-quic_abhinavk@quicinc.com> From: Abhinav Kumar 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: 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-ORIG-GUID: XJaikXbEGvVeE-34BnxXxws-Mk3ba9PJ X-Proofpoint-GUID: XJaikXbEGvVeE-34BnxXxws-Mk3ba9PJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-30_24,2023-11-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 priorityscore=1501 impostorscore=0 phishscore=0 spamscore=0 malwarescore=0 bulkscore=0 adultscore=0 clxscore=1015 mlxscore=0 mlxlogscore=826 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311300177 X-Spam-Status: No, score=-3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 30 Nov 2023 15:58:43 -0800 (PST) On 8/30/2023 5:14 PM, Dmitry Baryshkov wrote: > On Thu, 31 Aug 2023 at 01:50, Abhinav Kumar wrote: >> >> In preparation of setting up CDM block, add the logic to disable it >> properly during encoder cleanup. >> >> Signed-off-by: Abhinav Kumar >> --- >> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 8 ++++++++ >> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 2 ++ >> 2 files changed, 10 insertions(+) >> >> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c >> index 582680804016..1b1e07292a9e 100644 >> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c >> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c >> @@ -26,6 +26,7 @@ >> #include "dpu_hw_dspp.h" >> #include "dpu_hw_dsc.h" >> #include "dpu_hw_merge3d.h" >> +#include "dpu_hw_cdm.h" >> #include "dpu_formats.h" >> #include "dpu_encoder_phys.h" >> #include "dpu_crtc.h" >> @@ -2097,6 +2098,13 @@ void dpu_encoder_helper_phys_cleanup(struct dpu_encoder_phys *phys_enc) >> phys_enc->hw_pp->merge_3d->idx); >> } >> >> + if (phys_enc->hw_cdm && phys_enc->hw_cdm->ops.bind_pingpong_blk && phys_enc->hw_pp) { >> + phys_enc->hw_cdm->ops.bind_pingpong_blk(phys_enc->hw_cdm, >> + false, phys_enc->hw_pp->idx); > > But it was already bound in the cdm->enable, wasn't it? > This is disable. I think you missed the "false" parameter. > Also the update_pending_flush_cdm should be called even for DPU < 5.0, > where there should be no bind_pingpong_blk callback. > Ack. This is a good catch! >> + if (phys_enc->hw_ctl->ops.update_pending_flush_cdm) >> + phys_enc->hw_ctl->ops.update_pending_flush_cdm(phys_enc->hw_ctl); >> + } >> + >> if (dpu_enc->dsc) { >> dpu_encoder_unprep_dsc(dpu_enc); >> dpu_enc->dsc = NULL; >> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h >> index 24dbc28be4f8..510c1c41ddbc 100644 >> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h >> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h >> @@ -150,6 +150,7 @@ enum dpu_intr_idx { >> * @hw_pp: Hardware interface to the ping pong registers >> * @hw_intf: Hardware interface to the intf registers >> * @hw_wb: Hardware interface to the wb registers >> + * @hw_cdm: Hardware interface to the CDM registers >> * @dpu_kms: Pointer to the dpu_kms top level >> * @cached_mode: DRM mode cached at mode_set time, acted on in enable >> * @enabled: Whether the encoder has enabled and running a mode >> @@ -178,6 +179,7 @@ struct dpu_encoder_phys { >> struct dpu_hw_pingpong *hw_pp; >> struct dpu_hw_intf *hw_intf; >> struct dpu_hw_wb *hw_wb; >> + struct dpu_hw_cdm *hw_cdm; >> struct dpu_kms *dpu_kms; >> struct drm_display_mode cached_mode; >> enum dpu_enc_split_role split_role; >> -- >> 2.40.1 >> > >