video: fbdev: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. One tracking pointer was added. Signed-off-by: Kees Cook <keescook@chromium.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: David Lechner <david@lechnology.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Sean Paul <seanpaul@chromium.org> Cc: Jean Delvare <jdelvare@suse.de> Cc: Hans de Goede <hdegoede@redhat.com> Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com> [b.zolnierkie: ported it over pxa3xx_gcu changes] Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
This commit is contained in:
parent
e4a67df75a
commit
6c78935777
|
@ -1454,9 +1454,9 @@ static void radeon_write_pll_regs(struct radeonfb_info *rinfo, struct radeon_reg
|
||||||
/*
|
/*
|
||||||
* Timer function for delayed LVDS panel power up/down
|
* Timer function for delayed LVDS panel power up/down
|
||||||
*/
|
*/
|
||||||
static void radeon_lvds_timer_func(unsigned long data)
|
static void radeon_lvds_timer_func(struct timer_list *t)
|
||||||
{
|
{
|
||||||
struct radeonfb_info *rinfo = (struct radeonfb_info *)data;
|
struct radeonfb_info *rinfo = from_timer(rinfo, t, lvds_timer);
|
||||||
|
|
||||||
radeon_engine_idle();
|
radeon_engine_idle();
|
||||||
|
|
||||||
|
@ -2291,9 +2291,7 @@ static int radeonfb_pci_register(struct pci_dev *pdev,
|
||||||
rinfo->pdev = pdev;
|
rinfo->pdev = pdev;
|
||||||
|
|
||||||
spin_lock_init(&rinfo->reg_lock);
|
spin_lock_init(&rinfo->reg_lock);
|
||||||
init_timer(&rinfo->lvds_timer);
|
timer_setup(&rinfo->lvds_timer, radeon_lvds_timer_func, 0);
|
||||||
rinfo->lvds_timer.function = radeon_lvds_timer_func;
|
|
||||||
rinfo->lvds_timer.data = (unsigned long)rinfo;
|
|
||||||
|
|
||||||
c1 = ent->device >> 8;
|
c1 = ent->device >> 8;
|
||||||
c2 = ent->device & 0xff;
|
c2 = ent->device & 0xff;
|
||||||
|
|
|
@ -395,10 +395,10 @@ static void fb_flashcursor(struct work_struct *work)
|
||||||
console_unlock();
|
console_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cursor_timer_handler(unsigned long dev_addr)
|
static void cursor_timer_handler(struct timer_list *t)
|
||||||
{
|
{
|
||||||
struct fb_info *info = (struct fb_info *) dev_addr;
|
struct fbcon_ops *ops = from_timer(ops, t, cursor_timer);
|
||||||
struct fbcon_ops *ops = info->fbcon_par;
|
struct fb_info *info = ops->info;
|
||||||
|
|
||||||
queue_work(system_power_efficient_wq, &info->queue);
|
queue_work(system_power_efficient_wq, &info->queue);
|
||||||
mod_timer(&ops->cursor_timer, jiffies + ops->cur_blink_jiffies);
|
mod_timer(&ops->cursor_timer, jiffies + ops->cur_blink_jiffies);
|
||||||
|
@ -414,8 +414,7 @@ static void fbcon_add_cursor_timer(struct fb_info *info)
|
||||||
if (!info->queue.func)
|
if (!info->queue.func)
|
||||||
INIT_WORK(&info->queue, fb_flashcursor);
|
INIT_WORK(&info->queue, fb_flashcursor);
|
||||||
|
|
||||||
setup_timer(&ops->cursor_timer, cursor_timer_handler,
|
timer_setup(&ops->cursor_timer, cursor_timer_handler, 0);
|
||||||
(unsigned long) info);
|
|
||||||
mod_timer(&ops->cursor_timer, jiffies + ops->cur_blink_jiffies);
|
mod_timer(&ops->cursor_timer, jiffies + ops->cur_blink_jiffies);
|
||||||
ops->flags |= FBCON_FLAGS_CURSOR_TIMER;
|
ops->flags |= FBCON_FLAGS_CURSOR_TIMER;
|
||||||
}
|
}
|
||||||
|
@ -714,6 +713,7 @@ static int con2fb_acquire_newinfo(struct vc_data *vc, struct fb_info *info,
|
||||||
|
|
||||||
if (!err) {
|
if (!err) {
|
||||||
ops->cur_blink_jiffies = HZ / 5;
|
ops->cur_blink_jiffies = HZ / 5;
|
||||||
|
ops->info = info;
|
||||||
info->fbcon_par = ops;
|
info->fbcon_par = ops;
|
||||||
|
|
||||||
if (vc)
|
if (vc)
|
||||||
|
|
|
@ -69,6 +69,7 @@ struct fbcon_ops {
|
||||||
struct timer_list cursor_timer; /* Cursor timer */
|
struct timer_list cursor_timer; /* Cursor timer */
|
||||||
struct fb_cursor cursor_state;
|
struct fb_cursor cursor_state;
|
||||||
struct display *p;
|
struct display *p;
|
||||||
|
struct fb_info *info;
|
||||||
int currcon; /* Current VC. */
|
int currcon; /* Current VC. */
|
||||||
int cur_blink_jiffies;
|
int cur_blink_jiffies;
|
||||||
int cursor_flash;
|
int cursor_flash;
|
||||||
|
|
|
@ -474,7 +474,7 @@ static void auto_update_complete(void *data)
|
||||||
jiffies + HWA742_AUTO_UPDATE_TIME);
|
jiffies + HWA742_AUTO_UPDATE_TIME);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hwa742_update_window_auto(unsigned long arg)
|
static void hwa742_update_window_auto(struct timer_list *unused)
|
||||||
{
|
{
|
||||||
LIST_HEAD(req_list);
|
LIST_HEAD(req_list);
|
||||||
struct hwa742_request *last;
|
struct hwa742_request *last;
|
||||||
|
@ -1002,9 +1002,7 @@ static int hwa742_init(struct omapfb_device *fbdev, int ext_mode,
|
||||||
hwa742.auto_update_window.height = fbdev->panel->y_res;
|
hwa742.auto_update_window.height = fbdev->panel->y_res;
|
||||||
hwa742.auto_update_window.format = 0;
|
hwa742.auto_update_window.format = 0;
|
||||||
|
|
||||||
init_timer(&hwa742.auto_update_timer);
|
timer_setup(&hwa742.auto_update_timer, hwa742_update_window_auto, 0);
|
||||||
hwa742.auto_update_timer.function = hwa742_update_window_auto;
|
|
||||||
hwa742.auto_update_timer.data = 0;
|
|
||||||
|
|
||||||
hwa742.prev_color_mode = -1;
|
hwa742.prev_color_mode = -1;
|
||||||
hwa742.prev_flags = 0;
|
hwa742.prev_flags = 0;
|
||||||
|
|
|
@ -3988,7 +3988,7 @@ static void dsi_update_screen_dispc(struct platform_device *dsidev)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DSI_CATCH_MISSING_TE
|
#ifdef DSI_CATCH_MISSING_TE
|
||||||
static void dsi_te_timeout(unsigned long arg)
|
static void dsi_te_timeout(struct timer_list *unused)
|
||||||
{
|
{
|
||||||
DSSERR("TE not received for 250ms!\n");
|
DSSERR("TE not received for 250ms!\n");
|
||||||
}
|
}
|
||||||
|
@ -5298,9 +5298,7 @@ static int dsi_bind(struct device *dev, struct device *master, void *data)
|
||||||
dsi_framedone_timeout_work_callback);
|
dsi_framedone_timeout_work_callback);
|
||||||
|
|
||||||
#ifdef DSI_CATCH_MISSING_TE
|
#ifdef DSI_CATCH_MISSING_TE
|
||||||
init_timer(&dsi->te_timer);
|
timer_setup(&dsi->te_timer, dsi_te_timeout, 0);
|
||||||
dsi->te_timer.function = dsi_te_timeout;
|
|
||||||
dsi->te_timer.data = 0;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
res = platform_get_resource_byname(dsidev, IORESOURCE_MEM, "proto");
|
res = platform_get_resource_byname(dsidev, IORESOURCE_MEM, "proto");
|
||||||
|
|
Loading…
Reference in New Issue