From nobody Mon Feb 9 11:14:03 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6C56C678D9 for ; Tue, 17 Jan 2023 16:21:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232054AbjAQQVp (ORCPT ); Tue, 17 Jan 2023 11:21:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229944AbjAQQVk (ORCPT ); Tue, 17 Jan 2023 11:21:40 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A21783D0A5; Tue, 17 Jan 2023 08:21:39 -0800 (PST) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30HEkMoU031207; Tue, 17 Jan 2023 16:21:37 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=CMUiND6SnIwB9sjI7rtmvilq/3s4ZbHzOgUy3H3Ysvw=; b=EpGbZkVM8UFskEvQtkAFp1RYc7fSmkfWGHZ4Fp4DxcTkAEh2++wPcnpL+ayBWR11o03D DqpmJejEIOVqsHXEiRxv8ZdkV3vwvuVzIEBHU+YHXTzgahT7w2SStmytAUD6AhrqIHBg Gexw1sloD7T+xFhMkD2bSsxiW8j9EZED0WRw2W7j3acnvKBAm5KNQS8lGz0WtKYyK3oK H479lWFEgdWM6n2Dgj74O3KFS9EWFwi0LQTZMXZEXNNYVH1+7SjKJjw7E/Ks2VlOT2Wy xeAH3YSAXLDjctu+/aYSnYZRHBzjBeDq08W3AQGtI5RhyTNFOmMDhhjgLaN5EuhUjWPj 5g== 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 3n5r2qgta2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Jan 2023 16:21:37 +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 30HGLXrR014792; Tue, 17 Jan 2023 16:21:33 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 3n3nfk7sus-1; Tue, 17 Jan 2023 16:21:33 +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 30HGLXHX014786; Tue, 17 Jan 2023 16:21:33 GMT Received: from kalyant-linux.qualcomm.com (kalyant-linux.qualcomm.com [10.204.66.210]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 30HGLXFh014783; Tue, 17 Jan 2023 16:21:33 +0000 Received: by kalyant-linux.qualcomm.com (Postfix, from userid 94428) id B485F4B06; Tue, 17 Jan 2023 08:21:32 -0800 (PST) From: Kalyan Thota To: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org Cc: Kalyan Thota , linux-kernel@vger.kernel.org, robdclark@chromium.org, dianders@chromium.org, swboyd@chromium.org, quic_vpolimer@quicinc.com, dmitry.baryshkov@linaro.org, quic_abhinavk@quicinc.com Subject: [PATCH 1/3] drm/msm/disp/dpu1: allow reservation even if dspps are not available. Date: Tue, 17 Jan 2023 08:21:26 -0800 Message-Id: <1673972488-30140-2-git-send-email-quic_kalyant@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1673972488-30140-1-git-send-email-quic_kalyant@quicinc.com> References: <1673972488-30140-1-git-send-email-quic_kalyant@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: 9EIWkcfpadbyPtSNePQk4K0Yh3mXvCIt X-Proofpoint-GUID: 9EIWkcfpadbyPtSNePQk4K0Yh3mXvCIt X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-17_08,2023-01-17_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 clxscore=1015 priorityscore=1501 spamscore=0 bulkscore=0 mlxlogscore=999 mlxscore=0 impostorscore=0 lowpriorityscore=0 suspectscore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301170131 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" if any topology requests for dspps and catalogue doesn't have the allocation, avoid failing the reservation. This can pave way to build logic allowing composer fallbacks for all the color features that are handled in dspp. Signed-off-by: Kalyan Thota --- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/d= isp/dpu1/dpu_rm.c index 73b3442..c8899ae 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c @@ -343,7 +343,13 @@ static bool _dpu_rm_check_lm_and_get_connected_blks(st= ruct dpu_rm *rm, return true; =20 idx =3D lm_cfg->dspp - DSPP_0; - if (idx < 0 || idx >=3D ARRAY_SIZE(rm->dspp_blks)) { + + if (idx < 0) { + DPU_DEBUG("lm doesn't have dspp, ignoring the request %d\n", lm_cfg->dsp= p); + return true; + } + + if (idx >=3D ARRAY_SIZE(rm->dspp_blks)) { DPU_ERROR("failed to get dspp on lm %d\n", lm_cfg->dspp); return false; } --=20 2.7.4 From nobody Mon Feb 9 11:14:03 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D121C6379F for ; Tue, 17 Jan 2023 16:22:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229889AbjAQQV5 (ORCPT ); Tue, 17 Jan 2023 11:21:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231742AbjAQQVn (ORCPT ); Tue, 17 Jan 2023 11:21:43 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B390C3D0A5; Tue, 17 Jan 2023 08:21:42 -0800 (PST) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30HEbjjd003067; Tue, 17 Jan 2023 16:21:40 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=8l6r3oGXtQ4eFNhlS+2XD+vzNkErClOvY4jbLM9GnxA=; b=HolnVwoSXYbFNVoItG1qDyI2U9SZ4/TmCveH3INtaOu6PDyZAlA2iDAgQN+og2+vy6bm T8O7T5VQpKRly8/Yb0i2yZpZWtJ+Wxkn3HiC6xX1sBA78T6AdnzWBC729KAmQF3J4CMH laklkJnGIVRCEHY2Q2fkXzwpo1dDikXHltXO/ZnAVxnveF2iNp4T9iFmzw2hz4rctwdf xDES0rpWYFesmaMBFDdUGEVUwv8VrLgc3nNSNJwxv3kaGJx6xxHeW0JrpXtyk8dAC9+Q RbjgZWvrwdnk5TqebNVPwj/rkw9HnNt+419jshmfm2yfdoVaT6aMirPglsIs0JqsA0Fy ZQ== 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 3n3mm9wskp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Jan 2023 16:21:40 +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 30HGLaAV014806; Tue, 17 Jan 2023 16:21:36 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 3n3nfk7sv0-1; Tue, 17 Jan 2023 16:21:36 +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 30HGLav2014801; Tue, 17 Jan 2023 16:21:36 GMT Received: from kalyant-linux.qualcomm.com (kalyant-linux.qualcomm.com [10.204.66.210]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 30HGLagF014798; Tue, 17 Jan 2023 16:21:36 +0000 Received: by kalyant-linux.qualcomm.com (Postfix, from userid 94428) id 8BF134B06; Tue, 17 Jan 2023 08:21:35 -0800 (PST) From: Kalyan Thota To: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org Cc: Kalyan Thota , linux-kernel@vger.kernel.org, robdclark@chromium.org, dianders@chromium.org, swboyd@chromium.org, quic_vpolimer@quicinc.com, dmitry.baryshkov@linaro.org, quic_abhinavk@quicinc.com Subject: [PATCH 2/3] drm/msm/disp/dpu1: allow dspp selection for all the interfaces Date: Tue, 17 Jan 2023 08:21:27 -0800 Message-Id: <1673972488-30140-3-git-send-email-quic_kalyant@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1673972488-30140-1-git-send-email-quic_kalyant@quicinc.com> References: <1673972488-30140-1-git-send-email-quic_kalyant@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-GUID: TnMJU5Sz2oNNRAHDxbjadSDMfcib3gH7 X-Proofpoint-ORIG-GUID: TnMJU5Sz2oNNRAHDxbjadSDMfcib3gH7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-17_08,2023-01-17_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 phishscore=0 spamscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 impostorscore=0 adultscore=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 mlxlogscore=522 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301170131 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Allow dspps to be populated as a requirement for all the encoder types it need not be just DSI. If for any encoder the dspp allocation doesn't go through then there can be an option to fallback for color features. Signed-off-by: Kalyan Thota --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/= msm/disp/dpu1/dpu_encoder.c index 9c6817b..e39b345 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -545,7 +545,8 @@ bool dpu_encoder_use_dsc_merge(struct drm_encoder *drm_= enc) static struct msm_display_topology dpu_encoder_get_topology( struct dpu_encoder_virt *dpu_enc, struct dpu_kms *dpu_kms, - struct drm_display_mode *mode) + struct drm_display_mode *mode, + struct drm_crtc_state *crtc_state) { struct msm_display_topology topology =3D {0}; int i, intf_count =3D 0; @@ -563,8 +564,9 @@ static struct msm_display_topology dpu_encoder_get_topo= logy( * 1 LM, 1 INTF * 2 LM, 1 INTF (stream merge to support high resolution interfaces) * - * Adding color blocks only to primary interface if available in - * sufficient number + * dspp blocks are made optional. If RM manager cannot allocate + * dspp blocks, then reservations will still go through with non dspp LM's + * so as to allow color management support via composer fallbacks */ if (intf_count =3D=3D 2) topology.num_lm =3D 2; @@ -573,11 +575,9 @@ static struct msm_display_topology dpu_encoder_get_top= ology( else topology.num_lm =3D (mode->hdisplay > MAX_HDISPLAY_SPLIT) ? 2 : 1; =20 - if (dpu_enc->disp_info.intf_type =3D=3D DRM_MODE_ENCODER_DSI) { - if (dpu_kms->catalog->dspp && - (dpu_kms->catalog->dspp_count >=3D topology.num_lm)) - topology.num_dspp =3D topology.num_lm; - } + if (dpu_kms->catalog->dspp && + (dpu_kms->catalog->dspp_count >=3D topology.num_lm)) + topology.num_dspp =3D topology.num_lm; =20 topology.num_enc =3D 0; topology.num_intf =3D intf_count; @@ -643,7 +643,7 @@ static int dpu_encoder_virt_atomic_check( } } =20 - topology =3D dpu_encoder_get_topology(dpu_enc, dpu_kms, adj_mode); + topology =3D dpu_encoder_get_topology(dpu_enc, dpu_kms, adj_mode, crtc_st= ate); =20 /* Reserve dynamic resources now. */ if (!ret) { --=20 2.7.4 From nobody Mon Feb 9 11:14:03 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4470FC3DA78 for ; Tue, 17 Jan 2023 16:22:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232596AbjAQQWC (ORCPT ); Tue, 17 Jan 2023 11:22:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229678AbjAQQVo (ORCPT ); Tue, 17 Jan 2023 11:21:44 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 288B93D082; Tue, 17 Jan 2023 08:21:44 -0800 (PST) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30HFT4Q7023393; Tue, 17 Jan 2023 16:21:41 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=VXFhZxrEOL9xAPAjX8pMsolOSKUDsJIMLskwVzWhLKk=; b=htZkIFWnPQqhiZ1vESd8mlwMdNlovXZKv78Jzpck+QS88+zBYtEJlqAPML7SnFS1BdgE FGGkxdyJHT8GXkSd0urAz/n8Jy+5ylA50WotQp9Ep/5c6/pRNnEnij53ZKqWs8kMmoIK OAZPrkKaHTo30Qb6/op93s/Dbaj2OH2IDnLUoQWtxnMhR2xnzTT2G26ExfPlhrh0kDHu xB1m0PVcIedDV95HUbzv7XxsvtSyPGoaJW285zv/r+rVu96o+Q6SZHlLr29aIOU+g0xB CdDTplIIUDXEHxSWuDiBS7pFKTEaIfMuW/xeJDwkrIGnnQ29yMqQNbh385m04P+r/K8b Ug== 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 3n5b189vyr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Jan 2023 16:21:41 +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 30HGK75h013659; Tue, 17 Jan 2023 16:21:38 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 3n3nfk7sv4-1; Tue, 17 Jan 2023 16:21:38 +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 30HGLcp8014814; Tue, 17 Jan 2023 16:21:38 GMT Received: from kalyant-linux.qualcomm.com (kalyant-linux.qualcomm.com [10.204.66.210]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 30HGLbwV014813; Tue, 17 Jan 2023 16:21:38 +0000 Received: by kalyant-linux.qualcomm.com (Postfix, from userid 94428) id 3FC1B14F6; Tue, 17 Jan 2023 08:21:37 -0800 (PST) From: Kalyan Thota To: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org Cc: Kalyan Thota , linux-kernel@vger.kernel.org, robdclark@chromium.org, dianders@chromium.org, swboyd@chromium.org, quic_vpolimer@quicinc.com, dmitry.baryshkov@linaro.org, quic_abhinavk@quicinc.com Subject: [PATCH 3/3] drm/msm/disp/dpu1: fail atomic check if color feature is requested with no dspp Date: Tue, 17 Jan 2023 08:21:28 -0800 Message-Id: <1673972488-30140-4-git-send-email-quic_kalyant@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1673972488-30140-1-git-send-email-quic_kalyant@quicinc.com> References: <1673972488-30140-1-git-send-email-quic_kalyant@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-GUID: YsNLSAxH5T10RV4d8vIaIGkWrjUz8vqG X-Proofpoint-ORIG-GUID: YsNLSAxH5T10RV4d8vIaIGkWrjUz8vqG X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-17_08,2023-01-17_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 phishscore=0 spamscore=0 malwarescore=0 priorityscore=1501 adultscore=0 impostorscore=0 suspectscore=0 mlxlogscore=864 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301170131 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Fail atomic check if any color feature is requested with no dspps allocated in the datapath so that composer can offload those features. Signed-off-by: Kalyan Thota --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm= /disp/dpu1/dpu_crtc.c index 4170fbe..de8d799 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c @@ -1147,6 +1147,7 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crt= c, int left_zpos_cnt =3D 0, right_zpos_cnt =3D 0; struct drm_rect crtc_rect =3D { 0 }; bool needs_dirtyfb =3D dpu_crtc_needs_dirtyfb(crtc_state); + struct dpu_crtc_mixer *mixer =3D cstate->mixers; =20 pstates =3D kzalloc(sizeof(*pstates) * DPU_STAGE_MAX * 4, GFP_KERNEL); =20 @@ -1173,6 +1174,16 @@ static int dpu_crtc_atomic_check(struct drm_crtc *cr= tc, _dpu_crtc_setup_lm_bounds(crtc, crtc_state); } =20 + if (crtc_state->color_mgmt_changed) { + for (i =3D 0; i < cstate->num_mixers; i++) { + if (!mixer[i].hw_dspp) { + DPU_DEBUG("%s: failed to get dspp for crtc%d state\n", + dpu_crtc->name, crtc->base.id); + return -EINVAL; + } + } + } + crtc_rect.x2 =3D mode->hdisplay; crtc_rect.y2 =3D mode->vdisplay; =20 --=20 2.7.4