Merge tag 'fbdev-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 20 Apr 2015 22:16:25 +0000 (15:16 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 20 Apr 2015 22:16:25 +0000 (15:16 -0700)
Pull fbdev updates from Tomi Valkeinen:
 "Small fixes and improvements to various fbdev drivers"

* tag 'fbdev-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (24 commits)
  omapdss: extend pm notifier to handle hibernation
  OMAPDSS: Correct video ports description file path in DT binding doc
  OMAPDSS: disable VT switch
  fbdev: sh_mobile_lcdc: Fix destruction of uninitialized mutex
  video: fbdev: sh_mobile_lcdcfb: Fix ROP3 sysfs attribute parsing
  fbdev: pm3fb: cleanup some confusing indenting
  hyperv: hyperv_fb: match wait_for_completion_timeout return type
  video: fbdev: use msecs_to_jiffies for time conversions
  fbdev: via/via_clock: fix sparse warning
  video: fbdev: make of_device_id array const
  fbdev: sm501fb: use memset_io
  OMAPDSS: workaround for MFLAG + NV12 issue
  OMAPDSS: Add support for MFLAG
  OMAPDSS: setup default fifo thresholds
  OMAPDSS: DISPC: lock access to DISPC_CONTROL & DISPC_CONFIG
  OMAPDSS: DISPC: fix div by zero issue in overlay scaling
  OMAPDSS: DISPC: change sync_pclk_edge default value
  OMAPDSS: change signal_level & signal_edge enum values
  OMAPDSS: DISPC: explicit handling for sync and de levels
  OMAPDSS: DISPC: remove OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES
  ...

26 files changed:
Documentation/devicetree/bindings/video/ti,omap-dss.txt
drivers/gpu/drm/omapdrm/omap_connector.c
drivers/video/fbdev/hyperv_fb.c
drivers/video/fbdev/imxfb.c
drivers/video/fbdev/omap2/displays-new/connector-dvi.c
drivers/video/fbdev/omap2/displays-new/encoder-tfp410.c
drivers/video/fbdev/omap2/displays-new/panel-lgphilips-lb035q02.c
drivers/video/fbdev/omap2/displays-new/panel-sharp-ls037v7dw01.c
drivers/video/fbdev/omap2/displays-new/panel-sony-acx565akm.c
drivers/video/fbdev/omap2/displays-new/panel-tpo-td028ttec1.c
drivers/video/fbdev/omap2/displays-new/panel-tpo-td043mtea1.c
drivers/video/fbdev/omap2/dss/core.c
drivers/video/fbdev/omap2/dss/dispc.c
drivers/video/fbdev/omap2/dss/display.c
drivers/video/fbdev/omap2/dss/dsi.c
drivers/video/fbdev/omap2/dss/dss.c
drivers/video/fbdev/omap2/dss/dss_features.c
drivers/video/fbdev/omap2/dss/hdmi5_core.c
drivers/video/fbdev/omap2/dss/rfbi.c
drivers/video/fbdev/omap2/omapfb/omapfb-main.c
drivers/video/fbdev/pm3fb.c
drivers/video/fbdev/pxafb.c
drivers/video/fbdev/sh_mobile_lcdcfb.c
drivers/video/fbdev/sm501fb.c
drivers/video/fbdev/via/via_clock.c
include/video/omapdss.h

index d5f1a3fe31092bdceb7b09199157189e3d8eeb5b..e1ef29569338f32d0934f7d560eb881709e67a2e 100644 (file)
@@ -25,8 +25,8 @@ Video Ports
 -----------
 
 The DSS Core and the encoders have video port outputs. The structure of the
-video ports is described in Documentation/devicetree/bindings/video/video-
-ports.txt, and the properties for the ports and endpoints for each encoder are
+video ports is described in Documentation/devicetree/bindings/graph.txt,
+and the properties for the ports and endpoints for each encoder are
 described in the SoC's DSS binding documentation.
 
 The video ports are used to describe the connections to external hardware, like
index b41965c2888d9e43ad57e1c7f74f6e55ee70b288..17739737dcf604139c188084d00d28883f4cc7a2 100644 (file)
@@ -102,7 +102,7 @@ void copy_timings_drm_to_omap(struct omap_video_timings *timings,
 
        timings->data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE;
        timings->de_level = OMAPDSS_SIG_ACTIVE_HIGH;
-       timings->sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES;
+       timings->sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE;
 }
 
 static enum drm_connector_status omap_connector_detect(
index 42543362f16308b3b6b0fdbffb287e98bf33d14d..807ee22ef2292204eb85dc6e3bce75d0f9fbe74c 100644 (file)
@@ -415,7 +415,8 @@ static int synthvid_negotiate_ver(struct hv_device *hdev, u32 ver)
        struct fb_info *info = hv_get_drvdata(hdev);
        struct hvfb_par *par = info->par;
        struct synthvid_msg *msg = (struct synthvid_msg *)par->init_buf;
-       int t, ret = 0;
+       int ret = 0;
+       unsigned long t;
 
        memset(msg, 0, sizeof(struct synthvid_msg));
        msg->vid_hdr.type = SYNTHVID_VERSION_REQUEST;
@@ -488,7 +489,8 @@ static int synthvid_send_config(struct hv_device *hdev)
        struct fb_info *info = hv_get_drvdata(hdev);
        struct hvfb_par *par = info->par;
        struct synthvid_msg *msg = (struct synthvid_msg *)par->init_buf;
-       int t, ret = 0;
+       int ret = 0;
+       unsigned long t;
 
        /* Send VRAM location */
        memset(msg, 0, sizeof(struct synthvid_msg));
index 3b6a3c8c36e295e3cad7870643479bfa3f61bfbd..84d1d29e532cb6ceed4c698b16e249dc69476c36 100644 (file)
@@ -183,7 +183,7 @@ static struct platform_device_id imxfb_devtype[] = {
 };
 MODULE_DEVICE_TABLE(platform, imxfb_devtype);
 
-static struct of_device_id imxfb_of_dev_id[] = {
+static const struct of_device_id imxfb_of_dev_id[] = {
        {
                .compatible = "fsl,imx1-fb",
                .data = &imxfb_devtype[IMX1_FB],
index 0cdc97413020df12489e998eda347eb2e9864694..a8ce920fa797d335d2dbfbbc1c9d8f93a4378959 100644 (file)
@@ -37,7 +37,7 @@ static const struct omap_video_timings dvic_default_timings = {
        .hsync_level    = OMAPDSS_SIG_ACTIVE_HIGH,
        .data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
        .de_level       = OMAPDSS_SIG_ACTIVE_HIGH,
-       .sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
+       .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
 };
 
 struct panel_drv_data {
index 92919a74e7156097a5e7ef765e77fdeb2e1674b4..d9048b3df495c0b2ec11d2ddef1a702ef0df05c5 100644 (file)
@@ -114,12 +114,21 @@ static void tfp410_disable(struct omap_dss_device *dssdev)
        dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
 }
 
+static void tfp410_fix_timings(struct omap_video_timings *timings)
+{
+       timings->data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE;
+       timings->sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE;
+       timings->de_level = OMAPDSS_SIG_ACTIVE_HIGH;
+}
+
 static void tfp410_set_timings(struct omap_dss_device *dssdev,
                struct omap_video_timings *timings)
 {
        struct panel_drv_data *ddata = to_panel_data(dssdev);
        struct omap_dss_device *in = ddata->in;
 
+       tfp410_fix_timings(timings);
+
        ddata->timings = *timings;
        dssdev->panel.timings = *timings;
 
@@ -140,6 +149,8 @@ static int tfp410_check_timings(struct omap_dss_device *dssdev,
        struct panel_drv_data *ddata = to_panel_data(dssdev);
        struct omap_dss_device *in = ddata->in;
 
+       tfp410_fix_timings(timings);
+
        return in->ops.dpi->check_timings(in, timings);
 }
 
index 27d4fcfa1824313a7e3799f37b8c7a0deb6c89e7..9974a37a11af9455a508ffd9b7010296bc465275 100644 (file)
@@ -37,7 +37,7 @@ static struct omap_video_timings lb035q02_timings = {
        .hsync_level    = OMAPDSS_SIG_ACTIVE_LOW,
        .data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
        .de_level       = OMAPDSS_SIG_ACTIVE_HIGH,
-       .sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
+       .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
 };
 
 struct panel_drv_data {
index 18b19b6e1ac2c238db4b0e04177d26b476e001ba..eae263702964a7e78f22f922acc4b0b451e6b8ec 100644 (file)
@@ -54,7 +54,7 @@ static const struct omap_video_timings sharp_ls_timings = {
        .hsync_level    = OMAPDSS_SIG_ACTIVE_LOW,
        .data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
        .de_level       = OMAPDSS_SIG_ACTIVE_HIGH,
-       .sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
+       .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
 };
 
 #define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev)
index 337ccc5c0f5eca846b62ba43b053d0f40f1cf335..90cbc4c3406c719909f3495cb97533face292d3c 100644 (file)
@@ -108,7 +108,7 @@ static const struct omap_video_timings acx565akm_panel_timings = {
 
        .data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
        .de_level       = OMAPDSS_SIG_ACTIVE_HIGH,
-       .sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
+       .sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
 };
 
 #define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev)
index fbba0b8ca8718abcb08f7bc8b03e4947e93dc9ba..9edc51133c59c112088df6325164d3e958804fe2 100644 (file)
@@ -58,7 +58,7 @@ static struct omap_video_timings td028ttec1_panel_timings = {
 
        .data_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
        .de_level       = OMAPDSS_SIG_ACTIVE_HIGH,
-       .sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
+       .sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
 };
 
 #define JBT_COMMAND    0x000
index 5aba76bca25a03bfab66dcfe24c485fcf07982fd..79e4a029aab90658ef52f4921345a18c50005b7b 100644 (file)
@@ -91,7 +91,7 @@ static const struct omap_video_timings tpo_td043_timings = {
        .hsync_level    = OMAPDSS_SIG_ACTIVE_LOW,
        .data_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
        .de_level       = OMAPDSS_SIG_ACTIVE_HIGH,
-       .sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
+       .sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
 };
 
 #define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev)
index d5d92124e0199554afd8857922918de35d104e0d..16751755d43364c02c6b0d4814ea7b091cad474b 100644 (file)
@@ -179,10 +179,14 @@ static int omap_dss_pm_notif(struct notifier_block *b, unsigned long v, void *d)
 
        switch (v) {
        case PM_SUSPEND_PREPARE:
+       case PM_HIBERNATION_PREPARE:
+       case PM_RESTORE_PREPARE:
                DSSDBG("suspending displays\n");
                return dss_suspend_all_devices();
 
        case PM_POST_SUSPEND:
+       case PM_POST_HIBERNATION:
+       case PM_POST_RESTORE:
                DSSDBG("resuming displays\n");
                return dss_resume_all_devices();
 
index 31b743c70272024fbe8e46553e59a674b0521404..f4fc77d9d3bfcb02f807f8781142d43d22840630 100644 (file)
@@ -123,6 +123,9 @@ static struct {
 
        struct regmap *syscon_pol;
        u32 syscon_pol_offset;
+
+       /* DISPC_CONTROL & DISPC_CONFIG lock*/
+       spinlock_t control_lock;
 } dispc;
 
 enum omap_color_component {
@@ -261,7 +264,16 @@ static u32 mgr_fld_read(enum omap_channel channel, enum mgr_reg_fields regfld)
 static void mgr_fld_write(enum omap_channel channel,
                                        enum mgr_reg_fields regfld, int val) {
        const struct dispc_reg_field rfld = mgr_desc[channel].reg_desc[regfld];
+       const bool need_lock = rfld.reg == DISPC_CONTROL || rfld.reg == DISPC_CONFIG;
+       unsigned long flags;
+
+       if (need_lock)
+               spin_lock_irqsave(&dispc.control_lock, flags);
+
        REG_FLD_MOD(rfld.reg, val, rfld.high, rfld.low);
+
+       if (need_lock)
+               spin_unlock_irqrestore(&dispc.control_lock, flags);
 }
 
 #define SR(reg) \
@@ -1126,6 +1138,7 @@ static void dispc_init_fifos(void)
        int fifo;
        u8 start, end;
        u32 unit;
+       int i;
 
        unit = dss_feat_get_buffer_size_unit();
 
@@ -1165,6 +1178,20 @@ static void dispc_init_fifos(void)
                dispc.fifo_assignment[OMAP_DSS_GFX] = OMAP_DSS_WB;
                dispc.fifo_assignment[OMAP_DSS_WB] = OMAP_DSS_GFX;
        }
+
+       /*
+        * Setup default fifo thresholds.
+        */
+       for (i = 0; i < dss_feat_get_num_ovls(); ++i) {
+               u32 low, high;
+               const bool use_fifomerge = false;
+               const bool manual_update = false;
+
+               dispc_ovl_compute_fifo_thresholds(i, &low, &high,
+                       use_fifomerge, manual_update);
+
+               dispc_ovl_set_fifo_threshold(i, low, high);
+       }
 }
 
 static u32 dispc_ovl_get_fifo_size(enum omap_plane plane)
@@ -1278,6 +1305,63 @@ void dispc_ovl_compute_fifo_thresholds(enum omap_plane plane,
 }
 EXPORT_SYMBOL(dispc_ovl_compute_fifo_thresholds);
 
+static void dispc_ovl_set_mflag(enum omap_plane plane, bool enable)
+{
+       int bit;
+
+       if (plane == OMAP_DSS_GFX)
+               bit = 14;
+       else
+               bit = 23;
+
+       REG_FLD_MOD(DISPC_OVL_ATTRIBUTES(plane), enable, bit, bit);
+}
+
+static void dispc_ovl_set_mflag_threshold(enum omap_plane plane,
+       int low, int high)
+{
+       dispc_write_reg(DISPC_OVL_MFLAG_THRESHOLD(plane),
+               FLD_VAL(high, 31, 16) | FLD_VAL(low, 15, 0));
+}
+
+static void dispc_init_mflag(void)
+{
+       int i;
+
+       /*
+        * HACK: NV12 color format and MFLAG seem to have problems working
+        * together: using two displays, and having an NV12 overlay on one of
+        * the displays will cause underflows/synclosts when MFLAG_CTRL=2.
+        * Changing MFLAG thresholds and PRELOAD to certain values seem to
+        * remove the errors, but there doesn't seem to be a clear logic on
+        * which values work and which not.
+        *
+        * As a work-around, set force MFLAG to always on.
+        */
+       dispc_write_reg(DISPC_GLOBAL_MFLAG_ATTRIBUTE,
+               (1 << 0) |      /* MFLAG_CTRL = force always on */
+               (0 << 2));      /* MFLAG_START = disable */
+
+       for (i = 0; i < dss_feat_get_num_ovls(); ++i) {
+               u32 size = dispc_ovl_get_fifo_size(i);
+               u32 unit = dss_feat_get_buffer_size_unit();
+               u32 low, high;
+
+               dispc_ovl_set_mflag(i, true);
+
+               /*
+                * Simulation team suggests below thesholds:
+                * HT = fifosize * 5 / 8;
+                * LT = fifosize * 4 / 8;
+                */
+
+               low = size * 4 / 8 / unit;
+               high = size * 5 / 8 / unit;
+
+               dispc_ovl_set_mflag_threshold(i, low, high);
+       }
+}
+
 static void dispc_ovl_set_fir(enum omap_plane plane,
                                int hinc, int vinc,
                                enum omap_color_component color_comp)
@@ -2322,6 +2406,11 @@ static int dispc_ovl_calc_scaling(unsigned long pclk, unsigned long lclk,
        if (width == out_width && height == out_height)
                return 0;
 
+       if (pclk == 0 || mgr_timings->pixelclock == 0) {
+               DSSERR("cannot calculate scaling settings: pclk is zero\n");
+               return -EINVAL;
+       }
+
        if ((caps & OMAP_DSS_OVL_CAP_SCALE) == 0)
                return -EINVAL;
 
@@ -2441,7 +2530,7 @@ static int dispc_ovl_setup_common(enum omap_plane plane,
        unsigned long pclk = dispc_plane_pclk_rate(plane);
        unsigned long lclk = dispc_plane_lclk_rate(plane);
 
-       if (paddr == 0)
+       if (paddr == 0 && rotation_type != OMAP_DSS_ROT_TILER)
                return -EINVAL;
 
        out_width = out_width == 0 ? width : out_width;
@@ -2915,7 +3004,7 @@ static void _dispc_mgr_set_lcd_timings(enum omap_channel channel, int hsw,
 
 {
        u32 timing_h, timing_v, l;
-       bool onoff, rf, ipc;
+       bool onoff, rf, ipc, vs, hs, de;
 
        timing_h = FLD_VAL(hsw-1, dispc.feat->sw_start, 0) |
                        FLD_VAL(hfp-1, dispc.feat->fp_start, 8) |
@@ -2927,6 +3016,39 @@ static void _dispc_mgr_set_lcd_timings(enum omap_channel channel, int hsw,
        dispc_write_reg(DISPC_TIMING_H(channel), timing_h);
        dispc_write_reg(DISPC_TIMING_V(channel), timing_v);
 
+       switch (vsync_level) {
+       case OMAPDSS_SIG_ACTIVE_LOW:
+               vs = true;
+               break;
+       case OMAPDSS_SIG_ACTIVE_HIGH:
+               vs = false;
+               break;
+       default:
+               BUG();
+       }
+
+       switch (hsync_level) {
+       case OMAPDSS_SIG_ACTIVE_LOW:
+               hs = true;
+               break;
+       case OMAPDSS_SIG_ACTIVE_HIGH:
+               hs = false;
+               break;
+       default:
+               BUG();
+       }
+
+       switch (de_level) {
+       case OMAPDSS_SIG_ACTIVE_LOW:
+               de = true;
+               break;
+       case OMAPDSS_SIG_ACTIVE_HIGH:
+               de = false;
+               break;
+       default:
+               BUG();
+       }
+
        switch (data_pclk_edge) {
        case OMAPDSS_DRIVE_SIG_RISING_EDGE:
                ipc = false;
@@ -2934,22 +3056,18 @@ static void _dispc_mgr_set_lcd_timings(enum omap_channel channel, int hsw,
        case OMAPDSS_DRIVE_SIG_FALLING_EDGE:
                ipc = true;
                break;
-       case OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES:
        default:
                BUG();
        }
 
+       /* always use the 'rf' setting */
+       onoff = true;
+
        switch (sync_pclk_edge) {
-       case OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES:
-               onoff = false;
-               rf = false;
-               break;
        case OMAPDSS_DRIVE_SIG_FALLING_EDGE:
-               onoff = true;
                rf = false;
                break;
        case OMAPDSS_DRIVE_SIG_RISING_EDGE:
-               onoff = true;
                rf = true;
                break;
        default:
@@ -2958,10 +3076,10 @@ static void _dispc_mgr_set_lcd_timings(enum omap_channel channel, int hsw,
 
        l = FLD_VAL(onoff, 17, 17) |
                FLD_VAL(rf, 16, 16) |
-               FLD_VAL(de_level, 15, 15) |
+               FLD_VAL(de, 15, 15) |
                FLD_VAL(ipc, 14, 14) |
-               FLD_VAL(hsync_level, 13, 13) |
-               FLD_VAL(vsync_level, 12, 12);
+               FLD_VAL(hs, 13, 13) |
+               FLD_VAL(vs, 12, 12);
 
        dispc_write_reg(DISPC_POL_FREQ(channel), l);
 
@@ -3569,6 +3687,9 @@ static void _omap_dispc_initial_config(void)
 
        if (dispc.feat->mstandby_workaround)
                REG_FLD_MOD(DISPC_MSTANDBY_CTRL, 1, 0, 0);
+
+       if (dss_has_feature(FEAT_MFLAG))
+               dispc_init_mflag();
 }
 
 static const struct dispc_features omap24xx_dispc_feats __initconst = {
@@ -3770,6 +3891,8 @@ static int __init omap_dispchw_probe(struct platform_device *pdev)
 
        dispc.pdev = pdev;
 
+       spin_lock_init(&dispc.control_lock);
+
        r = dispc_init_features(dispc.pdev);
        if (r)
                return r;
index 2412a0dd0c1312baa732296e895d5d9f1a63eea6..ef5b9027985d63e50aecd7b91177e2b2030a61bb 100644 (file)
@@ -295,7 +295,7 @@ void videomode_to_omap_video_timings(const struct videomode *vm,
                OMAPDSS_DRIVE_SIG_RISING_EDGE :
                OMAPDSS_DRIVE_SIG_FALLING_EDGE;
 
-       ovt->sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES;
+       ovt->sync_pclk_edge = ovt->data_pclk_edge;
 }
 EXPORT_SYMBOL(videomode_to_omap_video_timings);
 
index 5081f6fb1737ee02ab29cdbfd32fd150e6844300..28b0bc11669d59d42c16a7e51d731af87dc7a2f3 100644 (file)
@@ -4137,7 +4137,7 @@ static int dsi_display_init_dispc(struct platform_device *dsidev,
        dsi->timings.vsync_level = OMAPDSS_SIG_ACTIVE_HIGH;
        dsi->timings.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE;
        dsi->timings.de_level = OMAPDSS_SIG_ACTIVE_HIGH;
-       dsi->timings.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES;
+       dsi->timings.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE;
 
        dss_mgr_set_timings(mgr, &dsi->timings);
 
index a6d10d4279f3b86239c3253230c0e98fe59ddba3..7f978b6a34e8022c1f47c5ccc53bbfe972c8fb9b 100644 (file)
@@ -38,6 +38,7 @@
 #include <linux/regmap.h>
 #include <linux/of.h>
 #include <linux/regulator/consumer.h>
+#include <linux/suspend.h>
 
 #include <video/omapdss.h>
 
@@ -1138,6 +1139,8 @@ static int __init omap_dsshw_probe(struct platform_device *pdev)
 
        dss_debugfs_create_file("dss", dss_dump_regs);
 
+       pm_set_vt_switch(0);
+
        return 0;
 
 err_pll_init:
index 376270b777f886e8109b69650f7a8f24d9bc7241..b0b6dfd657bfb0311e9e1a7abf382a02d0190655 100644 (file)
@@ -440,7 +440,7 @@ static const struct dss_param_range omap3_dss_param_range[] = {
 
 static const struct dss_param_range am43xx_dss_param_range[] = {
        [FEAT_PARAM_DSS_FCK]                    = { 0, 200000000 },
-       [FEAT_PARAM_DSS_PCD]                    = { 2, 255 },
+       [FEAT_PARAM_DSS_PCD]                    = { 1, 255 },
        [FEAT_PARAM_DOWNSCALE]                  = { 1, 4 },
        [FEAT_PARAM_LINEWIDTH]                  = { 1, 1024 },
 };
index a3cfe3d708f7a5b47389f41791000615485539c7..bfc0c4c297d69b9c16bcb16eba56d7d734f8ccf0 100644 (file)
@@ -55,7 +55,7 @@ static void hdmi_core_ddc_init(struct hdmi_core_data *core)
        const unsigned ss_scl_low = 4700;               /* ns */
        const unsigned fs_scl_high = 600;               /* ns */
        const unsigned fs_scl_low = 1300;               /* ns */
-       const unsigned sda_hold = 300;                  /* ns */
+       const unsigned sda_hold = 1000;                 /* ns */
        const unsigned sfr_div = 10;
        unsigned long long sfr;
        unsigned v;
index 28e694b11ff9810b7280298bf822643259bb87bc..065effca9236b2845658b8ed007143fc4f1b2367 100644 (file)
@@ -869,7 +869,7 @@ static void rfbi_config_lcd_manager(struct omap_dss_device *dssdev)
        rfbi.timings.vsync_level = OMAPDSS_SIG_ACTIVE_HIGH;
        rfbi.timings.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE;
        rfbi.timings.de_level = OMAPDSS_SIG_ACTIVE_HIGH;
-       rfbi.timings.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES;
+       rfbi.timings.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE;
 
        dss_mgr_set_timings(mgr, &rfbi.timings);
 }
index 22f07f88bc40828a51606e3b248cf020f55a0fce..4f0cbb54d4dbdf1d43eb013d8fbdcc6cb3813389 100644 (file)
@@ -2073,7 +2073,7 @@ static int omapfb_mode_to_timings(const char *mode_str,
        } else {
                timings->data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE;
                timings->de_level = OMAPDSS_SIG_ACTIVE_HIGH;
-               timings->sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES;
+               timings->sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE;
        }
 
        timings->pixelclock = PICOS2KHZ(var->pixclock) * 1000;
@@ -2223,7 +2223,7 @@ static void fb_videomode_to_omap_timings(struct fb_videomode *m,
        } else {
                t->data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE;
                t->de_level = OMAPDSS_SIG_ACTIVE_HIGH;
-               t->sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES;
+               t->sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE;
        }
 
        t->x_res = m->xres;
index 4bf3273d0433a3cfb34b0633875f3dceb7dbee27..77b99ed39ad0935856398a1921b626e64e069a50 100644 (file)
@@ -1479,9 +1479,9 @@ static void pm3fb_remove(struct pci_dev *dev)
                fb_dealloc_cmap(&info->cmap);
 
 #ifdef CONFIG_MTRR
-       if (par->mtrr_handle >= 0)
-               mtrr_del(par->mtrr_handle, info->fix.smem_start,
-                        info->fix.smem_len);
+               if (par->mtrr_handle >= 0)
+                       mtrr_del(par->mtrr_handle, info->fix.smem_start,
+                                info->fix.smem_len);
 #endif /* CONFIG_MTRR */
                iounmap(info->screen_base);
                release_mem_region(fix->smem_start, fix->smem_len);
index da2431eda2fde0da4fe0948fb6ade83abba01590..7245611ec96398935b7194d819ee021dd9ad2293 100644 (file)
@@ -1285,7 +1285,7 @@ static int pxafb_smart_thread(void *arg)
                mutex_unlock(&fbi->ctrlr_lock);
 
                set_current_state(TASK_INTERRUPTIBLE);
-               schedule_timeout(30 * HZ / 1000);
+               schedule_timeout(msecs_to_jiffies(30));
        }
 
        pr_debug("%s(): task ending\n", __func__);
@@ -1460,7 +1460,7 @@ static void pxafb_disable_controller(struct pxafb_info *fbi)
 #ifdef CONFIG_FB_PXA_SMARTPANEL
        if (fbi->lccr0 & LCCR0_LCDT) {
                wait_for_completion_timeout(&fbi->refresh_done,
-                               200 * HZ / 1000);
+                               msecs_to_jiffies(200));
                return;
        }
 #endif
@@ -1472,7 +1472,7 @@ static void pxafb_disable_controller(struct pxafb_info *fbi)
        lcd_writel(fbi, LCCR0, lccr0);
        lcd_writel(fbi, LCCR0, lccr0 | LCCR0_DIS);
 
-       wait_for_completion_timeout(&fbi->disable_done, 200 * HZ / 1000);
+       wait_for_completion_timeout(&fbi->disable_done, msecs_to_jiffies(200));
 
        /* disable LCD controller clock */
        clk_disable_unprepare(fbi->clk);
index d3013cd9f976966330cd7b501e86e934f1493794..82c0a8caa9b851126402b27a88a5d41ea9fc7386 100644 (file)
@@ -1461,7 +1461,7 @@ overlay_rop3_store(struct device *dev, struct device_attribute *attr,
        unsigned int rop3;
        char *endp;
 
-       rop3 = !!simple_strtoul(buf, &endp, 10);
+       rop3 = simple_strtoul(buf, &endp, 10);
        if (isspace(*endp))
                endp++;
 
@@ -2605,7 +2605,6 @@ sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_chan *ch)
        unsigned int max_size;
        unsigned int i;
 
-       mutex_init(&ch->open_lock);
        ch->notify = sh_mobile_lcdc_display_notify;
 
        /* Validate the format. */
@@ -2704,7 +2703,7 @@ static int sh_mobile_lcdc_probe(struct platform_device *pdev)
        struct resource *res;
        int num_channels;
        int error;
-       int i;
+       int irq, i;
 
        if (!pdata) {
                dev_err(&pdev->dev, "no platform data defined\n");
@@ -2712,8 +2711,8 @@ static int sh_mobile_lcdc_probe(struct platform_device *pdev)
        }
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       i = platform_get_irq(pdev, 0);
-       if (!res || i < 0) {
+       irq = platform_get_irq(pdev, 0);
+       if (!res || irq < 0) {
                dev_err(&pdev->dev, "cannot get platform resources\n");
                return -ENOENT;
        }
@@ -2726,16 +2725,18 @@ static int sh_mobile_lcdc_probe(struct platform_device *pdev)
 
        priv->dev = &pdev->dev;
        priv->meram_dev = pdata->meram_dev;
+       for (i = 0; i < ARRAY_SIZE(priv->ch); i++)
+               mutex_init(&priv->ch[i].open_lock);
        platform_set_drvdata(pdev, priv);
 
-       error = request_irq(i, sh_mobile_lcdc_irq, 0,
+       error = request_irq(irq, sh_mobile_lcdc_irq, 0,
                            dev_name(&pdev->dev), priv);
        if (error) {
                dev_err(&pdev->dev, "unable to request irq\n");
                goto err1;
        }
 
-       priv->irq = i;
+       priv->irq = irq;
        atomic_set(&priv->hw_usecnt, -1);
 
        for (i = 0, num_channels = 0; i < ARRAY_SIZE(pdata->ch); i++) {
index e8d4121783fb09b4f4ffcb2f12b035545c1c6cb6..d0a4e2f79a5703c3b0ed1b968fcac40f43052968 100644 (file)
@@ -1606,7 +1606,7 @@ static int sm501fb_start(struct sm501fb_info *info,
        info->fbmem_len = resource_size(res);
 
        /* clear framebuffer memory - avoids garbage data on unused fb */
-       memset(info->fbmem, 0, info->fbmem_len);
+       memset_io(info->fbmem, 0, info->fbmem_len);
 
        /* clear palette ram - undefined at power on */
        for (k = 0; k < (256 * 3); k++)
index db1e39277e321f37a39b690d4f6f0d5638325376..bf269fa43977e6d7a83dda2269b2d191a08221ef 100644 (file)
@@ -30,7 +30,7 @@
 #include "global.h"
 #include "debug.h"
 
-const char *via_slap = "Please slap VIA Technologies to motivate them "
+static const char *via_slap = "Please slap VIA Technologies to motivate them "
        "releasing full documentation for your platform!\n";
 
 static inline u32 cle266_encode_pll(struct via_pll_config pll)
index c8ed15daad02d37c5a8eec0b3787dfabf8ad9d3f..f001a356fd98f896ae617fe64db45745e1dc4736 100644 (file)
@@ -129,14 +129,13 @@ enum omap_rfbi_te_mode {
 };
 
 enum omap_dss_signal_level {
-       OMAPDSS_SIG_ACTIVE_HIGH = 0,
-       OMAPDSS_SIG_ACTIVE_LOW  = 1,
+       OMAPDSS_SIG_ACTIVE_LOW,
+       OMAPDSS_SIG_ACTIVE_HIGH,
 };
 
 enum omap_dss_signal_edge {
-       OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
-       OMAPDSS_DRIVE_SIG_RISING_EDGE,
        OMAPDSS_DRIVE_SIG_FALLING_EDGE,
+       OMAPDSS_DRIVE_SIG_RISING_EDGE,
 };
 
 enum omap_dss_venc_type {