Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6887260rwn; Tue, 13 Sep 2022 10:19:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ILu/RaJO9LtpBZmbffRhIyFoMe8ICfE1wf3XHsCMDwe+qbI6ueSr6dZV4h4qvL4cFG/2o X-Received: by 2002:a17:90b:38cb:b0:200:aaa6:6428 with SMTP id nn11-20020a17090b38cb00b00200aaa66428mr302524pjb.47.1663089564844; Tue, 13 Sep 2022 10:19:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663089564; cv=none; d=google.com; s=arc-20160816; b=AbshIdJ3km8GepqLtE4ZeQMPLM6ktnAgrdYs1YgbGcJlYHH8fFP+FEyFMRZF3JcDdg XQZEShVx/wIIDHJc2sTbq0NGYVQ+anqKja/9RAS8wibJXo2VXYVSS7zni0Jyjbt4RVsB Sf1aFXtNeS6lkAna6yq4H1fzPzjp0p56vkWzNVj41e5SIaypl66tOFh6Fte2Ttt/rMhr vXB1M3BnaSj+8whKpRAFEfZYu2bsCqqUpSgHKVmT6Pd/KsyDF7zf//OmZxleHSFpihiK uXUhQ7G+TmM3BpxjB3ESymnJ92b65F1go3ZdvHkkhh4RD+Ar5OGathytXYtb+meRvm8c cB2Q== 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=4nlqORRt9b3DsraZrJNija+m8ktZiw/UtRuAhAf6CDc=; b=nKGs0n6dR+nOF3XoCRDQwoFEj7TAB/dR0tdez+T+Ap9D0yzofmSzx165CsfNJuX6P7 y2RNQNwJKsWBF8rxUVa+nzBjxmvj4SKKhkI5sqhWMPeb9MmzD7RCU7VbwFuFfLlNj9cK y0gUnwEgnCSY9TID/3fw0FZUs5+8nH7EuJDW/Xx/eTavlgzUAADRpW3MJ/Wgdyn3juiz Q4Jhd7Q/D9YvvOsPNdJ81/MVhalOyWp67/uwV+OHm0wxsJ5NF3LjZ1tuFrTV1V+ayE5o WVzNA9jnbNm0OtZOQKhQ5tqA8eZSbIAs4u78JtFqtbhF0afe0UIMVxcHxVvw2uqB6VUZ iS7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=oKL3amyy; 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 u13-20020a17090341cd00b0017687e1c8e9si14684333ple.131.2022.09.13.10.19.11; Tue, 13 Sep 2022 10:19:24 -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=oKL3amyy; 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 S232021AbiIMQzX (ORCPT + 99 others); Tue, 13 Sep 2022 12:55:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231990AbiIMQyn (ORCPT ); Tue, 13 Sep 2022 12:54:43 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBF871EAF4; Tue, 13 Sep 2022 08:47:31 -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 28DDui8c024936; Tue, 13 Sep 2022 14:56:31 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=4nlqORRt9b3DsraZrJNija+m8ktZiw/UtRuAhAf6CDc=; b=oKL3amyyXlb/jJUlP5rMG244QJuVCbTW1GVALO2DyhPtrCTyKBNGCEbbNb3dtmEMBuLb Wmgc06RcS/yjR/6jSR4a0iABJ63gEwgFIq6EzrS7ETlTEsPwE9bf5Crs2OVdOEVTOH/C kvD2clIjcKaKzkz2VAAAl6a4GRS389oktjpU2dXP1vIEsiTt87+r8orL/JC2HjVFaVZD Vhn0SkGB05Cmf/AghbviH9YXSE9XO0jBHMhDeAnmi4o5YsoAMLp/fHxG9cylCs2SFdhw 31J9tc4ETSRjMNSFrG4uSTx7JqUUbz6ibRfNY9Ko9o3vOwZVPfk73R66BMlotRh9CjNY 9g== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jjnju9vpk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Sep 2022 14:56:31 +0000 Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 28DEpR1V017971; Tue, 13 Sep 2022 14:51:27 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTPS id 3jh46m5ds1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 13 Sep 2022 14:51:27 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 28DEpQGf017856; Tue, 13 Sep 2022 14:51:27 GMT Received: from vpolimer-linux.qualcomm.com (vpolimer-linux.qualcomm.com [10.204.67.235]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 28DEpQKB017894; Tue, 13 Sep 2022 14:51:27 +0000 Received: by vpolimer-linux.qualcomm.com (Postfix, from userid 463814) id DC5A14044; Tue, 13 Sep 2022 20:21:25 +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 v7 09/15] drm/msm/disp/dpu: use atomic enable/disable callbacks for encoder functions Date: Tue, 13 Sep 2022 20:21:10 +0530 Message-Id: <1663080676-12936-10-git-send-email-quic_vpolimer@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1663080676-12936-1-git-send-email-quic_vpolimer@quicinc.com> References: <1663080676-12936-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-ORIG-GUID: 1IVV-D-dQmG38CDiGNnMm_JXEho6IFSg X-Proofpoint-GUID: 1IVV-D-dQmG38CDiGNnMm_JXEho6IFSg X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-13_07,2022-09-13_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 bulkscore=0 spamscore=0 phishscore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 malwarescore=0 priorityscore=1501 mlxlogscore=910 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209130068 X-Spam-Status: No, score=-2.5 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,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 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 0c7d8b5..9cb2542 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; @@ -2387,8 +2389,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