Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp11352400rwb; Fri, 25 Nov 2022 14:35:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf4bABwM7J2iE+M7bav5Rql/VdOAyYL3eMVJOFZqEpjpmZufEohFhxTKcgfeqoRsGtzc+AUM X-Received: by 2002:a17:906:708d:b0:7ad:b45c:dbe7 with SMTP id b13-20020a170906708d00b007adb45cdbe7mr33368023ejk.617.1669415756148; Fri, 25 Nov 2022 14:35:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669415756; cv=none; d=google.com; s=arc-20160816; b=CuuaRb1MJpSc6rKlzOqHGVoCnX4kCSMGDy1CRAn5rSK9vsqieDr/pxAN1cL2wZj24C z7xt6MRQCWkX8eDKejQruL5krhr+m1HQyyNnn4ZE/5tySL8+6iQAwWUUcw1YuJZPBugd 4TLHGXXZs1OOCj/TPC8V+HIaS+eMRzod+QJh7QSLvB+g6mJEABTBVNNprAlGofXCdJ2G JfFbrPmAZ4pLVRcdw+c9LTz0dfrZkdmo+OvwjMHHL00VcypE9/x/3xglCgAd95ayBLfY zcLstfSeTiFUvkhRn4r352H5/gjn8yQx+CsSy5qR8VYC5bx+Bavw/Ix4zmNHYX+OUrxX ip7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rja1eW5wCZnhqubaIIClqRCiUYLTCEdcEtknkp8dHw4=; b=RYBxVuihmUXGbi17tf5lZVV9T65B85oah70h+Xhp1xylJqaa2C9fadp2i6/hDqy0aQ Ku4BudPYLt7QgG+XVtuEq/oBxsXvZ7ywTXHhQpELjQ6je8gnhNXO+zO73p394JAE9XYS SuloX1ug07qmRW4um4vU+B3SwXI8k+ifb6/IWm2VJTTZzMF//j0ljh6X2gfL2aqFLPjH QXgjZ6zry+bR6yJxBYi52NCVBJ4M6cVSrgHPgUUe9BmfDrdBMgKCZCPIxF9u3PYdeMwF EubKSIY2QFCEjnapWLdT82FmVo9xA7oBK7rvQBRKJWv8xmB8lYv9bRgP32njDfl5q3UP OE2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=hL1D4Rz9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dz15-20020a0564021d4f00b00469fc2b3bc8si5449523edb.386.2022.11.25.14.35.35; Fri, 25 Nov 2022 14:35:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=hL1D4Rz9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229787AbiKYWYN (ORCPT + 86 others); Fri, 25 Nov 2022 17:24:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbiKYWYK (ORCPT ); Fri, 25 Nov 2022 17:24:10 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AB032655B; Fri, 25 Nov 2022 14:24:10 -0800 (PST) Received: from notapiano (unknown [IPv6:2600:4041:5b1a:cd00:524d:e95d:1a9c:492a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id 169BD6602B6F; Fri, 25 Nov 2022 22:24:06 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1669415048; bh=n/JLhB9y1lHTrAqStH1aXYwPM6mB/oILrr8xuIpUxBM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hL1D4Rz9csbBTpf1Zc8BME8cRYbNoiwVf+91duBmWBmSu3hj0B/x0mxj9IayaaEIF ZuRYN0f0bP4uheKt2VXEj61N1VnnDAzSmNKXfudty00OIalGaLuSTbLN/Hkgt23QOQ Lkd0dCcu5gqhI3S7O5m+O4ePoMFPq2dV4ybUNFRuVJIOLHiQUJ4NXJOrrGySa78inN ke/aQ/9ywGMunB4khwu9lr2l6PyFcvejc9M2a5d+4t7xePZKCqbNez4bkA/zopnbVZ eLjJySiDFw+mxFZW2jVoiFaXV8VW7/YY3jktdQ8LKTnULKmrPAMYL5tSmFXvTxp6+c KxtGmHbs3kcZQ== Date: Fri, 25 Nov 2022 17:24:02 -0500 From: =?utf-8?B?TsOtY29sYXMgRi4gUi4gQS4=?= Prado To: "Nancy.Lin" Cc: Rob Herring , Matthias Brugger , Chun-Kuang Hu , Philipp Zabel , wim@linux-watchdog.org, AngeloGioacchino Del Regno , linux@roeck-us.net, David Airlie , Daniel Vetter , Nathan Chancellor , Nick Desaulniers , "jason-jh . lin" , Yongqiang Niu , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, dri-devel@lists.freedesktop.org, llvm@lists.linux.dev, singo.chang@mediatek.com, Project_Global_Chrome_Upstream_Group@mediatek.com Subject: Re: [PATCH v28 6/7] drm/mediatek: add drm ovl_adaptor sub driver for MT8195 Message-ID: <20221125222402.u4qiolkqi2nsv7ae@notapiano> References: <20221107072413.16178-1-nancy.lin@mediatek.com> <20221107072413.16178-7-nancy.lin@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221107072413.16178-7-nancy.lin@mediatek.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 07, 2022 at 03:24:12PM +0800, Nancy.Lin wrote: > Add drm ovl_adaptor sub driver. Bring up ovl_adaptor sub driver if > the component exists in the path. > > Signed-off-by: Nancy.Lin > Reviewed-by: AngeloGioacchino Del Regno > Reviewed-by: CK Hu > Tested-by: AngeloGioacchino Del Regno > Tested-by: Bo-Chen Chen > Tested-by: N?colas F. R. A. Prado > --- [..] > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c > index 30dcb65d8a5a..ce5617ad04cb 100644 > --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c > +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c [..] > @@ -897,22 +906,18 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev, > crtc_i++; > > for (i = 0; i < path_len; i++) { > - enum mtk_ddp_comp_id comp_id = path[i]; > + unsigned int comp_id = path[i]; > struct device_node *node; > - struct mtk_ddp_comp *comp; > > node = priv->comp_node[comp_id]; > - comp = &priv->ddp_comp[comp_id]; > - > - if (!node) { > - dev_info(dev, > - "Not creating crtc %d because component %d is disabled or missing\n", > - crtc_i, comp_id); > - return 0; > - } > > - if (!comp->dev) { > - dev_err(dev, "Component %pOF not initialized\n", node); > + /* Not all drm components have a DTS device node, such as ovl_adaptor, > + * which is the drm bring up sub driver > + */ > + if (!node && comp_id != DDP_COMPONENT_DRM_OVL_ADAPTOR) { > + dev_err(dev, > + "Not creating crtc %d because component %d is disabled, missing or not initialized\n", > + crtc_i, comp_id); > return -ENODEV; Why do you change the behavior here? If !node, the return should be 0, because there are two separate data streams, for internal and external display, and they are optional. It should be possible to for example have the nodes for external display disabled in DT and still have the driver probe and have a working internal display. But with this change you're breaking that. Also, this message should stay as dev_info and not mention "not initialized", so basically it should stay the same as before the change. Thanks, N?colas