Commit Graph

3728 Commits

Author SHA1 Message Date
Tomi Valkeinen ea29033359 OMAP: DSS2: FEATURES: Add missing consts
omap_dss_features definitions were missing consts.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:49 +03:00
Tomi Valkeinen 6705615e92 OMAP: DSS2: DSI: Add OMAP4 CIO irqs
OMAP4 DSI block has new interrupts for the two new DSI lanes.

Add definitions for those interrupts, and add the interrupts to the CIO
error mask.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:49 +03:00
Tomi Valkeinen 1abf781454 OMAP: DSS2: Taal: Implement ULPS functionality
ULPS is a low power state where the DSI lanes are kept at ground. This
patch implements ULPS by having a DSI bus inactivity timer which
triggers the entry to ULPS. ULPS exit will happen automatically when the
driver needs to do something on the DSI lanes.

The ulps_timeout is configurable from board file or via sysfs.
Additionally another sysfs file, "ulps", can be used to check the
current ULPS state, or to manually enter or exit ULPS.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:48 +03:00
Tomi Valkeinen 883b9ac95e OMAP: DSS2: Taal: Rename esd_wq to workqueue
ESD workqueue will be shared with other functionality also. Rename
"esd_wq" to "workqueue" to better reflect its usage.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:48 +03:00
Tomi Valkeinen bb5476c720 OMAP: DSS2: Taal: Separate panel reset
Separate panel reset code to a function of its own. This will keep the
code cleaner in the future when panel reset is called from multiple
locations.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:48 +03:00
Tomi Valkeinen 1f8fa452af OMAP: DSS2: Taal: Add sysfs file for ESD interval
Implement sysfs support to configure the ESD interval.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:47 +03:00
Tomi Valkeinen 1663d2f70a OMAP: DSS2: Taal: Clean up ESD queueing
Separate the code which queues/cancels ESD work into their own
functions.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:47 +03:00
Tomi Valkeinen 33a410be6f OMAP: DSS2: Taal: Implement configurable ESD interval
ESD check in Taal driver is currently on/off feature with hardcoded
interval. This patch changes it to a configurable interval, which can be
set from the board file.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:44 +03:00
Tomi Valkeinen 88257b2695 OMAP: DSS2: DSI: ensure VDDS_DSI is disabled on exit
The panel drivers can leave the VDDS_DSI regulator enabled, even when
the panel is disabled, to ensure that the DSI pins are powered.

This patch ensures that VDDS_DSI is disabled on DSI module unload.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:17 +03:00
Tomi Valkeinen d1f5857e4b OMAP: DSS2: DSI: Add DSI pad muxing support
Add dsi_mux_pads function pointer to omap_dss_board_info, and use the
function pointer in DSI code to configure the DSI pads either to normal
DSI operation, or to pull down when in ULPS.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:17 +03:00
Tomi Valkeinen 22d6d67626 OMAP: DSS2: DSI: add parameter to enter ulps on disable
Add parameter to omapdss_dsi_display_disable() which the panel driver
can use to tell if the DSI lanes should be put to ULPS before disabling
the interface.

This can be used to skip ULPS entry in cases where the panel doesn't
care about ULPS state, for example when the panel will be reset, or when
the display interface will be enabled again right after the disable.

This will speed up the operation considerably in cases where entering
ULPS would fail with timeout, and the panel driver isn't even interested
in entering ULPS.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:17 +03:00
Tomi Valkeinen 03329ace1d OMAP: DSS2: DSI: wait for TXCLKESC domain to come out of reset
Add dsi_cio_wait_tx_clk_esc_reset() function which waits for the
TXCLKESC domains to come out of reset.

Things have worked fine without this, but better be safe than sorry.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:16 +03:00
Tomi Valkeinen 65c62bb953 OMAP: DSS2: DSI: fix CIO init and uninit
Use dsi_enable_scp_clk and dsi_disable_scp_clk in CIO init and uninit,
and improve the CIO init by adding a few status checks and error
handling.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:16 +03:00
Tomi Valkeinen 24c1ae4191 OMAP: DSS2: DSI: implement enable/disable SCP clk
SCP clock is needed for CIO on OMAP3, and for CIO and PLL on OMAP4.
Current driver enables the CIO clock always when DSI display is
initialized. However, if a DPI display tries to use DSI PLL, the SCP
clock is never enabled.

This patch implements simple ref counting enable/disable functions for
SCP clock.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:15 +03:00
Tomi Valkeinen c335cbf94e OMAP: DSS2: DSI: fix _dsi_print_reset_status
The bits for TXCLKESCx reset have changed for OMAP3630 and OMAP4.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:15 +03:00
Tomi Valkeinen 293ef19cbb OMAP: DSS2: Add FEAT_DSI_REVERSE_TXCLKESC
OMAP3430 has RESETDONETXCLKESCx bits in the order following bitnumber
order for lanes 0, 1, 2: 28, 27, 26. OMAP3630 and later have them in
saner order: 24, 25, 26 (and 27, 28 for OMAP4).

This patch adds a dss_feature that can be used to differentiate between
those two orders of RESETDONETXCLKESCx bits.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:14 +03:00
Tomi Valkeinen cc5c185098 OMAP: DSS2: DSI: rename complexio related functions
Rename ComplexIO from dsi_complexio_xxx to dsi_cio_xxx for brevity.
Also, add cio prefix for couple of functions that didn't have it, but
are cio related.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:14 +03:00
Tomi Valkeinen 2a89dc1533 OMAP: DSS2: DSI: add option to leave DSI lanes powered on
The DSI pins are powered by VDDS_DSI. If VDDS_DSI is off, the DSI pins
are floating even if they are pinmuxed to, say, safe mode and there's a
pull down/up.

This patch gives the panel drivers an option to leave the VDDS_DSI power
enabled while the DSS itself is turned off. This can be used to keep the
DSI lanes in a valid state while DSS is off, if the DSI pins are muxed
for pull down (not done in this patch).

There will be a slight power consumption increase (~100 uA?) when the
VDDS_DSI is left on, but because this option is used when the panel is
left on, the regulator consumption is negligible compared to panel power
consumption.

When the panel is fully turned off the VDDS_DSI is also turned off.

As an added bonus this will give us faster start up time when starting
up the DSS and the regulator is already enabled.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:13 +03:00
Tomi Valkeinen 40885ab31f OMAP: DSS2: DSI: implement ULPS enter and exit
Entering ULPS (Ultra Low Power State) happens by sending ULPS entry
sequence to the DSI peripheral and pulling the DSI lines down.

Exiting ULPS happens by sending ULPS exit sequence.

We can send the ULPS entry sequence by using OMAP DSS HW's ULPS support,
but we cannot use the ULPS exit support from DSS HW. DSS HW refuses to
send the ULPS exit sequence if it thinks that the lanes are not in ULPS.
After being in OFF mode the DSS HW has been reset, and so it does not
know that the lanes are actually in ULPS.

Thus we need to use the lane override support and manually send the ULPS
exit sequence. Luckily the sequence is very simple.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:13 +03:00
Tomi Valkeinen 95861368e3 OMAP: DSS2: DSI: Remove CIO LDO status check
CIO LDO status check seems to be broken on OMAP3630+ chips, and it's
also quite unclear what LDO status actually tells and when its status
changes.

This patch removes the whole check on the grounds that if there's a
problem with the LDO, we should anyway catch the problem as we check the
CIO power state and CIO reset status.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:12 +03:00
Tomi Valkeinen 0a0ee46b1a OMAP: DSS2: DSI: Add lane override functions
DSI_DSIPHY_CFG10 register can be used to override DSI lane state. Add
functions to configure and enable the override, and to disable the
override.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:12 +03:00
Tomi Valkeinen ab46d8b2a3 OMAP: DSS2: improve clock debugfs output
OMAP4 has clocks set up in a bit interesting way, causing, for example,
the DSS's "ick" to be called "dss_fck".

This patch changes the debugfs output to show both the DSS's name for
the clock (ie. basically the clock alias), and the real name from the
clock struct.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:11 +03:00
Tomi Valkeinen e3502ce97f OMAP: DSS2: Convert simple/strict_strto* to kstrto*
Convert simple/strict_strto* functions to kstrto* functions. Only simple
cases are converted.

