All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Russell King <rmk+kernel@armlinux.org.uk>,
	David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 1/7] drm/i2c: tda998x: move mutex/waitqueue/timer/work init early
Date: Wed, 6 Dec 2017 14:51:31 +0100	[thread overview]
Message-ID: <1750d773-556b-aabc-5ac7-db7d977b64c4@xs4all.nl> (raw)
In-Reply-To: <E1eMYv5-0004VR-NJ@rmk-PC.armlinux.org.uk>

On 12/06/17 13:35, Russell King wrote:
> Move the mutex, waitqueue, timer and detect work initialisation early
> in the driver's initialisation, rather than being after we've registered
> the CEC device.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>

Regards,

	Hans

> ---
>  drivers/gpu/drm/i2c/tda998x_drv.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
> index 127815253a84..7f4dbca7f7f4 100644
> --- a/drivers/gpu/drm/i2c/tda998x_drv.c
> +++ b/drivers/gpu/drm/i2c/tda998x_drv.c
> @@ -1476,7 +1476,11 @@ static int tda998x_create(struct i2c_client *client, struct tda998x_priv *priv)
>  	u32 video;
>  	int rev_lo, rev_hi, ret;
>  
> -	mutex_init(&priv->audio_mutex); /* Protect access from audio thread */
> +	mutex_init(&priv->mutex);	/* protect the page access */
> +	mutex_init(&priv->audio_mutex); /* protect access from audio thread */
> +	init_waitqueue_head(&priv->edid_delay_waitq);
> +	timer_setup(&priv->edid_delay_timer, tda998x_edid_delay_done, 0);
> +	INIT_WORK(&priv->detect_work, tda998x_detect_work);
>  
>  	priv->vip_cntrl_0 = VIP_CNTRL_0_SWAP_A(2) | VIP_CNTRL_0_SWAP_B(3);
>  	priv->vip_cntrl_1 = VIP_CNTRL_1_SWAP_C(0) | VIP_CNTRL_1_SWAP_D(1);
> @@ -1490,11 +1494,6 @@ static int tda998x_create(struct i2c_client *client, struct tda998x_priv *priv)
>  	if (!priv->cec)
>  		return -ENODEV;
>  
> -	mutex_init(&priv->mutex);	/* protect the page access */
> -	init_waitqueue_head(&priv->edid_delay_waitq);
> -	timer_setup(&priv->edid_delay_timer, tda998x_edid_delay_done, 0);
> -	INIT_WORK(&priv->detect_work, tda998x_detect_work);
> -
>  	/* wake up the device: */
>  	cec_write(priv, REG_CEC_ENAMODS,
>  			CEC_ENAMODS_EN_RXSENS | CEC_ENAMODS_EN_HDMI);
> 

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

  reply	other threads:[~2017-12-06 13:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06 12:34 [PATCH v2 0/7] TDA998x CEC support Russell King - ARM Linux
2017-12-06 12:35 ` [PATCH v2 1/7] drm/i2c: tda998x: move mutex/waitqueue/timer/work init early Russell King
2017-12-06 13:51   ` Hans Verkuil [this message]
2017-12-06 12:35 ` [PATCH v2 2/7] drm/i2c: tda998x: move CEC device initialisation later Russell King
2017-12-06 13:54   ` Hans Verkuil
2017-12-08 11:59     ` Russell King - ARM Linux
2017-12-12 14:37       ` Hans Verkuil
2017-12-12 14:50         ` Russell King - ARM Linux
2017-12-06 12:35 ` [PATCH v2 3/7] drm/i2c: tda998x: fix error cleanup paths Russell King
2017-12-06 13:55   ` Hans Verkuil
2017-12-06 12:35 ` [PATCH v2 4/7] drm/i2c: tda998x: always disable and clear interrupts at probe Russell King
2017-12-06 13:55   ` Hans Verkuil
2017-12-06 12:35 ` [PATCH v2 5/7] drm/i2c: tda9950: add CEC driver Russell King
2017-12-06 14:11   ` Hans Verkuil
2017-12-11 10:34     ` Russell King - ARM Linux
2017-12-06 12:35 ` [PATCH v2 6/7] drm/i2c: tda998x: add CEC support Russell King
2017-12-06 13:50   ` Hans Verkuil
2017-12-08 11:57     ` Russell King - ARM Linux
2017-12-08 12:14       ` Hans Verkuil
     [not found] ` <20171206123452.GA13127-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2017-12-06 12:35   ` [PATCH v2 7/7] dt-bindings: tda998x: add the calibration gpio Russell King
     [not found]     ` <E1eMYva-0004WA-Hf-eh5Bv4kxaXIk46pC+1QYvQNdhmdF6hFW@public.gmane.org>
2017-12-06 20:41       ` Rob Herring

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=1750d773-556b-aabc-5ac7-db7d977b64c4@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=rmk+kernel@armlinux.org.uk \
    /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.