pandora-kernel.git
13 years agoOMAP4: DSS2: HDMI: Add DSS feature for CTS calculation
Ricardo Neri [Thu, 19 May 2011 03:27:56 +0000 (22:27 -0500)]
OMAP4: DSS2: HDMI: Add DSS feature for CTS calculation

CTS and N parameters are used to regenerate the audio clock from
the TMDS clock at the HDMI sink. In  OMAP4430 ES1.0 version
the calculation of the CTS parameter is done by the HDMI IP
(hardware mode) while in others it must be done by the HDMI driver
(software mode). A DSS feature is used to indicate the HDMI
driver which mode is used.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP4: DSS2: Create a DSS features structure for OMAP4430 ES1.0
Ricardo Neri [Thu, 19 May 2011 03:23:33 +0000 (22:23 -0500)]
OMAP4: DSS2: Create a DSS features structure for OMAP4430 ES1.0

Create a separate DSS features structure for OMAP4430 ES1.0. This
structure is used to expose features only present in such
silicon version. Specifically, this is required to handle how
the HDMI IP calculates the CTS parameter for audio clock
regeneration packets. OMAP4430 ES1.0 is the only one that supports
computation of the CTS parameter by the HDMI IP (hardware mode).
The rest of the revisions require the HDMI driver to perform the
computation.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: DSI: Get line buffer size from DSI_GNQ register
Archit Taneja [Mon, 16 May 2011 09:47:09 +0000 (15:17 +0530)]
OMAP: DSS2: DSI: Get line buffer size from DSI_GNQ register

The line buffer sizes vary across DSI modules, create a function
dsi_get_line_buf_size() using DSI_GNQ register to get the size of
line buffer used for the DISPC video port data.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: DSI: Get number of DSI data lanes using DSI_GNQ register
Archit Taneja [Mon, 16 May 2011 09:47:08 +0000 (15:17 +0530)]
OMAP: DSS2: DSI: Get number of DSI data lanes using DSI_GNQ register

On OMAP3, the DSI module has 2 data lanes. On OMAP4, DSI1 has 4 data lanes
and DSI2 has 2 data lanes. Introduce function dsi_get_num_data_lanes() which
returns the number of data lanes on the dsi interface, introduce function
dsi_get_num_data_lanes_dssdev() which returns the number of data lanes used by
the omap_dss_device connected to the lanes.

Use the DSI_GNQ register on OMAP4 to get the number of data lanes, modify
dsi.c to use the number of lanes and the extra data lanes on DSI1.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: DSI: Use system workqueue for delayed work instead of a private workqueue
Archit Taneja [Mon, 16 May 2011 09:47:07 +0000 (15:17 +0530)]
OMAP: DSS2: DSI: Use system workqueue for delayed work instead of a private workqueue

In the previous DSI driver design, a private workqueue was needed to prevent a
deadlock as explained in the commit : 0f16aa0ae6b84d7ae72fbe8999e6a94cb78edd4e
. In the current design, the workqueue is only used for queueing delayed work in
the case where we don't get a FRAMEDONE interrupt for 250 milliseconds. It is
safe to remove the private workqueue amd use the system workqueue instead to
schedule the delayed work with the new design where the deadlock can't occur.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: DSI: Remove DISPC pixel clock related info in dsi_dump_clocks()
Archit Taneja [Mon, 16 May 2011 09:47:06 +0000 (15:17 +0530)]
OMAP: DSS2: DSI: Remove DISPC pixel clock related info in dsi_dump_clocks()

dsi_dump_clocks() prints lck and pck rates for the DISPC channel which it is
connected to. Remove this since it is already printed by dispc_dump_clocks()
in debugfs.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: OMAPFB: Reduce stack usage
Tomi Valkeinen [Sat, 30 Apr 2011 12:26:40 +0000 (15:26 +0300)]
OMAP: DSS2: OMAPFB: Reduce stack usage

omapfb_mode_to_timings() had struct fb_info, struct fb_var and struct
fb_ops allocated from stack. This caused the stack usage grow quite
high.

Use kzalloc to allocate the structs instead.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: OMAPFB: remove dead code
Tomi Valkeinen [Sat, 30 Apr 2011 09:33:27 +0000 (12:33 +0300)]
OMAP: DSS2: OMAPFB: remove dead code

Remove old unused code lying inside #if 0.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: RFBI: cleanup
Tomi Valkeinen [Fri, 29 Apr 2011 13:51:10 +0000 (16:51 +0300)]
OMAP: DSS2: RFBI: cleanup

The RFBI driver is quite messy. Remove dead and unneeded code and add
statics to functions.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: RFBI: add omap_rfbi_configure
Tomi Valkeinen [Fri, 29 Apr 2011 12:57:01 +0000 (15:57 +0300)]
OMAP: DSS2: RFBI: add omap_rfbi_configure

Add omap_rfbi_configure() which the panel driver can use to reconfigure
the data element size and the number of data lines in the RFBI bus.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: RFBI: clock enable/disable changes
Tomi Valkeinen [Thu, 21 Apr 2011 16:53:25 +0000 (19:53 +0300)]
OMAP: DSS2: RFBI: clock enable/disable changes

RFBI enables and disables clocks inside almost every function to get a
finegrained control to the clocks. However, the current understanding is
that this is not necessary power-management-wise.

Change the clocking scheme so that RFBI clocks are enabled when the
omapdss_rfbi_display_enable is called, and disabled when
omapdss_rfbi_display_disable is called.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: RFBI: add rfbi_bus_lock
Tomi Valkeinen [Thu, 21 Apr 2011 16:50:31 +0000 (19:50 +0300)]
OMAP: DSS2: RFBI: add rfbi_bus_lock

Add similar bus lock to RFBI as is in DSI. The panel driver can use the
bus lock to mark that the RFBI bus is currently in use.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAPFB: fix wrong clock aliases and device name
Tomi Valkeinen [Thu, 21 Apr 2011 16:11:16 +0000 (19:11 +0300)]
OMAPFB: fix wrong clock aliases and device name

The clock aliases and the dss platform device name have changed, and
omapfb fails to initialize. Update the names to correct ones.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Add missing dummy functions
Tomi Valkeinen [Sat, 30 Apr 2011 12:38:15 +0000 (15:38 +0300)]
OMAP: DSS2: Add missing dummy functions

dpi.c does not compile if DSI is not compiled in. Add the missing dummy
functions so that dpi.c compiles.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Taal: Use device name in backlight_device_register
Archit Taneja [Thu, 12 May 2011 11:56:30 +0000 (17:26 +0530)]
OMAP: DSS2: Taal: Use device name in backlight_device_register

Panel Taal driver uses the string "taal" to register for a backlight device.
This causes backlight_device_register() to fail when a second taal panel
is added. Use dev_name(&dssdev->dev) as a parameter instead of the string.

Note: This will break backlight related sysfs commands. Use the name as
generated by the DSS2 driver, in the form "displayi", which represents
the ith registered display device.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP4: DSS2: DSI: Changes for DSI2 on OMAP4
Archit Taneja [Thu, 12 May 2011 11:56:29 +0000 (17:26 +0530)]
OMAP4: DSS2: DSI: Changes for DSI2 on OMAP4

Introduce DSI2 PLL clock sources needed by LCD2 channel and DSI2 Protocol
engine and DISPC Functional clock. Do the following:

- Modify dss_get_dsi_clk_source() and dss_select_dsi_clk_source() to take the
  dsi module number as an argument.
- Create debugfs files for dsi2, split the corresponding debugfs functions.
- Allow DPI to use these new clock sources.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: DSI: Pass pointer to struct to packet_sent_handler isrs
Archit Taneja [Thu, 12 May 2011 11:56:28 +0000 (17:26 +0530)]
OMAP: DSS2: DSI: Pass pointer to struct to packet_sent_handler isrs

dsi_packet_sent_handler_vp() and dsi_packet_sent_handler_l4() currently
receive the completion parameter as their argument. This is not sufficient
information to differentiate between DSI1 and DSI2 platform devices.

Pass the struct "dsi_packet_sent_handler_data" to the packet_sent_handler
isrs, these contain the platform_device pointer of the DSI device and the
pointer to the completion struct.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: DSI: Use platform_device pointer to get dsi data
Archit Taneja [Thu, 12 May 2011 11:56:27 +0000 (17:26 +0530)]
OMAP: DSS2: DSI: Use platform_device pointer to get dsi data

The dsi related data structure currently creates one global instance of itself
which is accessed by dsi functions. Remove this global structure instance and
declare the struct as dsi_data. Modify dsi_init() to allocate a "dsi_data"
structure for each platform device instance. Link this data with the device's
platform_device pointer. Create the function dsi_get_dsidrv_data() which takes
the pdev and return a pointer to the device's dsi_data.

Make dsi_get_dsidev_id() return only 0 for now, this will be removed once the
name of the DSI platform device is changed to the device instance form, like
"omapdss_dsi.0" and "omapdss_dsi.1" etc.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Pass platform_device as an argument in dsi functions
Archit Taneja [Thu, 12 May 2011 11:56:26 +0000 (17:26 +0530)]
OMAP: DSS2: Pass platform_device as an argument in dsi functions

The DSI interface is represented as a platform device, using the DSI platform
driver(dsi.c). The current DSI driver design is capable of running only one
instance of a DSI device. On OMAP4, there are 2 very similar DSI modules which
can be represented as instances of "omapdss_dsi" platform device.

Add member "module" in "dssdev.phy.dsi" that tells us which DSI module's lanes
the panel is connected to. Modify dsi.c functions to take the device's
platform_device struct pointer, provide functions dsi_get_dsidev_from_dssdev()
and dsi_get_dsidev_from_id() take the panel's omap_dss_device and module number
respectively, and return the platform_device pointer. Currently, the dsi struct
is declared globally and is accessed when dsi data is needed. The new pdev
argument will be used later to provide the platform device's dsi related data.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Remove omap_dss_device argument from dsi_pll_init()
Archit Taneja [Thu, 12 May 2011 11:56:25 +0000 (17:26 +0530)]
OMAP: DSS2: Remove omap_dss_device argument from dsi_pll_init()

The function dsi_pll_init() has omap_dss_device argument which is
not used. Remove this argument.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: DSI: Add extra omap_dss_device argument in functions exported by dsi
Archit Taneja [Thu, 12 May 2011 11:56:24 +0000 (17:26 +0530)]
OMAP: DSS2: DSI: Add extra omap_dss_device argument in functions exported by dsi

Add pointer to omap_dss_device struct as an argument in the functions which
are exported to dsi panel drivers. This argument will tell the DSI driver
which DSI interface's data it has to choose.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: OMAPFB: make DBG() more resistant in if-else constructions
Niels de Vos [Tue, 10 May 2011 11:07:33 +0000 (12:07 +0100)]
OMAP: DSS2: OMAPFB: make DBG() more resistant in if-else constructions

When DBG() is used in a simple if-else, the resulting code path
currently depends on the definition of DBG(). Inserting the statement in
a "do { ... } while (0)" prevents this possible misuse.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
[tomi.valkeinen@ti.com: changed the title of the commit msg]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2: avoid descending into disabled framebuffer dirs
Mike Frysinger [Mon, 9 May 2011 14:40:24 +0000 (10:40 -0400)]
OMAP2: avoid descending into disabled framebuffer dirs

Rather than always add the omap2 dirs to the build list (and thus
force everyone to generate a useless built-in.o), bind the dirs to
their relevant kconfig symbol.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Remove DSS_IRQSTATUS
Tomi Valkeinen [Mon, 9 May 2011 07:52:15 +0000 (10:52 +0300)]
OMAP: DSS2: Remove DSS_IRQSTATUS

DSS_IRQSTATUS register is available only on OMAP3, and reading it in
dss_dump_registers() on OMAP4 seems to cause a crash.

The register is not used for anything, and displaying its value is of no
use, so let's just remove it altogether.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Remove usage of struct dispc_reg
Archit Taneja [Fri, 6 May 2011 06:15:51 +0000 (11:45 +0530)]
OMAP: DSS2: Remove usage of struct dispc_reg

struct dispc_reg was originally used while migrating from old omapfb to
catch cases where the arguments to dispc_read_reg/dispc_write_reg were in
wrong order, since old omapfb had the arguments in reverse order.

Remove this struct and use u16 instead

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Clean up DISPC overlay manager register definitions
Archit Taneja [Fri, 6 May 2011 06:15:50 +0000 (11:45 +0530)]
OMAP: DSS2: Clean up DISPC overlay manager register definitions

Represent manager/channel specific DISPC registers as inline functions returning
the required dispc_reg struct. This is done since the current method is not
scalable as the number of overlay managers increase in number.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Clean up DISPC overlay register definitions
Archit Taneja [Fri, 6 May 2011 06:15:49 +0000 (11:45 +0530)]
OMAP: DSS2: Clean up DISPC overlay register definitions

Move all DISPC register definitions to a new header dispc.h. There are
separate register offset definitions for GFX, VID1 and VID2 pipeline share
register definitions by using an argument. The introduction of VID3 pipeline
on OMAP4 will not let us use the above method since VID3 pipe register offsets
don't map with VID1 and VID2 offsets.

Represent overlay registers as DISPC_OVL_XXXX(plane), where the plane argument
tells the overlay. Register offsets are calculated as:

DISPC_OVL_XXXX(plane) = DISPC_OVL_BASE(plane) + DISPC_XXXX_OFFSET(plane)

Idea suggested by Tomi Valkeinen.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: DSI: enable scp clock in dsi_dump_regs()
Archit Taneja [Tue, 19 Apr 2011 13:30:15 +0000 (19:00 +0530)]
OMAP: DSS2: DSI: enable scp clock in dsi_dump_regs()

OMAP4 requires SCP clocks enabled to access DSI PLL registers and DSI COMPLEXIO
registers. Enable scp clock before accessing the registers and disable it before
exiting dsi_dump_regs().

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Support for Powertip PH480272T
Enric Balletbo i Serra [Tue, 3 May 2011 07:07:37 +0000 (09:07 +0200)]
OMAP: DSS2: Support for Powertip PH480272T

Add support for Powertip PH480242T, a LCD 4.3inch (480x242) display
type with 24-bit RGB interface, to panel-generic-dpi.

Tested with IGEP v2 board.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Support for Seiko 70WVW1TZ3
Enric Balletbo i Serra [Tue, 3 May 2011 07:07:36 +0000 (09:07 +0200)]
OMAP: DSS2: Support for Seiko 70WVW1TZ3

Add support for Seiko 70WVW1TZ3, a LCD 7.0inch WVGA (800x480) display
type with 24-bit RGB interface and Touch-Panel, to panel-generic-dpi

Tested with IGEP v2 board.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: DSI: enable interface for omap4
Vikram Pandita [Thu, 21 Apr 2011 03:31:15 +0000 (20:31 -0700)]
OMAP: DSS2: DSI: enable interface for omap4

By default, the DSI is not getting enabled for omap4.
OMAP2PLUS does not catch this issue since it has ARCH_OMAP3.

The issue is only seen when using defconfig with ARCH_OMAP4 only.

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Cc: Archit Taneja <archit@ti.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: FEATURES: Add missing consts
Tomi Valkeinen [Wed, 20 Apr 2011 07:09:36 +0000 (10:09 +0300)]
OMAP: DSS2: FEATURES: Add missing consts

omap_dss_features definitions were missing consts.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: DSI: Add OMAP4 CIO irqs
Tomi Valkeinen [Thu, 24 Mar 2011 14:30:17 +0000 (16:30 +0200)]
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>
13 years agoOMAP: DSS2: Taal: Implement ULPS functionality
Tomi Valkeinen [Thu, 24 Mar 2011 12:53:27 +0000 (14:53 +0200)]
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>
13 years agoOMAP: DSS2: Taal: Rename esd_wq to workqueue
Tomi Valkeinen [Thu, 24 Mar 2011 13:01:30 +0000 (15:01 +0200)]
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>
13 years agoOMAP: DSS2: Taal: Separate panel reset
Tomi Valkeinen [Thu, 24 Mar 2011 13:00:06 +0000 (15:00 +0200)]
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>
13 years agoOMAP: DSS2: Taal: Add sysfs file for ESD interval
Tomi Valkeinen [Thu, 24 Mar 2011 12:06:51 +0000 (14:06 +0200)]
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>
13 years agoOMAP: DSS2: Taal: Clean up ESD queueing
Tomi Valkeinen [Thu, 24 Mar 2011 12:01:49 +0000 (14:01 +0200)]
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>
13 years agoOMAP: DSS2: Taal: Implement configurable ESD interval
Tomi Valkeinen [Thu, 24 Mar 2011 11:58:01 +0000 (13:58 +0200)]
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>
13 years agoOMAP: DSS2: DSI: ensure VDDS_DSI is disabled on exit
Tomi Valkeinen [Mon, 20 Dec 2010 14:26:22 +0000 (16:26 +0200)]
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>
13 years agoOMAP: DSS2: DSI: Add DSI pad muxing support
Tomi Valkeinen [Fri, 30 Jul 2010 08:57:57 +0000 (11:57 +0300)]
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>
13 years agoOMAP: DSS2: DSI: add parameter to enter ulps on disable
Tomi Valkeinen [Mon, 11 Oct 2010 08:33:30 +0000 (11:33 +0300)]
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>
13 years agoOMAP: DSS2: DSI: wait for TXCLKESC domain to come out of reset
Tomi Valkeinen [Thu, 7 Oct 2010 10:59:22 +0000 (13:59 +0300)]
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>
13 years agoOMAP: DSS2: DSI: fix CIO init and uninit
Tomi Valkeinen [Fri, 15 Apr 2011 08:58:41 +0000 (11:58 +0300)]
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>
13 years agoOMAP: DSS2: DSI: implement enable/disable SCP clk
Tomi Valkeinen [Wed, 13 Apr 2011 14:12:52 +0000 (17:12 +0300)]
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>
13 years agoOMAP: DSS2: DSI: fix _dsi_print_reset_status
Tomi Valkeinen [Thu, 7 Oct 2010 10:27:42 +0000 (13:27 +0300)]
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>
13 years agoOMAP: DSS2: Add FEAT_DSI_REVERSE_TXCLKESC
Tomi Valkeinen [Fri, 15 Apr 2011 12:07:33 +0000 (15:07 +0300)]
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>
13 years agoOMAP: DSS2: DSI: rename complexio related functions
Tomi Valkeinen [Wed, 6 Oct 2010 12:18:13 +0000 (15:18 +0300)]
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>
13 years agoOMAP: DSS2: DSI: add option to leave DSI lanes powered on
Tomi Valkeinen [Fri, 30 Jul 2010 09:39:34 +0000 (12:39 +0300)]
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>
13 years agoOMAP: DSS2: DSI: implement ULPS enter and exit
Tomi Valkeinen [Wed, 28 Jul 2010 12:53:38 +0000 (15:53 +0300)]
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>
13 years agoOMAP: DSS2: DSI: Remove CIO LDO status check
Tomi Valkeinen [Thu, 14 Apr 2011 08:42:22 +0000 (11:42 +0300)]
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>
13 years agoOMAP: DSS2: DSI: Add lane override functions
Tomi Valkeinen [Tue, 27 Jul 2010 08:11:48 +0000 (11:11 +0300)]
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>
13 years agoOMAP2PLUS: DSS2: Clean up omap_display_init()
Archit Taneja [Mon, 18 Apr 2011 04:02:13 +0000 (09:32 +0530)]
OMAP2PLUS: DSS2: Clean up omap_display_init()

Currently, omap_display_init() maintains arrays for hwmod name(oh_name) and the
correspnding platform_device name(dev_name) needed by omap_device_build().
A variable oh_count keeps a track of the number of devices to build from oh_name
based on what omap revision it is.

