Skip to content

Commit

Permalink
Merge tag 'fbdev-fixes-3.18' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/tomba/linux

Pull fbdev fixes from Tomi Valkeinen:

 - fix fb console option parsing

 - fixes for OMAPDSS/OMAPFB crashes related to module unloading and
   device/driver binding & unbinding.

 - fix for OMAP HDMI PLL locking failing in certain cases

 - misc minor fixes for atmel lcdfb and OMAP

* tag 'fbdev-fixes-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux:
  omap: dss: connector-analog-tv: Add missing module device table
  OMAPDSS: DSI: Fix PLL_SELFEQDCO field width
  OMAPDSS: fix dispc register dump for preload & mflag
  OMAPDSS: DISPC: fix mflag offset
  OMAPDSS: HDMI: fix regsd write
  OMAPDSS: HDMI: fix PLL GO bit handling
  OMAPFB: fix releasing overlays
  OMAPFB: fix overlay disable when freeing resources.
  OMAPDSS: apply: wait pending updates on manager disable
  OMAPFB: remove __exit annotation
  OMAPDSS: set suppress_bind_attrs
  OMAPFB: add missing MODULE_ALIAS()
  drivers: video: fbdev: atmel_lcdfb.c: remove unnecessary header
  video/console: Resolve several shadow warnings
  fbcon: Fix option parsing control flow in fb_console_setup
  • Loading branch information
torvalds committed Oct 30, 2014
2 parents 9471292 + a942535 commit 3a2f22b
Show file tree
Hide file tree
Showing 29 changed files with 67 additions and 46 deletions.
19 changes: 9 additions & 10 deletions drivers/video/console/fbcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,22 +448,20 @@ static int __init fb_console_setup(char *this_opt)
return 1;

while ((options = strsep(&this_opt, ",")) != NULL) {
if (!strncmp(options, "font:", 5))
if (!strncmp(options, "font:", 5)) {
strlcpy(fontname, options + 5, sizeof(fontname));
continue;
}

if (!strncmp(options, "scrollback:", 11)) {
options += 11;
if (*options) {
fbcon_softback_size = simple_strtoul(options, &options, 0);
if (*options == 'k' || *options == 'K') {
fbcon_softback_size *= 1024;
options++;
}
if (*options != ',')
return 1;
options++;
} else
return 1;
}
continue;
}

if (!strncmp(options, "map:", 4)) {
Expand All @@ -478,8 +476,7 @@ static int __init fb_console_setup(char *this_opt)

fbcon_map_override();
}

return 1;
continue;
}

if (!strncmp(options, "vc:", 3)) {
Expand All @@ -491,14 +488,16 @@ static int __init fb_console_setup(char *this_opt)
if (*options++ == '-')
last_fb_vc = simple_strtoul(options, &options, 10) - 1;
fbcon_is_default = 0;
}
continue;
}

if (!strncmp(options, "rotate:", 7)) {
options += 7;
if (*options)
initial_rotation = simple_strtoul(options, &options, 0);
if (initial_rotation > 3)
initial_rotation = 0;
continue;
}
}
return 1;
Expand Down
24 changes: 12 additions & 12 deletions drivers/video/console/vgacon.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static int cursor_size_lastfrom;
static int cursor_size_lastto;
static u32 vgacon_xres;
static u32 vgacon_yres;
static struct vgastate state;
static struct vgastate vgastate;

#define BLANK 0x0020

Expand Down Expand Up @@ -400,7 +400,7 @@ static const char *vgacon_startup(void)

vga_video_num_lines = screen_info.orig_video_lines;
vga_video_num_columns = screen_info.orig_video_cols;
state.vgabase = NULL;
vgastate.vgabase = NULL;

if (screen_info.orig_video_mode == 7) {
/* Monochrome display */
Expand Down Expand Up @@ -851,12 +851,12 @@ static void vga_set_palette(struct vc_data *vc, unsigned char *table)
{
int i, j;

vga_w(state.vgabase, VGA_PEL_MSK, 0xff);
vga_w(vgastate.vgabase, VGA_PEL_MSK, 0xff);
for (i = j = 0; i < 16; i++) {
vga_w(state.vgabase, VGA_PEL_IW, table[i]);
vga_w(state.vgabase, VGA_PEL_D, vc->vc_palette[j++] >> 2);
vga_w(state.vgabase, VGA_PEL_D, vc->vc_palette[j++] >> 2);
vga_w(state.vgabase, VGA_PEL_D, vc->vc_palette[j++] >> 2);
vga_w(vgastate.vgabase, VGA_PEL_IW, table[i]);
vga_w(vgastate.vgabase, VGA_PEL_D, vc->vc_palette[j++] >> 2);
vga_w(vgastate.vgabase, VGA_PEL_D, vc->vc_palette[j++] >> 2);
vga_w(vgastate.vgabase, VGA_PEL_D, vc->vc_palette[j++] >> 2);
}
}

Expand Down Expand Up @@ -1008,7 +1008,7 @@ static int vgacon_blank(struct vc_data *c, int blank, int mode_switch)
switch (blank) {
case 0: /* Unblank */
if (vga_vesa_blanked) {
vga_vesa_unblank(&state);
vga_vesa_unblank(&vgastate);
vga_vesa_blanked = 0;
}
if (vga_palette_blanked) {
Expand All @@ -1022,7 +1022,7 @@ static int vgacon_blank(struct vc_data *c, int blank, int mode_switch)
case 1: /* Normal blanking */
case -1: /* Obsolete */
if (!mode_switch && vga_video_type == VIDEO_TYPE_VGAC) {
vga_pal_blank(&state);
vga_pal_blank(&vgastate);
vga_palette_blanked = 1;
return 0;
}
Expand All @@ -1034,7 +1034,7 @@ static int vgacon_blank(struct vc_data *c, int blank, int mode_switch)
return 1;
default: /* VESA blanking */
if (vga_video_type == VIDEO_TYPE_VGAC) {
vga_vesa_blank(&state, blank - 1);
vga_vesa_blank(&vgastate, blank - 1);
vga_vesa_blanked = blank;
}
return 0;
Expand Down Expand Up @@ -1280,7 +1280,7 @@ static int vgacon_font_set(struct vc_data *c, struct console_font *font, unsigne
(charcount != 256 && charcount != 512))
return -EINVAL;

rc = vgacon_do_font_op(&state, font->data, 1, charcount == 512);
rc = vgacon_do_font_op(&vgastate, font->data, 1, charcount == 512);
if (rc)
return rc;

Expand All @@ -1299,7 +1299,7 @@ static int vgacon_font_get(struct vc_data *c, struct console_font *font)
font->charcount = vga_512_chars ? 512 : 256;
if (!font->data)
return 0;
return vgacon_do_font_op(&state, font->data, 0, vga_512_chars);
return vgacon_do_font_op(&vgastate, font->data, 0, vga_512_chars);
}

#else
Expand Down
1 change: 0 additions & 1 deletion drivers/video/fbdev/atmel_lcdfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <linux/regulator/consumer.h>
#include <video/videomode.h>

#include <mach/cpu.h>
#include <asm/gpio.h>

#include <video/atmel_lcdc.h>
Expand Down
3 changes: 3 additions & 0 deletions drivers/video/fbdev/omap2/displays-new/connector-analog-tv.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,13 +301,16 @@ static const struct of_device_id tvc_of_match[] = {
{},
};

MODULE_DEVICE_TABLE(of, tvc_of_match);

static struct platform_driver tvc_connector_driver = {
.probe = tvc_probe,
.remove = __exit_p(tvc_remove),
.driver = {
.name = "connector-analog-tv",
.owner = THIS_MODULE,
.of_match_table = tvc_of_match,
.suppress_bind_attrs = true,
},
};

Expand Down
1 change: 1 addition & 0 deletions drivers/video/fbdev/omap2/displays-new/connector-dvi.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ static struct platform_driver dvi_connector_driver = {
.name = "connector-dvi",
.owner = THIS_MODULE,
.of_match_table = dvic_of_match,
.suppress_bind_attrs = true,
},
};

Expand Down
1 change: 1 addition & 0 deletions drivers/video/fbdev/omap2/displays-new/connector-hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ static struct platform_driver hdmi_connector_driver = {
.name = "connector-hdmi",
.owner = THIS_MODULE,
.of_match_table = hdmic_of_match,
.suppress_bind_attrs = true,
},
};

Expand Down
1 change: 1 addition & 0 deletions drivers/video/fbdev/omap2/displays-new/encoder-tfp410.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ static struct platform_driver tfp410_driver = {
.name = "tfp410",
.owner = THIS_MODULE,
.of_match_table = tfp410_of_match,
.suppress_bind_attrs = true,
},
};

Expand Down
1 change: 1 addition & 0 deletions drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ static struct platform_driver tpd_driver = {
.name = "tpd12s015",
.owner = THIS_MODULE,
.of_match_table = tpd_of_match,
.suppress_bind_attrs = true,
},
};

Expand Down
1 change: 1 addition & 0 deletions drivers/video/fbdev/omap2/displays-new/panel-dpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ static struct platform_driver panel_dpi_driver = {
.name = "panel-dpi",
.owner = THIS_MODULE,
.of_match_table = panel_dpi_of_match,
.suppress_bind_attrs = true,
},
};

Expand Down
1 change: 1 addition & 0 deletions drivers/video/fbdev/omap2/displays-new/panel-dsi-cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1378,6 +1378,7 @@ static struct platform_driver dsicm_driver = {
.name = "panel-dsi-cm",
.owner = THIS_MODULE,
.of_match_table = dsicm_of_match,
.suppress_bind_attrs = true,
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ static struct spi_driver lb035q02_spi_driver = {
.name = "panel_lgphilips_lb035q02",
.owner = THIS_MODULE,
.of_match_table = lb035q02_of_match,
.suppress_bind_attrs = true,
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ static struct spi_driver nec_8048_driver = {
.owner = THIS_MODULE,
.pm = NEC_8048_PM_OPS,
.of_match_table = nec_8048_of_match,
.suppress_bind_attrs = true,
},
.probe = nec_8048_probe,
.remove = nec_8048_remove,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ static struct platform_driver sharp_ls_driver = {
.name = "panel-sharp-ls037v7dw01",
.owner = THIS_MODULE,
.of_match_table = sharp_ls_of_match,
.suppress_bind_attrs = true,
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,7 @@ static struct spi_driver acx565akm_driver = {
.name = "acx565akm",
.owner = THIS_MODULE,
.of_match_table = acx565akm_of_match,
.suppress_bind_attrs = true,
},
.probe = acx565akm_probe,
.remove = acx565akm_remove,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ static struct spi_driver td028ttec1_spi_driver = {
.name = "panel-tpo-td028ttec1",
.owner = THIS_MODULE,
.of_match_table = td028ttec1_of_match,
.suppress_bind_attrs = true,
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ static struct spi_driver tpo_td043_spi_driver = {
.owner = THIS_MODULE,
.pm = &tpo_td043_spi_pm,
.of_match_table = tpo_td043_of_match,
.suppress_bind_attrs = true,
},
.probe = tpo_td043_probe,
.remove = tpo_td043_remove,
Expand Down
2 changes: 2 additions & 0 deletions drivers/video/fbdev/omap2/dss/apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -1132,6 +1132,8 @@ static void dss_mgr_disable_compat(struct omap_overlay_manager *mgr)
if (!mp->enabled)
goto out;

wait_pending_extra_info_updates();

if (!mgr_manual_update(mgr))
dispc_mgr_disable_sync(mgr->id);

Expand Down
8 changes: 4 additions & 4 deletions drivers/video/fbdev/omap2/dss/dispc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3290,8 +3290,11 @@ static void dispc_dump_regs(struct seq_file *s)
DUMPREG(i, DISPC_OVL_FIFO_SIZE_STATUS);
DUMPREG(i, DISPC_OVL_ROW_INC);
DUMPREG(i, DISPC_OVL_PIXEL_INC);

if (dss_has_feature(FEAT_PRELOAD))
DUMPREG(i, DISPC_OVL_PRELOAD);
if (dss_has_feature(FEAT_MFLAG))
DUMPREG(i, DISPC_OVL_MFLAG_THRESHOLD);

if (i == OMAP_DSS_GFX) {
DUMPREG(i, DISPC_OVL_WINDOW_SKIP);
Expand All @@ -3312,10 +3315,6 @@ static void dispc_dump_regs(struct seq_file *s)
}
if (dss_has_feature(FEAT_ATTR2))
DUMPREG(i, DISPC_OVL_ATTRIBUTES2);
if (dss_has_feature(FEAT_PRELOAD))
DUMPREG(i, DISPC_OVL_PRELOAD);
if (dss_has_feature(FEAT_MFLAG))
DUMPREG(i, DISPC_OVL_MFLAG_THRESHOLD);
}

#undef DISPC_REG
Expand Down Expand Up @@ -3843,6 +3842,7 @@ static struct platform_driver omap_dispchw_driver = {
.owner = THIS_MODULE,
.pm = &dispc_pm_ops,
.of_match_table = dispc_of_match,
.suppress_bind_attrs = true,
},
};

Expand Down
3 changes: 1 addition & 2 deletions drivers/video/fbdev/omap2/dss/dispc.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@
DISPC_FIR_COEF_V2_OFFSET(n, i))
#define DISPC_OVL_PRELOAD(n) (DISPC_OVL_BASE(n) + \
DISPC_PRELOAD_OFFSET(n))
#define DISPC_OVL_MFLAG_THRESHOLD(n) (DISPC_OVL_BASE(n) + \
DISPC_MFLAG_THRESHOLD_OFFSET(n))
#define DISPC_OVL_MFLAG_THRESHOLD(n) DISPC_MFLAG_THRESHOLD_OFFSET(n)

/* DISPC up/downsampling FIR filter coefficient structure */
struct dispc_coef {
Expand Down
1 change: 1 addition & 0 deletions drivers/video/fbdev/omap2/dss/dpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,7 @@ static struct platform_driver omap_dpi_driver = {
.driver = {
.name = "omapdss_dpi",
.owner = THIS_MODULE,
.suppress_bind_attrs = true,
},
};

Expand Down
3 changes: 2 additions & 1 deletion drivers/video/fbdev/omap2/dss/dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1603,7 +1603,7 @@ int dsi_pll_set_clock_div(struct platform_device *dsidev,
} else if (dss_has_feature(FEAT_DSI_PLL_SELFREQDCO)) {
f = cinfo->clkin4ddr < 1000000000 ? 0x2 : 0x4;

l = FLD_MOD(l, f, 4, 1); /* PLL_SELFREQDCO */
l = FLD_MOD(l, f, 3, 1); /* PLL_SELFREQDCO */
}

l = FLD_MOD(l, 1, 13, 13); /* DSI_PLL_REFEN */
Expand Down Expand Up @@ -5754,6 +5754,7 @@ static struct platform_driver omap_dsihw_driver = {
.owner = THIS_MODULE,
.pm = &dsi_pm_ops,
.of_match_table = dsi_of_match,
.suppress_bind_attrs = true,
},
};

Expand Down
1 change: 1 addition & 0 deletions drivers/video/fbdev/omap2/dss/dss.c
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,7 @@ static struct platform_driver omap_dsshw_driver = {
.owner = THIS_MODULE,
.pm = &dss_pm_ops,
.of_match_table = dss_of_match,
.suppress_bind_attrs = true,
},
};

Expand Down
1 change: 1 addition & 0 deletions drivers/video/fbdev/omap2/dss/hdmi4.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,7 @@ static struct platform_driver omapdss_hdmihw_driver = {
.owner = THIS_MODULE,
.pm = &hdmi_pm_ops,
.of_match_table = hdmi_of_match,
.suppress_bind_attrs = true,
},
};

Expand Down
1 change: 1 addition & 0 deletions drivers/video/fbdev/omap2/dss/hdmi5.c
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,7 @@ static struct platform_driver omapdss_hdmihw_driver = {
.owner = THIS_MODULE,
.pm = &hdmi_pm_ops,
.of_match_table = hdmi_of_match,
.suppress_bind_attrs = true,
},
};

Expand Down
13 changes: 6 additions & 7 deletions drivers/video/fbdev/omap2/dss/hdmi_pll.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,15 @@ static int hdmi_pll_config(struct hdmi_pll_data *pll)
r = FLD_MOD(r, 0x0, 14, 14); /* PHY_CLKINEN de-assert during locking */
r = FLD_MOD(r, fmt->refsel, 22, 21); /* REFSEL */

if (fmt->dcofreq) {
/* divider programming for frequency beyond 1000Mhz */
REG_FLD_MOD(pll->base, PLLCTRL_CFG3, fmt->regsd, 17, 10);
if (fmt->dcofreq)
r = FLD_MOD(r, 0x4, 3, 1); /* 1000MHz and 2000MHz */
} else {
else
r = FLD_MOD(r, 0x2, 3, 1); /* 500MHz and 1000MHz */
}

hdmi_write_reg(pll->base, PLLCTRL_CFG2, r);

REG_FLD_MOD(pll->base, PLLCTRL_CFG3, fmt->regsd, 17, 10);

r = hdmi_read_reg(pll->base, PLLCTRL_CFG4);
r = FLD_MOD(r, fmt->regm2, 24, 18);
r = FLD_MOD(r, fmt->regmf, 17, 0);
Expand All @@ -144,8 +143,8 @@ static int hdmi_pll_config(struct hdmi_pll_data *pll)

/* wait for bit change */
if (hdmi_wait_for_bit_change(pll->base, PLLCTRL_PLL_GO,
0, 0, 1) != 1) {
DSSERR("PLL GO bit not set\n");
0, 0, 0) != 0) {
DSSERR("PLL GO bit not clearing\n");
return -ETIMEDOUT;
}

Expand Down
1 change: 1 addition & 0 deletions drivers/video/fbdev/omap2/dss/rfbi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1044,6 +1044,7 @@ static struct platform_driver omap_rfbihw_driver = {
.name = "omapdss_rfbi",
.owner = THIS_MODULE,
.pm = &rfbi_pm_ops,
.suppress_bind_attrs = true,
},
};

Expand Down
Loading

0 comments on commit 3a2f22b

Please sign in to comment.