From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2374C433E1 for ; Tue, 23 Mar 2021 21:51:41 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 62A7B61920 for ; Tue, 23 Mar 2021 21:51:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 62A7B61920 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ADEBE6E174; Tue, 23 Mar 2021 21:51:40 +0000 (UTC) Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0C75B6E174 for ; Tue, 23 Mar 2021 21:51:40 +0000 (UTC) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B248CB1D; Tue, 23 Mar 2021 22:51:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1616536297; bh=DhPUhvIplQwn5uEXEluALoP9uxyM3s9ihKpOZ/rIOFQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=smznc+OwvmR1QkvFJPEVk7pjpscfZ+D7+lwFRzUq4+jkmFLPO37RzDv9z+qMGTvrK N5SXUusqHAr82QnQC1vsUOEFB8WwJlgMJ04LF1kv2OHhacCMZbqidbfJNCwFHzuk5s cmz2ck/JEQT0EJf+yURHgfreMkGaFtklNLWQOmec= Date: Tue, 23 Mar 2021 23:50:55 +0200 From: Laurent Pinchart To: Stephen Boyd Subject: Re: [RFC PATCH 05/11] drm/bridge: ti-sn65dsi86: Wrap panel with panel-bridge Message-ID: References: <20210322030128.2283-1-laurent.pinchart+renesas@ideasonboard.com> <20210322030128.2283-6-laurent.pinchart+renesas@ideasonboard.com> <161648364484.3012082.8827104507556270267@swboyd.mtv.corp.google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <161648364484.3012082.8827104507556270267@swboyd.mtv.corp.google.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jernej Skrabec , Jonas Karlman , Neil Armstrong , Douglas Anderson , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Andrzej Hajda Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Stephen, On Tue, Mar 23, 2021 at 12:14:04AM -0700, Stephen Boyd wrote: > Quoting Laurent Pinchart (2021-03-21 20:01:22) > > diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c > > index 1d1be791d5ba..c21a7f7d452b 100644 > > --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c > > +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c > > @@ -418,8 +420,18 @@ static int ti_sn_bridge_attach(struct drm_bridge *bridge, > > } > > pdata->dsi = dsi; > > > > + /* Attach the next bridge */ > > + ret = drm_bridge_attach(bridge->encoder, pdata->next_bridge, > > + &pdata->bridge, flags); > > + if (ret < 0) { > > + DRM_ERROR("failed to attach next bridge\n"); > > Can this be pushed into drm_bridge_attach() instead of in each caller? Good idea. > > + goto err_dsi_detach; > > + } > > + > > return 0; > > > > +err_dsi_detach: > > + mipi_dsi_detach(dsi); > > err_dsi_attach: > > mipi_dsi_device_unregister(dsi); > > err_dsi_host: > > static void ti_sn_bridge_post_disable(struct drm_bridge *bridge) > > @@ -1245,6 +1249,14 @@ static int ti_sn_bridge_probe(struct i2c_client *client, > > return ret; > > } > > > > + pdata->next_bridge = devm_drm_panel_bridge_add(pdata->dev, > > + pdata->panel); > > + if (IS_ERR(pdata->next_bridge)) { > > + DRM_ERROR("failed to create panel bridge\n"); > > + ret = PTR_ERR(pdata->next_bridge); > > + return ret; > > Just return PTR_ERR(pdata->next_bridge)? Indeed. Bad copy and paste. > > + } > > + > > dev_set_drvdata(&client->dev, pdata); -- Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel