Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10679708rwr; Fri, 12 May 2023 11:16:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4LQP2eLU5ZmuO/H2qzo4dBSDyA/cPxQWfx3yI35VlbXoRrpyLdj/Qq5qCCFflbSZLYfDGe X-Received: by 2002:a05:6a20:914c:b0:103:f331:cee9 with SMTP id x12-20020a056a20914c00b00103f331cee9mr8016380pzc.24.1683915383028; Fri, 12 May 2023 11:16:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683915383; cv=none; d=google.com; s=arc-20160816; b=nOnxbBFon1pjV695R6XGjlsaRDH6JtFtZQPfTy1bBIv3Ol+zxGiVEVwZ8SJCrgAyAy qZGOu9L2WMi4TcwigwAn3nBAyas5Id+Cnr7UDznDN8g6ILWM9o0/FPqTQ31uKneK56PP A7XGMWs1+pvhtDnOgRaZCxWjMNMRPphMsxW0jsbTHeEWTkn7XVzf66+7x1Hp6/tUi5f1 tG/CSFITu6fwwfGmF8m80LX+gV9xTOF6D4ULMMd1o5/kE9TiWgtipmW2QyQIdJVtvOkK FC0o4xWCeZqvAsKkcfqkxhqnRHFcIC0+ELby2NTAs0sz0osTb4FeuZSBr84vyE21F8Mb uVNg== 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=DAW3UKWUTnYGMk6Lajt3CoeP6fUhTrBadYe58/Z/QNo=; b=ufUEewt5u6LlXEniPlJn7SayBhdbW0FIh5ixgprNhbBEd+8bvhFnH0c9E7OY2rPX7O OFrlj+p+guI/MMdC2olTzT5aswk25WHAcfhDA3zf6bQbtCqW/1Ddu6KCWSw+glYpFiyr 1DBFU1VrGjT9tuMNsMOkXPSxJ8DqzK3dOxe9jO7IBdE5sRcHMPO3cns6SYIWQB18CgOp F/3xh7ABiuNIdIt6hwzqYfYmlb4XH7VX6fAm/YBQPY5h9gNXkrbFj3LNCvS5ibWgOSxI eU4TLXyqr9MUMT3EVk4npH4bCi2rm+JJC2bA7p2ORz46ZzfFIVNbqhgnFUZhpA+jILrX 8A+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Y3g+rl7X; 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 k191-20020a6384c8000000b0053073e45b5asi4759289pgd.187.2023.05.12.11.16.10; Fri, 12 May 2023 11:16:23 -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=Y3g+rl7X; 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 S238150AbjELSAx (ORCPT + 99 others); Fri, 12 May 2023 14:00:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237708AbjELSAt (ORCPT ); Fri, 12 May 2023 14:00:49 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44E73E57; Fri, 12 May 2023 11:00:46 -0700 (PDT) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34CEOZPG027065; Fri, 12 May 2023 18:00:38 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=DAW3UKWUTnYGMk6Lajt3CoeP6fUhTrBadYe58/Z/QNo=; b=Y3g+rl7Xwox15uZ+v1A/0GlK8zTFrQF/5zQTAlXoLiYcrt5P6T+yjpKZg/Ueout7NFyP +d9kG4ZZ13Zu5cCxw1HQHrcn01QLZwpKq8cVkwRRjvZLkV4TXxmjtBNrS2hdhUYG88YR SW5M1pQtUKlgC4/DOId5VbwMIaQjj9wHaZJAteAd0teFPqB1cxyyzyfXtJiD1cneTBK/ DalkawmF/htZFyb/+P3waBdANc8tk3bMV6uNJsbj8y9tdf1n4quDJsyTpmEA5bOBN/Fe tGL1KJ8CUvcPfyUvOpXJhUAN+A4+rzlE/JvEdy66WEAOA6baUg5i8APqXXXG0QKkVZRE UQ== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qhpsdrj0x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 May 2023 18:00:37 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 34CI0a8u024841 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 May 2023 18:00:36 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; Fri, 12 May 2023 11:00:35 -0700 From: Kuogee Hsieh To: , , , , , , , , , , CC: Kuogee Hsieh , , , , , , , Subject: [PATCH v8 2/8] drm/msm/dpu: add DPU_PINGPONG_DSC feature bit for DPU < 7.0.0 Date: Fri, 12 May 2023 11:00:17 -0700 Message-ID: <1683914423-17612-3-git-send-email-quic_khsieh@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1683914423-17612-1-git-send-email-quic_khsieh@quicinc.com> References: <1683914423-17612-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: 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: 6jxoMItPJm7NHlpSSPGnYZtiTexsq1YQ X-Proofpoint-ORIG-GUID: 6jxoMItPJm7NHlpSSPGnYZtiTexsq1YQ 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_10,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 mlxscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 suspectscore=0 phishscore=0 priorityscore=1501 mlxlogscore=955 bulkscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305120150 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 requires the PINGPONG block to be involved during DSC setting up. Since DPU >= 7.0.0, enabling and starting the DSC encoder engine was moved to INTF with the help of the flush mechanism. Add a DPU_PINGPONG_DSC feature bit to restrict the availability of dpu_hw_pp_setup_dsc() and dpu_hw_pp_dsc_{enable,disable}() on the PINGPONG block to DPU < 7.0.0 hardware, as the registers are not available [in the PINGPONG block] on DPU 7.0.0 and higher anymore. Add DPU_PINGPONG_DSC to PINGPONG_SDM845_MASK, PINGPONG_SDM845_TE2_MASK and PINGPONG_SM8150_MASK which is used for all DPU < 7.0 chipsets. changes in v6: -- split patches and rearrange to keep catalog related files at this patch changes in v7: -- rewording commit text as suggested at review comments Signed-off-by: Kuogee Hsieh --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 6 +++--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c index 82b58c6..78e4bf6 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c @@ -76,13 +76,13 @@ (BIT(DPU_DIM_LAYER) | BIT(DPU_MIXER_COMBINED_ALPHA)) #define PINGPONG_SDM845_MASK \ - (BIT(DPU_PINGPONG_DITHER) | BIT(DPU_PINGPONG_TE)) + (BIT(DPU_PINGPONG_DITHER) | BIT(DPU_PINGPONG_TE) | BIT(DPU_PINGPONG_DSC)) #define PINGPONG_SDM845_TE2_MASK \ - (PINGPONG_SDM845_MASK | BIT(DPU_PINGPONG_TE2)) + (PINGPONG_SDM845_MASK | BIT(DPU_PINGPONG_TE2) | BIT(DPU_PINGPONG_DSC)) #define PINGPONG_SM8150_MASK \ - (BIT(DPU_PINGPONG_DITHER)) + (BIT(DPU_PINGPONG_DITHER) | BIT(DPU_PINGPONG_DSC)) #define CTL_SC7280_MASK \ (BIT(DPU_CTL_ACTIVE_CFG) | \ diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h index 6ee48f0..dc0a4da 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h @@ -144,7 +144,8 @@ enum { * @DPU_PINGPONG_TE2 Additional tear check block for split pipes * @DPU_PINGPONG_SPLIT PP block supports split fifo * @DPU_PINGPONG_SLAVE PP block is a suitable slave for split fifo - * @DPU_PINGPONG_DITHER, Dither blocks + * @DPU_PINGPONG_DITHER Dither blocks + * @DPU_PINGPONG_DSC PP ops functions required for DSC * @DPU_PINGPONG_MAX */ enum { @@ -153,6 +154,7 @@ enum { DPU_PINGPONG_SPLIT, DPU_PINGPONG_SLAVE, DPU_PINGPONG_DITHER, + DPU_PINGPONG_DSC, DPU_PINGPONG_MAX }; -- 2.7.4