Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4788441rdb; Tue, 12 Dec 2023 09:17:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IFStKYfljxAyO9OJJQGLFSTjdK8xq7RIK9Ko3uUWFVgy+LXUxEHqnl8WuCFxt1HTjclEPdg X-Received: by 2002:a05:6a21:a5a4:b0:18f:fcc5:4c4f with SMTP id gd36-20020a056a21a5a400b0018ffcc54c4fmr3034613pzc.40.1702401443476; Tue, 12 Dec 2023 09:17:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702401443; cv=none; d=google.com; s=arc-20160816; b=hCfDEeBIpQ9dTxomYG/g2B26tDUiYjYqUS8GusMB9eInqRFkuipWmqcBdeKdOVimn5 mUxbgPjW0INpGO2TvQekYcT7ML9dFl/F04a++W7KBojG3HZX+ugGWdELSdxGkwQxNXsF CVQjUf1209xnWtukRj9W858M+XsPDmw5LIMi5suDGHV/l2g+rFOkHrKajFfpvTget/Vt 8KnQIUbYICiaDYjj6IN4lwyCitUjs2PGriCRNbDt+5xX5lnztbyrrQlj+t48pMDYXKDI 35qKRlbwNFVFO8On6uB9ADHonpirj/j4uY90L/0G9FMb1BfA4fPJwBSG13QRxdVM8FAW GCKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=hBDbpoMatSnLVbcj80k8t1w+6Q2nyJMKgtB38AzFUJ8=; fh=s8wPFNZ6sHMHivXPx2iFTGXuMlX/GFs58spIMenNN9Y=; b=aI10blxxCbjCjmciZjLHIK3oQa/EzGGzMGceP260g82ZMDX2MNa9XDT99ydAAB0nLl BPaNIZA2lI2NFT+c2OAfDYiTbSaAeAd/MGALhu3R2InSlaJ1n/kh44ODHCcBoIi6jmay 7Y++aKeJuizpHw37bQoXYUH1a75cLoJbBd8GQ2TkB5M1u3XZsO9sKA1RGE0OH/1aKjCx uNnen1iVtLur5PECBYp/ND1LjVGdqN7s6E00yxLXbYbKJKDAc9d26au71dKxSIkiqJMz KtRw9qISTZcHphN8lbp90dmWPsKsaSkscKQURgrtygwkRV8yDzaMWrHWXIWcImIDAelC c4Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=R9dtzSGB; 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 n11-20020a63f80b000000b005ca409a5fefsi635975pgh.643.2023.12.12.09.17.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 09:17:23 -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=R9dtzSGB; 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 1C0398048F64; Tue, 12 Dec 2023 09:17:21 -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 S235002AbjLLRRG (ORCPT + 99 others); Tue, 12 Dec 2023 12:17:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232981AbjLLRRF (ORCPT ); Tue, 12 Dec 2023 12:17:05 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD66C99; Tue, 12 Dec 2023 09:17:11 -0800 (PST) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BCH62MV023003; Tue, 12 Dec 2023 17:17:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=hBDbpoMatSnLVbcj80k8t1w+6Q2nyJMKgtB38AzFUJ8=; b=R9 dtzSGB918gdNNjh7e5vfwqSH2I5593BV68g1/cCSt+WhY23Dx6ExIUzCIeAkTtN6 yw7MgNlAzHGdcYihvu+k7jii3HE335E/+YRHCRVv4i9nRaEqH+dH4taK6DrmfGLD gLo1S/lOGaP6FaiN9H1zk22vGIQJTjuhrymWU5dlouRtwFa96KUXg4a/rFn+eut8 FNzYdlCHTHoigctMiqX5FWXVKlQ5HrNtW3gfeLON3kL0/wf2f0p65lBC16L8Lcqi auWR8QxnwOvBGeaHgUBE7Yb4qed3tVFyx9icznWWL8Zs2tUa/zxRU7u9cgPygXvu Z0YFHCnAssWNNpNPlUkQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uxru2ghtx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2023 17:17:01 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3BCHH1hJ001880 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2023 17:17:01 GMT Received: from [10.71.109.77] (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 09:17:00 -0800 Message-ID: <59304cf8-33b7-bf27-f9e2-a15e323c869a@quicinc.com> Date: Tue, 12 Dec 2023 09:16:59 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v3 01/15] drm/msm/dpu: add formats check for writeback encoder Content-Language: en-US To: Dmitry Baryshkov CC: , Rob Clark , "Sean Paul" , Marijn Suijten , "David Airlie" , Daniel Vetter , , , , , References: <20231212002245.23715-1-quic_abhinavk@quicinc.com> <20231212002245.23715-2-quic_abhinavk@quicinc.com> From: Abhinav Kumar In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) 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: PTGBhOdYEvx3Uwk0MYpCvXsN3SXwF_db X-Proofpoint-ORIG-GUID: PTGBhOdYEvx3Uwk0MYpCvXsN3SXwF_db 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_01,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 mlxlogscore=999 adultscore=0 phishscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312120133 X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,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 09:17:21 -0800 (PST) On 12/11/2023 10:40 PM, Dmitry Baryshkov wrote: > On Tue, 12 Dec 2023 at 02:23, Abhinav Kumar wrote: >> >> In preparation for adding more formats to dpu writeback add >> format validation to it to fail any unsupported formats. >> >> 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..425415d45ec1 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_ERROR("invalid pixel format %p4cc\n", &fb->format->format); >> + return ret; >> + } > > There is no guarantee that there will be no other checks added to this > helper. So, I think this message is incorrect. If you wish, you can > promote the level of the message in the helper itself. > On the other hand, we rarely print such messages by default. Most of > the checks use drm_dbg. > hmm...actually drm_atomic_helper_check_wb_connector_state() already has a debug message to indicate invalid pixel formats. You are right, i should perhaps just say that "atomic_check failed" or something. I can make this a DPU_DEBUG. Actually I didnt know that we are not supposed to print out atomic_check() errors. Is it perhaps because its okay for check to fail? But then we would not know why it failed. >> + >> return 0; >> } >> >> -- >> 2.40.1 >> > >