From nobody Tue Dec 2 00:46:24 2025 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F1F6C2E8E12 for ; Tue, 25 Nov 2025 06:49:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764053401; cv=none; b=I75c6TPHQAOTJHo23tN3ccbqWTnj3QuwRgenhdU4M1HuYDx/OFiG1R7T7qRh2fumU+PhwuPctsBmmUdif5v3QzwlZwxvaQOCvufUvDuN7ijqaH2GQf/y+U8IBRlfnJEvla+Rz8avkv4ULcaQN0ZxqnZwfMbeaASKlPkJQexGHSE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764053401; c=relaxed/simple; bh=TNDq8mkLMSVU3Da1mrHQxKNiCXtWYOQqjgOYB21tllM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oCpBiNocTYNscbkBB+W1aNv87HJqnuUBWdlwH54nxiQyabGLRE2Buv4z+2fsEPPcTJLBTUIVYeAituuk32S+x72Zl7Is2eykQP85V1DBpkOBJFoL0o1s7o6IEU/nsRipdmqd79nyMkpVRNX9n0Z7cs+8+sDQCldCc0z3gR0Z2ZM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=etfBD5+5; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=jVdGDhi5; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="etfBD5+5"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="jVdGDhi5" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5AP2gkj51688365 for ; Tue, 25 Nov 2025 06:49:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=XxK3gfAsvNp 9xX3RxeJTwwOUyerwBQHdHbIQLFQrL8Q=; b=etfBD5+5HCI9U7Be72roBIf1P4y SZfKmbtYXWEFUmvkxIaQ/a5ydYgsTD7fbBmjqBaNXL2pSLa3jJCMnJMDlcHFat7e 970EDE4kmi7dW/eLFbZ6ezaA3BNo9GfsXggeaZ6CGj1ycLplcrZ1ccfC1IzYL5Fu TrGhoG0N6y7ZvnP8ry+HIPcFzTXAnHokED9sIGgiNM6zKY5Wn/Gx4e2hagRcpGeE TJKL/G9n8XL0ziEKJqlTgF5dZfv3JTWdmPWedhu3JC6dufsySRCggQI+gWYJnjnI 5N5VJ7mV0gLDab3VAYY12XbTUDYZvdn2BzY+o6LDxPGN/BNzxtH3o4ONY+g== Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4amrv6aj6k-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 25 Nov 2025 06:49:58 +0000 (GMT) Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-8823f71756dso59853786d6.3 for ; Mon, 24 Nov 2025 22:49:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764053397; x=1764658197; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XxK3gfAsvNp9xX3RxeJTwwOUyerwBQHdHbIQLFQrL8Q=; b=jVdGDhi5rmSlplYJ/viS7/BgMdAx4o0pU72Wz6inYxw2pIIyV3H9DxbFO4j8pKLs6p Ju56B5jR8/FLnRxT8pFxBtgAMa5/KqPl6U61B8/LxQbJQhU9AASdooVKPPfFE26pTjHo LTcNbIxiUFdzDEuIGkqz4nh7FhK2l/PdReHYVheBmFUUoJ8+mHU6+NoYbOwhDKuSI0Wp dkckqTMxWELnz5r560kv5pyOelcp54DhnXnImuSSAA2ipw0H1o5Kjt1XIoQdULjPFJxu SaP0pXuMAt7Wb/s4QEKsccEBdak4AUgsrzJrCcB9sAMTxDxzhFLyjUKtyo6B/5uuhtGI jGiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764053397; x=1764658197; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=XxK3gfAsvNp9xX3RxeJTwwOUyerwBQHdHbIQLFQrL8Q=; b=L5v9G7guycNGB7wCq0CFT7HqowU/lYKecZEsOHY2ZLu+fRPw07xZe5Cqz7C35QWuDg IR3htnIGI3081ZS0i0i/CjgsGQw2icjbwRk4KDhGtRiNpxwa2WkUKTaJRX1kpaPC2HC1 Fv86oy762tTN2WjoaxEy9pdXR1Cr/1nfeVcxKwaj6G9P+/lV1M9SuD9MoYl5Lwt5kUlW ESLYHTsBjtoN4C0tyL74IEXLAm6aG0UULsKku5y+RREu5rBw7Pl11mmZrkq4LsUdVZc3 cM471c/YpFLT9NQWCpMnm+NhgS46DLNETtu22DPj92X5TavnolP2sxfV8IvLilJcOc1V q4iw== X-Forwarded-Encrypted: i=1; AJvYcCWdHhxRVkGN4XtGwXGwzYky+oyiwkOR/m3Y8Y65HxE5xtxNmpsOk4+vBf5kVeoZC1TbO1dXXvGrHULyBqY=@vger.kernel.org X-Gm-Message-State: AOJu0Yz4Px+94ylf5J6Z6w+Z7ER6tBkIt6JtyV0aBYW7aST+6IF4owXS rQk388T858NlaBVtjfRCBDqX92hQSe6rlA9hBC5OHGJH9WoVl76CR6YWbzVM5Z/oMHUGqkvuGbH cRXPluL0Ws/ecq5fkkl/9urkF/nDXhM8+f+6pC28bgqRvhl9JGuOPRiRUDA6gQpLYwuE= X-Gm-Gg: ASbGnctQwyMR3lRJzpdWXWetAohIctd6ZKzhzz0R3FSEIT8z/LglIfAuZGcnuuPTnGE yIqjzIZ1hZwcQ46I3qr0HIwh+oJoJ/ghuFnVEAZ4ZIPdRzn9kbCKr0P1s/gOLjPuOVKkUF6VsLZ 6xTdUbqSf2q73AB4Y6JxGofZLgqXcspH0ua8ULU201UxYutPNFqZC9hBRWHgLxqZnPCCAh+MQOA X195JREeKO6IbXYSa76LrFk6ftih1bGbQFMP6Rrn/kIoo+iPsONo6OFPUVtn5yNMqj1HZO+3JlU Q9cLz2/54kke7i+IRb7JFhagGPRldZO5WO+ceQaiceivRD0CeB9080MZJH+p5JxhkgxMc3+9cUm plkhN3OTZ29S9/tlMTeEIWZ2+D4c8g4BtWEt6tpoyiU1DsZp/iwJt5odmMjAXrGdLSjtIHIU= X-Received: by 2002:a05:622a:19a4:b0:4ed:e064:1638 with SMTP id d75a77b69052e-4efbda9015fmr21240741cf.40.1764053396891; Mon, 24 Nov 2025 22:49:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IGGX45VGw51UkNg2dhBcwFHvisr394hJNXjtMaVqPVKQtS9cNj7et3kANkvVHWgmGE8kyjz1g== X-Received: by 2002:a05:622a:19a4:b0:4ed:e064:1638 with SMTP id d75a77b69052e-4efbda9015fmr21240561cf.40.1764053396355; Mon, 24 Nov 2025 22:49:56 -0800 (PST) Received: from yuanjiey.qualcomm.com (Global_NAT1_IAD_FW.qualcomm.com. [129.46.232.65]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4ee48e3edb9sm100645971cf.22.2025.11.24.22.49.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Nov 2025 22:49:55 -0800 (PST) From: yuanjie yang To: robin.clark@oss.qualcomm.com, lumag@kernel.org, abhinav.kumar@linux.dev, sean@poorly.run, marijn.suijten@somainline.org, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, quic_mkrishn@quicinc.com, jonathan@marek.ca, quic_khsieh@quicinc.com, neil.armstrong@linaro.org, yuanjie.yang@oss.qualcomm.com Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, tingwei.zhang@oss.qualcomm.com, aiqun.yu@oss.qualcomm.com, Yongxing Mou Subject: [PATCH v2 10/10] drm/msm/dpu: Add support for Kaanapali DPU Date: Tue, 25 Nov 2025 14:47:58 +0800 Message-Id: <20251125064758.7207-11-yuanjie.yang@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251125064758.7207-1-yuanjie.yang@oss.qualcomm.com> References: <20251125064758.7207-1-yuanjie.yang@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI1MDA1NCBTYWx0ZWRfX7rr/BeaMy16b 4ohO2CwdeamPIojD+44ynEVztJg8lugbEdUpwjvs/UNR2w6awi8A0xbu9kdqfyVMKhYAXBcn6dW KATuS/1L6dopx5/VeRO5gxsYYQwmVDvDTaJpkwuqd5LwJcyD6hESs3Y42AsWb53XcLPrHE4yyfw CRtN4x3+nOPMEcHLMJoGctca5CZiiHHsT4sWK5L/yD9j2F/VIGD1kxcfqWLzXKEcgVrN+BG4Y5Z 9cceWx1Bhohem7dZir5NQx7v01wRn/tHivNSkXtLyi3ffsgLpV9couiKmcC3wVcdwJrj3PLq4o6 X/FY64Y19dOISJXYlDIkicH/kswdSjbAlc91A6NVMq1lrr1GEDUMvNt2Fl4B4UYKbZQw79QQF6C mOBQFXDb4+9fFw7uBj7KFl5EzzLeXg== X-Proofpoint-GUID: nhWqJ1bOdH0JlCViS8KZ3E29EdhJMja- X-Authority-Analysis: v=2.4 cv=f7BFxeyM c=1 sm=1 tr=0 ts=69255196 cx=c_pps a=wEM5vcRIz55oU/E2lInRtA==:117 a=C3Dk8TwHQYyIj7nOf9RCJw==:17 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=iVC9QAuiRl3Xz_40r_EA:9 a=OIgjcC2v60KrkQgK7BGD:22 X-Proofpoint-ORIG-GUID: nhWqJ1bOdH0JlCViS8KZ3E29EdhJMja- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-25_01,2025-11-24_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 phishscore=0 adultscore=0 priorityscore=1501 impostorscore=0 lowpriorityscore=0 suspectscore=0 clxscore=1015 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511250054 Content-Type: text/plain; charset="utf-8" From: Yuanjie Yang Add support for Display Processing Unit (DPU) version 13.0 on the Kaanapali platform. This version introduces changes to the SSPP sub-block structure. Add common block and rectangle blocks to accommodate these structural modifications for compatibility. Co-developed-by: Yongxing Mou Signed-off-by: Yongxing Mou Signed-off-by: Yuanjie Yang Reviewed-by: Dmitry Baryshkov --- .../disp/dpu1/catalog/dpu_13_0_kaanapali.h | 492 ++++++++++++++++++ .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 41 ++ .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 1 + 4 files changed, 535 insertions(+) create mode 100644 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_13_0_kaanapal= i.h diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_13_0_kaanapali.h b/d= rivers/gpu/drm/msm/disp/dpu1/catalog/dpu_13_0_kaanapali.h new file mode 100644 index 000000000000..0b20401b04cf --- /dev/null +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_13_0_kaanapali.h @@ -0,0 +1,492 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +#ifndef _DPU_13_0_KAANAPALI_H +#define _DPU_13_0_KAANAPALI_H + +static const struct dpu_caps kaanapali_dpu_caps =3D { + .max_mixer_width =3D DEFAULT_DPU_OUTPUT_LINE_WIDTH, + .max_mixer_blendstages =3D 0xb, + .has_src_split =3D true, + .has_dim_layer =3D true, + .has_idle_pc =3D true, + .has_3d_merge =3D true, + .max_linewidth =3D 8192, + .pixel_ram_size =3D DEFAULT_PIXEL_RAM_SIZE, +}; + +static const struct dpu_mdp_cfg kaanapali_mdp =3D { + .name =3D "top_0", + .base =3D 0, .len =3D 0x494, + .clk_ctrls =3D { + [DPU_CLK_CTRL_REG_DMA] =3D { .reg_off =3D 0x2bc, .bit_off =3D 20 }, + }, +}; + +static const struct dpu_ctl_cfg kaanapali_ctl[] =3D { + { + .name =3D "ctl_0", .id =3D CTL_0, + .base =3D 0x1f000, .len =3D 0x1000, + .intr_start =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), + }, { + .name =3D "ctl_1", .id =3D CTL_1, + .base =3D 0x20000, .len =3D 0x1000, + .intr_start =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), + }, { + .name =3D "ctl_2", .id =3D CTL_2, + .base =3D 0x21000, .len =3D 0x1000, + .intr_start =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11), + }, { + .name =3D "ctl_3", .id =3D CTL_3, + .base =3D 0x22000, .len =3D 0x1000, + .intr_start =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 12), + }, { + .name =3D "ctl_4", .id =3D CTL_4, + .base =3D 0x23000, .len =3D 0x1000, + .intr_start =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 13), + }, { + .name =3D "ctl_5", .id =3D CTL_5, + .base =3D 0x24000, .len =3D 0x1000, + .intr_start =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 23), + }, +}; + +static const struct dpu_sspp_cfg kaanapali_sspp[] =3D { + { + .name =3D "sspp_0", .id =3D SSPP_VIG0, + .base =3D 0x2b000, .len =3D 0x84, + .features =3D VIG_SDM845_MASK_SDMA, + .sblk =3D &dpu_vig_sblk_qseed3_3_5, + .xin_id =3D 0, + .type =3D SSPP_TYPE_VIG, + }, { + .name =3D "sspp_1", .id =3D SSPP_VIG1, + .base =3D 0x34000, .len =3D 0x84, + .features =3D VIG_SDM845_MASK_SDMA, + .sblk =3D &dpu_vig_sblk_qseed3_3_5, + .xin_id =3D 4, + .type =3D SSPP_TYPE_VIG, + }, { + .name =3D "sspp_2", .id =3D SSPP_VIG2, + .base =3D 0x3d000, .len =3D 0x84, + .features =3D VIG_SDM845_MASK_SDMA, + .sblk =3D &dpu_vig_sblk_qseed3_3_5, + .xin_id =3D 8, + .type =3D SSPP_TYPE_VIG, + }, { + .name =3D "sspp_3", .id =3D SSPP_VIG3, + .base =3D 0x46000, .len =3D 0x84, + .features =3D VIG_SDM845_MASK_SDMA, + .sblk =3D &dpu_vig_sblk_qseed3_3_5, + .xin_id =3D 12, + .type =3D SSPP_TYPE_VIG, + }, { + .name =3D "sspp_8", .id =3D SSPP_DMA0, + .base =3D 0x97000, .len =3D 0x84, + .features =3D DMA_SDM845_MASK_SDMA, + .sblk =3D &dpu_dma_sblk, + .xin_id =3D 1, + .type =3D SSPP_TYPE_DMA, + }, { + .name =3D "sspp_9", .id =3D SSPP_DMA1, + .base =3D 0xa0000, .len =3D 0x84, + .features =3D DMA_SDM845_MASK_SDMA, + .sblk =3D &dpu_dma_sblk, + .xin_id =3D 5, + .type =3D SSPP_TYPE_DMA, + }, { + .name =3D "sspp_10", .id =3D SSPP_DMA2, + .base =3D 0xa9000, .len =3D 0x84, + .features =3D DMA_SDM845_MASK_SDMA, + .sblk =3D &dpu_dma_sblk, + .xin_id =3D 9, + .type =3D SSPP_TYPE_DMA, + }, { + .name =3D "sspp_11", .id =3D SSPP_DMA3, + .base =3D 0xb2000, .len =3D 0x84, + .features =3D DMA_SDM845_MASK_SDMA, + .sblk =3D &dpu_dma_sblk, + .xin_id =3D 13, + .type =3D SSPP_TYPE_DMA, + }, { + .name =3D "sspp_12", .id =3D SSPP_DMA4, + .base =3D 0xbb000, .len =3D 0x84, + .features =3D DMA_CURSOR_SDM845_MASK_SDMA, + .sblk =3D &dpu_dma_sblk, + .xin_id =3D 14, + .type =3D SSPP_TYPE_DMA, + }, { + .name =3D "sspp_13", .id =3D SSPP_DMA5, + .base =3D 0xc4000, .len =3D 0x84, + .features =3D DMA_CURSOR_SDM845_MASK_SDMA, + .sblk =3D &dpu_dma_sblk, + .xin_id =3D 15, + .type =3D SSPP_TYPE_DMA, + }, +}; + +static const struct dpu_lm_cfg kaanapali_lm[] =3D { + { + .name =3D "lm_0", .id =3D LM_0, + .base =3D 0x103000, .len =3D 0x400, + .features =3D MIXER_MSM8998_MASK, + .sblk =3D &sm8750_lm_sblk, + .lm_pair =3D LM_1, + .pingpong =3D PINGPONG_0, + .dspp =3D DSPP_0, + }, { + .name =3D "lm_1", .id =3D LM_1, + .base =3D 0x10b000, .len =3D 0x400, + .features =3D MIXER_MSM8998_MASK, + .sblk =3D &sm8750_lm_sblk, + .lm_pair =3D LM_0, + .pingpong =3D PINGPONG_1, + .dspp =3D DSPP_1, + }, { + .name =3D "lm_2", .id =3D LM_2, + .base =3D 0x113000, .len =3D 0x400, + .features =3D MIXER_MSM8998_MASK, + .sblk =3D &sm8750_lm_sblk, + .lm_pair =3D LM_3, + .pingpong =3D PINGPONG_2, + .dspp =3D DSPP_2, + }, { + .name =3D "lm_3", .id =3D LM_3, + .base =3D 0x11b000, .len =3D 0x400, + .features =3D MIXER_MSM8998_MASK, + .sblk =3D &sm8750_lm_sblk, + .lm_pair =3D LM_2, + .pingpong =3D PINGPONG_3, + .dspp =3D DSPP_3, + }, { + .name =3D "lm_4", .id =3D LM_4, + .base =3D 0x123000, .len =3D 0x400, + .features =3D MIXER_MSM8998_MASK, + .sblk =3D &sm8750_lm_sblk, + .lm_pair =3D LM_5, + .pingpong =3D PINGPONG_4, + }, { + .name =3D "lm_5", .id =3D LM_5, + .base =3D 0x12b000, .len =3D 0x400, + .features =3D MIXER_MSM8998_MASK, + .sblk =3D &sm8750_lm_sblk, + .lm_pair =3D LM_4, + .pingpong =3D PINGPONG_5, + }, { + .name =3D "lm_6", .id =3D LM_6, + .base =3D 0x133000, .len =3D 0x400, + .features =3D MIXER_MSM8998_MASK, + .sblk =3D &sm8750_lm_sblk, + .lm_pair =3D LM_7, + .pingpong =3D PINGPONG_6, + }, { + .name =3D "lm_7", .id =3D LM_7, + .base =3D 0x13b000, .len =3D 0x400, + .features =3D MIXER_MSM8998_MASK, + .sblk =3D &sm8750_lm_sblk, + .lm_pair =3D LM_6, + .pingpong =3D PINGPONG_7, + }, +}; + +static const struct dpu_dspp_cfg kaanapali_dspp[] =3D { + { + .name =3D "dspp_0", .id =3D DSPP_0, + .base =3D 0x105000, .len =3D 0x1800, + .sblk =3D &sm8750_dspp_sblk, + }, { + .name =3D "dspp_1", .id =3D DSPP_1, + .base =3D 0x10d000, .len =3D 0x1800, + .sblk =3D &sm8750_dspp_sblk, + }, { + .name =3D "dspp_2", .id =3D DSPP_2, + .base =3D 0x115000, .len =3D 0x1800, + .sblk =3D &sm8750_dspp_sblk, + }, { + .name =3D "dspp_3", .id =3D DSPP_3, + .base =3D 0x11d000, .len =3D 0x1800, + .sblk =3D &sm8750_dspp_sblk, + }, +}; + +static const struct dpu_pingpong_cfg kaanapali_pp[] =3D { + { + .name =3D "pingpong_0", .id =3D PINGPONG_0, + .base =3D 0x108000, .len =3D 0, + .sblk =3D &kaanapali_pp_sblk, + .merge_3d =3D MERGE_3D_0, + .intr_done =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), + }, { + .name =3D "pingpong_1", .id =3D PINGPONG_1, + .base =3D 0x110000, .len =3D 0, + .sblk =3D &kaanapali_pp_sblk, + .merge_3d =3D MERGE_3D_0, + .intr_done =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9), + }, { + .name =3D "pingpong_2", .id =3D PINGPONG_2, + .base =3D 0x118000, .len =3D 0, + .sblk =3D &kaanapali_pp_sblk, + .merge_3d =3D MERGE_3D_1, + .intr_done =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10), + }, { + .name =3D "pingpong_3", .id =3D PINGPONG_3, + .base =3D 0x120000, .len =3D 0, + .sblk =3D &kaanapali_pp_sblk, + .merge_3d =3D MERGE_3D_1, + .intr_done =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11), + }, { + .name =3D "pingpong_4", .id =3D PINGPONG_4, + .base =3D 0x128000, .len =3D 0, + .sblk =3D &kaanapali_pp_sblk, + .merge_3d =3D MERGE_3D_2, + .intr_done =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 30), + }, { + .name =3D "pingpong_5", .id =3D PINGPONG_5, + .base =3D 0x130000, .len =3D 0, + .sblk =3D &kaanapali_pp_sblk, + .merge_3d =3D MERGE_3D_2, + .intr_done =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 31), + }, { + .name =3D "pingpong_6", .id =3D PINGPONG_6, + .base =3D 0x138000, .len =3D 0, + .sblk =3D &kaanapali_pp_sblk, + .merge_3d =3D MERGE_3D_3, + .intr_done =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 20), + }, { + .name =3D "pingpong_7", .id =3D PINGPONG_7, + .base =3D 0x140000, .len =3D 0, + .sblk =3D &kaanapali_pp_sblk, + .merge_3d =3D MERGE_3D_3, + .intr_done =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 21), + }, { + .name =3D "pingpong_cwb_0", .id =3D PINGPONG_CWB_0, + .base =3D 0x169000, .len =3D 0, + .sblk =3D &kaanapali_pp_sblk, + .merge_3d =3D MERGE_3D_4, + }, { + .name =3D "pingpong_cwb_1", .id =3D PINGPONG_CWB_1, + .base =3D 0x169400, .len =3D 0, + .sblk =3D &kaanapali_pp_sblk, + .merge_3d =3D MERGE_3D_4, + }, { + .name =3D "pingpong_cwb_2", .id =3D PINGPONG_CWB_2, + .base =3D 0x16a000, .len =3D 0, + .sblk =3D &kaanapali_pp_sblk, + .merge_3d =3D MERGE_3D_5, + }, { + .name =3D "pingpong_cwb_3", .id =3D PINGPONG_CWB_3, + .base =3D 0x16a400, .len =3D 0, + .sblk =3D &kaanapali_pp_sblk, + .merge_3d =3D MERGE_3D_5, + }, +}; + +static const struct dpu_merge_3d_cfg kaanapali_merge_3d[] =3D { + { + .name =3D "merge_3d_0", .id =3D MERGE_3D_0, + .base =3D 0x163000, .len =3D 0x1c, + }, { + .name =3D "merge_3d_1", .id =3D MERGE_3D_1, + .base =3D 0x164000, .len =3D 0x1c, + }, { + .name =3D "merge_3d_2", .id =3D MERGE_3D_2, + .base =3D 0x165000, .len =3D 0x1c, + }, { + .name =3D "merge_3d_3", .id =3D MERGE_3D_3, + .base =3D 0x166000, .len =3D 0x1c, + }, { + .name =3D "merge_3d_4", .id =3D MERGE_3D_4, + .base =3D 0x169700, .len =3D 0x1c, + }, { + .name =3D "merge_3d_5", .id =3D MERGE_3D_5, + .base =3D 0x16a700, .len =3D 0x1c, + }, +}; + +/* + * NOTE: Each display compression engine (DCE) contains dual hard + * slice DSC encoders so both share same base address but with + * its own different sub block address. + */ +static const struct dpu_dsc_cfg kaanapali_dsc[] =3D { + { + .name =3D "dce_0_0", .id =3D DSC_0, + .base =3D 0x181000, .len =3D 0x8, + .features =3D BIT(DPU_DSC_NATIVE_42x_EN), + .sblk =3D &sm8750_dsc_sblk_0, + }, { + .name =3D "dce_0_1", .id =3D DSC_1, + .base =3D 0x181000, .len =3D 0x8, + .features =3D BIT(DPU_DSC_NATIVE_42x_EN), + .sblk =3D &sm8750_dsc_sblk_1, + }, { + .name =3D "dce_1_0", .id =3D DSC_2, + .base =3D 0x183000, .len =3D 0x8, + .features =3D BIT(DPU_DSC_NATIVE_42x_EN), + .sblk =3D &sm8750_dsc_sblk_0, + }, { + .name =3D "dce_1_1", .id =3D DSC_3, + .base =3D 0x183000, .len =3D 0x8, + .features =3D BIT(DPU_DSC_NATIVE_42x_EN), + .sblk =3D &sm8750_dsc_sblk_1, + }, { + .name =3D "dce_2_0", .id =3D DSC_4, + .base =3D 0x185000, .len =3D 0x8, + .features =3D BIT(DPU_DSC_NATIVE_42x_EN), + .sblk =3D &sm8750_dsc_sblk_0, + }, { + .name =3D "dce_2_1", .id =3D DSC_5, + .base =3D 0x185000, .len =3D 0x8, + .features =3D BIT(DPU_DSC_NATIVE_42x_EN), + .sblk =3D &sm8750_dsc_sblk_1, + }, { + .name =3D "dce_3_0", .id =3D DSC_6, + .base =3D 0x187000, .len =3D 0x8, + .features =3D BIT(DPU_DSC_NATIVE_42x_EN), + .sblk =3D &sm8750_dsc_sblk_0, + }, { + .name =3D "dce_3_1", .id =3D DSC_7, + .base =3D 0x187000, .len =3D 0x8, + .features =3D BIT(DPU_DSC_NATIVE_42x_EN), + .sblk =3D &sm8750_dsc_sblk_1, + }, +}; + +static const struct dpu_wb_cfg kaanapali_wb[] =3D { + { + .name =3D "wb_2", .id =3D WB_2, + .base =3D 0x16e000, .len =3D 0x2c8, + .features =3D WB_SDM845_MASK, + .format_list =3D wb2_formats_rgb_yuv, + .num_formats =3D ARRAY_SIZE(wb2_formats_rgb_yuv), + .xin_id =3D 6, + .vbif_idx =3D VBIF_RT, + .maxlinewidth =3D 4096, + .intr_wb_done =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4), + }, +}; + +static const struct dpu_cwb_cfg kaanapali_cwb[] =3D { + { + .name =3D "cwb_0", .id =3D CWB_0, + .base =3D 0x169200, .len =3D 0x20, + }, + { + .name =3D "cwb_1", .id =3D CWB_1, + .base =3D 0x169600, .len =3D 0x20, + }, + { + .name =3D "cwb_2", .id =3D CWB_2, + .base =3D 0x16a200, .len =3D 0x20, + }, + { + .name =3D "cwb_3", .id =3D CWB_3, + .base =3D 0x16a600, .len =3D 0x20, + }, +}; + +static const struct dpu_intf_cfg kaanapali_intf[] =3D { + { + .name =3D "intf_0", .id =3D INTF_0, + .base =3D 0x18d000, .len =3D 0x4bc, + .type =3D INTF_DP, + .controller_id =3D MSM_DP_CONTROLLER_0, + .prog_fetch_lines_worst_case =3D 24, + .intr_underrun =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 24), + .intr_vsync =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 25), + }, { + .name =3D "intf_1", .id =3D INTF_1, + .base =3D 0x18e000, .len =3D 0x4bc, + .type =3D INTF_DSI, + .controller_id =3D MSM_DSI_CONTROLLER_0, + .prog_fetch_lines_worst_case =3D 24, + .intr_underrun =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 26), + .intr_vsync =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 27), + .intr_tear_rd_ptr =3D DPU_IRQ_IDX(MDP_INTF1_TEAR_INTR, 2), + }, { + .name =3D "intf_2", .id =3D INTF_2, + .base =3D 0x18f000, .len =3D 0x4bc, + .type =3D INTF_DSI, + .controller_id =3D MSM_DSI_CONTROLLER_1, + .prog_fetch_lines_worst_case =3D 24, + .intr_underrun =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 28), + .intr_vsync =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 29), + .intr_tear_rd_ptr =3D DPU_IRQ_IDX(MDP_INTF2_TEAR_INTR, 2), + }, { + .name =3D "intf_3", .id =3D INTF_3, + .base =3D 0x190000, .len =3D 0x4bc, + .type =3D INTF_DP, + .controller_id =3D MSM_DP_CONTROLLER_1, + .prog_fetch_lines_worst_case =3D 24, + .intr_underrun =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 30), + .intr_vsync =3D DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 31), + }, +}; + +static const struct dpu_perf_cfg kaanapali_perf_data =3D { + .max_bw_low =3D 21400000, + .max_bw_high =3D 30200000, + .min_core_ib =3D 2500000, + .min_llcc_ib =3D 0, + .min_dram_ib =3D 800000, + .min_prefill_lines =3D 35, + .danger_lut_tbl =3D {0x0ffff, 0x0ffff, 0x0}, + .safe_lut_tbl =3D {0xff00, 0xff00, 0xffff}, + .qos_lut_tbl =3D { + {.nentry =3D ARRAY_SIZE(kaanapali_qos_linear), + .entries =3D kaanapali_qos_linear + }, + {.nentry =3D ARRAY_SIZE(kaanapali_qos_macrotile), + .entries =3D kaanapali_qos_macrotile + }, + {.nentry =3D ARRAY_SIZE(sc7180_qos_nrt), + .entries =3D sc7180_qos_nrt + }, + /* TODO: macrotile-qseed is different from macrotile */ + }, + .cdp_cfg =3D { + {.rd_enable =3D 1, .wr_enable =3D 1}, + {.rd_enable =3D 1, .wr_enable =3D 0} + }, + .clk_inefficiency_factor =3D 105, + .bw_inefficiency_factor =3D 120, +}; + +static const struct dpu_mdss_version kaanapali_mdss_ver =3D { + .core_major_ver =3D 13, + .core_minor_ver =3D 0, +}; + +const struct dpu_mdss_cfg dpu_kaanapali_cfg =3D { + .mdss_ver =3D &kaanapali_mdss_ver, + .caps =3D &kaanapali_dpu_caps, + .mdp =3D &kaanapali_mdp, + .cdm =3D &dpu_cdm_13_x, + .ctl_count =3D ARRAY_SIZE(kaanapali_ctl), + .ctl =3D kaanapali_ctl, + .sspp_count =3D ARRAY_SIZE(kaanapali_sspp), + .sspp =3D kaanapali_sspp, + .mixer_count =3D ARRAY_SIZE(kaanapali_lm), + .mixer =3D kaanapali_lm, + .dspp_count =3D ARRAY_SIZE(kaanapali_dspp), + .dspp =3D kaanapali_dspp, + .pingpong_count =3D ARRAY_SIZE(kaanapali_pp), + .pingpong =3D kaanapali_pp, + .dsc_count =3D ARRAY_SIZE(kaanapali_dsc), + .dsc =3D kaanapali_dsc, + .merge_3d_count =3D ARRAY_SIZE(kaanapali_merge_3d), + .merge_3d =3D kaanapali_merge_3d, + .wb_count =3D ARRAY_SIZE(kaanapali_wb), + .wb =3D kaanapali_wb, + .cwb_count =3D ARRAY_SIZE(kaanapali_cwb), + .cwb =3D sm8650_cwb, + .intf_count =3D ARRAY_SIZE(kaanapali_intf), + .intf =3D kaanapali_intf, + .vbif_count =3D ARRAY_SIZE(sm8650_vbif), + .vbif =3D sm8650_vbif, + .perf =3D &kaanapali_perf_data, +}; + +#endif diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c b/drivers/gpu/d= rm/msm/disp/dpu1/dpu_hw_catalog.c index 23bb39b471b7..be3492df8bde 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c @@ -241,6 +241,23 @@ static const u32 wb2_formats_rgb_yuv[] =3D { .rotation_cfg =3D NULL, \ } =20 +/* kaanapali SSPP common configuration */ +#define _VIG_SBLK_REC0_REC1(scaler_ver) \ + { \ + .sspp_rec0_blk =3D {.name =3D "sspp_rec0", \ + .base =3D 0x1000, .len =3D 0x180,}, \ + .csc_blk =3D {.name =3D "csc", \ + .base =3D 0x1800, .len =3D 0x100,}, \ + .scaler_blk =3D {.name =3D "scaler", \ + .version =3D scaler_ver, \ + .base =3D 0x2000, .len =3D 0xec,}, \ + .sspp_rec1_blk =3D {.name =3D "sspp_rec1", \ + .base =3D 0x3000, .len =3D 0x180,}, \ + .format_list =3D plane_formats_yuv, \ + .num_formats =3D ARRAY_SIZE(plane_formats_yuv), \ + .rotation_cfg =3D NULL, \ + } + #define _VIG_SBLK_ROT(scaler_ver, rot_cfg) \ { \ .scaler_blk =3D {.name =3D "scaler", \ @@ -329,6 +346,9 @@ static const struct dpu_sspp_sub_blks dpu_vig_sblk_qsee= d3_3_3 =3D static const struct dpu_sspp_sub_blks dpu_vig_sblk_qseed3_3_4 =3D _VIG_SBLK(SSPP_SCALER_VER(3, 4)); =20 +static const struct dpu_sspp_sub_blks dpu_vig_sblk_qseed3_3_5 =3D + _VIG_SBLK_REC0_REC1(SSPP_SCALER_VER(3, 5)); + static const struct dpu_sspp_sub_blks dpu_rgb_sblk =3D _RGB_SBLK(); =20 static const struct dpu_sspp_sub_blks dpu_dma_sblk =3D _DMA_SBLK(); @@ -412,6 +432,11 @@ static const struct dpu_pingpong_sub_blks sc7280_pp_sb= lk =3D { .len =3D 0x20, .version =3D 0x20000}, }; =20 +static const struct dpu_pingpong_sub_blks kaanapali_pp_sblk =3D { + .dither =3D {.name =3D "dither", .base =3D 0xc0, + .len =3D 0x40, .version =3D 0x30000}, +}; + /************************************************************* * DSC sub blocks config *************************************************************/ @@ -452,6 +477,13 @@ static const struct dpu_cdm_cfg dpu_cdm_5_x =3D { .base =3D 0x79200, }; =20 +static const struct dpu_cdm_cfg dpu_cdm_13_x =3D { + .name =3D "cdm_0", + .id =3D CDM_0, + .len =3D 0x240, + .base =3D 0x19e000, +}; + /************************************************************* * VBIF sub blocks config *************************************************************/ @@ -639,6 +671,10 @@ static const struct dpu_qos_lut_entry sc7180_qos_linea= r[] =3D { {.fl =3D 0, .lut =3D 0x0011222222335777}, }; =20 +static const struct dpu_qos_lut_entry kaanapali_qos_linear[] =3D { + {.fl =3D 0, .lut =3D 0x0011223344556666}, +}; + static const struct dpu_qos_lut_entry sm6350_qos_linear_macrotile[] =3D { {.fl =3D 0, .lut =3D 0x0011223445566777 }, }; @@ -668,6 +704,10 @@ static const struct dpu_qos_lut_entry sc7180_qos_macro= tile[] =3D { {.fl =3D 0, .lut =3D 0x0011223344556677}, }; =20 +static const struct dpu_qos_lut_entry kaanapali_qos_macrotile[] =3D { + {.fl =3D 0, .lut =3D 0x0011223344556666}, +}; + static const struct dpu_qos_lut_entry sc8180x_qos_macrotile[] =3D { {.fl =3D 10, .lut =3D 0x0000000344556677}, }; @@ -727,3 +767,4 @@ static const struct dpu_qos_lut_entry sc7180_qos_nrt[] = =3D { #include "catalog/dpu_10_0_sm8650.h" #include "catalog/dpu_12_0_sm8750.h" #include "catalog/dpu_12_2_glymur.h" +#include "catalog/dpu_13_0_kaanapali.h" diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h b/drivers/gpu/d= rm/msm/disp/dpu1/dpu_hw_catalog.h index c996b08076a9..7c53490c6c83 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h @@ -775,6 +775,7 @@ struct dpu_mdss_cfg { }; =20 extern const struct dpu_mdss_cfg dpu_glymur_cfg; +extern const struct dpu_mdss_cfg dpu_kaanapali_cfg; extern const struct dpu_mdss_cfg dpu_msm8917_cfg; extern const struct dpu_mdss_cfg dpu_msm8937_cfg; extern const struct dpu_mdss_cfg dpu_msm8953_cfg; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/= disp/dpu1/dpu_kms.c index f4c9767c418d..0623f1dbed97 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -1506,6 +1506,7 @@ static const struct dev_pm_ops dpu_pm_ops =3D { =20 static const struct of_device_id dpu_dt_match[] =3D { { .compatible =3D "qcom,glymur-dpu", .data =3D &dpu_glymur_cfg, }, + { .compatible =3D "qcom,kaanapali-dpu", .data =3D &dpu_kaanapali_cfg, }, { .compatible =3D "qcom,msm8917-mdp5", .data =3D &dpu_msm8917_cfg, }, { .compatible =3D "qcom,msm8937-mdp5", .data =3D &dpu_msm8937_cfg, }, { .compatible =3D "qcom,msm8953-mdp5", .data =3D &dpu_msm8953_cfg, }, --=20 2.34.1