drm/tegra: sor - Use bits-per-color from panel
authorStéphane Marchesin <marcheu@chromium.org>
Fri, 20 Jun 2014 01:18:29 +0000 (18:18 -0700)
committerThierry Reding <treding@nvidia.com>
Mon, 4 Aug 2014 08:07:37 +0000 (10:07 +0200)
This change uses the value of bits-per-color from panel to remove one
more hardcoded value.

Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/sor.c

index 64f57fa9b8f69c2e965aebb6e7c56f76dc00e1c2..479da1b210b44c9df99a6224411368e0956347a0 100644 (file)
@@ -525,7 +525,7 @@ static int tegra_output_sor_enable(struct tegra_output *output)
                dev_err(sor->dev, "failed to set safe parent clock: %d\n", err);
 
        memset(&config, 0, sizeof(config));
-       config.bits_per_pixel = 24; /* XXX: don't hardcode? */
+       config.bits_per_pixel = output->connector.display_info.bpc * 3;
 
        err = tegra_sor_calc_config(sor, mode, &config, &link);
        if (err < 0)