Linux Media Controller development
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Johannes Schellen <Johannes.Schellen@rwth-aachen.de>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH] omap3isp: Fix histogram regions
Date: Mon, 21 Jan 2013 11:19:06 +0100	[thread overview]
Message-ID: <1458907.C3QX6jGXBz@avalon> (raw)
In-Reply-To: <0MGG003PWV15AG70@relay-auth-2.ms.rz.rwth-aachen.de>

Hi Johannes,

On Friday 11 January 2013 16:00:19 Johannes Schellen wrote:
> From: Johannes Schellen <Johannes.Schellen@rwth-aachen.de>
> 
> This patch fixes a bug which causes all histogram regions to start in the
> top left corner of the image. The histogram region coordinates are 16 bit
> values which share a 32 bit register. The bug is due to the region end
> value assignments overwriting the region start values with zero.
> Signed-off-by: Johannes Schellen <Johannes.Schellen@rwth-aachen.de>

Good catch, thanks.

I've applied the patch to my tree.

> ---
> The patch is against v3.8-rc3
> 
> --- linux-3.8-rc3/drivers/media/platform/omap3isp/isphist.c.orig
> +++ linux-3.8-rc3/drivers/media/platform/omap3isp/isphist.c
> @@ -114,14 +114,14 @@ static void hist_setup_regs(struct ispst
>  	/* Regions size and position */
>  	for (c = 0; c < OMAP3ISP_HIST_MAX_REGIONS; c++) {
>  		if (c < conf->num_regions) {
> -			reg_hor[c] = conf->region[c].h_start <<
> -				     ISPHIST_REG_START_SHIFT;
> -			reg_hor[c] = conf->region[c].h_end <<
> -				     ISPHIST_REG_END_SHIFT;
> -			reg_ver[c] = conf->region[c].v_start <<
> -				     ISPHIST_REG_START_SHIFT;
> -			reg_ver[c] = conf->region[c].v_end <<
> -				     ISPHIST_REG_END_SHIFT;
> +			reg_hor[c] = (conf->region[c].h_start <<
> +				     ISPHIST_REG_START_SHIFT)
> +			           | (conf->region[c].h_end <<
> +				     ISPHIST_REG_END_SHIFT);
> +			reg_ver[c] = (conf->region[c].v_start <<
> +				     ISPHIST_REG_START_SHIFT)
> +			           | (conf->region[c].v_end <<
> +				     ISPHIST_REG_END_SHIFT);
>  		} else {
>  			reg_hor[c] = 0;
>  			reg_ver[c] = 0;

-- 
Regards,

Laurent Pinchart


      reply	other threads:[~2013-01-21 10:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-11 15:00 [PATCH] omap3isp: Fix histogram regions Johannes Schellen
2013-01-21 10:19 ` Laurent Pinchart [this message]

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=1458907.C3QX6jGXBz@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=Johannes.Schellen@rwth-aachen.de \
    --cc=linux-media@vger.kernel.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