Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3643296rwi; Wed, 12 Oct 2022 05:06:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4TYjA/4iVJBmH6XF9Whf6xCzofToNwFUF3CnxuRpwh7L0d3WODa0bwOOCbwAQr4S2zhgOU X-Received: by 2002:a05:6402:35cf:b0:45b:a8af:1494 with SMTP id z15-20020a05640235cf00b0045ba8af1494mr21024102edc.415.1665576389738; Wed, 12 Oct 2022 05:06:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665576389; cv=none; d=google.com; s=arc-20160816; b=DXwk9l/lU8sfqGD8CEenkgVG6vxAx8yrG/dr6qDunRdlV8Cl3LQ3fybf2c8RpYSwlV z37DJLp37Urw58iqIuPlzRFnlMFCwgz5ODr3EDhpzoYBpKUO/UT2ZvxbME0SVTw6l9+w lHMJM7HOus0aEMp/inN8YCprPFpeLWFqdPE8W+cpBnNf21ctibWx2mONC1bQAMM6Dhrh 6SkS6D4iGaJGL6qMxxuJjl1I1zAKUtImtl/FPTiGwFs4U9HPaUqWUMi7bdeSInpf3QK8 EFKUOKjq9SSsAXYASII1UoeUKyZF0l9S7tXMrv7ShVyOGOrAZdLlWcqocnYHp/ghX8tc FbAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=vEkBOleL8iFY4g03Tl+wP1D4x2KBIqDkQD9kz2YzgOU=; b=IKaQFcSBid7movc0qEWl90Q9xt31cg5IMr0wMRzGuSAIfruv51sZnCgpjQxXORIJx2 9TP1B7FaPEtiZAqQzKoEV+3C6+w40IVpmq6fpiiqlgnYTG/SfkmFsalHFxysPB3WBARx /PsPX3NChv6RpQyhRo6wbmvsAaQvtLmdB96KIrFl6tBPda0nw8Jpsplby/8HnE7vjtTe hTBMOu99JWGFPAm5zR5ZsETG+J6+jdzYgISW8dga/dpveyyNeBnQz6N8pmfTjrH546Tn mn0mUmBhygjkhKqeRKt11G5eRC2MkZBBnPLZZq6OlZszikBTllMNem8x19uxs2ltH/4F OlWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=WedIlL5O; 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 ga41-20020a1709070c2900b007824b85978asi18498401ejc.81.2022.10.12.05.05.40; Wed, 12 Oct 2022 05:06:29 -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=WedIlL5O; 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 S229936AbiJLMDn (ORCPT + 99 others); Wed, 12 Oct 2022 08:03:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229627AbiJLMC6 (ORCPT ); Wed, 12 Oct 2022 08:02:58 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AC85A4BA1; Wed, 12 Oct 2022 05:02:56 -0700 (PDT) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29C8doYA004902; Wed, 12 Oct 2022 12:02:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=qcppdkim1; bh=vEkBOleL8iFY4g03Tl+wP1D4x2KBIqDkQD9kz2YzgOU=; b=WedIlL5OK/o8dLfaz2q6H1Hyt96PTEZkjSfbPMt5R2Zbb66rX8GIB6VNGgKWqyOHvbLD JXYbk2RGM6mVWHJdKP4Yn/LzlQuW7L5k8yVQKI4ILq1uz8vgGzZt/NfjDBIl0oseHgMa bvuabxZPhgqYtQ/XlXcVTK5abLwYyJWQtopGJiq5ZrT9iGYhtC6VKGqHaR5J34KWN3lP PU014mfeqT0AegfOrF1j6O6OOWQZqltDJ2i57Nz14ux72sGb3xVKj6PoNiTYbsTpZqv4 DJNoG7FSaRINW0TxPDK+JK+jxF8h+ZzJGKzQokVXJ6x7Ra6O92p1ZQV43HwODPnCpV5N vg== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3k5t8r0knk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Oct 2022 12:02:53 +0000 Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 29CC2luO026864; Wed, 12 Oct 2022 12:02:49 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 3k3jpu0t2t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 12 Oct 2022 12:02:49 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 29CC2mN3026904; Wed, 12 Oct 2022 12:02:48 GMT Received: from vpolimer-linux.qualcomm.com (vpolimer-linux.qualcomm.com [10.204.67.235]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTP id 29CC2m5k026875; Wed, 12 Oct 2022 12:02:48 +0000 Received: by vpolimer-linux.qualcomm.com (Postfix, from userid 463814) id F36253EEA; Wed, 12 Oct 2022 17:32:46 +0530 (IST) From: Vinod Polimera To: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org Cc: Vinod Polimera , linux-kernel@vger.kernel.org, robdclark@gmail.com, dianders@chromium.org, swboyd@chromium.org, quic_kalyant@quicinc.com, dmitry.baryshkov@linaro.org, quic_khsieh@quicinc.com, quic_vproddut@quicinc.com, quic_bjorande@quicinc.com, quic_aravindh@quicinc.com, quic_abhinavk@quicinc.com, quic_sbillaka@quicinc.com Subject: [PATCH v8 09/15] drm/msm/disp/dpu: use atomic enable/disable callbacks for encoder functions Date: Wed, 12 Oct 2022 17:32:33 +0530 Message-Id: <1665576159-3749-10-git-send-email-quic_vpolimer@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1665576159-3749-1-git-send-email-quic_vpolimer@quicinc.com> References: <1665576159-3749-1-git-send-email-quic_vpolimer@quicinc.com> X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: Qol7OSfH_GEY4j37PQFAE_oXo_XCjlZ_ X-Proofpoint-ORIG-GUID: Qol7OSfH_GEY4j37PQFAE_oXo_XCjlZ_ 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_06,2022-10-12_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 adultscore=0 impostorscore=0 phishscore=0 clxscore=1015 suspectscore=0 spamscore=0 mlxlogscore=875 lowpriorityscore=0 malwarescore=0 priorityscore=1501 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210120079 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE 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 Use atomic variants for encoder callback functions such that certain states like self-refresh can be accessed as part of enable/disable sequence. Signed-off-by: Kalyan Thota Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index d05b353..7e35560 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -1167,7 +1167,8 @@ void dpu_encoder_virt_runtime_resume(struct drm_encoder *drm_enc) mutex_unlock(&dpu_enc->enc_lock); } -static void dpu_encoder_virt_enable(struct drm_encoder *drm_enc) +static void dpu_encoder_virt_atomic_enable(struct drm_encoder *drm_enc, + struct drm_atomic_state *state) { struct dpu_encoder_virt *dpu_enc = NULL; int ret = 0; @@ -1203,7 +1204,8 @@ static void dpu_encoder_virt_enable(struct drm_encoder *drm_enc) mutex_unlock(&dpu_enc->enc_lock); } -static void dpu_encoder_virt_disable(struct drm_encoder *drm_enc) +static void dpu_encoder_virt_atomic_disable(struct drm_encoder *drm_enc, + struct drm_atomic_state *state) { struct dpu_encoder_virt *dpu_enc = NULL; int i = 0; @@ -2378,8 +2380,8 @@ static void dpu_encoder_frame_done_timeout(struct timer_list *t) static const struct drm_encoder_helper_funcs dpu_encoder_helper_funcs = { .atomic_mode_set = dpu_encoder_virt_atomic_mode_set, - .disable = dpu_encoder_virt_disable, - .enable = dpu_encoder_virt_enable, + .atomic_disable = dpu_encoder_virt_atomic_disable, + .atomic_enable = dpu_encoder_virt_atomic_enable, .atomic_check = dpu_encoder_virt_atomic_check, }; -- 2.7.4