simple_strto* uses are still left to places where it is used to parse
numbers from a list of numbers. These need some other solution than
kstrto*.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:11 +03:00
Archit Taneja 7636b3b4e1 OMAP2PLUS: DSS2: Remove hack config "CONFIG_OMAP2_DSS_USE_DSI_PLL"
The clock sources for DISPC_FCLK and LCD1_CLK are now specified in the board file.
There is no need for the hack config "CONFIG_OMAP2_DSS_USE_DSI_PLL" anymore.
Introduce function dpi_use_dsi_pll() which checks for the clock sources to decide
whether DSI PLL is to be used or not.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:10 +03:00
Archit Taneja 6cb07b256a OMAP: DSS2: HDMI: Use dss_device clock configuration for HDMI PLL parameters
Move some of the configurable HDMI PLL parameters to dssdev.clock struct.
Cleanup the function hdmi_compute_pll() by using the parameters defined in the
board file and do some cosmetic modifications.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:10 +03:00
Archit Taneja e888166247 OMAP2PLUS: DSS2: Add clock sources to dss device clock configuration
Add enum dss_clock_source in dssdev.clocks struct so that the clock sources can
be specified in the board file.
Replace hard coded clock sources in dsi.c, dpi.c and replace them with the new
clock source members in dssdev.clocks. Modify the sdp4430_lcd_device struct in
board-4430sdp.c to specify clock sources for DISPC_FCLK, LCD1_CLK and DSI1_FCLK.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:06 +03:00
Archit Taneja 89a35e5170 OMAP2PLUS: DSS2: Change enum "dss_clk_source" to "omap_dss_clk_source"
Change enum dss_clk_source to omap_dss_clock_source and move it to
'plat/display.h'. Change the enum members to attach "OMAP_" in the beginning.
These changes are done in order to specify the clock sources for DSS in the
board file.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:19:27 +03:00
Tomi Valkeinen 14e4d78485 OMAP: DSS2: use __exit for selected panel drivers
We can use __exit for the driver remove function in plain dss panels
(ie. those that do not need i2c or spi).

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:19:26 +03:00
Tomi Valkeinen 06b2b0d597 OMAP: DSS2: make omap_dss_(un)register_device static
omap_dss_register_device and omap_dss_unregister_device can only be
called from core.c, so we can make it static.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:19:26 +03:00
Tomi Valkeinen 14572c6356 OMAP: DSS2: VENC: Add missing start/stop_device calls
VENC code was missing omap_dss_start/stop_device calls. This didn't
cause any problems as VENC could not be compiled as a module, but
nevertheless it's better to add the calls.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:19:25 +03:00
Jani Nikula bcd8e374b5 OMAP: DSS2: OMAPFB: Remove implicit display update on unblank
Currently omapfb does an implicit display update (for manual update
displays) on unblank.

There is no guarantee that the framebuffer contains a valid image when
unblank is called. When using manual update displays it is the
responsibility of the user space to update the display, and so it should
be in this case also.

This patch removes the implicit display update on unblank.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
[tomi.valkeinen@ti.com: improved description]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:19:25 +03:00
Tomi Valkeinen 91ac27a687 OMAP: DSS2: OMAPFB: Handle errors when initializing panel
Errors from the panel driver were ignored during panel initialization.
Handle the errors and fail accordingly.

Also move the display initialization to a separate function to make it
cleaner.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:19:25 +03:00
Jani Nikula 7a0987bf2c OMAP: DSS2: Add method for querying display dimensions from DSS drivers
Add get_dimensions() to struct omap_dss_driver. Use the call, if supported
by the driver, in OMAPFB.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:19:24 +03:00
Tomi Valkeinen b4de838e9f OMAP: DSS2: VENC: Remove sleeps at venc enable/disable
VENC code had 50ms sleep after enabling the output and 100ms sleep after
disabling the output. I don't see any reason for these sleeps.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:19:24 +03:00
Tomi Valkeinen c6f65e1a43 OMAP: DSS2: VENC: make 20ms venc bug-fix sleep optional
There's a 20ms sleep after VENC reset. It's unknown what bug this
circumvents and on what platforms. Add a Kconfig option to disable the
sleep.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:19:23 +03:00
Tomi Valkeinen f1aafdcd42 OMAP: DSS2: make 50ms bug-fix sleep optional
For some unknown reason we may get SYNC_LOST errors from the display
subsystem at initialization time if we don't sleep before resetting the
DSS. See the source (dss.c) for more comments.

However, 50ms is quite long time to sleep, and with some configurations
the SYNC_LOST may never happen, so this patch creates a Kconfig option
to disable the sleep.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:19:23 +03:00
Tomi Valkeinen d792eecd9a OMAP: DSS2: remove non-working msleep(40) workaround
The sleep workaround for the problem described in the comment doesn't
really work. This patch removes the workaround, and improves the comment
about the bug, and proposes an userspace workaround.

omap_dss_set_manager() is called 6 times when loading omapdss and
omapfb, which means that 40ms * 6 = 240ms was spent sleeping when
booting up.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:19:22 +03:00
Tomi Valkeinen c6940a3dc5 OMAP: DSS2: move dss device clock configuration
Clock configuration was defined inside dssdev.phy.dsi struct. The clock
config doesn't really belong there, and so it's moved to dssdev.clock
struct.

Now the explicit clock configuration could also be used for other
interfaces than DSI, although there's no support for it currently.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:19:16 +03:00
Archit Taneja cf398fb3e6 OMAP: DSS2: DSI: Introduce sync_vc functions
The DSI protocol engine has no interrupt for signalling the end of a Frame
transfer. The present approach is to send a BTA after DISPC generates a
FRAMEDONE interrupt, and unlock the dsi bus only when the BTA Ack is received.

The assumption made with this approach was that OMAP will send a BTA only after
the long packet corresponding to the last line is sent. However, it is possible
that on the DISPC FRAMEDONE interrupt there are 2 (or more) lines of pixel data
in the DSI line buffer. Hence, the BTA Ack could be received for the long packet
corresponding to the second last line (or the third last and so on..).
Therefore, the current method doesn't ensure that the complete frame data is
sent before we start a new transfer. A similar explanation holds valid if we
send a BTA in between multiple short/long command packets from the slave port.

Introduce dsi_sync_vc functions, based on Tomi Valkeinen's idea, which ensure
that the DSI Virtual Channel in use(update_channel) completes its previous work
before proceeding to the next Frame/Command.

For a frame update, the DSI driver now sends a callback to the Panel Driver
on the FRAMEDONE interrupt itself. The callback in the panel driver then unlocks
the bus. dsi_sync_vc() functions are placed in dsi_vc_config_l4() and
dsi_vc_config_vp() to ensure that the previous task of the Virtual Channel is
completed.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:10:55 +03:00
Archit Taneja 9613c02b5f OMAP4: DSS2: Register configuration changes for DSI
The following changes have changed from OMAP3 to OMAP4 DSI:
-The register field DSI_PLL_FREQSEL in DSI_PLL_CONFIGURATION2 has been removed.
-DCS_CMD_ENABLE and DCS_CMD_CODE bits have been moved from DSI_CTRL to
DSI_VC_CTRLi, hence the control of the bits is available per VC.
-DSI LDO powergood notification doesn't work on OMAP4. This is mentioned in
OMAP4 errata revision 1.8(Errata 1.76).
-OCP_WIDTH register field is included in DSI_VC_CTRL.
-The SCP clock is also required to access DSI PLL registers

Introduce dss features for these changes so that DSI runs on both OMAP3 and
OMAP4.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:10:55 +03:00
Tomi Valkeinen 2783fa849b OMAP: DSS2: fix panel Kconfig dependencies
All DPI panels were missing dependency to OMAP2_DSS_DPI. Add the
dependency.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:10:54 +03:00
Tomi Valkeinen c94dfe05c4 OMAP: DSS2: DSI: Fix DSI PLL power bug
OMAP3630 has a HW bug causing DSI PLL power command POWER_ON_DIV (0x3)
to not work properly. The bug prevents us from enabling DSI PLL power
only to HS divider block.

This patch adds a dss feature for the bug and converts POWER_ON_DIV
requests to POWER_ON_ALL (0x2).

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:10:54 +03:00
Archit Taneja 89976f2990 OMAP: DSS2: Fix: Return correct lcd clock source for OMAP2/3
dss.lcd_clk_source is set to the default value DSS_CLK_SRC_FCK at dss_init.
For OMAP2 and OMAP3, the dss.lcd_clk_source should always be the same as
dss.dispc_clk_source. The function dss_get_lcd_clk_source() always returns the
default value DSS_CLK_SRC_FCK for OMAP2/3. This leads to wrong clock dumps when
dispc_clk_source is not DSS_CLK_SRC_FCK.

Correct this function to always return dss.dispc_clk_source for OMAP2/3.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:10:54 +03:00
Tomi Valkeinen a9a6500b71 OMAP: DSS2: DSI: fix dsi_dump_clocks()
On OMAP4, reading DSI_PLL_CONFIGURATION2 register requires the L3 clock
(CIO_CLK_ICG) to PLL. Currently dsi_dump_clocks() tries to read that
register without enabling the L3 clock, leading to crash if DSI is not
in use.

The status of the bit being read from DSI_PLL_CONFIGURATION2 is
available from dsi_clock_info->use_sys_clk, so we can avoid the whole
problem by just using that.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:10:54 +03:00
Tomi Valkeinen b2765092ae OMAP: DSS2: DSI: fix use_sys_clk & highfreq
use_sys_clk and highfreq fields in dsi.current_cinfo were never set.
Luckily they weren't used anywhere so it didn't cause any problems.

This patch fixes those fields and they are now set at the same time as
the rest of the fields.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:10:54 +03:00
Tomi Valkeinen 4e9f99d75c OMAP: DSS2: Move nokia-dsi-panel.h to include/video/
arch/arm/plat-omap/include/plat/nokia-dsi-panel.h is an include for the
OMAP DSS panel driver for Nokia's DSI displays. A more logical place for
it is in include/video.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:10:07 +03:00
Tomi Valkeinen f8ae2f08d2 OMAP: DSS2: Move panel-generic-dpi.h to include/video/
arch/arm/plat-omap/include/plat/panel-generic-dpi.h is an include for
the OMAP DSS panel driver for generic DPI displays. A more logical place
for it is in include/video.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:08:51 +03:00
Tomi Valkeinen a0b38cc4d3 OMAP: DSS2: Move display.h to include/video/
arch/arm/plat-omap/include/plat/display.h is an include for the OMAP DSS
driver. A more logical place for it is in include/video.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:05:07 +03:00
Daniel Drake 8aa4d96fe3 viafb: Automatic OLPC XO-1.5 configuration
Currently, a long set of viafb options are needed to get the XO-1.5
laptop to output video (there is only 1 configuration that works, that
can't really be autodetected).

This patch automatically detects and configures viafb for the XO-1.5
laptop, meaning all that is required for working display is that
viafb is loaded.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-05-11 07:27:37 +00:00
Russell King 52fe116376 ARM: RiscPC: acornfb: fix section mismatches
WARNING: drivers/video/built-in.o(.devinit.text+0x38): Section mismatch in reference from the function acornfb_probe() to the function .init.text:acornfb_setup()
The function __devinit acornfb_probe() references
a function __init acornfb_setup().
If acornfb_setup is only used by acornfb_probe then
annotate acornfb_setup with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x3c): Section mismatch in reference from the function acornfb_probe() to the function .init.text:acornfb_init_fbinfo()
The function __devinit acornfb_probe() references
a function __init acornfb_init_fbinfo().
If acornfb_init_fbinfo is only used by acornfb_probe then
annotate acornfb_init_fbinfo with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x4c0): Section mismatch in reference from the function acornfb_probe() to the (unknown reference) .init.data:(unknown)
The function __devinit acornfb_probe() references
a (unknown reference) __initdata (unknown).
If (unknown) is only used by acornfb_probe then
annotate (unknown) with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x4c8): Section mismatch in reference from the function acornfb_probe() to the (unknown reference) .init.data:(unknown)
The function __devinit acornfb_probe() references
a (unknown reference) __initdata (unknown).
If (unknown) is only used by acornfb_probe then
annotate (unknown) with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x4cc): Section mismatch in reference from the function acornfb_probe() to the (unknown reference) .init.data:(unknown)
The function __devinit acornfb_probe() references
a (unknown reference) __initdata (unknown).
If (unknown) is only used by acornfb_probe then
annotate (unknown) with a matching annotation.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-06 08:16:51 +01:00
Jiri Kosina 07f9479a40 Merge branch 'master' into for-next
Fast-forwarded to current state of Linus' tree as there are patches to be
applied for files that didn't exist on the old branch.
2011-04-26 10:22:59 +02:00
Florian Tobias Schandinat e01255d698 viafb: remove unused CEA mode
This trivial patch removes unused mode tables.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-04-26 08:10:33 +00:00
Florian Tobias Schandinat 9d5f96f618 viafb: try to map less memory in case of failure
The current code might result in trying to remap 512MB video ram on
a 32 bit system which is quite likely to fail.
This patch tries to map less of it down to 8MB as this should still
be enough to get a reasonably well working framebuffer. This should
make viafb work for many people without requiring them to manually
allocate more space.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-04-25 20:01:46 +00:00
Florian Tobias Schandinat cace71b318 viafb: use write combining for video ram
This can give a speed up of factor 6-9, which is quite notable.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-04-24 17:08:44 +00:00
Florian Tobias Schandinat f33f6f0ccc Merge branch 'viafb-pll' into viafb-next
Conflicts:
	drivers/video/via/viamode.c

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-04-24 13:18:48 +00:00
Florian Tobias Schandinat 75ec72f8c5 Merge branch 'viafb-cleanup' into viafb-next 2011-04-24 13:17:09 +00:00
Florian Tobias Schandinat 2946294f9a viafb: add X server compatibility mode
This patch adds a config option to be compatible with X servers like
OpenChrome. This is required as for example the X server does not
handle things like disabled IGAs/PLLs resulting in a potential
freeze on X startup. With this option disabled we can provide some
nice features like power management and not reinitializing the
hardware on every mode switch (taking long time, causing flickering).

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-04-23 23:52:45 +00:00
Florian Tobias Schandinat c5a4e6d725 viafb: reduce OLPC refresh a bit
When allowing some PLL calculation we get a frequency that seems to
be a bit higher than what the OLPC DCON likes resulting in a still
readable but not so good image. We don't really know whether this is
a problem with the calculation formula or the OLPC but as other
displays seem to be happy with the other modes adjusting the OLPC
refresh looks like the better thing. This patch prevents a
regression when dynamic PLL calculation is allowed.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-04-23 22:24:52 +00:00
Florian Tobias Schandinat 32fab7bcc7 viafb: fix OLPC XO 1.5 device connection
This patch fixes the devices connected on OLPC. The OLPC panel seems
to be connected to DVP1 and LVDS2 for some reasons and if not both
are handled correct the display does not work correct or not at all.
This patch prevents regressions on the OLPC where it worked by
accident but would break in future as the driver did not know the
correct devices connected. This might also fix hardware scaling.
Hopefully the OLPC is the only device with such a requirement but it
will be certainly better to actually know what devices are actually
connected and to not work by accident.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-04-23 22:06:18 +00:00
Paul Mundt 4f2970b9f6 s3fb: fix up DDC build with MTRR disabled.
drivers/video/s3fb.c: In function 's3_pci_remove':
drivers/video/s3fb.c:1388: error: 'par' undeclared (first use in this function)

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-04-20 18:20:26 +09:00
Ondrej Zary 86c0f043a7 s3fb: add DDC support
Add I2C support for the DDC bus and also default mode initialization by
reading monitor EDID to the s3fb driver.

Tested on Trio64V+ (2 cards), Trio64V2/DX, Virge (3 cards),
Virge/DX (3 cards), Virge/GX2, Trio3D/2X (4 cards), Trio3D.

Will probably not work on Trio32 - my 2 cards have DDC support in BIOS that
looks different from the other cards but the DDC pins on the VGA connector
are not connected.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-04-19 15:50:53 +09:00
Paul Mundt 6e4b26805a Merge branch 'viafb-next' of git://github.com/schandinat/linux-2.6 into fbdev-fixes-for-linus 2011-04-19 15:49:36 +09:00
Paul Mundt 9b6d777711 Merge branch 'for-paul-39-rc' of git://gitorious.org/linux-omap-dss2/linux into fbdev-fixes-for-linus 2011-04-18 17:47:57 +09:00
Florian Tobias Schandinat b4ce6a285b viafb: fix OLPC DCON refresh rate
This patch fixes a regression introduced by
	fd3cc69848b7e1873e5f12bbcdd572b20277ecf3a
	"viafb: remove duplicated clock storage"
caused by an incosistent mode which pretended to have a higher
refresh rate than it actually had. The wrong refresh rate resulted
in a calculated higher pixclock which the OLPC DCON could not handle.
By reducing the refresh rate to 50Hz we get close to the old
pixclock which makes the OLPC display usable again.
Minor other adjustments are needed as 60Hz is assumed to be a safe
value which is not true for OLPC DCON. This is no problem as we only
support 1200x900 on the OLPC.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Reported-by: Daniel Drake <dsd@laptop.org>
2011-04-15 21:35:25 +00:00
Tomi Valkeinen 0fd08060f1 OMAP: DSS2: fix panel Kconfig dependencies
All DPI panels were missing dependency to OMAP2_DSS_DPI. Add the
dependency.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-04-15 11:08:39 +03:00
Tomi Valkeinen 0b41136c0d OMAP: DSS2: DSI: Fix DSI PLL power bug
OMAP3630 has a HW bug causing DSI PLL power command POWER_ON_DIV (0x3)
to not work properly. The bug prevents us from enabling DSI PLL power
only to HS divider block.

This patch adds a dss feature for the bug and converts POWER_ON_DIV
requests to POWER_ON_ALL (0x2).

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-04-15 11:08:33 +03:00
Archit Taneja 6553b2105c OMAP: DSS2: Fix: Return correct lcd clock source for OMAP2/3
dss.lcd_clk_source is set to the default value DSS_CLK_SRC_FCK at dss_init.
For OMAP2 and OMAP3, the dss.lcd_clk_source should always be the same as
dss.dispc_clk_source. The function dss_get_lcd_clk_source() always returns the
default value DSS_CLK_SRC_FCK for OMAP2/3. This leads to wrong clock dumps when
dispc_clk_source is not DSS_CLK_SRC_FCK.

Correct this function to always return dss.dispc_clk_source for OMAP2/3.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-04-15 11:08:22 +03:00
Tomi Valkeinen 4eb68edb7d OMAP: DSS2: DSI: fix dsi_dump_clocks()
On OMAP4, reading DSI_PLL_CONFIGURATION2 register requires the L3 clock
(CIO_CLK_ICG) to PLL. Currently dsi_dump_clocks() tries to read that
register without enabling the L3 clock, leading to crash if DSI is not
in use.

The status of the bit being read from DSI_PLL_CONFIGURATION2 is
available from dsi_clock_info->use_sys_clk, so we can avoid the whole
problem by just using that.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-04-15 10:54:11 +03:00
Tomi Valkeinen ae038af12c OMAP: DSS2: DSI: fix use_sys_clk & highfreq
use_sys_clk and highfreq fields in dsi.current_cinfo were never set.
Luckily they weren't used anywhere so it didn't cause any problems.

This patch fixes those fields and they are now set at the same time as
the rest of the fields.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-04-15 10:54:10 +03:00
Marek Vasut a6d710fefd ARM: pxafb: Fix access to nonexistent member of pxafb_info
In case CONFIG_FB_PXA_OVERLAY is not defined, the pxafb_freq_transition()
function tests nonexistent member of pxafb_info (since the member is not
part of the structure).

Fix this by wraping the test in ifdef, even if I don't really like how the code
looks now. The check doesn't have to happen if overlays are disabled at all as
the check is always true then.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2011-04-12 23:07:42 +08:00
Jingoo Han b07f3bbee1 video: s3c-fb: add spinlock to interrupt routine
The spinlock is added to interrupt routine to ensure that the driver
is protected against multiple accesses.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-04-11 09:38:50 -07:00
Jingoo Han 0d60b281dc video: s3c-fb: make runtime pm functions static
This patch makes runtime pm functions static.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-04-11 09:38:50 -07:00
Justin P. Mattock 6eab04a876 treewide: remove extra semicolons
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-10 17:01:05 +02:00
Joe Perches 06794eaeb7 treewide: Fix iomap resource size miscalculations
Convert off-by-1 r->end - r->start to resource_size(r)

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: David Brown <davidb@codeaurora.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Florian Fainelli <florian@openwrt.org>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-10 17:01:04 +02:00
Linus Torvalds 132452ee23 Merge branch 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6
* 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6:
  efifb: Add override for 11" Macbook Air 3,1
  efifb: Support overriding fields FW tells us with the DMI data.
  fb: Reduce priority of resource conflict message
  savagefb: Remove obsolete else clause in savage_setup_i2c_bus
  savagefb: Set up I2C based on chip family instead of card id
  savagefb: Replace magic register address with define
  drivers/video/bfin-lq035q1-fb.c: introduce missing kfree
  video: s3c-fb: fix checkpatch errors and warning
  efifb: support AMD Radeon HD 6490
  s3fb: fix Virge/GX2
  fbcon: Remove unused 'display *p' variable from fb_flashcursor()
  fbdev: sh_mobile_lcdcfb: fix module lock acquisition
  fbdev: sh_mobile_lcdcfb: add blanking support
  viafb: initialize margins correct
  viafb: refresh rate bug collection
  sh: mach-ap325rxa: move backlight control code
  sh: mach-ecovec24: support for main lcd backlight
2011-04-07 12:49:17 -07:00
Linus Torvalds 42933bac11 Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6
* 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6:
  Fix common misspellings
2011-04-07 11:14:49 -07:00
Matthew Garrett 97fb85076c efifb: Add override for 11" Macbook Air 3,1
The 11" Macbook Air appears to claim that its stride is 1366, when it's
actually 2048. Override it.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-04-06 10:58:10 -07:00
Peter Jones 47dfe51f8f efifb: Support overriding fields FW tells us with the DMI data.
Some machines apparently give us bogus linelength/stride/pitch data, so
we need to support letting the DMI table override the supplied data.

I bet you can't guess whose machines I'm talking about.

Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-04-06 10:58:10 -07:00
Matthew Garrett 47c87d930f fb: Reduce priority of resource conflict message
It's expected that efifb will conflict with a native driver, so the
handover message should be informational rather than an error.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-04-06 09:58:29 -07:00
Tormod Volden 787dffa5c7 savagefb: Remove obsolete else clause in savage_setup_i2c_bus
The else clause was not needed after the cleanup in commit
b8901b091d

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-04-06 09:49:53 -07:00
Tormod Volden 21cd72e7cb savagefb: Set up I2C based on chip family instead of card id
In practice this means enabling I2C (for DDC2) on all prosavage cards,
like the xorg ddx does. The savage4 and savage2000 families have only
one member each, so there is no change for those.

Tested on TwisterK.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-04-06 09:49:53 -07:00
Tormod Volden a564d301e9 savagefb: Replace magic register address with define
MM_SERIAL1 was already defined, but not used.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-04-06 09:49:52 -07:00
Julia Lawall a8c908d353 drivers/video/bfin-lq035q1-fb.c: introduce missing kfree
Error handling code following a kmalloc should free the allocated data.

The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@

x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...x...+> }
(
x->f1 = E
|
 (x->f1 == NULL || ...)
|
 f(...,x->f1,...)
)
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-04-06 09:44:57 -07:00
Jingoo Han b73a21fc66 video: s3c-fb: fix checkpatch errors and warning
This patch fixes the checkpatch errors listed below:

ERROR: space required before the open parenthesis '('
ERROR: need consistent spacing around '+' (ctx:WxV)
ERROR: space prohibited before that close parenthesis ')'

Also, following warning is fixed by adding 'platid' variable
which can reduce number of lines exceeding 80 characters.

WARNING: line over 80 characters

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-04-06 09:44:57 -07:00
Justin P. Mattock 79add62773 update David Miller's old email address
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-06 06:19:38 -07:00
Linus Torvalds 3230ca9dc6 Merge branch 'unicore32' of git://git.kernel.org/pub/scm/linux/kernel/git/epip/linux-2.6-unicore32
* 'unicore32' of git://git.kernel.org/pub/scm/linux/kernel/git/epip/linux-2.6-unicore32:
  unicore32 framebuffer fix: get videomemory by __get_free_pages() and make it floatable
  unicore32 core architecture: remove duplicated #include
  unicore32 rtc driver fix: cleanup irq_set_freq and irq_set_state
  unicore32 fix: remove arch-specific futex support
  unicore32 ldscript fix: add cacheline parameter to PERCPU() macro
2011-04-04 08:33:21 -07:00
Guan Xuetao 6b794743b2 unicore32 framebuffer fix: get videomemory by __get_free_pages() and make it floatable
1. get videomemory by __get_free_pages() in fb-puv3.c
2. remove resource reservation for old fixed UNIGFX_MMAP & UVC_MMAP space
3. remove unused macros: PKUNTIY_UNIGFX_MMAP_BASE, PKUNITY_UNIGFX_MMAP_SIZE,
	PKUNITY_UVC_MMAP_BASE, PKUNITY_UVC_MMAP_SIZE and KUSER_UNIGFX_BASE
4. remove unused header linux/vmalloc.h in fb-puv3.h

Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Acked-by: Arnd Bergmann <arnd@arndb.de>
2011-04-02 16:17:38 +08:00
Florian Tobias Schandinat 4d9fd0b72c viafb: delete clock and PLL initialization
We do this also in the real program code so there is no reason to
do it here too (and here it's hardly readable).

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-04-01 15:32:22 +00:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Davidlohr Bueso e9c5db0b8d efifb: support AMD Radeon HD 6490
This patch enables the framebuffer for the AMD Radeon 6490 found in the new MacBook Pro 8,2 generation.
The framebuffer's base is located at 0x90010000, the method for obtaining it was found in the same way mentioned in https://patchwork.kernel.org/patch/91704/

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Jonathan Gonzalez <zeus@gnu.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-31 13:49:09 +09:00
Ondrej Zary 94e948e6e4 s3fb: fix Virge/GX2
Fix Virge/GX2 support in s3fb:
- fix IDs: 86C357 is GX2, 86C359 is GX2+, 86C356 probably does not exist
- add memory size detection
- drive it the same way as Trio3D/2X

The original IDs most likely came from S3 website which claims that:
- 356 is Virge/GX2 with ID=8A10, driver included in Windows 2K, XP
- 357 is Virge/GX2+ with ID=8A11, driver included in Windows ME
- 359 is Virge/GX2+ with ID=8A12, driver included in Windows ME
but:
- google search for 86C356 only reveals references to Trio3D (probably
because of a typo - Trio3D is 86C365)
- my card is clearly marked as 86C357, Virge/GX2 and has ID=8A10
- there is no driver for IDs 8A11 and 8A12 in Windows ME
- there is a driver for ID 8A10 in Windows ME that says it's GX2 (357)

Tested with #9 Reality 334 (86C357 Virge/GX2, ID=0x8A10).

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-31 13:48:58 +09:00
Sergey Senozhatsky 62e0ff1ef2 fbcon: Remove unused 'display *p' variable from fb_flashcursor()
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-31 13:48:54 +09:00
Paul Mundt 1fcf0069f4 Merge branch 'common/fbdev' of master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6 2011-03-29 16:06:21 +09:00
Alexandre Courbot 247f993861 fbdev: sh_mobile_lcdcfb: fix module lock acquisition
Whenever the LCDC is to be started or stopped, a board callback is
checked for existence and invoked. Prior to the invokation, the
callback's module lock is also acquired, to be released once the
callback returns. However, the order of testing makes it possible for
the lock to be acquired and not released in case the callback does not
exist. This patch reorders the tests to prevent this particular case.

Signed-off-by: Alexandre Courbot <gnurou@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-29 16:04:45 +09:00
Alexandre Courbot 8857b9aa7e fbdev: sh_mobile_lcdcfb: add blanking support
Add a blanking callback to the LCDC driver in order to support both
FBIOBLANK and TIOCLINUX blanking ioctls. LCDC clocks are also released
if the requested blanking level is superior to FB_BLANK_NORMAL, to allow
runtime PM to disable the clocks if possible.

Signed-off-by: Alexandre Courbot <gnurou@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-29 16:04:39 +09:00
Florian Tobias Schandinat cd00b1154d viafb: replace custom return values
This patch replaces OK/FAIL by true/false which is simpler and saner.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-03-27 03:36:00 +00:00
Florian Tobias Schandinat 7f980a06e4 viafb: some small cleanup for global variables
We do not need viafb_second{,_virtual}_{xres,yres} outside of
viafbdev.c so move them there and eliminate the virtual ones where
the only sane usage is done during initalization.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-03-27 02:54:32 +00:00
Florian Tobias Schandinat 95d517cfce viafb: gather common good, old VGA initialization in one place
This patch moves all unprotected VGA initialization in one table and
provides some documentation for those values.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-03-26 23:39:07 +00:00
Russell King 938c0ace3f Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel-stable
Conflicts:
	arch/arm/mach-pxa/tosa.c
2011-03-26 10:03:03 +00:00
Florian Tobias Schandinat bea02e4587 viafb: add engine clock support
This patch adds support for enabling and configuring the engine on
VIAs IGPs. This is the main clock used for everything but pixel
output.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-03-26 02:53:21 +00:00
Paul Mundt 53f358a81e Merge branch 'viafb-next' of git://github.com/schandinat/linux-2.6 2011-03-25 07:52:38 +09:00
Florian Tobias Schandinat b692a63af8 viafb: add VIA slapping capability
This patch introduces dummy functions to execute when we don't know
what we should do (due to missing documentation). They do nothing
but print a nice message in the log explaining the situation.
To trigger this message initial power management support is
activated which might save a bit energy by disabling PLL and clock
if no device is configured to use them.

Note: The message is only shown for the oldest IGPs CLE266 and K400
      as for the other platforms there are reasonable assumptions
      how it does (hopefully) work.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-03-24 21:17:52 +00:00
Linus Torvalds 76d21c5635 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (442 commits)
  [media] videobuf2-dma-contig: make cookie() return a pointer to dma_addr_t
  [media] sh_mobile_ceu_camera: Do not call vb2's mem_ops directly
  [media] V4L: soc-camera: explicitly require V4L2_BUF_TYPE_VIDEO_CAPTURE
  [media] v4l: soc-camera: Store negotiated buffer settings
  [media] rc: interim support for 32-bit NEC-ish scancodes
  [media] mceusb: topseed 0x0011 needs gen3 init for tx to work
  [media] lirc_zilog: error out if buffer read bytes != chunk size
  [media] lirc: silence some compile warnings
  [media] hdpvr: use same polling interval as other OS
  [media] ir-kbd-i2c: pass device code w/key in hauppauge case
  [media] rc/keymaps: Remove the obsolete rc-rc5-tv keymap
  [media] remove the old RC_MAP_HAUPPAUGE_NEW RC map
  [media] rc/keymaps: Rename Hauppauge table as rc-hauppauge
  [media] rc-rc5-hauppauge-new: Fix Hauppauge Grey mapping
  [media] rc-rc5-hauppauge-new: Add support for the old Black RC
  [media] rc-rc5-hauppauge-new: Add the old control to the table
  [media] rc-winfast: Fix the keycode tables
  [media] a800: Fix a few wrong IR key assignments
  [media] opera1: Use multimedia keys instead of an app-specific mapping
  [media] dw2102: Use multimedia keys instead of an app-specific mapping
  ...

Fix up trivial conflicts (remove/modify and some real conflicts) in:
	arch/arm/mach-omap2/devices.c
	drivers/staging/Kconfig
	drivers/staging/Makefile
	drivers/staging/dabusb/dabusb.c
	drivers/staging/dabusb/dabusb.h
	drivers/staging/easycap/easycap_ioctl.c
	drivers/staging/usbvideo/usbvideo.c
	drivers/staging/usbvideo/vicam.c
2011-03-24 09:50:13 -07:00
Linus Torvalds a6a1d6485e Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (90 commits)
  mfd: Push byte swaps out of wm8994 bulk read path
  mfd: Rename ab8500 gpadc header
  mfd: Constify WM8994 write path
  mfd: Push byte swap out of WM8994 bulk I/O
  mfd: Avoid copying data in WM8994 I2C write
  mfd: Remove copy from WM831x I2C write function
  mfd: Staticise WM8994 PM ops
  regulator: Add a subdriver for TI TPS6105x regulator portions v2
  mfd: Add a core driver for TI TPS61050/TPS61052 chips v2
  gpio: Add Tunnel Creek support to sch_gpio
  mfd: Add Tunnel Creek support to lpc_sch
  pci_ids: Add Intel Tunnel Creek LPC Bridge device ID.
  regulator: MAX8997/8966 support
  mfd: Add WM8994 bulk register write operation
  mfd: Append additional read write on 88pm860x
  mfd: Adopt mfd_data in 88pm860x input driver
  mfd: Adopt mfd_data in 88pm860x regulator
  mfd: Adopt mfd_data in 88pm860x led
  mfd: Adopt mfd_data in 88pm860x backlight
  mfd: Fix MAX8997 Kconfig entry typos
  ...
2011-03-24 07:59:01 -07:00
Linus Torvalds 4cc4d24efc Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6: (140 commits)
  MAINTAINERS: de-orphan fbdev.
  MAINTAINERS: Add file pattern for fb dt bindings.
  video: Move sm501fb devicetree binding documentation to a better place.
  fbcon: fix situation where fbcon gets deinitialised and can't reinit.
  video, sm501: add OF binding to support SM501
  video, sm501: add edid and commandline support
  video, sm501: add I/O functions for use on powerpc
  video: Fix EDID macros H_SYNC_WIDTH and H_SYNC_OFFSET
  fbcon: Bugfix soft cursor detection in Tile Blitting
  video: add missing framebuffer_release in error path
  video: metronomefb: add __devexit_p around reference to metronomefb_remove
  video: hecubafb: add __devexit_p around reference to hecubafb_remove
  drivers:video:aty:radeon_base Fix typo occationally to occasionally
  atmel_lcdfb: add fb_blank function
  atmel_lcdfb: implement inverted contrast pwm
  video: s3c-fb: return proper error if clk_get fails
  uvesafb,vesafb: create WC or WB PAT-entries
  video: ffb: fix ffb_probe error path
  radeonfb: Let hwmon driver probe the "monid" I2C bus
  fbdev: sh_mobile_lcdc: checking NULL instead of IS_ERR()
  ...
2011-03-24 07:56:52 -07:00
Florian Tobias Schandinat 2c536f84c1 viafb: split clock and PLL code to an extra file
This patch is a huge move operation with some rename and introduces
an interface to still use the functions. This should be a step in
the right direction to reuse the code whenever possible but cleanly
separate code that differs on different platform and keeping the
complexity as low as possible.
pll_config was renamed to via_pll_config to keep the naming scheme.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-03-24 13:30:09 +00:00
Linus Torvalds 2f284c8463 Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (35 commits)
  ARM: Update (and cut down) mach-types
  ARM: 6771/1: vexpress: add support for multiple core tiles
  ARM: 6797/1: hw_breakpoint: Fix newlines in WARNings
  ARM: 6751/1: vexpress: select applicable errata workarounds in Kconfig
  ARM: 6753/1: omap4: Enable ARM local timers with OMAP4430 es1.0 exception
  ARM: 6759/1: smp: Select local timers vs broadcast timer support runtime
  ARM: pgtable: add pud-level code
  ARM: 6673/1: LPAE: use phys_addr_t instead of unsigned long for start of membanks
  ARM: Use long long format when printing meminfo physical addresses
  ARM: integrator: add Integrator/CP sched_clock support
  ARM: realview/vexpress: consolidate SMP bringup code
  ARM: realview/vexpress: consolidate localtimer support
  ARM: integrator/versatile: consolidate FPGA IRQ handling code
  ARM: rationalize versatile family Kconfig/Makefile
  ARM: realview: remove old AMBA device DMA definitions
  ARM: versatile: remove old AMBA device DMA definitions
  ARM: vexpress: use new init_early for clock tree and sched_clock init
  ARM: realview: use new init_early for clock tree and sched_clock init
  ARM: versatile: use new init_early for clock tree and sched_clock init
  ARM: integrator: use new init_early for clock tree init
  ...
2011-03-23 20:37:26 -07:00
Florian Tobias Schandinat c5593d26ae viafb: add primary/secondary clock on/off switches
This patch adds functions to enable/disable the display clocks.
It also fixes a tiny bug that slipped in with a previous commit but
could not yet have caused any problems.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-03-24 02:03:42 +00:00
Florian Tobias Schandinat 6c1093af58 viafb: add clock source selection and PLL power management support
This patch adds some support for clock source selection as well as
PLL power management. The code is unused at the moment but was
successfully tested as far as possible.
The implementation is according to the documentation for VX700,
VX800, VX855, VX900. Probably the source selection works like this
starting with K800 and the power managemennt at least since VX700.
(guessed based on the initialization in viamode.c)

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-03-23 21:11:46 +00:00
Florian Tobias Schandinat 0f77d4a052 viafb: prepare for PLL separation
This patch splits some functionality to extra functions.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-03-23 17:14:26 +00:00
Florian Tobias Schandinat 1606f87e98 viafb: call viafb_get_clk_value only in viafb_set_vclock
As no caller is interested in the result call viafb_get_clk_value
directly from viafb_set_vclock to encapsulate the hardware dependend
stuff there.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-03-23 13:49:32 +00:00
Florian Tobias Schandinat c91faa6169 viafb: remove unused max_hres/vres
This patch removes the max_hres and max_vres which are not used at
the moment. In general they could be useful but it would be better
to get them via any standard EDID implementation and not the buggy
incomplete one currently used which is also removed as far as
possible.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-03-23 13:04:35 +00:00
Florian Tobias Schandinat eb0536c5e2 viafb: allow some pll calculations
This patch allows calculating the pll multiplier within limits based
on the previous table. All available information supports that it
should be possible/sane to choose the multiplier free within some
ranges.
Storing the multiplier ranges instead of lots of pll configurations
reduces the memory needed and may as well improve the performance.
It is also expected to provide better pll values resulting in better
frequencies for the connected devices.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-03-23 13:01:37 +00:00
Haojian Zhuang adb70483f4 mfd: Adopt mfd_data in 88pm860x backlight
Copy 88pm860x platform data into different mfd_data structure for
backlight driver. So move the identification of device node from
backlight driver to mfd driver.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-23 10:42:05 +01:00
Andres Salomon 944dc03551 tmio: Silence warnings introduced by mfd changes
This silences warnings such as

drivers/video/tmiofb.c: In function 'tmiofb_hw_init':
drivers/video/tmiofb.c:270: warning: initialization discards qualifiers from pointer target type

These were added by me in commit 2a79bb1d.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-23 10:42:01 +01:00
Andres Salomon 6d90bdde4b fb: Use mfd_data instead of driver_data for tmio-fb
Use mfd_data for passing information from mfd drivers to mfd
clients.  The mfd_cell's driver_data field is being phased out.

Clients that were using driver_data now access .mfd_data
via mfd_get_data().  This changes tmio-fb only; mfd drivers with
other cells are not modified.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-23 10:41:57 +01:00
Andres Salomon 7d76ac15ad mfd: mfd_cell is now implicitly available to tc6393xb drivers
No need to explicitly set the cell's platform_data/data_size.

Modify clients to use mfd_get_cell helper function instead of
accessing platform_data directly.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-23 10:41:53 +01:00
Alexey Dobriyan 33ee3b2e2e kstrto*: converting strings to integers done (hopefully) right
1. simple_strto*() do not contain overflow checks and crufty,
   libc way to indicate failure.
2. strict_strto*() also do not have overflow checks but the name and
   comments pretend they do.
3. Both families have only "long long" and "long" variants,
   but users want strtou8()
4. Both "simple" and "strict" prefixes are wrong:
   Simple doesn't exactly say what's so simple, strict should not exist
   because conversion should be strict by default.

The solution is to use "k" prefix and add convertors for more types.
Enter
	kstrtoull()
	kstrtoll()
	kstrtoul()
	kstrtol()
	kstrtouint()
	kstrtoint()

	kstrtou64()
	kstrtos64()
	kstrtou32()
	kstrtos32()
	kstrtou16()
	kstrtos16()
	kstrtou8()
	kstrtos8()

Include runtime testsuite (somewhat incomplete) as well.

strict_strto*() become deprecated, stubbed to kstrto*() and
eventually will be removed altogether.

Use kstrto*() in code today!

Note: on some archs _kstrtoul() and _kstrtol() are left in tree, even if
      they'll be unused at runtime. This is temporarily solution,
      because I don't want to hardcode list of archs where these
      functions aren't needed. Current solution with sizeof() and
      __alignof__ at least always works.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-22 17:44:14 -07:00
Robert Morell ef0a5e80f5 pwm_backlight: add check_fb() hook
In systems with multiple framebuffer devices, one of the devices might be
blanked while another is unblanked.  In order for the backlight blanking
logic to know whether to turn off the backlight for a particular
framebuffer's blanking notification, it needs to be able to check if a
given framebuffer device corresponds to the backlight.

This plumbs the check_fb hook from core backlight through the
pwm_backlight helper to allow platform code to plug in a check_fb hook.

Signed-off-by: Robert Morell <rmorell@nvidia.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Arun Murthy <arun.murthy@stericsson.com>
Cc: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-22 17:44:00 -07:00
Axel Lin 0508e04e05 drivers/video/backlight/jornada720_*.c: make needlessly global symbols static
The following symbols are needlessly defined global: jornada_bl_init,
jornada_bl_exit, jornada_lcd_init, jornada_lcd_exit.

Make them static.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-22 17:44:00 -07:00
Randy Dunlap b372412e15 backlight: apple_bl depends on ACPI
apple_bl uses ACPI interfaces (data & code), so it should depend on ACPI.

  drivers/video/backlight/apple_bl.c:142: warning: 'struct acpi_device' declared inside parameter list
  drivers/video/backlight/apple_bl.c:142: warning: its scope is only this definition or declaration, which is probably not what you want
  drivers/video/backlight/apple_bl.c:201: warning: 'struct acpi_device' declared inside parameter list
  drivers/video/backlight/apple_bl.c:215: error: variable 'apple_bl_driver' has initializer but incomplete type
  drivers/video/backlight/apple_bl.c:216: error: unknown field 'name' specified in initializer
  ...

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Matthew Garrett <mjg@redhat.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-22 17:44:00 -07:00
Matthew Garrett 39b3dee76f mbp_nvidia_bl: rename to apple_bl
It works on hardware other than Macbook Pros, and it works on GPUs other
than Nvidia.  It should even work on iMacs, so change the name to match
reality more precisely and include an alias so existing users don't get
confused.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Mourad De Clerck <mourad@aquazul.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-22 17:44:00 -07:00
Matthew Garrett 99fd28e194 mbp_nvidia_bl: check that the backlight control functions
The SMI-based backlight control functionality may fail to work if the
system is running under EFI rather than BIOS.  Check that the hardware
responds as expected, and exit if it doesn't.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Mourad De Clerck <mourad@aquazul.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-22 17:44:00 -07:00
Matthew Garrett 23a9847f0d mbp_nvidia_bl: remove DMI dependency
This driver only has to deal with two different classes of hardware, but
right now it needs new DMI entries for every new machine. It turns out
that there's an ACPI device that uniquely identifies Apples with backlights,
so this patch reworks the driver into an ACPI one, identifies the hardware
by checking the PCI vendor of the root bridge and strips out all the DMI
code. It also changes the config text to clarify that it works on devices
other than Macbook Pros and GPUs other than nvidia.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Mourad De Clerck <mourad@aquazul.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-22 17:44:00 -07:00
Matthew Garrett bb7ca747f8 backlight: add backlight type
There may be multiple ways of controlling the backlight on a given
machine.  Allow drivers to expose the type of interface they are
providing, making it possible for userspace to make appropriate policy
decisions.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Airlie <airlied@linux.ie>
Cc: Alex Deucher <alexdeucher@gmail.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-22 17:43:59 -07:00
Donghwa Lee 1baf0eb397 drivers/vidfeo/backlight: ld9040 amoled driver support
Add a ld9040 amoled panel driver.

Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-22 17:43:59 -07:00
Dave Airlie 32b98bf875 fbcon: fix situation where fbcon gets deinitialised and can't reinit.
Situation as follow:
2 GPUs + vesafb + kms.

GPU 1 is primary, vesafb binds to it as fb0
radeon loads
GPU 0 loads as fb1
GPU 1 loads, vesafb gets kicked off which causes fb0 to unbind
console, which causes the dummy console to rebind.

this means fbcon_deinit gets called, which calls fbcon_exit
since the console isn't bound anymore and we set fbcon_has_exited.

GPU 1 creates a new fb0 which is primary and we want to be console.
fbcon_fb_registered gets called sets the primary up and calls set_con2fb_map,
however as fbcon_has_exited is set nothing further ever happens.

This patch bypasses the fbcon_has_exited and checks if the console is unbound,
if its unbound it calls the fbcon_takeover which calls the vt layer to
call the fbcon_startup method and everthing works.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 17:22:19 +09:00
Heiko Schocher 4295f9bf74 video, sm501: add OF binding to support SM501
- add binding to OF, compatible name "smi,sm501"

Signed-off-by: Heiko Schocher <hs@denx.de>
cc: linux-fbdev@vger.kernel.org
cc: devicetree-discuss@ozlabs.org
cc: Ben Dooks <ben@simtec.co.uk>
cc: Vincent Sanders <vince@simtec.co.uk>
cc: Samuel Ortiz <sameo@linux.intel.com>
cc: linux-kernel@vger.kernel.org
cc: Randy Dunlap <rdunlap@xenotime.net>
cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 17:17:14 +09:00
Heiko Schocher e6a0498071 video, sm501: add edid and commandline support
- add commandline options:
  sm501fb.mode:
    Specify resolution as "<xres>x<yres>[-<bpp>][@<refresh>]"
  sm501fb.bpp:
    Specify bit-per-pixel if not specified mode

- Add support for encoding display mode information
  in the device tree using verbatim EDID block.

  If the "edid" entry in the "smi,sm501" node is present,
  the driver will build mode database using EDID data
  and allow setting the display modes from this database.

Signed-off-by: Heiko Schocher <hs@denx.de>
cc: linux-fbdev@vger.kernel.org
cc: devicetree-discuss@ozlabs.org
cc: Ben Dooks <ben@simtec.co.uk>
cc: Vincent Sanders <vince@simtec.co.uk>
cc: Samuel Ortiz <sameo@linux.intel.com>
cc: linux-kernel@vger.kernel.org
cc: Randy Dunlap <rdunlap@xenotime.net>
cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 17:17:00 +09:00
Heiko Schocher bf5f001904 video, sm501: add I/O functions for use on powerpc
- add read/write functions for using this driver
  also on powerpc plattforms

Signed-off-by: Heiko Schocher <hs@denx.de>
cc: linux-fbdev@vger.kernel.org
cc: devicetree-discuss@ozlabs.org
cc: Ben Dooks <ben@simtec.co.uk>
cc: Vincent Sanders <vince@simtec.co.uk>
cc: Samuel Ortiz <sameo@linux.intel.com>
cc: linux-kernel@vger.kernel.org
cc: Randy Dunlap <rdunlap@xenotime.net>
cc: Paul Mundt <lethal@linux-sh.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 17:16:34 +09:00
Martin Decky dfc906daee video: Fix EDID macros H_SYNC_WIDTH and H_SYNC_OFFSET
The macros for getting the values for horizontal sync width and offset
do not respect the EDID specification. Both these values are 10 bit
values according to [1], not 6 bit values. The lower 8 bits are stored
in byte 8 and byte 9 of the DTD respectively, while two additional bits
for each value are stored in byte 11. The original macros just slammed
the bits together.

Although the original macros usually worked fine because the higher two
bits are rarely used, it can cause severe problems on plasma panels
running at 1920x1080 @ 50 Hz with drivers that rely on the correct
parsing of the EDID data by fbmon.c (e.g. udlfb).

The patch should apply cleanly to both the fbdev-2.6.git branch and
linux-next.git branch.

[1] VESA Enhanced Extended Display Identification Data Standard,
     Release A, Revision 2, page 34, notes 7 & 8, VESA, Sep 2006

Signed-off-by: Martin Decky <martin@decky.cz>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 16:45:03 +09:00
Henry Nestler d6244bc0ed fbcon: Bugfix soft cursor detection in Tile Blitting
Use mask 0x10 for "soft cursor" detection on in function tile_cursor.
(Tile Blitting Operation in framebuffer console).

The old mask 0x01 for vc_cursor_type detects CUR_NONE, CUR_LOWER_THIRD
and every second mode value as "software cursor". This hides the cursor
for these modes (cursor.mode = 0). But, only CUR_NONE or "software cursor"
should hide the cursor.
See also 0x10 in functions add_softcursor, bit_cursor and cw_cursor.

Signed-off-by: Henry Nestler <henry.nestler@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 16:41:08 +09:00
axel lin 6359691d7e video: add missing framebuffer_release in error path
This patch fixes a memory leak in the error path.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 16:35:44 +09:00
axel lin 1e93f390e5 video: metronomefb: add __devexit_p around reference to metronomefb_remove
metronomefb_remove is marked __devexit,
thus add __devexit_p around reference to metronomefb_remove.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 16:34:33 +09:00
axel lin 79ac33ec84 video: hecubafb: add __devexit_p around reference to hecubafb_remove
hecubafb_remove is marked __devexit,
thus add __devexit_p around reference to hecubafb_remove.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 16:34:28 +09:00
Justin P. Mattock 83e61f71d7 drivers:video:aty:radeon_base Fix typo occationally to occasionally
The below patch fixes a typo occationally to occasionally.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 16:31:59 +09:00
Andreas Bießmann bed7bddbb4 atmel_lcdfb: add fb_blank function
Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 16:23:47 +09:00
Andreas Bießmann 7cdcdb69bd atmel_lcdfb: implement inverted contrast pwm
This patch introduces lcdc->lcdcon_pol_negative which set CONTRAST_CTR
 register to inverted polarity.

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 16:23:44 +09:00
axel lin 942b8d05cd video: s3c-fb: return proper error if clk_get fails
Return PTR_ERR(sfb->bus_clk) instead of 0 if clk_get fails.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 16:22:45 +09:00
Thomas Schlichter 803a4e14a7 uvesafb,vesafb: create WC or WB PAT-entries
with an PAT-enabled kernel, when using uvesafb or vesafb, these drivers will
create uncached-minus PAT entries for the framebuffer memory because they use
ioremap() (not the *_cache or *_wc variants). When the framebuffer memory
intersects with the video RAM used by Xorg, the complete video RAM will be
mapped uncached-minus what results in a serve performance penalty.

Here are the correct MTRR entries created by uvesafb:
schlicht@netbook:~$ cat /proc/mtrr
reg00: base=0x000000000 ( 0MB), size= 2048MB, count=1: write-back
reg01: base=0x06ff00000 ( 1791MB), size= 1MB, count=1: uncachable
reg02: base=0x070000000 ( 1792MB), size= 256MB, count=1: uncachable
reg03: base=0x0d0000000 ( 3328MB), size= 16MB, count=1: write-combining

And here are the problematic PAT entries:
schlicht@netbook:~$ sudo cat /sys/kernel/debug/x86/pat_memtype_list
PAT memtype list:
write-back @ 0x0-0x1000
uncached-minus @ 0x6fedd000-0x6fee3000
uncached-minus @ 0x6fee2000-0x6fee3000
uncached-minus @ 0x6fee2000-0x6fee3000
uncached-minus @ 0x6fee2000-0x6fee3000
uncached-minus @ 0x6fee2000-0x6fee3000
uncached-minus @ 0x6fee2000-0x6fee3000
uncached-minus @ 0x6fee2000-0x6fee3000
uncached-minus @ 0x6fee2000-0x6fee3000
uncached-minus @ 0x6fee3000-0x6fee4000
uncached-minus @ 0x6fee3000-0x6fee4000
uncached-minus @ 0x6fee3000-0x6fee4000
uncached-minus @ 0xd0000000-0xe0000000 <-- created by xserver-xorg
uncached-minus @ 0xd0000000-0xd1194000 <-- created by uvesafb
uncached-minus @ 0xf4000000-0xf4009000
uncached-minus @ 0xf4200000-0xf4400000
uncached-minus @ 0xf5000000-0xf5010000
uncached-minus @ 0xf5100000-0xf5104000
uncached-minus @ 0xf5400000-0xf5404000
uncached-minus @ 0xf5404000-0xf5405000
uncached-minus @ 0xf5404000-0xf5405000
uncached-minus @ 0xfed00000-0xfed01000

Therefore I created the attached patch for uvesafb which uses ioremap_wc() to
create the correct PAT entries, as shown below:
schlicht@netbook:~$ sudo cat /sys/kernel/debug/x86/pat_memtype_list
PAT memtype list:
write-back @ 0x0-0x1000
uncached-minus @ 0x6fedd000-0x6fee3000
uncached-minus @ 0x6fee2000-0x6fee3000
uncached-minus @ 0x6fee2000-0x6fee3000
uncached-minus @ 0x6fee2000-0x6fee3000
uncached-minus @ 0x6fee2000-0x6fee3000
uncached-minus @ 0x6fee2000-0x6fee3000
uncached-minus @ 0x6fee2000-0x6fee3000
uncached-minus @ 0x6fee2000-0x6fee3000
uncached-minus @ 0x6fee3000-0x6fee4000
uncached-minus @ 0x6fee3000-0x6fee4000
uncached-minus @ 0x6fee3000-0x6fee4000
write-combining @ 0xd0000000-0xe0000000
write-combining @ 0xd0000000-0xd1194000
uncached-minus @ 0xf4000000-0xf4009000
uncached-minus @ 0xf4200000-0xf4400000
uncached-minus @ 0xf5000000-0xf5010000
uncached-minus @ 0xf5100000-0xf5104000
uncached-minus @ 0xf5400000-0xf5404000
uncached-minus @ 0xf5404000-0xf5405000
uncached-minus @ 0xf5404000-0xf5405000
uncached-minus @ 0xfed00000-0xfed01000

This results in a performance gain, objectively measurable with e.g.
x11perf -comppixwin10 -comppixwin100 -comppixwin500:
1: x11perf_xaa.log
2: x11perf_xaa_patched.log

       1                2 Operation
-------- ---------------- -----------------
124000.0 202000.0 ( 1.63) Composite 10x10 from pixmap to window
  3340.0  24400.0 ( 7.31) Composite 100x100 from pixmap to window
   131.0   1150.0 ( 8.78) Composite 500x500 from pixmap to window

You can see the serve performance gain when composing larger pixmaps to window.

The patches replace the ioremap() function with the variant matching the mtrr-
parameter. To create "write-back" PAT entries, the ioremap_cache() function
must be called after creating the MTRR entries, and the ioremap_cache() region
must completely fit into the MTRR region, this is why the MTRR region size is
now rounded up to the next power-of-two.

Signed-off-by: Thomas Schlichter <thomas.schlichter@web.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 16:20:44 +09:00
axel lin 7b0e278519 video: ffb: fix ffb_probe error path
Current implementation calls of_iounmap for par->fbc twice in error path.
In the case of goto out_unmap_dac, we should call of_iounmap for par->dac.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 16:18:51 +09:00
Jean Delvare 49bb094332 radeonfb: Let hwmon driver probe the "monid" I2C bus
Some Radeon cards have an I2C-based thermal sensor chip connected to
the "monid" I2C bus. Set the I2C probing class of this bus properly so
that hwmon drivers can detect devices on it and bind to them.

This closes kernel.org bug #26172.

We exclude PPC for the time being, as Benjamin doesn't want us to
mess up with them without explicit testing, and there is no evidence
that this change is needed for them either.

Reported-by: Alexander Goomenyuk <emerg.reanimator@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 16:17:48 +09:00
Dan Carpenter beee1f20a1 fbdev: sh_mobile_lcdc: checking NULL instead of IS_ERR()
backlight_device_register() returns an ERR_PTR.  It doesn't return NULL.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 16:08:48 +09:00
axel lin e0998eab67 video: sh7760fb: use resource_size()
The size calculation is done incorrectly in request_mem_region because
it should include both the start and end (end - start + 1).

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 16:07:35 +09:00
axel lin 56fb22f7ca video: hpfb: use resource_size()
The size calculation is done incorrectly here because it should include
both the start and end (end - start + 1).

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 16:07:32 +09:00
Ondrej Zary 7fe029df42 s3fb: use new start address register
Use "new" start address register 0x69 (bits 16-20) instead of "old" 0x31
(bits 16-17) and 0x51 (bits 18-19). This is needed for panning to work
correctly on Trio3D/2X cards (and does no harm on other ones).

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Ondrej Zajicek <santiago@crfreenet.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 15:50:00 +09:00
Ondrej Zary cb11c04892 s3fb: enable DTPC
Enable Data Transfer Position Control (DTPC). This is needed at least on
Virge/DX to correctly display at higher pixclocks.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Ondrej Zajicek <santiago@crfreenet.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 15:49:56 +09:00
Ondrej Zary 3827d10ed4 s3fb: fix 15/16bpp modes with over 115MHz pixclocks on 86C365 Trio3D
Enable pixel multiplexing in 15/16bpp modes when pixclock is over 115MHz
on Trio3D (86C365) cards to fix artifacts on the left side of screen.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Ondrej Zajicek <santiago@crfreenet.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 15:49:53 +09:00
Ondrej Zary 5694f9ce58 s3fb: add support for 86C365 Trio3D
Add support for S3 Trio3D (86C365) cards to s3fb driver. Tested with one 4MB card.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Ondrej Zajicek <santiago@crfreenet.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 15:49:49 +09:00
Ondrej Zary 99d054d825 s3fb: maximize virtual vertical size for fast scrolling
Maximize virtual vertical framebuffer size during init to allow fast scrolling
(accelerated by panning).

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Ondrej Zajicek <santiago@crfreenet.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-22 15:49:45 +09:00