Clean this up by maintaining an array of omap_dss_hwmod_data struct which is
defined for each omap revision as suggested by Tomi Valkeinen. Assign the
corresponding omap_dss_hwmod_data array struct to the pointer curr_dss_hwmod in
omap_display_init().

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: improve clock debugfs output
Tomi Valkeinen [Mon, 4 Apr 2011 06:36:23 +0000 (09:36 +0300)]
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>
13 years agoOMAP: DSS2: Convert simple/strict_strto* to kstrto*
Tomi Valkeinen [Mon, 4 Apr 2011 12:40:23 +0000 (15:40 +0300)]
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>
13 years agoOMAP2PLUS: DSS2: Remove hack config "CONFIG_OMAP2_DSS_USE_DSI_PLL"
Archit Taneja [Tue, 12 Apr 2011 08:22:26 +0000 (13:52 +0530)]
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>
13 years agoOMAP: DSS2: HDMI: Use dss_device clock configuration for HDMI PLL parameters
Archit Taneja [Tue, 12 Apr 2011 08:22:25 +0000 (13:52 +0530)]
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>
13 years agoOMAP2PLUS: DSS2: Add clock sources to dss device clock configuration
Archit Taneja [Tue, 12 Apr 2011 08:22:24 +0000 (13:52 +0530)]
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>
13 years agoOMAP2PLUS: DSS2: Change enum "dss_clk_source" to "omap_dss_clk_source"
Archit Taneja [Tue, 12 Apr 2011 08:22:23 +0000 (13:52 +0530)]
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>
13 years agoOMAP: DSS2: use __exit for selected panel drivers
Tomi Valkeinen [Thu, 31 Mar 2011 09:03:51 +0000 (12:03 +0300)]
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>
13 years agoOMAP: DSS2: make omap_dss_(un)register_device static
Tomi Valkeinen [Thu, 31 Mar 2011 09:34:06 +0000 (12:34 +0300)]
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>
13 years agoOMAP: DSS2: VENC: Add missing start/stop_device calls
Tomi Valkeinen [Thu, 28 Oct 2010 13:46:38 +0000 (16:46 +0300)]
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>
13 years agoOMAP: DSS2: OMAPFB: Remove implicit display update on unblank
Jani Nikula [Fri, 24 Sep 2010 09:16:24 +0000 (11:16 +0200)]
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>
13 years agoOMAP: DSS2: OMAPFB: Handle errors when initializing panel
Tomi Valkeinen [Thu, 23 Sep 2010 08:18:44 +0000 (11:18 +0300)]
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>
13 years agoOMAP: DSS2: Add method for querying display dimensions from DSS drivers
Jani Nikula [Wed, 16 Jun 2010 12:26:36 +0000 (15:26 +0300)]
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>
13 years agoOMAP: DSS2: VENC: Remove sleeps at venc enable/disable
Tomi Valkeinen [Wed, 2 Jun 2010 14:57:33 +0000 (17:57 +0300)]
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>
13 years agoOMAP: DSS2: VENC: make 20ms venc bug-fix sleep optional
Tomi Valkeinen [Wed, 2 Jun 2010 14:48:22 +0000 (17:48 +0300)]
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>
13 years agoOMAP: DSS2: make 50ms bug-fix sleep optional
Tomi Valkeinen [Wed, 2 Jun 2010 14:31:53 +0000 (17:31 +0300)]
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>
13 years agoOMAP: DSS2: remove non-working msleep(40) workaround
Tomi Valkeinen [Thu, 20 May 2010 12:13:12 +0000 (15:13 +0300)]
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>
13 years agoOMAP: DSS2: move dss device clock configuration
Tomi Valkeinen [Tue, 22 Feb 2011 11:36:10 +0000 (13:36 +0200)]
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>
13 years agoOMAP: DSS2: DSI: Introduce sync_vc functions
Archit Taneja [Wed, 23 Mar 2011 09:59:34 +0000 (09:59 +0000)]
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>
13 years agoOMAP4: DSS2: Register configuration changes for DSI
Archit Taneja [Tue, 22 Mar 2011 11:33:36 +0000 (06:33 -0500)]
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>
13 years agoOMAP: DSS2: fix panel Kconfig dependencies
Tomi Valkeinen [Fri, 8 Apr 2011 06:30:27 +0000 (09:30 +0300)]
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>
13 years agoOMAP: DSS2: DSI: Fix DSI PLL power bug
Tomi Valkeinen [Fri, 15 Apr 2011 07:42:59 +0000 (10:42 +0300)]
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>
13 years agoOMAP: DSS2: Fix: Return correct lcd clock source for OMAP2/3
Archit Taneja [Thu, 31 Mar 2011 07:53:35 +0000 (13:23 +0530)]
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>
13 years agoOMAP: DSS2: DSI: fix dsi_dump_clocks()
Tomi Valkeinen [Mon, 4 Apr 2011 07:02:53 +0000 (10:02 +0300)]
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>
13 years agoOMAP: DSS2: DSI: fix use_sys_clk & highfreq
Tomi Valkeinen [Thu, 7 Apr 2011 12:28:47 +0000 (15:28 +0300)]
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>
13 years agoOMAP: DSS2: Move nokia-dsi-panel.h to include/video/
Tomi Valkeinen [Wed, 11 May 2011 11:10:07 +0000 (14:10 +0300)]
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>
13 years agoOMAP: DSS2: Move panel-generic-dpi.h to include/video/
Tomi Valkeinen [Tue, 10 May 2011 16:48:10 +0000 (19:48 +0300)]
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>
13 years agoOMAP: DSS2: Move display.h to include/video/
Tomi Valkeinen [Wed, 11 May 2011 11:05:07 +0000 (14:05 +0300)]
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>
13 years agoLinux 2.6.39-rc7 v2.6.39-rc7
Linus Torvalds [Tue, 10 May 2011 02:33:54 +0000 (19:33 -0700)]
Linux 2.6.39-rc7

13 years agovm: fix vm_pgoff wrap in upward expansion
Hugh Dickins [Tue, 10 May 2011 00:44:42 +0000 (17:44 -0700)]
vm: fix vm_pgoff wrap in upward expansion

Commit a626ca6a6564 ("vm: fix vm_pgoff wrap in stack expansion") fixed
the case of an expanding mapping causing vm_pgoff wrapping when you had
downward stack expansion.  But there was another case where IA64 and
PA-RISC expand mappings: upward expansion.

This fixes that case too.

Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keith...
Linus Torvalds [Mon, 9 May 2011 23:59:51 +0000 (16:59 -0700)]
Merge branch 'drm-intel-fixes' of git://git./linux/kernel/git/keithp/linux-2.6

* 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6:
  drm/i915/lvds: Only act on lid notify when the device is on
  drm/i915: fix intel_crtc_clock_get pipe reads after "cleanup cleanup"
  drm/i915: Only enable the plane after setting the fb base (pre-ILK)
  drm/i915/dp: Be paranoid in case we disable a DP before it is attached
  drm/i915: Release object along create user fb error path

13 years agoDon't lock guardpage if the stack is growing up
Mikulas Patocka [Mon, 9 May 2011 11:01:09 +0000 (13:01 +0200)]
Don't lock guardpage if the stack is growing up

Linux kernel excludes guard page when performing mlock on a VMA with
down-growing stack. However, some architectures have up-growing stack
and locking the guard page should be excluded in this case too.

This patch fixes lvm2 on PA-RISC (and possibly other architectures with
up-growing stack). lvm2 calculates number of used pages when locking and
when unlocking and reports an internal error if the numbers mismatch.

[ Patch changed fairly extensively to also fix /proc/<pid>/maps for the
  grows-up case, and to move things around a bit to clean it all up and
  share the infrstructure with the /proc bits.

  Tested on ia64 that has both grow-up and grow-down segments  - Linus ]

Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Tested-by: Tony Luck <tony.luck@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platf...
Linus Torvalds [Mon, 9 May 2011 19:00:49 +0000 (12:00 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mjg59/platform-drivers-x86

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86:
  eeepc-laptop: Use ACPI handle to identify rfkill port
  [PATCH] sony-laptop: limit brightness range to DSDT provided ones
  sony-laptop: report failures on setting LCD brightness
  thinkpad-acpi: module autoloading for newer Lenovo ThinkPads.

13 years agodrm/i915/lvds: Only act on lid notify when the device is on
Alex Williamson [Thu, 21 Apr 2011 22:08:14 +0000 (16:08 -0600)]
drm/i915/lvds: Only act on lid notify when the device is on

If we're using vga switcheroo, the device may be turned off
and poking it can return random state. This provokes an OOPS fixed
separately by 8ff887c847 (drm/i915/dp: Be paranoid in case we disable a
DP before it is attached). Trying to use and respond to events on a
device that has been turned off by the user is in principle a silly thing
to do.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agodrm/i915: fix intel_crtc_clock_get pipe reads after "cleanup cleanup"
Chris Wilson [Fri, 22 Apr 2011 21:17:21 +0000 (22:17 +0100)]
drm/i915: fix intel_crtc_clock_get pipe reads after "cleanup cleanup"

Despite the fixes in 548f245ba6a31 (drm/i915: fix per-pipe reads after
"cleanup"), we missed one neighbouring read that was mistakenly replaced
with the reg value in 9db4a9c (drm/i915: cleanup per-pipe reg usage).
This was preventing us from correctly determining the mode the BIOS left
the panel in for machines that neither have an OpRegion nor access to
the VBT, (e.g. the EeePC 700).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: stable@kernel.org
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agodrm/i915: Only enable the plane after setting the fb base (pre-ILK)
Chris Wilson [Tue, 19 Apr 2011 20:14:14 +0000 (21:14 +0100)]
drm/i915: Only enable the plane after setting the fb base (pre-ILK)

When enabling the plane, it is helpful to have already pointed that
plane to valid memory or else we may incur the wrath of a PGTBL_ER.
This code preserved the behaviour from the bad old days for unknown
reasons...

Found by assert_fb_bound_for_plane().

References: https://bugs.freedesktop.org/show_bug.cgi?id=36246
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
13 years agoMerge branch 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 9 May 2011 16:13:10 +0000 (09:13 -0700)]
Merge branch 'fix/asoc' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ASoC: Fix CODEC DAI names for Goni
  ASoC: Fix CODEC name in Goni
  davinci-mcasp: fix _CBM_CFS pin directions
  davinci-mcasp: fix _CBM_CFS hw_params
  davinci-mcasp: use bitfield definitions for PDIR
  ASoC: davinci-mcasp: correct tdm_slots limit

13 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Mon, 9 May 2011 16:09:04 +0000 (09:09 -0700)]
Merge branch 'drm-fixes' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/radeon/kms: add pci id to acer travelmate quirk for 5730
  drm/radeon: fix order of doing things in radeon_crtc_cursor_set
  drm: mm: fix debug output
  drm/radeon/kms: ATPX switcheroo fixes
  drm/nouveau: Fix a crash at card takedown for NV40 and older cards

13 years agoMerge branch 'hpfs'
Linus Torvalds [Mon, 9 May 2011 16:07:55 +0000 (09:07 -0700)]
Merge branch 'hpfs'

* hpfs:
  HPFS: Remove unused variable
  HPFS: Move declaration up, so that there are no out-of-scope pointers
  HPFS: Fix some unaligned accesses
  HPFS: Fix endianity. Make hpfs work on big-endian machines
  HPFS: Implement fsync for hpfs
  HPFS: Fix a bug that filesystem was not marked dirty when remounting it
  HPFS: Restrict uid and gid to 16-bit values
  HPFS: When marking or clearing the dirty bit, sync the filesystem
  HPFS: Use types with defined width
  HPFS: Remove mark_inode_dirty
  HPFS: Remove CR/LF conversion option
  HPFS: Remove remaining locks
  HPFS: Introduce a global mutex and lock it on every callback from VFS.
  HPFS: Make HPFS compile on preempt and SMP

13 years agoHPFS: Remove unused variable
Mikulas Patocka [Sun, 8 May 2011 18:44:46 +0000 (20:44 +0200)]
HPFS: Remove unused variable

Remove unused variable

Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoHPFS: Move declaration up, so that there are no out-of-scope pointers
Mikulas Patocka [Sun, 8 May 2011 18:44:38 +0000 (20:44 +0200)]
HPFS: Move declaration up, so that there are no out-of-scope pointers

Move declaration up, so that there are no out-of-scope pointers

Reported-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoHPFS: Fix some unaligned accesses
Mikulas Patocka [Sun, 8 May 2011 18:44:32 +0000 (20:44 +0200)]
HPFS: Fix some unaligned accesses

Fix some unaligned accesses

Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoHPFS: Fix endianity. Make hpfs work on big-endian machines
Mikulas Patocka [Sun, 8 May 2011 18:44:26 +0000 (20:44 +0200)]
HPFS: Fix endianity. Make hpfs work on big-endian machines

Fix endianity. Make hpfs work on big-endian machines.

Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoHPFS: Implement fsync for hpfs
Mikulas Patocka [Sun, 8 May 2011 18:44:19 +0000 (20:44 +0200)]
HPFS: Implement fsync for hpfs

Implement fsync for hpfs.

Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoHPFS: Fix a bug that filesystem was not marked dirty when remounting it
Mikulas Patocka [Sun, 8 May 2011 18:44:08 +0000 (20:44 +0200)]
HPFS: Fix a bug that filesystem was not marked dirty when remounting it

Fix a bug that filesystem was not marked dirty when remounting it

Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoHPFS: Restrict uid and gid to 16-bit values
Mikulas Patocka [Sun, 8 May 2011 18:44:00 +0000 (20:44 +0200)]
HPFS: Restrict uid and gid to 16-bit values

Restrict uid and gid to 16-bit values.

HPFS stores only 2 bytes in the EAs.

Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoHPFS: When marking or clearing the dirty bit, sync the filesystem
Mikulas Patocka [Sun, 8 May 2011 18:43:41 +0000 (20:43 +0200)]
HPFS: When marking or clearing the dirty bit, sync the filesystem

When marking or clearing the dirty bit, sync the filesystem

Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoHPFS: Use types with defined width
Mikulas Patocka [Sun, 8 May 2011 18:43:34 +0000 (20:43 +0200)]
HPFS: Use types with defined width

Use types with defined width

Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>