Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4911499rdb; Tue, 12 Dec 2023 12:53:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IFU18qezP5leEEt6uySezuHGx6b8Lqc9sU5udAed+X8BDWTRL5Z9C9j3YNBE0tzuK7V5oF4 X-Received: by 2002:a05:6a00:2348:b0:6bd:9281:9453 with SMTP id j8-20020a056a00234800b006bd92819453mr4685252pfj.9.1702414423627; Tue, 12 Dec 2023 12:53:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702414423; cv=none; d=google.com; s=arc-20160816; b=fKuiW7FNtygG9eAVvd55h0AhFE31Be/LXkC2APANPLw2fWTjm/wi6BD7TSSCWBG7e7 XmozO298ZCfZh953twUaurRiviBlcHpQY/O86JKb2T+Jyg+haLjmZLKIACtCe85UrX+5 nEOAiIxhSV1n+2DQrbyd33742EDQ2h7TEtwc3ven1jV5WDi5ad9wAQqUB60oedfnQOKb EurTBjP4LsaoTYerw5QqtOJuaJChy0+D+5k+AlPDZL0JSrHr/Rd9H6DmtPVlcCKHKpM6 zRr6zZRSuJc2cPa7edER4g2HuyYtwK0JbEcvmnG+b+KNggV/nq92ewg5o5bqC6puF5yc x4YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=I8JxpzJTIhZueOaTm1JVOmTswxeZbGbq/+/lDORy+gA=; fh=2XyQDqDG0wz2VEIrVbLmdsbSBBAARfl7BOJG4nJ/HZo=; b=1G/uLGS8YkX4ACNammI8qR/1Q4C4LU2TAAfr3KQvEkTtm1+56TVdNZEp0KGIelDtph Da7ST77E1Kww4gvZE0Rj5auZBAHDLI8y0wYtOdZOK2fJRrUfUxMlI52gBLsty/srB7Xf TmC2Z0R/U8xjLmbF1RPcf5QCl5xiXz4KyP+ni3/GddYO2V4jZf/Fl7nsNSQ9orDZK0Qd z8cmlJtjW3x72Go/QLHETWVhcZrrH8hbEuRWtXwuUvQEIMgASWdCRV/gw6DFa1T22Ili b5gqkRFBYCDN7dObjhRIGlHK4tGai1UdX3KLhLC/MIwyEIulmzHUa7OkNd0rUPuQB9SR f3bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=L8GHeJmC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id fm4-20020a056a002f8400b006ce79a76cb0si8127120pfb.137.2023.12.12.12.53.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 12:53:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=L8GHeJmC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id C701D80B182E; Tue, 12 Dec 2023 12:53:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377344AbjLLUxS (ORCPT + 99 others); Tue, 12 Dec 2023 15:53:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377396AbjLLUxJ (ORCPT ); Tue, 12 Dec 2023 15:53:09 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A55F0D7E; Tue, 12 Dec 2023 12:53:15 -0800 (PST) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BCKZNbg004462; Tue, 12 Dec 2023 20:53:08 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-transfer-encoding:content-type; s= qcppdkim1; bh=I8JxpzJTIhZueOaTm1JVOmTswxeZbGbq/+/lDORy+gA=; b=L8 GHeJmCb8Ye0uWrnCOnQ3CI4fi7MJ8kIRhwKSgiiIHnPcjibNp5sANZpyQL0toTlZ 7bsa08XmY1Ly+CYCSSrQHvBNAsyecnPRpDsuTREBLLuXaypi4KbqOqrReUU4PP/w srSy5ILUV7FOZn9TtKBd8rGzaVk6hq9M/MbMJT4Kc3W8gSuMLRxL+O2nHk8iNI3n J89rwDVPgCYpbuxGp4sKzkS7zTyV/85xMkitgabzOls2jlOo3qME88i4ZnfVSzTK VexQf11R1RT5pmMrqU+fKpS7aS6kyWoQC/IJpYMd58koWrLlN6Q4gZ1Y1IVPml7I ggOX9UpeHOHA0UWncwWQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uxpsu9aje-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2023 20:53:08 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3BCKr7KL011034 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2023 20:53:07 GMT Received: from abhinavk-linux.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.1118.40; Tue, 12 Dec 2023 12:53:06 -0800 From: Abhinav Kumar To: , Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , "Daniel Vetter" CC: , , , , Subject: [PATCH v4 01/15] drm/msm/dpu: add formats check for writeback encoder Date: Tue, 12 Dec 2023 12:52:39 -0800 Message-ID: <20231212205254.12422-2-quic_abhinavk@quicinc.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231212205254.12422-1-quic_abhinavk@quicinc.com> References: <20231212205254.12422-1-quic_abhinavk@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-GUID: mph1PjfYY2QowukgFhXKUSPc8-IP9QtB X-Proofpoint-ORIG-GUID: mph1PjfYY2QowukgFhXKUSPc8-IP9QtB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 mlxlogscore=999 impostorscore=0 malwarescore=0 adultscore=0 phishscore=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312120161 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 12 Dec 2023 12:53:37 -0800 (PST) In preparation for adding more formats to dpu writeback add format validation to it to fail any unsupported formats. changes in v4: - change the failure message of the API drm_atomic_helper_check_wb_connector_state() to a generic one in case it checks more errors later and moreoever it already has debug message to indicate its failure - change the corresponding DPU_ERROR to DPU_DEBUG in-line with other atomic_check failure messages changes in v3: - rebase on top of msm-next - replace drm_atomic_helper_check_wb_encoder_state() with drm_atomic_helper_check_wb_connector_state() due to the rebase changes in v2: - correct some grammar in the commit text Fixes: d7d0e73f7de3 ("drm/msm/dpu: introduce the dpu_encoder_phys_* for writeback") Signed-off-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c index bb94909caa25..4953d87affa1 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c @@ -272,6 +272,7 @@ static int dpu_encoder_phys_wb_atomic_check( { struct drm_framebuffer *fb; const struct drm_display_mode *mode = &crtc_state->mode; + int ret; DPU_DEBUG("[atomic_check:%d, \"%s\",%d,%d]\n", phys_enc->hw_wb->idx, mode->name, mode->hdisplay, mode->vdisplay); @@ -308,6 +309,12 @@ static int dpu_encoder_phys_wb_atomic_check( return -EINVAL; } + ret = drm_atomic_helper_check_wb_connector_state(conn_state->connector, conn_state->state); + if (ret < 0) { + DPU_DEBUG("wb check connector state failed ret = %d\n", ret); + return ret; + } + return 0; } -- 2.40.1