Re: [PATCH 1/2] video: tegra: Add dc color dithering support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 15, 2011 at 8:18 PM, Robert Morell <rmorell@xxxxxxxxxx> wrote:

 snip

> +       /*
> +        * The line buffer for error-diffusion dither is limited to 640 pixels
> +        * per line, so we can't use it if the active region is larger than 640
> +        * pixels.  Be nice and fall back to ordered dithering, but warn so the
> +        * platform data can be corrected.
> +        */
> +       if (WARN_ON(dc->out->dither == TEGRA_DC_ERRDIFF_DITHER &&
> +                   dc->mode.h_active > 640)) {
> +               dc->out->dither = TEGRA_DC_ORDERED_DITHER;
> +       }

snip

> +       case TEGRA_DC_ERRDIFF_DITHER:
> +               BUG_ON(dc->mode.h_active > 640);
> +               color_control |= DITHER_CONTROL_ERRDIFF;
> +               break;
> +       }

Since you explicitly make this condition impossible above, the BUG_ON
is not needed.

-Erik
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux