diff options
-rw-r--r-- | drivers/video/tegra/dc/dc.c | 8 | ||||
-rw-r--r-- | drivers/video/tegra/dc/dc_priv.h | 1 | ||||
-rw-r--r-- | drivers/video/tegra/dc/dsi.c | 2 |
3 files changed, 3 insertions, 8 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c index 3d834ebc1716..e6fc06546785 100644 --- a/drivers/video/tegra/dc/dc.c +++ b/drivers/video/tegra/dc/dc.c @@ -942,7 +942,7 @@ static unsigned long tegra_dc_calc_win_bandwidth(struct tegra_dc *dc, 2 * tegra_dc_fmt_bpp(w->fmt) : tegra_dc_fmt_bpp(w->fmt); /* perform calculations with most significant bits of pixel clock * to prevent overflow of long. */ - ret = (unsigned long)(dc->pixel_clk >> 16) * + ret = (unsigned long)(dc->mode.pclk >> 16) * bpp / 8 * (win_use_v_filter(w) ? 2 : 1) * dfixed_trunc(w->w) / w->out_w * (WIN_IS_TILED(w) ? tiled_windows_bw_multiplier : 1); @@ -1545,14 +1545,14 @@ static bool check_ref_to_sync(struct tegra_dc_mode *mode) #ifdef DEBUG /* return in 1000ths of a Hertz */ -static int calc_refresh(struct tegra_dc *dc, const struct tegra_dc_mode *m) +static int calc_refresh(const struct tegra_dc_mode *m) { long h_total, v_total, refresh; h_total = m->h_active + m->h_front_porch + m->h_back_porch + m->h_sync_width; v_total = m->v_active + m->v_front_porch + m->v_back_porch + m->v_sync_width; - refresh = dc->pixel_clk / h_total; + refresh = m->pclk / h_total; refresh *= 1000; refresh /= v_total; return refresh; @@ -1659,8 +1659,6 @@ static int tegra_dc_program_mode(struct tegra_dc *dc, struct tegra_dc_mode *mode (mode->h_active << 16) | mode->v_active); #endif - dc->pixel_clk = dc->mode.pclk; - return 0; } diff --git a/drivers/video/tegra/dc/dc_priv.h b/drivers/video/tegra/dc/dc_priv.h index f52743d7e351..1451db8b5440 100644 --- a/drivers/video/tegra/dc/dc_priv.h +++ b/drivers/video/tegra/dc/dc_priv.h @@ -78,7 +78,6 @@ struct tegra_dc { void __iomem *base; int irq; - int pixel_clk; struct clk *clk; struct clk *emc_clk; int emc_clk_rate; diff --git a/drivers/video/tegra/dc/dsi.c b/drivers/video/tegra/dc/dsi.c index 506dfd7437af..5c120342f52a 100644 --- a/drivers/video/tegra/dc/dsi.c +++ b/drivers/video/tegra/dc/dsi.c @@ -457,8 +457,6 @@ static void tegra_dsi_init_sw(struct tegra_dc *dc, /* Calculate minimum required pixel rate. */ pixel_clk_hz = h_width_pixels * v_width_lines * dsi->info.refresh_rate; - dc->pixel_clk = pixel_clk_hz; - /* Calculate minimum byte rate on DSI interface. */ byte_clk_hz = (pixel_clk_hz * dsi->pixel_scaler_mul) / (dsi->pixel_scaler_div * dsi->info.n_data_lanes); |