From patchwork Wed Aug 30 22:49:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhinav Kumar X-Patchwork-Id: 13370789 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 856A5C83F16 for ; Wed, 30 Aug 2023 22:50:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344240AbjH3Wu4 (ORCPT ); Wed, 30 Aug 2023 18:50:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244768AbjH3Wuq (ORCPT ); Wed, 30 Aug 2023 18:50:46 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04AD312C; Wed, 30 Aug 2023 15:50:25 -0700 (PDT) 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 37UMoAuo020684; Wed, 30 Aug 2023 22:50:10 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=g0BQxY/l5p0K7aNk8HggcdEmuO/84gFuDZQa2UI8ay0=; b=aSB1r8Brym6qbCR1dk23t2MqaRrIPa0nzqYSMF5lA/Mj5YoJXCI1TEATBNEIpO8pqbxP lr6+Ik69XcFoWb5hWWOVX+nOghOLx3soyzULbAg6aGJmhkwVz3JwF8lgKjzS08ID2IPc LklHFtoDQQyOWWlFXm6rrW8kzA38zpaqrSZyDA3+XKEUpZAXAHtA8Wde87jOr/bosULS lv91LtQn57pA5mgwfbm4E1sTb8TUYytuUiHegfUzInq2ncQUAn3f78h9Vq1NWgmVgEew KwHMozh0XgBaFnshOdH9dQle7UwPmRmV/hFX3yADthDwiIagHhh521XsxDVQa7GWM7iC KA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3ssv00aanu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Aug 2023 22:50:10 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 37UMo90d021383 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Aug 2023 22:50:09 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.36; Wed, 30 Aug 2023 15:50:09 -0700 From: Abhinav Kumar To: , Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , "Daniel Vetter" CC: , , , , , Subject: [PATCH 14/16] drm/msm/dpu: do not allow YUV formats if no CDM block is present Date: Wed, 30 Aug 2023 15:49:07 -0700 Message-ID: <20230830224910.8091-15-quic_abhinavk@quicinc.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230830224910.8091-1-quic_abhinavk@quicinc.com> References: <20230830224910.8091-1-quic_abhinavk@quicinc.com> MIME-Version: 1.0 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-ORIG-GUID: vp0VJg018AzUgioHkpWbNS1tgmfPe4Wm X-Proofpoint-GUID: vp0VJg018AzUgioHkpWbNS1tgmfPe4Wm X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-08-30_18,2023-08-29_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 spamscore=0 malwarescore=0 priorityscore=1501 bulkscore=0 adultscore=0 mlxlogscore=854 lowpriorityscore=0 phishscore=0 clxscore=1015 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2308300207 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On chipsets where CDM block is not available OR where support has not been added yet do not allow YUV formats for writeback block. Signed-off-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 6 ++++++ 1 file changed, 6 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 7fc174b33ae2..d8edca9bc964 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 @@ -406,6 +406,12 @@ static int dpu_encoder_phys_wb_atomic_check( return ret; } + if (DPU_FORMAT_IS_YUV(to_dpu_format(msm_framebuffer_format(fb))) && + !phys_enc->dpu_kms->catalog->cdm) { + DPU_ERROR("cannot support YUV formats without CDM block\n"); + return -EINVAL; + } + return 0; }