From nobody Tue Jun 16 01:36:50 2026 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC729217704 for ; Wed, 15 Apr 2026 03:15:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776222928; cv=none; b=nN3NNTYto5uKTXukcAygKZMp4utqFgduVzosl2OBdtUgQJ8dWJDF4jPa5av5cWr38cPbdKqOQmQoC1NRmEQoIDznXuT2F3nJrRmjleA3YXxoEnNeNFAc1OLoutBggCb9f2sWlLBOerzDMygnZ3Tlnf9mumd7+h+y6LIpySBYOkw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776222928; c=relaxed/simple; bh=TspTLZp3Q+X6v+/+PxFuBs40guzEGz/yAzPP528WBc4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=NGvY29zAdhghl+6hoS00c5+V2PSdwzzX08I59FGXS6FG7D+Vr8aLTCN6MEfv2G/jHkTbjJKOQjlyX86NWH0Ai14jZwlknJqgOJcesXvgBtBqtttCCSbzXcw4XuwX76nVgKwePmddeJyX1Vrsdkjln/keN0qP3YMlQAEL64HNvrI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=doGQxEhB; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="doGQxEhB" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-2ab232cc803so31711445ad.3 for ; Tue, 14 Apr 2026 20:15:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1776222926; x=1776827726; darn=vger.kernel.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=PB+EIAT7fZRNiYH+z4gifx+Sew8+wzLH2FbEGCyDFDc=; b=doGQxEhBYBSRjJAVb4d9tjxC6fJbhLkt3rcs8okms70W0vgFbNQEn4hq5JZ1+Bzlxg k1XCJOwxdndV/IX/t+EVphyuPPBFzD6v2DpKOUJXmzAeNhKZpWf59Uzk6/AVjoVmvbEd m7vipu+YXSJxSdrtmDd3loghKJkKh0I4LKbOypxPB/JwgsQiJqqIxx8ljAe+UljaSwOj Vkcjl857FGyI5Wbypu4d+PF+AFeIhNAlEUEiC//Q542arbNjBOJoTDMqyianef7SKZH6 RdLdIZW95xkd3HKF/7E7sKkoPOvNBH8uL8gMvBLRMzwwDL/B+wtamxChECUytGgVw8aJ OzZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776222926; x=1776827726; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=PB+EIAT7fZRNiYH+z4gifx+Sew8+wzLH2FbEGCyDFDc=; b=F49JwhA/LlK2Xk6DNG4rr6q3DGneicDVeuk1gaVNZrnGrbCDzbX6eKtTc9uT4Tdi+8 +XhDfNu/mPbYS0UtBDucUgs8I3NvGykX7sChY+pedU/11ngcSXkvArAiIpqW5qExL158 UlLAI912/Qo/Cekv1iS+t3i6Qdp9VRtokC+D9jCQn+4GaPR2dDVyXpmEqes5Hs4wXN/2 PcvbVBfj+bcDFP3rwMNFzeKFtCm+FccpHMKber1z4jqbXjJaKGx3WWPXxp37Z1a1SXPR bBWNkntMZXCJUx5a1RYWLPvqr81xRG6/PG3aQehl2sg4RAGu8rdzjxD2hT0hCVj3zV95 kkxQ== X-Forwarded-Encrypted: i=1; AFNElJ9bx04Q+erOQr/1/ZzafZgtsOvsnHyCqYL7yUuQzDOpFKMlvXtyF941ww7S9Om56I4P5HSANVvYb7j+ZJo=@vger.kernel.org X-Gm-Message-State: AOJu0YycvEJc7VDsv1K/ssHOnyMim1Q0kMW78UaCA9Loxn+VM2k3iTcM neo/xiCixTxry75giqUjlQaGn7t/dVmnLcx0UJ8LdiOuaoyiK0XXLzlljZTUBIg6TlU= X-Gm-Gg: AeBDieuo5VHOWqa/esY91NrIUmZvC1pUlnFTz881/TonxtmnEK9p1d7EPDou6OijVH/ gtPifyiLrRxBx2FNs1mhYwWvv/hs5qOu3BuVLBhBEqPDtY51ZraK53w5aynQ4lPEBo+zHF9UDfr hKG9aEnzMgrU6fVMCNAwZkanREhxqkE5NcwyErHfnNQqIN7WM9K5tuSBvyVd1dgdgqtIcwfF+n4 dNm0b0+SNM2BMZy+1+fEIjQt4OZgvIwzLdrHRrVmeUW0/1o7h3Eg0qjKZBieFCbG94R2/xb860H Mdj2UbPLxd6kwaLrqgOFWSL//DreU5oMVN6BXJtRPaeIYtbL9lKEh0tRWQNEnODhf+C37NKSSow 1jpOWsOv/qC/ofgcaVyTVvE8MNBknbOkC7DV5xtxQp9TMyVpL3BdAEUV6lk2S7BzceKuIxzl7rx ABWPcs X-Received: by 2002:a17:902:8544:b0:2ae:803e:6c12 with SMTP id d9443c01a7336-2b2d5976d58mr137850285ad.6.1776222925742; Tue, 14 Apr 2026 20:15:25 -0700 (PDT) Received: from [127.0.1.1] ([2a11:3:200::105d]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b47810b898sm4174475ad.25.2026.04.14.20.15.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2026 20:15:25 -0700 (PDT) From: Jun Nie Date: Wed, 15 Apr 2026 11:15:11 +0800 Subject: [PATCH v20] drm/msm/dpu: Enable quad-pipe for DSC and dual-DSI case Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260415-msm-next-quad-pipe-split-v20-1-bc1fdf140b81@linaro.org> X-B4-Tracking: v=1; b=H4sIAL4C32kC/43NTQrCMBAF4KtI1o7kx8TElfcQF2kz0QFta1KLU np3Uzcigrh8j3nfjCxjIsxsuxhZwoEytU0Jki8XrD755ohAoRRMcmm4kAIu+QIN3nu43nyAjjq E3J2pB185XRlUMQbFyrxLGOn+sveHkk+U+zY9Xq8GsZnrP9RyCRwMViZYs9G1l7szNT61qzYd2 ewOwr4tKdQvyxZLW6GFtkEZpb8t97aUkL8sV6x1jF5W3NTOmQ9rmqYn95+VjVwBAAA= To: Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Rob Clark , Neil Armstrong Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jun Nie , Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1776222916; l=18082; i=jun.nie@linaro.org; s=20240403; h=from:subject:message-id; bh=TspTLZp3Q+X6v+/+PxFuBs40guzEGz/yAzPP528WBc4=; b=ha73tEB8QCE1yKayO/eOCpMyjuMnuSz9APA9T7ieRnbdH+iy9T/VN4RRHtI1HPMK74Og1RF2z 7qv0M7vbDveBokN8W4SO0lEiofYFVGNSTCaxEpxMU/i0Y0b8JThb7hz X-Developer-Key: i=jun.nie@linaro.org; a=ed25519; pk=MNiBt/faLPvo+iJoP1hodyY2x6ozVXL8QMptmsKg3cc= To support high-resolution cases that exceed the width constrain or scenarios that surpass the maximum MDP clock rate, additional pipes are necessary to enable parallel data processing within the width constraints and MDP clock rate. Expand pipe array size to 4. Request 4 mixers and 4 DSCs for high-resolution cases where dual interfaces are enabled for virtual plane case. More use cases can be incorporated later if quad-pipe capabilities are required. Signed-off-by: Jun Nie Reviewed-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang Patchwork: https://patchwork.freedesktop.org/patch/675418/ Link: https://lore.kernel.org/r/20250918-v6-16-rc2-quad-pipe-upstream-4-v16= -10-ff6232e3472f@linaro.org Signed-off-by: Dmitry Baryshkov --- 2 or more SSPPs and dual-DSI interface are need for super wide panel. And 4 DSC are preferred for power optimal in this case due to width limitation of SSPP and MDP clock rate constrain. This patch set extends number of pipes to 4 and revise related mixer blending logic to support quad pipe. All these changes depends on the virtual plane feature to split a super wide drm plane horizontally into 2 or more sub clip. Thus DMA of multiple SSPPs can share the effort of fetching the whole drm plane. The first pipe pair co-work with the first mixer pair to cover the left half of screen and 2nd pair of pipes and mixers are for the right half of screen. If a plane is only for the right half of screen, only one or two of pipes in the 2nd pipe pair are valid, and no SSPP or mixer is assinged for invalid pipe. For those panel that does not require quad-pipe, only 1 or 2 pipes in the 1st pipe pair will be used. There is no concept of right half of screen. For legacy non virtual plane mode, the first 1 or 2 pipes are used for the single SSPP and its multi-rect mode. This patch set drop the merged heading 8 patches of v16, only the last 2 are revised and split into 4 patches here. Changes in v20: - Rebase to latest msm-next to add single DSC case into topology reviso= n. - Link to v19: https://lore.kernel.org/r/20260312-msm-next-quad-pipe-sp= lit-v19-0-4ffa2b06c996@linaro.org Changes in v19: - Refine the plane resource assignment to avoid unnecessary argument and operation for non-virtual plane case. - Fix wording in comments. - Link to v18: https://lore.kernel.org/r/20260213-msm-next-quad-pipe-sp= lit-v18-0-5815158d3635@linaro.org Changes in v18: - Revise the deferring of SSPP handling and comments to distinguish assignment of non-virtual plane case and allocation of virtual plane = case. - Always assume 1 stage in non-virtual plane case when splitting and mapping plane to pipes. - Revise topology decision making and comments to fix possible regression. - Link to v17: https://lore.kernel.org/r/20260121-msm-next-quad-pipe-sp= lit-v17-0-6eb6d8675ca2@linaro.org =20 Changes in v17: - Fix iommu warning on Hamoa. - Extract plane splitting into a dedicated function. - Defer plan splitting and SSPP allocation until CRTC check so that topology information is available. - Add virtual plane condition to quad-pipe topology so that legacy devices are not impacted. - Drop the merged 8 patches of v16, only the last 2 is revised and sent here. - Link to v16: https://lore.kernel.org/linux-arm-msm/20250918-v6-16-rc2= -quad-pipe-upstream-4-v16-0-ff6232e3472f@linaro.org Changes in v16: - Rebase to latest branch msm-next-lumag. - Fix IGT test failures. - Drop patches that have been merged. - Link to v15: https://lore.kernel.org/r/20250819-v6-16-rc2-quad-pipe-u= pstream-v15-0-2c7a85089db8@linaro.org Changes in v15: - Polish logic in sspp check and assignment. - Link to v14: https://lore.kernel.org/r/20250801-v6-16-rc2-quad-pipe-u= pstream-v14-0-b626236f4c31@linaro.org Changes in v14: - Add patch to fix null pointer bug SSPP sharing, which is missed in the last version. - Polish single pipe check with removing loop. - Polish logic of SSPP sharing test in dpu_plane_virtual_assign_resourc= es() - Polish argument of dpu_plane_virtual_assign_resources(). - Link to v13: https://lore.kernel.org/r/20250728-v6-16-rc2-quad-pipe-u= pstream-v13-0-954e4917fe4f@linaro.org Changes in v13: - Modify the SSPP assignment patch for sharing SSPP among planes in quad-pipe case. - Link to v12: https://lore.kernel.org/r/20250707-v6-16-rc2-quad-pipe-u= pstream-v12-0-67e3721e7d83@linaro.org Changes in v12: - Polish single pipe case detection in a plane. Add stage index check w= hen sharing SSPP with multi-rect mode in 2 planes. - Abstract SSPP assignment in a stage into a function. - Rebase to latest msm/msm-next. - Link to v11: https://lore.kernel.org/r/20250603-v6-15-quad-pipe-upstr= eam-v11-0-c3af7190613d@linaro.org Changes in v11: - Change function name from dpu_plane_check_single_pipe to dpu_plane_get_single_pipe. - Abstract SSPP assignment in stage into a function. - Link to v10: https://lore.kernel.org/r/20250526-v6-15-quad-pipe-upstr= eam-v10-0-5fed4f8897c4@linaro.org Changes in v10: - Drop changes in drm helper side, because num_lm =3D=3D 0 does not lea= d to any issue in the first call to dpu_plane_atomic_check_nosspp() with latest repo. It is initialized properly right after the call in drm_atomic_helper_check_planes(), thus the later plane splitting works as expected. - Rebase to latest msm-next branch. - Fix PIPES_PER_STAGE to PIPES_PER_PLANE where handling all pipes, inst= ead of stages. - Link to v9: https://lore.kernel.org/r/20250506-quad-pipe-upstream-v9-= 0-f7b273a8cc80@linaro.org Changes in v9: - Rebase to latest mainline and drop 3 patches as mainline already cover the logic. "Do not fix number of DSC" "configure DSC per number in use" "switch RM to use crtc_id rather than enc_id for allocation" - Add a patch to check crtc before checking plane in drm framework. - Add a patch to use dedicated WB number in an encoder to avoid regress= ion. - Revise the condition to decide quad-pipe topology. - Link to v8: https://lore.kernel.org/r/20250303-sm8650-v6-14-hmd-decka= rd-mdss-quad-upstream-oldbootwrapper-36-prep-v8-0-eb5df105c807@linaro.org Changes in v8: - Fix looping pipes of a plane in _dpu_plane_color_fill() - Improve pipe assignment with deleting pipes loop in stage. - Define PIPES_PER_PLANE properly when it appears fisrt. - rename lms_in_pair to lms_in_stage to avoid confusion. - Add review tags. - Link to v7: https://lore.kernel.org/r/20250226-sm8650-v6-14-hmd-decka= rd-mdss-quad-upstream-oldbootwrapper-36-prep-v7-0-8d5f5f426eb2@linaro.org Changes in v7: - Improve pipe assignment to avoid point to invalid memory. - Define STAGES_PER_PLANE as 2 only when quad-pipe is introduced. - Polish LM number when blending pipes with min() and pull up to caller= func. - Add review tags. - Link to v6: https://lore.kernel.org/r/20250217-sm8650-v6-14-hmd-decka= rd-mdss-quad-upstream-oldbootwrapper-36-prep-v6-0-c11402574367@linaro.org Changes in v6: - Replace LM number with PP number to calculate PP number per encoder. - Rebase to Linux v6.14-rc2. - Add review tags. - Link to v5: https://lore.kernel.org/r/20250118-sm8650-v6-13-hmd-decka= rd-mdss-quad-upstream-33-v5-0-9701a16340da@linaro.org Changes in v5: - Iterate SSPP flushing within the required mixer pair, instead of all active mixers or specific mixer. - Limit qaud-pipe usage case to SoC with 4 or more DSC engines and 2 interfaces case. - Remove valid flag and use width for pipe validation. - Polish commit messages and code comments. - Link to v4: https://lore.kernel.org/r/20250116-sm8650-v6-13-hmd-decka= rd-mdss-quad-upstream-33-v4-0-74749c6eba33@linaro.org Changes in v4: - Restrict SSPP flushing to the required mixer, instead of all active m= ixers. - Polish commit messages and code comments. - Rebase to latest msm/drm-next branch. - Move pipe checking patch to the top of patch set. - Link to v3: https://lore.kernel.org/dri-devel/20241219-sm8650-v6-13-h= md-deckard-mdss-quad-upstream-32-v3-0-92c7c0a228e3@linaro.org Changes in v3: - Split change in trace into a separate patch. - Rebase to latest msm-next branch. - Reorder patch sequence to make sure valid flag is set in earlier patch - Rectify rewrite patch to move logic change into other patch - Polish commit messages and code comments. - Link to v2: https://lore.kernel.org/dri-devel/20241009-sm8650-v6-11-h= md-pocf-mdss-quad-upstream-21-v2-0-76d4f5d413bf@linaro.org Changes in v2: - Revise the patch sequence with changing to 2 pipes topology first. Th= en prepare for quad-pipe setup, then enable quad-pipe at last. - Split DSI patches into other patch set. - Link to v1: https://lore.kernel.org/all/20240829-sm8650-v6-11-hmd-poc= f-mdss-quad-upstream-8-v1-0-bdb05b4b5a2e@linaro.org --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 50 ++++++++++++++++----= ---- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h | 6 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 29 +++++--------- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 2 +- 6 files changed, 48 insertions(+), 43 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm= /disp/dpu1/dpu_crtc.c index bd0e720b484fd..8ef44163cd18e 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c @@ -200,7 +200,7 @@ static int dpu_crtc_get_lm_crc(struct drm_crtc *crtc, struct dpu_crtc_state *crtc_state) { struct dpu_crtc_mixer *m; - u32 crcs[CRTC_DUAL_MIXERS]; + u32 crcs[CRTC_QUAD_MIXERS]; =20 int rc =3D 0; int i; @@ -1384,6 +1384,9 @@ static struct msm_display_topology dpu_crtc_get_topol= ogy( struct drm_display_mode *mode =3D &crtc_state->adjusted_mode; struct msm_display_topology topology =3D {0}; struct drm_encoder *drm_enc; + struct msm_drm_private *priv =3D crtc->dev->dev_private; + struct dpu_kms *kms =3D to_dpu_kms(priv->kms); + u32 num_rt_intf; =20 drm_for_each_encoder_mask(drm_enc, crtc->dev, crtc_state->encoder_mask) dpu_encoder_update_topology(drm_enc, &topology, crtc_state->state, @@ -1396,32 +1399,45 @@ static struct msm_display_topology dpu_crtc_get_top= ology( * * Dual display * 2 LM, 2 INTF ( Split display using 2 interfaces) + * 4 LM, 2 INTF ( Split display using 2 interfaces and stream merge + to support high resolution interfaces if virtual + plane is enabled) + * If DSC is enabled, use 2:2:2 for 2 LMs case, and 4:4:2 for 4 LMs + * case. * * Single display * 1 LM, 1 INTF * 2 LM, 1 INTF (stream merge to support high resolution interfaces) * - * If DSC is enabled, use 2 LMs for 2:2:1 topology + * If DSC is enabled, use 2 LMs for 2:2:1 topology for single display + * to support legacy devices that use this topology. Use 1:1:1 topology + * if there is only one DSC engine in SoC. * * Add dspps to the reservation requirements if ctm or gamma_lut are requ= ested - * - * Only hardcode num_lm to 2 for cases where num_intf =3D=3D 2 and CWB is= not - * enabled. This is because in cases where CWB is enabled, num_intf will - * count both the WB and real-time phys encoders. - * - * For non-DSC CWB usecases, have the num_lm be decided by the - * (mode->hdisplay > MAX_HDISPLAY_SPLIT) check. */ =20 - if (topology.num_intf =3D=3D 2 && !topology.cwb_enabled) - topology.num_lm =3D 2; - else if (topology.num_dsc =3D=3D 2) - topology.num_lm =3D 2; - else if (dpu_kms->catalog->caps->has_3d_merge && - topology.num_dsc =3D=3D 0) - topology.num_lm =3D (mode->hdisplay > MAX_HDISPLAY_SPLIT) ? 2 : 1; + num_rt_intf =3D topology.num_intf; + if (topology.cwb_enabled) + num_rt_intf--; + + if ((mode->hdisplay > (MAX_HDISPLAY_SPLIT * num_rt_intf)) || + ((u64)mode->hdisplay * mode->vtotal * drm_mode_vrefresh(mode) > + kms->perf.max_core_clk_rate)) + topology.num_lm =3D num_rt_intf * 2; else - topology.num_lm =3D 1; + topology.num_lm =3D num_rt_intf; + + if (!dpu_use_virtual_planes) + topology.num_lm =3D min(2, topology.num_lm); + + if (!dpu_kms->catalog->caps->has_3d_merge) + topology.num_lm =3D min(num_rt_intf, topology.num_lm); + + if (topology.num_dsc) { + if (num_rt_intf =3D=3D 1) + topology.num_lm =3D min(2, dpu_kms->catalog->dsc_count); + topology.num_dsc =3D topology.num_lm; + } =20 if (crtc_state->ctm || crtc_state->gamma_lut) topology.num_dspp =3D topology.num_lm; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h b/drivers/gpu/drm/msm= /disp/dpu1/dpu_crtc.h index 6eaba5696e8e6..455073c7025b0 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h @@ -210,7 +210,7 @@ struct dpu_crtc_state { =20 bool bw_control; bool bw_split_vote; - struct drm_rect lm_bounds[CRTC_DUAL_MIXERS]; + struct drm_rect lm_bounds[CRTC_QUAD_MIXERS]; =20 uint64_t input_fence_timeout_ns; =20 @@ -218,10 +218,10 @@ struct dpu_crtc_state { =20 /* HW Resources reserved for the crtc */ u32 num_mixers; - struct dpu_crtc_mixer mixers[CRTC_DUAL_MIXERS]; + struct dpu_crtc_mixer mixers[CRTC_QUAD_MIXERS]; =20 u32 num_ctls; - struct dpu_hw_ctl *hw_ctls[CRTC_DUAL_MIXERS]; + struct dpu_hw_ctl *hw_ctls[CRTC_QUAD_MIXERS]; =20 enum dpu_crtc_crc_source crc_source; int crc_frame_skip_count; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/= msm/disp/dpu1/dpu_encoder.c index eba1d52211f68..058a7c8727f7c 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -55,7 +55,7 @@ #define MAX_PHYS_ENCODERS_PER_VIRTUAL \ (MAX_H_TILES_PER_DISPLAY * NUM_PHYS_ENCODER_TYPES) =20 -#define MAX_CHANNELS_PER_ENC 2 +#define MAX_CHANNELS_PER_ENC 4 #define MAX_CWB_PER_ENC 2 =20 #define IDLE_SHORT_TIMEOUT 1 @@ -661,7 +661,6 @@ void dpu_encoder_update_topology(struct drm_encoder *dr= m_enc, struct dpu_encoder_virt *dpu_enc =3D to_dpu_encoder_virt(drm_enc); struct msm_drm_private *priv =3D dpu_enc->base.dev->dev_private; struct msm_display_info *disp_info =3D &dpu_enc->disp_info; - struct dpu_kms *dpu_kms =3D to_dpu_kms(priv->kms); struct drm_connector *connector; struct drm_connector_state *conn_state; struct drm_framebuffer *fb; @@ -675,22 +674,12 @@ void dpu_encoder_update_topology(struct drm_encoder *= drm_enc, =20 dsc =3D dpu_encoder_get_dsc_config(drm_enc); =20 - /* We only support 2 DSC mode (with 2 LM and 1 INTF) */ - if (dsc) { - /* - * Use 2 DSC encoders, 2 layer mixers and 1 or 2 interfaces - * when Display Stream Compression (DSC) is enabled, - * and when enough DSC blocks are available. - * This is power-optimal and can drive up to (including) 4k - * screens. - */ - WARN(topology->num_intf > 2, - "DSC topology cannot support more than 2 interfaces\n"); - if (topology->num_intf >=3D 2 || dpu_kms->catalog->dsc_count >=3D 2) - topology->num_dsc =3D 2; - else - topology->num_dsc =3D 1; - } + /* + * Set DSC number as 1 to mark the enabled status, will be adjusted + * in dpu_crtc_get_topology() + */ + if (dsc) + topology->num_dsc =3D 1; =20 connector =3D drm_atomic_get_new_connector_for_encoder(state, drm_enc); if (!connector) @@ -2180,8 +2169,8 @@ static void dpu_encoder_helper_reset_mixers(struct dp= u_encoder_phys *phys_enc) { int i, num_lm; struct dpu_global_state *global_state; - struct dpu_hw_blk *hw_lm[2]; - struct dpu_hw_mixer *hw_mixer[2]; + struct dpu_hw_blk *hw_lm[MAX_CHANNELS_PER_ENC]; + struct dpu_hw_mixer *hw_mixer[MAX_CHANNELS_PER_ENC]; struct dpu_hw_ctl *ctl =3D phys_enc->hw_ctl; =20 /* reset all mixers for this encoder */ diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h b/drivers/gpu= /drm/msm/disp/dpu1/dpu_encoder_phys.h index 61b22d9494546..09395d7910ac8 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h @@ -302,7 +302,7 @@ static inline enum dpu_3d_blend_mode dpu_encoder_helper= _get_3d_blend_mode( =20 /* Use merge_3d unless DSC MERGE topology is used */ if (phys_enc->split_role =3D=3D ENC_ROLE_SOLO && - dpu_cstate->num_mixers =3D=3D CRTC_DUAL_MIXERS && + (dpu_cstate->num_mixers !=3D 1) && !dpu_encoder_use_dsc_merge(phys_enc->parent)) return BLEND_3D_H_ROW_INT; =20 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 ba04ac24d5a9e..b1ac84c0b52db 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h @@ -24,7 +24,7 @@ #define DPU_MAX_IMG_WIDTH 0x3fff #define DPU_MAX_IMG_HEIGHT 0x3fff =20 -#define CRTC_DUAL_MIXERS 2 +#define CRTC_QUAD_MIXERS 4 =20 #define MAX_XIN_COUNT 16 =20 diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h b/drivers/gpu/drm/= msm/disp/dpu1/dpu_hw_mdss.h index 0e65bf5ddc4a6..fd1f3e7982062 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h @@ -34,7 +34,7 @@ #define DPU_MAX_PLANES 4 #endif =20 -#define STAGES_PER_PLANE 1 +#define STAGES_PER_PLANE 2 #define PIPES_PER_STAGE 2 #define PIPES_PER_PLANE (PIPES_PER_STAGE * STAGES_PER_PLANE) #ifndef DPU_MAX_DE_CURVES --- base-commit: a913d08e5ea9a491b806e64a24410f6722ddc9b3 change-id: 20260121-msm-next-quad-pipe-split-ab95b6e3ffd3 Best regards, --=20 Jun Nie