dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Jyri Sarha <jsarha@ti.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCHv2 7/7] drm/omap: hdmi4: fix use of uninitialized var
Date: Fri, 4 Oct 2019 10:03:05 +0300	[thread overview]
Message-ID: <20191004070305.GC9380@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20190930103840.18970-8-tomi.valkeinen@ti.com>

Hi Tomi,

Thank you for the patch.

On Mon, Sep 30, 2019 at 01:38:40PM +0300, Tomi Valkeinen wrote:
> If use_mclk is false, mclk_mode is written to a register without
> initialization. This doesn't cause any ill effects as the written value
> is not used when use_mclk is false.
> 
> To fix this, write use_mclk only when use_mclk is true.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> index 5d5d5588ebc1..c4ffe96e28bc 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
> @@ -542,8 +542,9 @@ static void hdmi_core_audio_config(struct hdmi_core_data *core,
>  	}
>  
>  	/* Set ACR clock divisor */
> -	REG_FLD_MOD(av_base,
> -			HDMI_CORE_AV_FREQ_SVAL, cfg->mclk_mode, 2, 0);
> +	if (cfg->use_mclk)
> +		REG_FLD_MOD(av_base, HDMI_CORE_AV_FREQ_SVAL,
> +			    cfg->mclk_mode, 2, 0);
>  
>  	r = hdmi_read_reg(av_base, HDMI_CORE_AV_ACR_CTRL);
>  	/*

-- 
Regards,

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

  reply	other threads:[~2019-10-04  7:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-30 10:38 [PATCHv2 0/7] drm/omap: misc improvements Tomi Valkeinen
2019-09-30 10:38 ` [PATCHv2 1/7] drm/omap: drop unneeded locking from mgr_fld_write() Tomi Valkeinen
2019-09-30 10:38 ` [PATCHv2 2/7] drm/omap: avoid copy in mgr_fld_read/write Tomi Valkeinen
2019-10-04  7:02   ` Laurent Pinchart
2019-09-30 10:38 ` [PATCHv2 3/7] drm/omap: tweak HDMI DDC timings Tomi Valkeinen
2019-09-30 10:38 ` [PATCHv2 4/7] drm/omap: fix missing scaler pixel fmt limitations Tomi Valkeinen
2019-09-30 10:38 ` [PATCHv2 5/7] drm/omap: dss: move platform_register_drivers() to dss.c and remove core.c Tomi Valkeinen
2019-09-30 10:38 ` [PATCHv2 6/7] drm/omap: hdmi5: automatically choose limited/full range output Tomi Valkeinen
2019-09-30 10:38 ` [PATCHv2 7/7] drm/omap: hdmi4: fix use of uninitialized var Tomi Valkeinen
2019-10-04  7:03   ` Laurent Pinchart [this message]
2019-10-08 14:13   ` Tony Lindgren
2019-10-08 14:16     ` Tomi Valkeinen
2019-10-08 14:21       ` Tony Lindgren
2019-10-10  6:47         ` Tomi Valkeinen
2019-10-10 13:24           ` Tony Lindgren
2019-10-11 10:25             ` Tomi Valkeinen
2019-10-11 16:10               ` Tony Lindgren

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=20191004070305.GC9380@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jsarha@ti.com \
    --cc=tomi.valkeinen@ti.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