From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Nikhil Devshatwar <nikhil.nd@ti.com>, <dri-devel@lists.freedesktop.org>
Cc: Sekhar Nori <nsekhar@ti.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Swapnil Jakhade <sjakhade@cadence.com>
Subject: Re: [PATCH 1/5] drm/tidss: Move to newer connector model
Date: Wed, 21 Oct 2020 10:47:32 +0300 [thread overview]
Message-ID: <17124389-948e-35c8-b7c1-5e419ea462cb@ti.com> (raw)
In-Reply-To: <20201016103917.26838-2-nikhil.nd@ti.com>
On 16/10/2020 13:39, Nikhil Devshatwar wrote:
> To be able to support connector operations across multiple
> bridges, it is recommended that the connector should be
> created by the SoC driver instead of the bridges.
>
> Modify the tidss modesetting initialization sequence to
> create the connector and attach bridges with flag
> DRM_BRIDGE_ATTACH_NO_CONNECTOR
>
> Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
> ---
> drivers/gpu/drm/tidss/tidss_drv.h | 3 +++
> drivers/gpu/drm/tidss/tidss_kms.c | 15 ++++++++++++++-
> 2 files changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/tidss/tidss_drv.h b/drivers/gpu/drm/tidss/tidss_drv.h
> index 7de4bba52e6f..cfbf85a4d92b 100644
> --- a/drivers/gpu/drm/tidss/tidss_drv.h
> +++ b/drivers/gpu/drm/tidss/tidss_drv.h
> @@ -27,6 +27,9 @@ struct tidss_device {
> unsigned int num_planes;
> struct drm_plane *planes[TIDSS_MAX_PLANES];
>
> + unsigned int num_connectors;
> + struct drm_connector *connectors[TIDSS_MAX_PORTS];
> +
> spinlock_t wait_lock; /* protects the irq masks */
> dispc_irq_t irq_mask; /* enabled irqs in addition to wait_list */
> };
> diff --git a/drivers/gpu/drm/tidss/tidss_kms.c b/drivers/gpu/drm/tidss/tidss_kms.c
> index 09485c7f0d6f..51c24b4a6a21 100644
> --- a/drivers/gpu/drm/tidss/tidss_kms.c
> +++ b/drivers/gpu/drm/tidss/tidss_kms.c
> @@ -7,6 +7,7 @@
> #include <drm/drm_atomic.h>
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_bridge.h>
> +#include <drm/drm_bridge_connector.h>
> #include <drm/drm_crtc_helper.h>
> #include <drm/drm_fb_cma_helper.h>
> #include <drm/drm_fb_helper.h>
> @@ -192,6 +193,7 @@ static int tidss_dispc_modeset_init(struct tidss_device *tidss)
> for (i = 0; i < num_pipes; ++i) {
> struct tidss_plane *tplane;
> struct tidss_crtc *tcrtc;
> + struct drm_connector *connector;
> struct drm_encoder *enc;
> u32 hw_plane_id = feat->vid_order[tidss->num_planes];
> int ret;
> @@ -222,11 +224,22 @@ static int tidss_dispc_modeset_init(struct tidss_device *tidss)
> return PTR_ERR(enc);
> }
>
> - ret = drm_bridge_attach(enc, pipes[i].bridge, NULL, 0);
> + ret = drm_bridge_attach(enc, pipes[i].bridge, NULL,
> + DRM_BRIDGE_ATTACH_NO_CONNECTOR);
> if (ret) {
> dev_err(tidss->dev, "bridge attach failed: %d\n", ret);
> return ret;
> }
> +
> + connector = drm_bridge_connector_init(&tidss->ddev, enc);
> + if (IS_ERR(connector)) {
> + dev_err(tidss->dev, "bridge_connector create failed\n");
> + return PTR_ERR(connector);
> + }
> +
> + tidss->connectors[tidss->num_connectors++] = connector;
> +
> + drm_connector_attach_encoder(connector, enc);
This call may return an error.
Tomi
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-10-21 7:47 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 10:39 [PATCH 0/5] drm/tidss: Use new connector model for tidss Nikhil Devshatwar
2020-10-16 10:39 ` [PATCH 1/5] drm/tidss: Move to newer connector model Nikhil Devshatwar
2020-10-21 7:47 ` Tomi Valkeinen [this message]
2020-10-29 22:54 ` Laurent Pinchart
2020-10-16 10:39 ` [PATCH 2/5] drm/tidss: Set bus_format correctly from bridge/connector Nikhil Devshatwar
2020-10-29 22:57 ` Laurent Pinchart
2020-11-09 11:40 ` Nikhil Devshatwar
2020-10-16 10:39 ` [PATCH 3/5] drm: bridge: Propagate the bus flags from bridge->timings Nikhil Devshatwar
2020-10-21 11:31 ` Tomi Valkeinen
2020-10-28 14:34 ` Nikhil Devshatwar
2020-10-29 22:48 ` Laurent Pinchart
2020-10-30 7:30 ` Tomi Valkeinen
2020-10-30 8:08 ` Boris Brezillon
2020-10-30 8:40 ` Tomi Valkeinen
2020-10-30 8:50 ` Boris Brezillon
2020-10-16 10:39 ` [PATCH 4/5] drm/bridge: tfp410: Support format negotiation Nikhil Devshatwar
2020-10-29 22:31 ` Laurent Pinchart
2020-10-16 10:39 ` [PATCH 5/5] drm/bridge: mhdp8564: " Nikhil Devshatwar
2020-10-28 14:40 ` Swapnil Kashinath Jakhade
2020-10-29 22:39 ` Laurent Pinchart
2020-11-02 7:25 ` Tomi Valkeinen
2020-10-19 12:11 ` [PATCH 0/5] drm/tidss: Use new connector model for tidss Tomi Valkeinen
2020-10-28 14:19 ` Nikhil Devshatwar
2020-10-29 7:14 ` Tomi Valkeinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17124389-948e-35c8-b7c1-5e419ea462cb@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=nikhil.nd@ti.com \
--cc=nsekhar@ti.com \
--cc=sjakhade@cadence.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox