dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Archit Taneja <architt@codeaurora.org>
To: Andrea Merello <andrea.merello@gmail.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 2/3] drm: simple_kms_helper: make connector optional at init time
Date: Mon, 29 Aug 2016 09:26:47 +0530	[thread overview]
Message-ID: <57C3B27F.2070403@codeaurora.org> (raw)
In-Reply-To: <1472115874-6219-2-git-send-email-andrea.merello@gmail.com>



On 08/25/2016 02:34 PM, Andrea Merello wrote:
> drm_simple_display_pipe_init() pretends to attach a connector
> to the display pipe.
>
> In case a drm bridge has to be used, then it's the bridge that
> takes care of connectors.
>
> This patch makes the connector parameter optional for
> drm_simple_display_pipe_init(), so that a drm bridge could
> handle connector by itself later.
>

Pushed to drm-misc.

Thanks,
Archit

> Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Noralf Trønnes <noralf@tronnes.org>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> ---
>   drivers/gpu/drm/drm_simple_kms_helper.c | 11 ++++++++---
>   1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_simple_kms_helper.c b/drivers/gpu/drm/drm_simple_kms_helper.c
> index 4476310..3301e4a 100644
> --- a/drivers/gpu/drm/drm_simple_kms_helper.c
> +++ b/drivers/gpu/drm/drm_simple_kms_helper.c
> @@ -146,10 +146,15 @@ static const struct drm_plane_funcs drm_simple_kms_plane_funcs = {
>    * @funcs: callbacks for the display pipe (optional)
>    * @formats: array of supported formats (DRM_FORMAT\_\*)
>    * @format_count: number of elements in @formats
> - * @connector: connector to attach and register
> + * @connector: connector to attach and register (optional)
>    *
>    * Sets up a display pipeline which consist of a really simple
> - * plane-crtc-encoder pipe coupled with the provided connector.
> + * plane-crtc-encoder pipe.
> + *
> + * If a connector is supplied, the pipe will be coupled with the provided
> + * connector. You may supply a NULL connector when using drm bridges, that
> + * handle connectors themselves (see drm_simple_display_pipe_attach_bridge()).
> + *
>    * Teardown of a simple display pipe is all handled automatically by the drm
>    * core through calling drm_mode_config_cleanup(). Drivers afterwards need to
>    * release the memory for the structure themselves.
> @@ -188,7 +193,7 @@ int drm_simple_display_pipe_init(struct drm_device *dev,
>   	encoder->possible_crtcs = 1 << drm_crtc_index(crtc);
>   	ret = drm_encoder_init(dev, encoder, &drm_simple_kms_encoder_funcs,
>   			       DRM_MODE_ENCODER_NONE, NULL);
> -	if (ret)
> +	if (ret || !connector)
>   		return ret;
>
>   	return drm_mode_connector_attach_encoder(connector, encoder);
>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-08-29  3:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-25  9:04 [PATCH v3 1/3] drm/bridge: introduce bridge detaching mechanism Andrea Merello
2016-08-25  9:04 ` [PATCH v3 2/3] drm: simple_kms_helper: make connector optional at init time Andrea Merello
2016-08-29  3:56   ` Archit Taneja [this message]
2016-08-25  9:04 ` [PATCH v3 3/3] drm: simple_kms_helper: add support for bridges Andrea Merello
2016-08-29  3:57   ` Archit Taneja
2016-08-25 12:16 ` [PATCH v3 1/3] drm/bridge: introduce bridge detaching mechanism Daniel Vetter
2016-08-29  3:54   ` Archit Taneja

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=57C3B27F.2070403@codeaurora.org \
    --to=architt@codeaurora.org \
    --cc=andrea.merello@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    /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