|
@@ -75,7 +75,7 @@ struct dispc_features {
|
|
unsigned long max_lcd_pclk;
|
|
unsigned long max_lcd_pclk;
|
|
unsigned long max_tv_pclk;
|
|
unsigned long max_tv_pclk;
|
|
int (*calc_scaling) (unsigned long pclk, unsigned long lclk,
|
|
int (*calc_scaling) (unsigned long pclk, unsigned long lclk,
|
|
- const struct videomode *mgr_timings,
|
|
|
|
|
|
+ const struct videomode *vm,
|
|
u16 width, u16 height, u16 out_width, u16 out_height,
|
|
u16 width, u16 height, u16 out_width, u16 out_height,
|
|
enum omap_color_mode color_mode, bool *five_taps,
|
|
enum omap_color_mode color_mode, bool *five_taps,
|
|
int *x_predecim, int *y_predecim, int *decim_x, int *decim_y,
|
|
int *x_predecim, int *y_predecim, int *decim_x, int *decim_y,
|
|
@@ -2179,7 +2179,7 @@ static void calc_tiler_rotation_offset(u16 screen_width, u16 width,
|
|
* undocumented horizontal position and timing related limitations.
|
|
* undocumented horizontal position and timing related limitations.
|
|
*/
|
|
*/
|
|
static int check_horiz_timing_omap3(unsigned long pclk, unsigned long lclk,
|
|
static int check_horiz_timing_omap3(unsigned long pclk, unsigned long lclk,
|
|
- const struct videomode *t, u16 pos_x,
|
|
|
|
|
|
+ const struct videomode *vm, u16 pos_x,
|
|
u16 width, u16 height, u16 out_width, u16 out_height,
|
|
u16 width, u16 height, u16 out_width, u16 out_height,
|
|
bool five_taps)
|
|
bool five_taps)
|
|
{
|
|
{
|
|
@@ -2189,15 +2189,15 @@ static int check_horiz_timing_omap3(unsigned long pclk, unsigned long lclk,
|
|
u64 val, blank;
|
|
u64 val, blank;
|
|
int i;
|
|
int i;
|
|
|
|
|
|
- nonactive = t->hactive + t->hfront_porch + t->hsync_len +
|
|
|
|
- t->hback_porch - out_width;
|
|
|
|
|
|
+ nonactive = vm->hactive + vm->hfront_porch + vm->hsync_len +
|
|
|
|
+ vm->hback_porch - out_width;
|
|
|
|
|
|
i = 0;
|
|
i = 0;
|
|
if (out_height < height)
|
|
if (out_height < height)
|
|
i++;
|
|
i++;
|
|
if (out_width < width)
|
|
if (out_width < width)
|
|
i++;
|
|
i++;
|
|
- blank = div_u64((u64)(t->hback_porch + t->hsync_len + t->hfront_porch) *
|
|
|
|
|
|
+ blank = div_u64((u64)(vm->hback_porch + vm->hsync_len + vm->hfront_porch) *
|
|
lclk, pclk);
|
|
lclk, pclk);
|
|
DSSDBG("blanking period + ppl = %llu (limit = %u)\n", blank, limits[i]);
|
|
DSSDBG("blanking period + ppl = %llu (limit = %u)\n", blank, limits[i]);
|
|
if (blank <= limits[i])
|
|
if (blank <= limits[i])
|
|
@@ -2233,7 +2233,7 @@ static int check_horiz_timing_omap3(unsigned long pclk, unsigned long lclk,
|
|
}
|
|
}
|
|
|
|
|
|
static unsigned long calc_core_clk_five_taps(unsigned long pclk,
|
|
static unsigned long calc_core_clk_five_taps(unsigned long pclk,
|
|
- const struct videomode *mgr_timings, u16 width,
|
|
|
|
|
|
+ const struct videomode *vm, u16 width,
|
|
u16 height, u16 out_width, u16 out_height,
|
|
u16 height, u16 out_width, u16 out_height,
|
|
enum omap_color_mode color_mode)
|
|
enum omap_color_mode color_mode)
|
|
{
|
|
{
|
|
@@ -2244,7 +2244,7 @@ static unsigned long calc_core_clk_five_taps(unsigned long pclk,
|
|
return (unsigned long) pclk;
|
|
return (unsigned long) pclk;
|
|
|
|
|
|
if (height > out_height) {
|
|
if (height > out_height) {
|
|
- unsigned int ppl = mgr_timings->hactive;
|
|
|
|
|
|
+ unsigned int ppl = vm->hactive;
|
|
|
|
|
|
tmp = (u64)pclk * height * out_width;
|
|
tmp = (u64)pclk * height * out_width;
|
|
do_div(tmp, 2 * out_height * ppl);
|
|
do_div(tmp, 2 * out_height * ppl);
|
|
@@ -2326,7 +2326,7 @@ static unsigned long calc_core_clk_44xx(unsigned long pclk, u16 width,
|
|
}
|
|
}
|
|
|
|
|
|
static int dispc_ovl_calc_scaling_24xx(unsigned long pclk, unsigned long lclk,
|
|
static int dispc_ovl_calc_scaling_24xx(unsigned long pclk, unsigned long lclk,
|
|
- const struct videomode *mgr_timings,
|
|
|
|
|
|
+ const struct videomode *vm,
|
|
u16 width, u16 height, u16 out_width, u16 out_height,
|
|
u16 width, u16 height, u16 out_width, u16 out_height,
|
|
enum omap_color_mode color_mode, bool *five_taps,
|
|
enum omap_color_mode color_mode, bool *five_taps,
|
|
int *x_predecim, int *y_predecim, int *decim_x, int *decim_y,
|
|
int *x_predecim, int *y_predecim, int *decim_x, int *decim_y,
|
|
@@ -2372,7 +2372,7 @@ static int dispc_ovl_calc_scaling_24xx(unsigned long pclk, unsigned long lclk,
|
|
}
|
|
}
|
|
|
|
|
|
static int dispc_ovl_calc_scaling_34xx(unsigned long pclk, unsigned long lclk,
|
|
static int dispc_ovl_calc_scaling_34xx(unsigned long pclk, unsigned long lclk,
|
|
- const struct videomode *mgr_timings,
|
|
|
|
|
|
+ const struct videomode *vm,
|
|
u16 width, u16 height, u16 out_width, u16 out_height,
|
|
u16 width, u16 height, u16 out_width, u16 out_height,
|
|
enum omap_color_mode color_mode, bool *five_taps,
|
|
enum omap_color_mode color_mode, bool *five_taps,
|
|
int *x_predecim, int *y_predecim, int *decim_x, int *decim_y,
|
|
int *x_predecim, int *y_predecim, int *decim_x, int *decim_y,
|
|
@@ -2394,7 +2394,7 @@ static int dispc_ovl_calc_scaling_34xx(unsigned long pclk, unsigned long lclk,
|
|
*five_taps = false;
|
|
*five_taps = false;
|
|
again:
|
|
again:
|
|
if (*five_taps)
|
|
if (*five_taps)
|
|
- *core_clk = calc_core_clk_five_taps(pclk, mgr_timings,
|
|
|
|
|
|
+ *core_clk = calc_core_clk_five_taps(pclk, vm,
|
|
in_width, in_height, out_width,
|
|
in_width, in_height, out_width,
|
|
out_height, color_mode);
|
|
out_height, color_mode);
|
|
else
|
|
else
|
|
@@ -2402,7 +2402,7 @@ again:
|
|
in_height, out_width, out_height,
|
|
in_height, out_width, out_height,
|
|
mem_to_mem);
|
|
mem_to_mem);
|
|
|
|
|
|
- error = check_horiz_timing_omap3(pclk, lclk, mgr_timings,
|
|
|
|
|
|
+ error = check_horiz_timing_omap3(pclk, lclk, vm,
|
|
pos_x, in_width, in_height, out_width,
|
|
pos_x, in_width, in_height, out_width,
|
|
out_height, *five_taps);
|
|
out_height, *five_taps);
|
|
if (error && *five_taps) {
|
|
if (error && *five_taps) {
|
|
@@ -2437,7 +2437,7 @@ again:
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
- if (check_horiz_timing_omap3(pclk, lclk, mgr_timings, pos_x, in_width,
|
|
|
|
|
|
+ if (check_horiz_timing_omap3(pclk, lclk, vm, pos_x, in_width,
|
|
in_height, out_width, out_height, *five_taps)) {
|
|
in_height, out_width, out_height, *five_taps)) {
|
|
DSSERR("horizontal timing too tight\n");
|
|
DSSERR("horizontal timing too tight\n");
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
@@ -2457,7 +2457,7 @@ again:
|
|
}
|
|
}
|
|
|
|
|
|
static int dispc_ovl_calc_scaling_44xx(unsigned long pclk, unsigned long lclk,
|
|
static int dispc_ovl_calc_scaling_44xx(unsigned long pclk, unsigned long lclk,
|
|
- const struct videomode *mgr_timings,
|
|
|
|
|
|
+ const struct videomode *vm,
|
|
u16 width, u16 height, u16 out_width, u16 out_height,
|
|
u16 width, u16 height, u16 out_width, u16 out_height,
|
|
enum omap_color_mode color_mode, bool *five_taps,
|
|
enum omap_color_mode color_mode, bool *five_taps,
|
|
int *x_predecim, int *y_predecim, int *decim_x, int *decim_y,
|
|
int *x_predecim, int *y_predecim, int *decim_x, int *decim_y,
|
|
@@ -2503,7 +2503,7 @@ static int dispc_ovl_calc_scaling_44xx(unsigned long pclk, unsigned long lclk,
|
|
|
|
|
|
static int dispc_ovl_calc_scaling(unsigned long pclk, unsigned long lclk,
|
|
static int dispc_ovl_calc_scaling(unsigned long pclk, unsigned long lclk,
|
|
enum omap_overlay_caps caps,
|
|
enum omap_overlay_caps caps,
|
|
- const struct videomode *mgr_timings,
|
|
|
|
|
|
+ const struct videomode *vm,
|
|
u16 width, u16 height, u16 out_width, u16 out_height,
|
|
u16 width, u16 height, u16 out_width, u16 out_height,
|
|
enum omap_color_mode color_mode, bool *five_taps,
|
|
enum omap_color_mode color_mode, bool *five_taps,
|
|
int *x_predecim, int *y_predecim, u16 pos_x,
|
|
int *x_predecim, int *y_predecim, u16 pos_x,
|
|
@@ -2517,7 +2517,7 @@ static int dispc_ovl_calc_scaling(unsigned long pclk, unsigned long lclk,
|
|
if (width == out_width && height == out_height)
|
|
if (width == out_width && height == out_height)
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
- if (!mem_to_mem && (pclk == 0 || mgr_timings->pixelclock == 0)) {
|
|
|
|
|
|
+ if (!mem_to_mem && (pclk == 0 || vm->pixelclock == 0)) {
|
|
DSSERR("cannot calculate scaling settings: pclk is zero\n");
|
|
DSSERR("cannot calculate scaling settings: pclk is zero\n");
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
@@ -2553,7 +2553,7 @@ static int dispc_ovl_calc_scaling(unsigned long pclk, unsigned long lclk,
|
|
if (decim_y > *y_predecim || out_height > height * 8)
|
|
if (decim_y > *y_predecim || out_height > height * 8)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
- ret = dispc.feat->calc_scaling(pclk, lclk, mgr_timings, width, height,
|
|
|
|
|
|
+ ret = dispc.feat->calc_scaling(pclk, lclk, vm, width, height,
|
|
out_width, out_height, color_mode, five_taps,
|
|
out_width, out_height, color_mode, five_taps,
|
|
x_predecim, y_predecim, &decim_x, &decim_y, pos_x, &core_clk,
|
|
x_predecim, y_predecim, &decim_x, &decim_y, pos_x, &core_clk,
|
|
mem_to_mem);
|
|
mem_to_mem);
|
|
@@ -2593,7 +2593,7 @@ static int dispc_ovl_setup_common(enum omap_plane plane,
|
|
u16 out_width, u16 out_height, enum omap_color_mode color_mode,
|
|
u16 out_width, u16 out_height, enum omap_color_mode color_mode,
|
|
u8 rotation, bool mirror, u8 zorder, u8 pre_mult_alpha,
|
|
u8 rotation, bool mirror, u8 zorder, u8 pre_mult_alpha,
|
|
u8 global_alpha, enum omap_dss_rotation_type rotation_type,
|
|
u8 global_alpha, enum omap_dss_rotation_type rotation_type,
|
|
- bool replication, const struct videomode *mgr_timings,
|
|
|
|
|
|
+ bool replication, const struct videomode *vm,
|
|
bool mem_to_mem)
|
|
bool mem_to_mem)
|
|
{
|
|
{
|
|
bool five_taps = true;
|
|
bool five_taps = true;
|
|
@@ -2607,7 +2607,7 @@ static int dispc_ovl_setup_common(enum omap_plane plane,
|
|
u16 in_height = height;
|
|
u16 in_height = height;
|
|
u16 in_width = width;
|
|
u16 in_width = width;
|
|
int x_predecim = 1, y_predecim = 1;
|
|
int x_predecim = 1, y_predecim = 1;
|
|
- bool ilace = !!(mgr_timings->flags & DISPLAY_FLAGS_INTERLACED);
|
|
|
|
|
|
+ bool ilace = !!(vm->flags & DISPLAY_FLAGS_INTERLACED);
|
|
unsigned long pclk = dispc_plane_pclk_rate(plane);
|
|
unsigned long pclk = dispc_plane_pclk_rate(plane);
|
|
unsigned long lclk = dispc_plane_lclk_rate(plane);
|
|
unsigned long lclk = dispc_plane_lclk_rate(plane);
|
|
|
|
|
|
@@ -2649,7 +2649,7 @@ static int dispc_ovl_setup_common(enum omap_plane plane,
|
|
if (!dss_feat_color_mode_supported(plane, color_mode))
|
|
if (!dss_feat_color_mode_supported(plane, color_mode))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
- r = dispc_ovl_calc_scaling(pclk, lclk, caps, mgr_timings, in_width,
|
|
|
|
|
|
+ r = dispc_ovl_calc_scaling(pclk, lclk, caps, vm, in_width,
|
|
in_height, out_width, out_height, color_mode,
|
|
in_height, out_width, out_height, color_mode,
|
|
&five_taps, &x_predecim, &y_predecim, pos_x,
|
|
&five_taps, &x_predecim, &y_predecim, pos_x,
|
|
rotation_type, mem_to_mem);
|
|
rotation_type, mem_to_mem);
|
|
@@ -2786,7 +2786,7 @@ static int dispc_ovl_setup_common(enum omap_plane plane,
|
|
}
|
|
}
|
|
|
|
|
|
int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi,
|
|
int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi,
|
|
- bool replication, const struct videomode *mgr_timings,
|
|
|
|
|
|
+ bool replication, const struct videomode *vm,
|
|
bool mem_to_mem)
|
|
bool mem_to_mem)
|
|
{
|
|
{
|
|
int r;
|
|
int r;
|
|
@@ -2805,14 +2805,14 @@ int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi,
|
|
oi->screen_width, oi->pos_x, oi->pos_y, oi->width, oi->height,
|
|
oi->screen_width, oi->pos_x, oi->pos_y, oi->width, oi->height,
|
|
oi->out_width, oi->out_height, oi->color_mode, oi->rotation,
|
|
oi->out_width, oi->out_height, oi->color_mode, oi->rotation,
|
|
oi->mirror, oi->zorder, oi->pre_mult_alpha, oi->global_alpha,
|
|
oi->mirror, oi->zorder, oi->pre_mult_alpha, oi->global_alpha,
|
|
- oi->rotation_type, replication, mgr_timings, mem_to_mem);
|
|
|
|
|
|
+ oi->rotation_type, replication, vm, mem_to_mem);
|
|
|
|
|
|
return r;
|
|
return r;
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(dispc_ovl_setup);
|
|
EXPORT_SYMBOL(dispc_ovl_setup);
|
|
|
|
|
|
int dispc_wb_setup(const struct omap_dss_writeback_info *wi,
|
|
int dispc_wb_setup(const struct omap_dss_writeback_info *wi,
|
|
- bool mem_to_mem, const struct videomode *mgr_timings)
|
|
|
|
|
|
+ bool mem_to_mem, const struct videomode *vm)
|
|
{
|
|
{
|
|
int r;
|
|
int r;
|
|
u32 l;
|
|
u32 l;
|
|
@@ -2821,8 +2821,8 @@ int dispc_wb_setup(const struct omap_dss_writeback_info *wi,
|
|
const u8 zorder = 0, global_alpha = 0;
|
|
const u8 zorder = 0, global_alpha = 0;
|
|
const bool replication = false;
|
|
const bool replication = false;
|
|
bool truncation;
|
|
bool truncation;
|
|
- int in_width = mgr_timings->hactive;
|
|
|
|
- int in_height = mgr_timings->vactive;
|
|
|
|
|
|
+ int in_width = vm->hactive;
|
|
|
|
+ int in_height = vm->vactive;
|
|
enum omap_overlay_caps caps =
|
|
enum omap_overlay_caps caps =
|
|
OMAP_DSS_OVL_CAP_SCALE | OMAP_DSS_OVL_CAP_PRE_MULT_ALPHA;
|
|
OMAP_DSS_OVL_CAP_SCALE | OMAP_DSS_OVL_CAP_PRE_MULT_ALPHA;
|
|
|
|
|
|
@@ -2835,7 +2835,7 @@ int dispc_wb_setup(const struct omap_dss_writeback_info *wi,
|
|
wi->buf_width, pos_x, pos_y, in_width, in_height, wi->width,
|
|
wi->buf_width, pos_x, pos_y, in_width, in_height, wi->width,
|
|
wi->height, wi->color_mode, wi->rotation, wi->mirror, zorder,
|
|
wi->height, wi->color_mode, wi->rotation, wi->mirror, zorder,
|
|
wi->pre_mult_alpha, global_alpha, wi->rotation_type,
|
|
wi->pre_mult_alpha, global_alpha, wi->rotation_type,
|
|
- replication, mgr_timings, mem_to_mem);
|
|
|
|
|
|
+ replication, vm, mem_to_mem);
|
|
|
|
|
|
switch (wi->color_mode) {
|
|
switch (wi->color_mode) {
|
|
case OMAP_DSS_COLOR_RGB16:
|
|
case OMAP_DSS_COLOR_RGB16:
|
|
@@ -2869,9 +2869,8 @@ int dispc_wb_setup(const struct omap_dss_writeback_info *wi,
|
|
} else {
|
|
} else {
|
|
int wbdelay;
|
|
int wbdelay;
|
|
|
|
|
|
- wbdelay = min(mgr_timings->vfront_porch +
|
|
|
|
- mgr_timings->vsync_len + mgr_timings->vback_porch,
|
|
|
|
- (u32)255);
|
|
|
|
|
|
+ wbdelay = min(vm->vfront_porch +
|
|
|
|
+ vm->vsync_len + vm->vback_porch, (u32)255);
|
|
|
|
|
|
/* WBDELAYCOUNT */
|
|
/* WBDELAYCOUNT */
|
|
REG_FLD_MOD(DISPC_OVL_ATTRIBUTES2(plane), wbdelay, 7, 0);
|
|
REG_FLD_MOD(DISPC_OVL_ATTRIBUTES2(plane), wbdelay, 7, 0);
|
|
@@ -3118,24 +3117,23 @@ static bool _dispc_mgr_pclk_ok(enum omap_channel channel,
|
|
return pclk <= dispc.feat->max_tv_pclk;
|
|
return pclk <= dispc.feat->max_tv_pclk;
|
|
}
|
|
}
|
|
|
|
|
|
-bool dispc_mgr_timings_ok(enum omap_channel channel,
|
|
|
|
- const struct videomode *timings)
|
|
|
|
|
|
+bool dispc_mgr_timings_ok(enum omap_channel channel, const struct videomode *vm)
|
|
{
|
|
{
|
|
- if (!_dispc_mgr_size_ok(timings->hactive, timings->vactive))
|
|
|
|
|
|
+ if (!_dispc_mgr_size_ok(vm->hactive, vm->vactive))
|
|
return false;
|
|
return false;
|
|
|
|
|
|
- if (!_dispc_mgr_pclk_ok(channel, timings->pixelclock))
|
|
|
|
|
|
+ if (!_dispc_mgr_pclk_ok(channel, vm->pixelclock))
|
|
return false;
|
|
return false;
|
|
|
|
|
|
if (dss_mgr_is_lcd(channel)) {
|
|
if (dss_mgr_is_lcd(channel)) {
|
|
/* TODO: OMAP4+ supports interlace for LCD outputs */
|
|
/* TODO: OMAP4+ supports interlace for LCD outputs */
|
|
- if (timings->flags & DISPLAY_FLAGS_INTERLACED)
|
|
|
|
|
|
+ if (vm->flags & DISPLAY_FLAGS_INTERLACED)
|
|
return false;
|
|
return false;
|
|
|
|
|
|
- if (!_dispc_lcd_timings_ok(timings->hsync_len,
|
|
|
|
- timings->hfront_porch, timings->hback_porch,
|
|
|
|
- timings->vsync_len, timings->vfront_porch,
|
|
|
|
- timings->vback_porch))
|
|
|
|
|
|
+ if (!_dispc_lcd_timings_ok(vm->hsync_len,
|
|
|
|
+ vm->hfront_porch, vm->hback_porch,
|
|
|
|
+ vm->vsync_len, vm->vfront_porch,
|
|
|
|
+ vm->vback_porch))
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3143,37 +3141,37 @@ bool dispc_mgr_timings_ok(enum omap_channel channel,
|
|
}
|
|
}
|
|
|
|
|
|
static void _dispc_mgr_set_lcd_timings(enum omap_channel channel,
|
|
static void _dispc_mgr_set_lcd_timings(enum omap_channel channel,
|
|
- const struct videomode *ovt)
|
|
|
|
|
|
+ const struct videomode *vm)
|
|
{
|
|
{
|
|
u32 timing_h, timing_v, l;
|
|
u32 timing_h, timing_v, l;
|
|
bool onoff, rf, ipc, vs, hs, de;
|
|
bool onoff, rf, ipc, vs, hs, de;
|
|
|
|
|
|
- timing_h = FLD_VAL(ovt->hsync_len - 1, dispc.feat->sw_start, 0) |
|
|
|
|
- FLD_VAL(ovt->hfront_porch - 1, dispc.feat->fp_start, 8) |
|
|
|
|
- FLD_VAL(ovt->hback_porch - 1, dispc.feat->bp_start, 20);
|
|
|
|
- timing_v = FLD_VAL(ovt->vsync_len - 1, dispc.feat->sw_start, 0) |
|
|
|
|
- FLD_VAL(ovt->vfront_porch, dispc.feat->fp_start, 8) |
|
|
|
|
- FLD_VAL(ovt->vback_porch, dispc.feat->bp_start, 20);
|
|
|
|
|
|
+ timing_h = FLD_VAL(vm->hsync_len - 1, dispc.feat->sw_start, 0) |
|
|
|
|
+ FLD_VAL(vm->hfront_porch - 1, dispc.feat->fp_start, 8) |
|
|
|
|
+ FLD_VAL(vm->hback_porch - 1, dispc.feat->bp_start, 20);
|
|
|
|
+ timing_v = FLD_VAL(vm->vsync_len - 1, dispc.feat->sw_start, 0) |
|
|
|
|
+ FLD_VAL(vm->vfront_porch, dispc.feat->fp_start, 8) |
|
|
|
|
+ FLD_VAL(vm->vback_porch, dispc.feat->bp_start, 20);
|
|
|
|
|
|
dispc_write_reg(DISPC_TIMING_H(channel), timing_h);
|
|
dispc_write_reg(DISPC_TIMING_H(channel), timing_h);
|
|
dispc_write_reg(DISPC_TIMING_V(channel), timing_v);
|
|
dispc_write_reg(DISPC_TIMING_V(channel), timing_v);
|
|
|
|
|
|
- if (ovt->flags & DISPLAY_FLAGS_VSYNC_HIGH)
|
|
|
|
|
|
+ if (vm->flags & DISPLAY_FLAGS_VSYNC_HIGH)
|
|
vs = false;
|
|
vs = false;
|
|
else
|
|
else
|
|
vs = true;
|
|
vs = true;
|
|
|
|
|
|
- if (ovt->flags & DISPLAY_FLAGS_HSYNC_HIGH)
|
|
|
|
|
|
+ if (vm->flags & DISPLAY_FLAGS_HSYNC_HIGH)
|
|
hs = false;
|
|
hs = false;
|
|
else
|
|
else
|
|
hs = true;
|
|
hs = true;
|
|
|
|
|
|
- if (ovt->flags & DISPLAY_FLAGS_DE_HIGH)
|
|
|
|
|
|
+ if (vm->flags & DISPLAY_FLAGS_DE_HIGH)
|
|
de = false;
|
|
de = false;
|
|
else
|
|
else
|
|
de = true;
|
|
de = true;
|
|
|
|
|
|
- if (ovt->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE)
|
|
|
|
|
|
+ if (vm->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE)
|
|
ipc = false;
|
|
ipc = false;
|
|
else
|
|
else
|
|
ipc = true;
|
|
ipc = true;
|
|
@@ -3181,7 +3179,7 @@ static void _dispc_mgr_set_lcd_timings(enum omap_channel channel,
|
|
/* always use the 'rf' setting */
|
|
/* always use the 'rf' setting */
|
|
onoff = true;
|
|
onoff = true;
|
|
|
|
|
|
- if (ovt->flags & DISPLAY_FLAGS_SYNC_POSEDGE)
|
|
|
|
|
|
+ if (vm->flags & DISPLAY_FLAGS_SYNC_POSEDGE)
|
|
rf = true;
|
|
rf = true;
|
|
else
|
|
else
|
|
rf = false;
|
|
rf = false;
|
|
@@ -3221,11 +3219,11 @@ static void _dispc_mgr_set_lcd_timings(enum omap_channel channel,
|
|
|
|
|
|
/* change name to mode? */
|
|
/* change name to mode? */
|
|
void dispc_mgr_set_timings(enum omap_channel channel,
|
|
void dispc_mgr_set_timings(enum omap_channel channel,
|
|
- const struct videomode *timings)
|
|
|
|
|
|
+ const struct videomode *vm)
|
|
{
|
|
{
|
|
unsigned xtot, ytot;
|
|
unsigned xtot, ytot;
|
|
unsigned long ht, vt;
|
|
unsigned long ht, vt;
|
|
- struct videomode t = *timings;
|
|
|
|
|
|
+ struct videomode t = *vm;
|
|
|
|
|
|
DSSDBG("channel %d xres %u yres %u\n", channel, t.hactive, t.vactive);
|
|
DSSDBG("channel %d xres %u yres %u\n", channel, t.hactive, t.vactive);
|
|
|
|
|
|
@@ -3240,10 +3238,10 @@ void dispc_mgr_set_timings(enum omap_channel channel,
|
|
xtot = t.hactive + t.hfront_porch + t.hsync_len + t.hback_porch;
|
|
xtot = t.hactive + t.hfront_porch + t.hsync_len + t.hback_porch;
|
|
ytot = t.vactive + t.vfront_porch + t.vsync_len + t.vback_porch;
|
|
ytot = t.vactive + t.vfront_porch + t.vsync_len + t.vback_porch;
|
|
|
|
|
|
- ht = timings->pixelclock / xtot;
|
|
|
|
- vt = timings->pixelclock / xtot / ytot;
|
|
|
|
|
|
+ ht = vm->pixelclock / xtot;
|
|
|
|
+ vt = vm->pixelclock / xtot / ytot;
|
|
|
|
|
|
- DSSDBG("pck %lu\n", timings->pixelclock);
|
|
|
|
|
|
+ DSSDBG("pck %lu\n", vm->pixelclock);
|
|
DSSDBG("hsync_len %d hfp %d hbp %d vsw %d vfp %d vbp %d\n",
|
|
DSSDBG("hsync_len %d hfp %d hbp %d vsw %d vfp %d vbp %d\n",
|
|
t.hsync_len, t.hfront_porch, t.hback_porch,
|
|
t.hsync_len, t.hfront_porch, t.hback_porch,
|
|
t.vsync_len, t.vfront_porch, t.vback_porch);
|
|
t.vsync_len, t.vfront_porch, t.vback_porch);
|
|
@@ -4185,12 +4183,12 @@ EXPORT_SYMBOL(dispc_free_irq);
|
|
*/
|
|
*/
|
|
|
|
|
|
static const struct dispc_errata_i734_data {
|
|
static const struct dispc_errata_i734_data {
|
|
- struct videomode timings;
|
|
|
|
|
|
+ struct videomode vm;
|
|
struct omap_overlay_info ovli;
|
|
struct omap_overlay_info ovli;
|
|
struct omap_overlay_manager_info mgri;
|
|
struct omap_overlay_manager_info mgri;
|
|
struct dss_lcd_mgr_config lcd_conf;
|
|
struct dss_lcd_mgr_config lcd_conf;
|
|
} i734 = {
|
|
} i734 = {
|
|
- .timings = {
|
|
|
|
|
|
+ .vm = {
|
|
.hactive = 8, .vactive = 1,
|
|
.hactive = 8, .vactive = 1,
|
|
.pixelclock = 16000000,
|
|
.pixelclock = 16000000,
|
|
.hsync_len = 8, .hfront_porch = 4, .hback_porch = 4,
|
|
.hsync_len = 8, .hfront_porch = 4, .hback_porch = 4,
|
|
@@ -4288,7 +4286,7 @@ static void dispc_errata_i734_wa(void)
|
|
|
|
|
|
/* Setup and enable GFX plane */
|
|
/* Setup and enable GFX plane */
|
|
dispc_ovl_set_channel_out(OMAP_DSS_GFX, OMAP_DSS_CHANNEL_LCD);
|
|
dispc_ovl_set_channel_out(OMAP_DSS_GFX, OMAP_DSS_CHANNEL_LCD);
|
|
- dispc_ovl_setup(OMAP_DSS_GFX, &ovli, false, &i734.timings, false);
|
|
|
|
|
|
+ dispc_ovl_setup(OMAP_DSS_GFX, &ovli, false, &i734.vm, false);
|
|
dispc_ovl_enable(OMAP_DSS_GFX, true);
|
|
dispc_ovl_enable(OMAP_DSS_GFX, true);
|
|
|
|
|
|
/* Set up and enable display manager for LCD1 */
|
|
/* Set up and enable display manager for LCD1 */
|
|
@@ -4296,7 +4294,7 @@ static void dispc_errata_i734_wa(void)
|
|
dispc_calc_clock_rates(dss_get_dispc_clk_rate(),
|
|
dispc_calc_clock_rates(dss_get_dispc_clk_rate(),
|
|
&lcd_conf.clock_info);
|
|
&lcd_conf.clock_info);
|
|
dispc_mgr_set_lcd_config(OMAP_DSS_CHANNEL_LCD, &lcd_conf);
|
|
dispc_mgr_set_lcd_config(OMAP_DSS_CHANNEL_LCD, &lcd_conf);
|
|
- dispc_mgr_set_timings(OMAP_DSS_CHANNEL_LCD, &i734.timings);
|
|
|
|
|
|
+ dispc_mgr_set_timings(OMAP_DSS_CHANNEL_LCD, &i734.vm);
|
|
|
|
|
|
dispc_clear_irqstatus(framedone_irq);
|
|
dispc_clear_irqstatus(framedone_irq);
|
|
|
|
|