All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Jyri Sarha <jsarha@ti.com>, dri-devel@lists.freedesktop.org
Cc: laurent.pinchart@ideasonboard.com
Subject: Re: [PATCH v3 21/22] drm/tilcdc: Initialize crtc->port
Date: Tue, 23 Feb 2016 17:19:47 +0200	[thread overview]
Message-ID: <56CC7893.1050105@ti.com> (raw)
In-Reply-To: <16a4e753f0388fb15b71f30d0754073367798d6d.1456239300.git.jsarha@ti.com>


[-- Attachment #1.1: Type: text/plain, Size: 1940 bytes --]



On 23/02/16 17:03, Jyri Sarha wrote:
> Initialize port device node pointer in the tilcdc crtc. Fixes "Falling
> back to first CRTC" warning from tda998x driver.
> 
> The tda998x encoder driver calls drm_of_find_possible_crtcs() to
> initialize possible_crtcs of struct drm_encoder. The crtc->port needs
> to be initialized for drm_of_find_possible_crtcs() to work.
> 
> Signed-off-by: Jyri Sarha <jsarha@ti.com>
> ---
>  drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> index 248e3ea..1eb4e0e 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> @@ -124,6 +124,7 @@ static void tilcdc_crtc_destroy(struct drm_crtc *crtc)
>  
>  	tilcdc_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
>  
> +	of_node_put(crtc->port);
>  	drm_crtc_cleanup(crtc);
>  	drm_flip_work_cleanup(&tilcdc_crtc->unref_work);
>  
> @@ -749,6 +750,7 @@ irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc)
>  
>  struct drm_crtc *tilcdc_crtc_create(struct drm_device *dev)
>  {
> +	struct tilcdc_drm_private *priv = dev->dev_private;
>  	struct tilcdc_crtc *tilcdc_crtc;
>  	struct drm_crtc *crtc;
>  	int ret;
> @@ -775,6 +777,20 @@ struct drm_crtc *tilcdc_crtc_create(struct drm_device *dev)
>  
>  	drm_crtc_helper_add(crtc, &tilcdc_crtc_helper_funcs);
>  
> +	if (priv->is_componentized) {
> +		struct device_node *ports =
> +			of_get_child_by_name(dev->dev->of_node, "ports");
> +
> +		if (ports) {
> +			crtc->port = of_get_child_by_name(ports, "port");
> +			of_node_put(ports);
> +		} else {
> +			crtc->port =
> +				of_get_child_by_name(dev->dev->of_node, "port");
> +		}
> +		WARN_ON(!crtc->port);
> +	}

You didn't comment on why this is not an error? Why should the driver
continue even if crtc->port is missing?

 Tomi


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-02-23 15:19 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23 15:03 [PATCH v3 00/22] drm/ticdc: Accumulated fixes over the past couple of years Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 01/22] drm/tilcdc: rewrite pixel clock calculation Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 02/22] drm/tilcdc: verify fb pitch Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 03/22] drm/tilcdc: adopt pinctrl support Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 04/22] drm/tilcdc: fix kernel panic on suspend when no hdmi monitor connected Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 05/22] drm/tilcdc: make frame_done interrupt active at all times Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 06/22] drm/tilcdc: disable the lcd controller/dma engine when suspend invoked Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 07/22] drm/tilcdc: Implement dma-buf support for tilcdc Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 08/22] drm/tilcdc: fix build error when !CONFIG_CPU_FREQ Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 09/22] drm/tilcdc: Allocate register storage based on the actual number registers Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 10/22] drm/tilcdc: cleanup runtime PM handling Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 11/22] drm/tilcdc: disable crtc on unload Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 12/22] drm/tilcdc: split reset to a separate function Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 13/22] drm/tilcdc: remove broken error handling Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 14/22] drm/tilcdc: cleanup irq handling Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 15/22] drm/tilcdc: Get rid of complex ping-pong mechanism Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 16/22] drm/tilcdc: Do not update the next frame buffer close to vertical blank Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 17/22] drm/tilcdc: Fix interrupt enable/disable code for version 2 tilcdc Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 18/22] drm/tilcdc: Remove the duplicate LCDC_INT_ENABLE_SET_REG in registers[] Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 19/22] drm/tilcdc: Add prints on sync lost and FIFO underrun interrupts Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 20/22] drm/tilcdc: Disable sync lost interrupt if it fires on every frame Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 21/22] drm/tilcdc: Initialize crtc->port Jyri Sarha
2016-02-23 15:19   ` Tomi Valkeinen [this message]
2016-02-23 15:26     ` Jyri Sarha
2016-02-23 15:32       ` Tomi Valkeinen
2016-02-23 15:37         ` Jyri Sarha
2016-02-23 15:03 ` [PATCH v3 22/22] drm/tilcdc: Use devm_kzalloc() and devm_kcalloc() for private data Jyri Sarha
2016-02-24 12:38   ` Tomi Valkeinen
2016-02-24 12:48     ` Jyri Sarha

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=56CC7893.1050105@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jsarha@ti.com \
    --cc=laurent.pinchart@ideasonboard.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.