mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 05:17:10 +09:00
Revert "video: tegra: add utility function to compute framebuffer stride"
This reverts commit 10c751b8f5.
Change-Id: I236ddcd531d3ca17c8727cac84e6d2aa6e27dbe1
This commit is contained in:
@@ -25,15 +25,6 @@
|
||||
#define TEGRA_MAX_DC 2
|
||||
#define DC_N_WINDOWS 3
|
||||
|
||||
#define TEGRA_DC_PITCH_ATOM 16
|
||||
#define TEGRA_DC_TILED_ATOM 16
|
||||
|
||||
enum tegra_win_layout {
|
||||
TEGRA_WIN_LAYOUT_PITCH,
|
||||
TEGRA_WIN_LAYOUT_TILED,
|
||||
TEGRA_WIN_LAYOUT_LINEAR_TILED,
|
||||
};
|
||||
|
||||
struct tegra_dc_mode {
|
||||
int pclk;
|
||||
int h_ref_to_sync;
|
||||
@@ -105,7 +96,6 @@ struct tegra_dc_win {
|
||||
unsigned out_w;
|
||||
unsigned out_h;
|
||||
unsigned z;
|
||||
enum tegra_win_layout layout;
|
||||
|
||||
int dirty;
|
||||
struct tegra_dc *dc;
|
||||
@@ -181,7 +171,4 @@ int tegra_dc_sync_windows(struct tegra_dc_win *windows[], int n);
|
||||
|
||||
int tegra_dc_set_mode(struct tegra_dc *dc, const struct tegra_dc_mode *mode);
|
||||
|
||||
ssize_t tegra_dc_compute_stride(int xres, int bpp,
|
||||
enum tegra_win_layout layout);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -328,20 +328,6 @@ struct tegra_dc *tegra_dc_get_dc(unsigned idx)
|
||||
}
|
||||
EXPORT_SYMBOL(tegra_dc_get_dc);
|
||||
|
||||
ssize_t tegra_dc_compute_stride(int xres, int bpp, enum tegra_win_layout layout)
|
||||
{
|
||||
unsigned int raw_stride = (xres * bpp) / 8;
|
||||
unsigned int k, n = 0;
|
||||
|
||||
if (layout == TEGRA_WIN_LAYOUT_PITCH)
|
||||
return ALIGN(raw_stride, TEGRA_DC_PITCH_ATOM);
|
||||
else if (layout == TEGRA_WIN_LAYOUT_TILED)
|
||||
return ALIGN(raw_stride, TEGRA_DC_TILED_ATOM);
|
||||
else
|
||||
return -EINVAL;
|
||||
}
|
||||
EXPORT_SYMBOL(tegra_dc_compute_stride);
|
||||
|
||||
struct tegra_dc_win *tegra_dc_get_window(struct tegra_dc *dc, unsigned win)
|
||||
{
|
||||
if (win >= dc->n_windows)
|
||||
|
||||
@@ -148,10 +148,7 @@ static int tegra_fb_set_par(struct fb_info *info)
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
info->fix.line_length = tegra_dc_compute_stride(var->xres,
|
||||
var->bits_per_pixel, TEGRA_WIN_LAYOUT_PITCH);
|
||||
tegra_fb->win->stride = info->fix.line_length;
|
||||
info->fix.line_length = var->xres * var->bits_per_pixel / 8;
|
||||
|
||||
if (var->pixclock) {
|
||||
struct tegra_dc_mode mode;
|
||||
@@ -681,9 +678,7 @@ struct tegra_fb_info *tegra_fb_register(struct nvhost_device *ndev,
|
||||
win->z = 0;
|
||||
win->phys_addr = fb_phys;
|
||||
win->virt_addr = fb_base;
|
||||
win->layout = TEGRA_WIN_LAYOUT_PITCH;
|
||||
win->stride = tegra_dc_compute_stride(fb_data->xres,
|
||||
fb_data->bits_per_pixel, win->layout);
|
||||
win->stride = fb_data->xres * fb_data->bits_per_pixel / 8;
|
||||
win->flags = TEGRA_WIN_FLAG_ENABLED;
|
||||
|
||||
if (fb_mem)
|
||||
|
||||
Reference in New Issue
Block a user