Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp397337rwb; Tue, 6 Dec 2022 23:19:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf6pCq42Rd30y3C3pwsDjqbGXsJIaW2fEifFs7SHiUdmGOTkNMbR9+PPS7Qsk/qC5rdlx9ul X-Received: by 2002:a05:6402:10c3:b0:468:4c9a:7c6c with SMTP id p3-20020a05640210c300b004684c9a7c6cmr12920957edu.397.1670397573622; Tue, 06 Dec 2022 23:19:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670397573; cv=none; d=google.com; s=arc-20160816; b=m4CM5uRy8SuCV5TL1bMCn8YYue/rw32lMJV5dPFb4DZ9/eGRqlXpZ7bo8HM91Kvh+j iPezep634U1OxFdsjTQZGmI9uau8QAhoD88A370PsWDokqtGKYrx44zmSfZqLuP8zADg nvaSWcvXQa4vTYVRTiy/h5h+cY281xdk/cS907JQMj5JjLjUCjMlp934etacYJsGn+y4 4te4NanvtXohRYF5fKv0V0hUvT5riI2cjhebuEHmVexFGvE4xuPFu5DbxfHLdRPqpYFx HIauFSVVnkgm1ez092s+TlhmfszkkuW2Z8wAsF/50kcFbh7XmhABfCDjwbqSd0wvqJ6f wrsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=EwiJEMTY+dDg1ZF6ls5H5vhahgBYvDMvgssIZeiUaHY=; b=YVubG9+EXMH2TpsLvzTAs3tjLHRJZvDWiJ+3Shvc+JLUcqnr1zYfXv/n7FQW5No68t TYrOAUFhN28FuBbE2KEPgW2QOXWWLBp52P9X16vX30XQGI+XqaZssQENcwDKUy8Egd5T ioxcn9YkUqJsrgpuHmgdZ9TzUiaXuDfutzgTm1YW/nl+RBTaWyMokN3P4KwoHhrJDDOC S0vFrK4Dt727MacNx1GLazWful4MfiFqX6Z4nuM1V9u1ZtUMOwVgeojfz1xvzdsx3XxJ oTSd1QzKk7Y5fqWLOWtzi/aADr0QGhYKGbnR/LNwW7XNOnTMtPlTfnVesR9VtJfiJEPj 53wQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o18-20020a170906975200b007c11e5ad98csi1128857ejy.352.2022.12.06.23.19.15; Tue, 06 Dec 2022 23:19:33 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229589AbiLGGvm (ORCPT + 76 others); Wed, 7 Dec 2022 01:51:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbiLGGvi (ORCPT ); Wed, 7 Dec 2022 01:51:38 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F23782DA9E for ; Tue, 6 Dec 2022 22:51:37 -0800 (PST) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p2oHE-0006zz-L7; Wed, 07 Dec 2022 07:51:32 +0100 Received: from sha by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1p2oHD-0000Bu-FU; Wed, 07 Dec 2022 07:51:31 +0100 Date: Wed, 7 Dec 2022 07:51:31 +0100 From: Sascha Hauer To: Michael Riesch Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Sandy Huang , David Airlie , Daniel Vetter Subject: Re: [PATCH 4/5] drm/rockchip: vop2: add support for the rgb output block Message-ID: <20221207065131.GW29728@pengutronix.de> References: <20221130140217.3196414-1-michael.riesch@wolfvision.net> <20221130140217.3196414-5-michael.riesch@wolfvision.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221130140217.3196414-5-michael.riesch@wolfvision.net> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Wed, Nov 30, 2022 at 03:02:16PM +0100, Michael Riesch wrote: > The Rockchip VOP2 features an internal RGB output block, which can be > attached to the video port 2 of the VOP2. Add support for this output > block. > > Signed-off-by: Michael Riesch > --- > drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 21 ++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c > index 94fddbf70ff6..16041c79d228 100644 > --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c > +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c > @@ -39,6 +39,7 @@ > #include "rockchip_drm_gem.h" > #include "rockchip_drm_fb.h" > #include "rockchip_drm_vop2.h" > +#include "rockchip_rgb.h" > > /* > * VOP2 architecture > @@ -212,6 +213,9 @@ struct vop2 { > struct clk *hclk; > struct clk *aclk; > > + /* optional internal rgb encoder */ > + struct rockchip_rgb *rgb; > + > /* must be put at the end of the struct */ > struct vop2_win win[]; > }; > @@ -2697,11 +2701,25 @@ static int vop2_bind(struct device *dev, struct device *master, void *data) > if (ret) > return ret; > > + vop2->rgb = rockchip_rgb_init(dev, &vop2->vps[2].crtc, vop2->drm, 2); Here you assume that the RGB output can only be connected to VP2, but it could be connected to any other VP as well, and we can find the description where it actually shall be connected in the device tree. As mentioned in my comment to patch 1, the question is "Is there something connected to VPx at endpoint ROCKCHIP_VOP2_EP_RGB0?" Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |