Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7943336rwr; Wed, 10 May 2023 15:14:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4hRjhWE+rUGnAwwbKQlPvWryYDBrbtp4t7to/nPiTITPATHustrqpcKj8ibTa1ATGoJruu X-Received: by 2002:a17:90b:4b07:b0:234:31f3:e00f with SMTP id lx7-20020a17090b4b0700b0023431f3e00fmr19141373pjb.43.1683756883105; Wed, 10 May 2023 15:14:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683756883; cv=none; d=google.com; s=arc-20160816; b=vqyE3uIPLGbxdnfp3Hfjg7PvEjpHdiF5aFmcrm2+aP4QX3rpvrW050wnYNjqrsPLRD VX7eGDtb8/Aute7Xb9qpu67FduHOEWHsi1wgExRzrW4+YIinOIsLgiJ0axx6ynhf9RMe SeQiK9DlRbjcVaT3arcLvz5Bqjv76RyrdgohfgmguJRWPGmNk2EnVm9D44Wjes42bXRZ LfSKJ4Rc5ouj3s/bvnAcbqeEgciO3rCPGmhOUw4GEISacC2Rj2L/xvtnoQRgQ8rYk8+a +bLdZLILdc3zn4Ds96yqsfQTxmAFsmmIDzF67nAhBjuO5RcEssUxnXGghx7JaV0vEytC nLqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=/U2fsbWjnF32tH67ClcskZwNYgHTBa0eHPFdIqRnso0=; b=FA9F6uG8sNUEx1Fg2kl+vTqcxxyM3y2B+ZVxBvc/McCJMhuqSUehFWq6+CS8zDQHde ti0uL3HEYKNO/VoaqtSFsSf2rw9PdkPBMIdAn4r5+NLtxjT0r9fSWy4EFR+aPQmqJFz1 U0RazvXsUN/s2rKLlXrKoDsfdYKUkrzHiLgsjxDF+g3RBaMi0Kcnj/HPbrA3rqfZIGMv shR9XXUieV7KLZL09Dqyi8etZ/J+eLSzTx9ncih+TF3+Qxe3Cz/GJ2sidd/ftFlUndXE ukrE6WcLZ7g1wKLBvegZT5n7AGGqbF5h+fvIx8nF3LlBXBwolUR2Skm/ad/NCa64CigS izYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=QsI+C2pW; 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 u6-20020a17090adb4600b002474fcf3bdasi14936505pjx.146.2023.05.10.15.14.31; Wed, 10 May 2023 15:14:43 -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=QsI+C2pW; 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 S236339AbjEJWIK (ORCPT + 99 others); Wed, 10 May 2023 18:08:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236313AbjEJWIC (ORCPT ); Wed, 10 May 2023 18:08:02 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58B04558E; Wed, 10 May 2023 15:08:00 -0700 (PDT) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34ALBD3n007015; Wed, 10 May 2023 22:07: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 : mime-version : content-type; s=qcppdkim1; bh=/U2fsbWjnF32tH67ClcskZwNYgHTBa0eHPFdIqRnso0=; b=QsI+C2pWyLFwN7XtpzbdaghlR9bl6I7h0AChasCCyDhSX0GyW+nRGGA7RXi3pz+tL/Av DzA4JxPzhB2O35x2sxT9dyAG4+1rGFA+MOEb2wBoQdHdsrkJKpsPPyr4d/uMIGV3gU0s sFegWgsShcYgnE6gKS02nd0IDuQl7ZewVxO2fOmIlZeS3uTJb2vK8OUBnl+p4wS1ueVH iRFLVn7uzIKMOIP7NpaVhZV63TPMsGCWAxAx0gcmXW9HqqwO2P6HltJmG2Ps4KTWBXoG mUBjY+wb2CmEGjLP2Jzay3eATFpLwCOFrNuvgIt0RxbuxE/HOTZYTfPA+w21eTUMNxVV EQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qgett0kny-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 May 2023 22:07:52 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 34AM7peh031889 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 May 2023 22:07:51 GMT Received: from khsieh-linux1.qualcomm.com (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; Wed, 10 May 2023 15:07:51 -0700 From: Kuogee Hsieh To: , , , , , , , , , , CC: Kuogee Hsieh , , , , , , , Subject: [PATCH v6 3/8] drm/msm/dpu: test DPU_PINGPONG_DSC bit before assign DSC ops to PINGPONG Date: Wed, 10 May 2023 15:07:28 -0700 Message-ID: <1683756453-22050-4-git-send-email-quic_khsieh@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1683756453-22050-1-git-send-email-quic_khsieh@quicinc.com> References: <1683756453-22050-1-git-send-email-quic_khsieh@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) 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: ibEqTl5OiHi0HTfR85CNSeThmKYiGd7v X-Proofpoint-GUID: ibEqTl5OiHi0HTfR85CNSeThmKYiGd7v 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-10_04,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 priorityscore=1501 bulkscore=0 impostorscore=0 mlxscore=0 lowpriorityscore=0 spamscore=0 clxscore=1015 phishscore=0 adultscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305100182 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 DPU < 7.0.0 has DPU_PINGPONG_DSC feature bit set to indicate it requires both dpu_hw_pp_setup_dsc() and dpu_hw_pp_dsc_{enable,disable}() to be executed to complete DSC configuration if DSC hardware block is present. Hence test DPU_PINGPONG_DSC feature bit and assign DSC related functions to the ops of PINGPONG block accordingly if DPU_PINGPONG_DSC bit is set. changes in v6: -- split patches and keep the function file handles DPU_PINGPONG_DSC bit at this patch Signed-off-by: Kuogee Hsieh --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c index 79e4576..e7f47a4 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c @@ -295,6 +295,12 @@ static void _setup_pingpong_ops(struct dpu_hw_pingpong *c, c->ops.enable_dsc = dpu_hw_pp_dsc_enable; c->ops.disable_dsc = dpu_hw_pp_dsc_disable; + if (test_bit(DPU_PINGPONG_DSC, &features)) { + c->ops.setup_dsc = dpu_hw_pp_setup_dsc; + c->ops.enable_dsc = dpu_hw_pp_dsc_enable; + c->ops.disable_dsc = dpu_hw_pp_dsc_disable; + } + if (test_bit(DPU_PINGPONG_DITHER, &features)) c->ops.setup_dither = dpu_hw_pp_setup_dither; }; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project