Florian Tobias Schandinat [Sun, 29 Jul 2012 16:47:40 +0000 (16:47 +0000)]
da8xx-fb: fix compile issue due to missing include
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Benjamin Herrenschmidt [Tue, 24 Jul 2012 08:19:13 +0000 (18:19 +1000)]
fbdev: Make pixel_to_pat() failure mode more friendly
If we accidentally pass an incorrect bpp value to pixel_to_pat(),
it panics. This is pretty useless, as we generally have the various
console locks held at that point, so nothing will be displayed,
and there is no reason to make this a fatal event.
Let's WARN instead.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Manjunathappa, Prakash [Tue, 24 Jul 2012 04:15:25 +0000 (09:45 +0530)]
da8xx-fb: do not turn ON LCD backlight unless LCDC is enabled
LCD blink is observed during suspend/resume and blank/unblank
operations as backlight is ON during LCDC disable and enable.
So make sure to turn OFF backlight before disabling and turn
it ON after enabling.
Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Laurent Pinchart [Thu, 26 Jul 2012 12:36:55 +0000 (14:36 +0200)]
fbdev: sh_mobile_lcdc: Fix vertical panning step
Commit
15dede882e564601947f2ce4b647742c0351be6d added support for
horizontal panning but accidentally computes the Y pan step value
incorrectly for NV12/21 and NV16/61 formats. Fix this.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Donghwa Lee [Mon, 23 Jul 2012 02:25:30 +0000 (11:25 +0900)]
video: exynos mipi dsi: Fix mipi dsi regulators handling issue
When FB_BLANK_UNLANK event occured, exynos mipi dsi regulators have to turn on.
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Manjunathappa, Prakash [Fri, 20 Jul 2012 15:51:11 +0000 (21:21 +0530)]
video: da8xx-fb: do clock reset of revision 2 LCDC before enabling
As in specification software reset should be applied for several
cycles before bringing it out of reset. Without this patch
particularly during suspend and resume clock reset is not guaranteed
to happen.
Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Manjunathappa, Prakash [Wed, 18 Jul 2012 15:34:57 +0000 (21:04 +0530)]
arm: da850: configure LCDC fifo threshold
Configure fifo threshold in raster dma_control register to
512 bytes. This reduces LCDC underflow errors.
Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Manjunathappa, Prakash [Wed, 18 Jul 2012 15:33:36 +0000 (21:03 +0530)]
video: da8xx-fb: configure FIFO threshold to reduce underflow errors
Patch works around the below silicon errata:
During LCDC initialization, there is the potential for a FIFO
underflow condition to occur. A FIFO underflow condition
occurs when the input FIFO is completely empty and the LCDC
raster controller logic that drives data to the output pins
attempts to fetch data from the FIFO. When a FIFO underflow
condition occurs, incorrect data will be driven out on the
LCDC data pins.
Software should poll the FUF bit field in the LCD_STAT register
to check if an error condition has occurred or service the
interrupt if FUF_EN is enabled when FUF occurs. If the FUF bit
field has been set to 1, this will indicate an underflow
condition has occurred and then the software should execute a
reset of the LCDC via the LPSC.
This problem may occur if the LCDC FIFO threshold size
(LCDDMA_CTRL[TH_FIFO_READY]) is left at its default value after
reset. Increasing the FIFO threshold size will reduce or
eliminate underflows. Setting the threshold size to 256 double
words or larger is recommended.
Above issue is described in section 2.1.3 of silicon errata
http://www.ti.com/lit/er/sprz313e/sprz313e.pdf
Signed-off-by: Rajashekhara, Sudhakar <sudhakar.raj@ti.com>
Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Manjunathappa, Prakash [Wed, 18 Jul 2012 15:31:56 +0000 (21:01 +0530)]
video: da8xx-fb: fix flicker due to 1 frame delay in updated frame
Flicker/tearing effect is observed with current FB driver.
Issue is because of 2 active DMA channels ping ponging among them
along with usage of 2 DDR ping pong buffers in driver. Application
unaware of active DMA channel keeps updating frame being displayed,
this leads to tearing effect.
Below steps describes the issue:
1)Initially assume both buffers FB0 and FB1 are programmed for buffer-0.
2)On EOF0: Program FB0 for buffer-1, indicate(wake up) application
to fill up buffer-0. As FB1 is active and continues to DMA buffer-0
(which is being filled), leading to tearing/flickering issue.
3)On EOF1: Program FB1 for buffer-0, indicate(wake up) application to
fill up buffer-1. As FB0 is active and continues to DMA buffer-1(which
is being filled), leading to tearing/flickering issue.
4)On EOF0: Program FB0 for buffer-1, indicate(wake up) application to
fill up buffer-0. As FB1 is active and continues to DMA buffer-0(which is
being filled), leading to tearing/flickering issue.
...
Above steps depict that issue is because of 1 frame delay in frame
panned by application.
Patch fixes the issue by keeping track free DMA channel and configures
it in drivers PAN callback so that panned frame from application gets
displayed in next frame period.
Wiki below describes the issue in detail and it also has link to
application with which issue can be reproduced.
http://processors.wiki.ti.com/index.php/DA8xx_LCDC_Linux_FB_FAQs
Signed-off-by: Nellutla, Aditya <aditya.n@ti.com>
Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Manjunathappa, Prakash [Wed, 18 Jul 2012 15:21:11 +0000 (20:51 +0530)]
video: da8xx-fb rev2: fix disabling of palette completion interrupt
Writing '1' to particular bit of IRQENABLE_CLEAR register disables the
corresponding interrupt on revision 2 LCDC. This register was wrongly
configured to disable all previous enabled interrupts instead of
disabling only palette completion interrupt. Patch fixes it by clearing
only palette completion interrupt bit.
Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Yegor Yefremov [Fri, 6 Jul 2012 14:01:28 +0000 (16:01 +0200)]
da8xx-fb: add missing FB_BLANK operations
add FB_BLANK_NORMAL, FB_BLANK_VSYNC_SUSPEND and FB_BLANK_HSYNC_SUSPEND
modes (copy drivers/video/omap2/omapfb/omapfb-main.c implementation).
Otherwise X-server will complain about invalid parameter.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Florian Tobias Schandinat [Wed, 25 Jul 2012 08:55:46 +0000 (08:55 +0000)]
Merge branch 'for-florian' of git://gitorious.org/linux-omap-dss2/linux into fbdev-next
Conflicts:
drivers/video/omap2/dss/core.c
drivers/video/omap2/dss/dispc.c
Florian Tobias Schandinat [Wed, 25 Jul 2012 08:46:21 +0000 (08:46 +0000)]
Merge branch 'for-next' of git://linuxtv.org/pinchartl/fbdev into fbdev-next
Jingoo Han [Wed, 18 Jul 2012 09:50:59 +0000 (18:50 +0900)]
video: exynos_dp: use usleep_range instead of delay
This patch replaces udelay and mdelay with usleep_range to remove
the busy loop waiting.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Jingoo Han [Tue, 17 Jul 2012 08:44:13 +0000 (17:44 +0900)]
video: exynos_dp: check the only INTERLANE_ALIGN_DONE bit during Link Training
The only INTERLANE_ALIGN_DONE bit should be checked for channel equalization
during Link Training. Previously, the other bits such as LINK_STATUS_UPDATED
were checked, and channel equalization procedure was repeated unnecessarily.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Alexander Shiyan [Sun, 15 Jul 2012 07:32:38 +0000 (11:32 +0400)]
fb: epson1355fb: Fix section mismatch
This patch fixes "section mismatch" warning in the epson1355fb driver.
WARNING: vmlinux.o(.devinit.text+0x184): Section mismatch in reference from the function epson1355fb_probe() to the function .init.text:fetch_hw_state()
The function __devinit epson1355fb_probe() references
a function __init fetch_hw_state().
If fetch_hw_state is only used by epson1355fb_probe then
annotate fetch_hw_state with a matching annotation.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Acked-by: Christopher Hoover <ch@murgatroid.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Jingoo Han [Thu, 12 Jul 2012 06:10:03 +0000 (15:10 +0900)]
video: exynos_dp: fix wrong DPCD address during Link Training
Wrong DPCD addresses were used for clock recovery during Link Training.
The training pattern should be set by TRAINING_PATTERN_SET (0x102), while
voltage swing and pre-emphasis should be set by TRAINING_LANE0_SET (0x103).
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Alexander Holler [Fri, 20 Apr 2012 22:11:07 +0000 (00:11 +0200)]
video/smscufx: fix line counting in fb_write
Line 0 and 1 were both written to line 0 (on the display) and all subsequent
lines had an offset of -1. The result was that the last line on the display
was never overwritten by writes to /dev/fbN.
The origin of this bug seems to have been udlfb.
Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Cc: stable@vger.kernel.org
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Emil Goode [Fri, 8 Jun 2012 16:55:20 +0000 (18:55 +0200)]
aty128fb: Fix coding style issues
This patch cleans up some coding style issues.
-Some lines are indented with 4 spaces, most of this code
is not used but it should be correctly indented anyway.
-I also fixed some long lines exceeding the 80 char limit.
Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Laurent Pinchart [Thu, 15 Mar 2012 17:15:37 +0000 (18:15 +0100)]
fbdev: sh_mobile_lcdc: Fix pan offset computation in YUV mode
The chroma plane offset in memory is equal to the luma plane maximum
size. Fix offset computations.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Laurent Pinchart [Thu, 19 Jul 2012 00:29:52 +0000 (02:29 +0200)]
fbdev: sh_mobile_lcdc: Fix overlay registers update during pan operation
Updating overlay registers require switching to overlay update mode.
This was correctly done when configuring the overlay format and size,
but not when updating the base address registers during pan operation.
Fix it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Laurent Pinchart [Wed, 18 Jul 2012 15:09:04 +0000 (17:09 +0200)]
fbdev: sh_mobile_lcdc: Support horizontal panning
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Laurent Pinchart [Wed, 18 Jul 2012 14:59:16 +0000 (16:59 +0200)]
fbdev: sh_mobile_lcdc: Use channel configuration to initialize fb device
Copy the x and y virtual resolutions from the channel information
instead of recomputing them.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Laurent Pinchart [Wed, 18 Jul 2012 14:29:20 +0000 (16:29 +0200)]
fbdev: sh_mobile_lcdc: Fix line pitch computation
Line pitch depends on the virtual horizontal resolution, compute it
accordingly.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Laurent Pinchart [Thu, 15 Mar 2012 17:34:05 +0000 (18:34 +0100)]
fbdev: sh_mobile_lcdc: Destroy mutex at remove time
Add a missing mutex_destroy() call when the driver is unbound from the
device.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Laurent Pinchart [Thu, 15 Mar 2012 12:18:17 +0000 (13:18 +0100)]
sh_mobile_meram: Add direct MERAM allocation API
The API can be used to allocate and free MERAM blocks directly, without
going through ICBs.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Laurent Pinchart [Thu, 15 Mar 2012 11:40:47 +0000 (12:40 +0100)]
sh_mobile_meram: Use direct function calls for the public API
There's no reason to use abstract operation pointers to implement the
MERAM API. Replace them by direct function calls.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Laurent Pinchart [Thu, 15 Mar 2012 11:40:47 +0000 (12:40 +0100)]
sh_mobile_meram: Rename operations to cache_[alloc|free|update]
The MERAM operations meram_register, meram_unregister and meram_update
handle LCDC cache. In preparation for "raw" MERAM allocation, rename
them to more appropriate names.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Ondrej Zary [Fri, 6 Jul 2012 13:12:11 +0000 (15:12 +0200)]
s3fb: Add Virge/MX (86C260)
Add support for Virge/MX (86C260) chip. Although this is a laptop chip,
there's an AGP card with this chip too.
Tested with AGP card, will probably not work correctly with laptops.
DDC does not work on this card (even in DOS or Windows).
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Emil Goode [Mon, 25 Jun 2012 22:37:32 +0000 (00:37 +0200)]
grvga: Fix error handling issues
This patch fixes two problems with the error handling in the
grvga_probe function and simplifies it making the code
easier to read.
- If the call to grvga_parse_custom on line 370 fails we use
the wrong label so that release_mem_region will be called
without a call to request_mem_region being made.
- If the call to ioremap on line 436 fails we should not try
to call iounmap in the error handling code.
This patch introduces the following changes:
- Converts request_mem_region into its devm_ equivalent
which simplifies the otherwise messy clean up code.
- Changes the labels for correct error handling and their
names to make the code easier to read.
Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Paul Parsons [Sun, 3 Jun 2012 10:33:52 +0000 (11:33 +0100)]
video: w100fb: Reduce sleep mode battery discharge
In 2006 and 2007 the handhelds.org kernel w100fb driver was patched to
reduce sleep mode battery discharge. Unfortunately those two patches
never migrated to the mainline kernel.
Fortunately the function affected - w100_suspend() - has not changed
since; thus those patches still apply cleanly.
Applying those patches to linux-3.4-rc3 running on an HP iPAQ hx4700
reduces the sleep mode battery discharge from approximately 26 mA to
approximately 11 mA.
This patch combines those two patches into a single unified patch.
Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
Cc: Matt Reimer <mreimer@sdgsystems.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Florian Tobias Schandinat [Sun, 8 Jul 2012 14:00:47 +0000 (14:00 +0000)]
Merge branch 'fbdev-for-linus' into fbdev-next
Tomi Valkeinen [Wed, 4 Jul 2012 12:43:49 +0000 (18:13 +0530)]
OMAPDSS: fix warnings if CONFIG_PM_RUNTIME=n
If runtime PM is not enabled in the kernel config, pm_runtime_get_sync()
will always return 1 and pm_runtime_put_sync() will always return
-ENOSYS. pm_runtime_get_sync() returning 1 presents no problem to the
driver, but -ENOSYS from pm_runtime_put_sync() causes the driver to
print a warning.
One option would be to ignore errors returned by pm_runtime_put_sync()
totally, as they only say that the call was unable to put the hardware
into suspend mode.
However, I chose to ignore the returned -ENOSYS explicitly, and print a
warning for other errors, as I think we should get notified if the HW
failed to go to suspend properly.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Jassi Brar <jaswinder.singh@linaro.org>
Cc: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Tomi Valkeinen [Wed, 4 Jul 2012 12:43:48 +0000 (18:13 +0530)]
OMAPDSS: Use PM notifiers for system suspend
The current way how omapdss handles system suspend and resume is that
omapdss device (a platform device, which is not part of the device
hierarchy of the DSS HW devices, like DISPC and DSI, or panels.) uses
the suspend and resume callbacks from platform_driver to handle system
suspend. It does this by disabling all enabled panels on suspend, and
resuming the previously disabled panels on resume.
This presents a few problems.
One is that as omapdss device is not related to the panel devices or the
DSS HW devices, there's no ordering in the suspend process. This means
that suspend could be first ran for DSS HW devices and panels, and only
then for omapdss device. Currently this is not a problem, as DSS HW
devices and panels do not handle suspend.
Another, more pressing problem, is that when suspending or resuming, the
runtime PM functions return -EACCES as runtime PM is disabled during
system suspend. This causes the driver to print warnings, and operations
to fail as they think that they failed to bring up the HW.
This patch changes the omapdss suspend handling to use PM notifiers,
which are called before suspend and after resume. This way we have a
normally functioning system when we are suspending and resuming the
panels.
This patch, I believe, creates a problem that somebody could enable or
disable a panel between PM_SUSPEND_PREPARE and the system suspend, and
similarly the other way around in resume. I choose to ignore the problem
for now, as it sounds rather unlikely, and if it happens, it's not
fatal.
In the long run the system suspend handling of omapdss and panels should
be thought out properly. The current approach feels rather hacky.
Perhaps the panel drivers should handle system suspend, or the users of
omapdss (omapfb, omapdrm) should handle system suspend.
Note that after this patch we could probably revert
0eaf9f52e94f756147dbfe1faf1f77a02378dbf9 (OMAPDSS: use sync versions of
pm_runtime_put). But as I said, this patch may be temporary, so let's
leave the sync version still in place.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reported-by: Jassi Brar <jaswinder.singh@linaro.org>
Tested-by: Jassi Brar <jaswinder.singh@linaro.org>
Tested-by: Joe Woodward <jw@terrafix.co.uk>
Signed-off-by: Archit Taneja <archit@ti.com>
[fts: fixed 2 brace coding style issues]
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Tomi Valkeinen [Fri, 29 Jun 2012 11:13:07 +0000 (14:13 +0300)]
Merge "Apply LCD manager related parameters" from Archit
The LCD interface drivers(DPI, DSI, RFBI, SDI) do some direct DISPC register
writes to configure LCD manager related fields. This series groups these fields
into a single struct, and let's the interface driver apply these parameters.
This allows us to:
- Check the LCD manager related parameters before applying them.
- Remove some omap_dss_device references as APPLY holds the applied parameters.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Archit Taneja [Mon, 25 Jun 2012 09:28:48 +0000 (14:58 +0530)]
OMAPDSS: OVERLAY: Clean up replication checking
Replication logic for an overlay depends on the color mode in which it is
configured and the video port width of the manager it is connected to.
video port width now held in dss_lcd_mgr_config in the manager's private
data in APPLY. Use this instead of referring to the omap_dss_device connected to
the manager.
Replication is enabled in the case of TV manager, the video_port_width is set to
a default value of 24 for TV manager.
Make the replication checking an overlay function since it's more of an overlay
characteristic than a display characteristic.
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Tue, 29 May 2012 06:25:38 +0000 (11:55 +0530)]
OMAPDSS: RFBI: Use dss_mgr_enable to enable the overlay manager
The RFBI driver uses a direct DISPC register write to enable the overlay
manager. Replace this with dss_mgr_enable() which checks if the connected
overlay and managers are correctly configured, and configure DSS for
fifomerge.
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Fri, 29 Jun 2012 09:11:30 +0000 (14:41 +0530)]
OMAPDSS: DISPC: Remove a redundant function
dss_mgr_is_lcd() available in dss.h does the same thing as dispc_mgr_is_lcd()
in dispc.c. Remove the function from dispc.c and replace it with the one in
dss.h.
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Thu, 24 May 2012 09:38:54 +0000 (15:08 +0530)]
OMAPDSS: APPLY: Remove usage of omap_dss_device from manual/auto update checks
APPLY needs to know at certain places whether an overlay manager is in manual
or auto update mode. The caps of the connected omap_dss_device were used to
check that.
A LCD manager is in manual update if stallmode is enabled for that manager. TV
managers for now always auto update.
Return the value of stallmode parameter in the private data 'lcd_confg' in
mgr_manual_update() and ovl_manual_update(), for TV managers stallmode field
will be false by default.
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Wed, 23 May 2012 11:31:35 +0000 (17:01 +0530)]
OMAPDSS: MANAGER: Check LCD related overlay manager parameters
The LCD related manager configurations are a part of the manager's private data
in APPLY. Pass this to dss_lcd_mgr_config to dss_mgr_check and create a function
to check the validity of some of the configurations.
To check some of the configurations, we require information of interface to
which the manager output is connected. These can be added once interfaces are
represented as an entity.
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Fri, 29 Jun 2012 09:07:03 +0000 (14:37 +0530)]
OMAPDSS: APPLY: Remove DISPC writes to manager's lcd parameters in interface drivers
Replace the DISPC fuctions used to configure LCD channel related manager
parameters with dss_mgr_set_lcd_config() in APPLY. This function ensures that
the DISPC registers are written at the right time by using the shadow register
programming model.
The LCD manager configurations is stored as a private data of manager in APPLY.
It is treated as an extra info as it's the panel drivers which trigger this
apply via interface drivers, and not a DSS2 user like omapfb or omapdrm.
Storing LCD manager related properties in APPLY also prevents the need to refer
to the panel connected to the manager for information. This helps in making the
DSS driver less dependent on panel.
A helper function is added to check whether the manager is LCD or TV. The direct
DISPC register writes are removed from the interface drivers.
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Fri, 29 Jun 2012 09:03:18 +0000 (14:33 +0530)]
OMAPDSS: SDI: Configure dss_lcd_mgr_config struct with lcd manager parameters
Create a dss_lcd_mgr_config struct instance in SDI. Fill up all the parameters
of the struct with configurations held by the panel, and the configurations
required by SDI.
Use these to write to the DISPC registers. These direct register writes would be
later replaced by a function which applies the configuration using the shadow
register programming model.
Create function sdi_config_lcd_manager() which fills the mgr_config parameters
and writes to the DISPC registers.
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Fri, 29 Jun 2012 09:01:07 +0000 (14:31 +0530)]
OMAPDSS: DSI: Configure dss_lcd_mgr_config struct with lcd manager parameters
Create a dss_lcd_mgr_config struct instance in DSI. Fill up all the parameters
of the struct with configurations held by the panel, and the configurations
required by DSI.
Use these to write to the DISPC registers. These direct register writes would be
later replaced by a function which applies the configuration using the shadow
register programming model.
The function dsi_configure_dispc_clocks() is now called in
dsi_display_init_dispc(), this lets all the lcd manager related configurations
happen in the same place. The DISPC_DIVISORo register was written in
dsi_configure_dispc_clock(), now it just fills up the dispc_clock_info parameter
in mgr_config. The clock_info is written later in dsi_display_init_dispc().
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Mon, 25 Jun 2012 05:54:10 +0000 (11:24 +0530)]
OMAPDSS: RFBI: Configure dss_lcd_mgr_config struct with lcd manager parameters
Create a dss_lcd_mgr_config struct instance in RFBI. Fill up all the parameters
of the struct with configurations held by the panel, and the configurations
required by RFBI.
Use these to write to the DISPC registers. These direct register writes would be
later replaced by a function which applies the configuration using the shadow
register programming model.
Create function rfbi_config_lcd_manager() which fills up the mgr_config
parameters and writes to the DISPC regs.
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Fri, 29 Jun 2012 08:49:13 +0000 (14:19 +0530)]
OMAPDSS: DPI: Configure dss_lcd_mgr_config struct with lcd manager parameters
Create a dss_lcd_mgr_config struct instance in DPI. Fill up all the parameters
of the struct with configurations held by the panel, and the configurations
required by DPI.
Use these to write to the DISPC registers. These direct register writes would be
later replaced by a function which applies the configuration using the shadow
register programming model.
The DISPC_DIVISORo registers were written in the functions dpi_set_dispc_clk()
and dpi_set_dsi_clk(), now they just fill up the dispc_clock_info parameter in
mgr_config. They are written later in dpi_config_lcd_manager.
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Fri, 29 Jun 2012 08:33:48 +0000 (14:03 +0530)]
OMAPDSS: Add struct to hold LCD overlay manager configuration
Create a struct dss_lcd_mgr_config which holds LCD overlay manager related
parameters. These are currently partially contained in the omap_dss_device
connected to the manager, and the rest are in the interface driver.
The parameters are directly written to the DISPC registers in the interface
drivers. These should eventually be applied at the correct time using the
shadow register programming model. This struct would help in grouping these
parameters so that they can be applied together.
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Fri, 29 Jun 2012 08:30:54 +0000 (14:00 +0530)]
OMAPDSS: DISPC: Change return type of dispc_mgr_set_clock_div()
dipsc_mgr_set_clock div has an int return type to report errors or success.
The function doesn't really check for errors and always returns 0. Change
the return type to void.
Checking for the correct DISPC clock divider ranges will be done when a DSS2
user does a manager apply. This support will be added later.
Signed-off-by: Archit Taneja <archit@ti.com>
Chandrabhanu Mahapatra [Thu, 28 Jun 2012 09:44:02 +0000 (15:14 +0530)]
ARM: OMAP2PLUS: DSS: Disable LCD3 output when resetting DSS
The dispc_disable_outputs() function currently disables all LCD managers except
LCD3. This patch adds disabling functionality for LCD3 manager thereby
maintaining consistency of Display Subsystem for in case Display Controller is
reset when LCD3 manager is in use.
Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Fri, 29 Jun 2012 07:18:33 +0000 (10:18 +0300)]
Merge Misc DSS clean ups from Archit
This series does the following things:
- Remove passive matrix LCD support: There are no panel drivers with
passive matrix LCD drivers in DSS2. There are no passive matrix panels
even available to test with DSS. Since no one is using passive matrix
panels, stop trying to support it. It cleans up the DSS driver.
- Add some new fields to omap_video_timings: There were some standard
panel timing fields missing from omap_video_timings. Namely
Hsync/Vsync/DE levels and interlace. Add these to omap_video_timings
to align it more with xorg modeline. Add some other OMAP DSS specific
fields to omap_video_timings.
- Remove some hacks done because omap_video_timings didn't have the
above fields.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Archit Taneja [Tue, 26 Jun 2012 07:08:31 +0000 (12:38 +0530)]
OMAPDSS: DSI: Fix HSYNC, VSYNC and DE polarities between DISPC and DSI
For DSI operation in videomode, DISPC logic levels for the signals HSYNC, VSYNC
and DE need to be specified to DSI via the fields VP_HSYNC_POL, VP_VSYNC_POL and
VP_DE_POL in DSI_CTRL registers.
This information is completely internal to DSS as logic levels for the above
signals hold no meaning on the DSI bus. Hence a DSI panel driver should be
totally oblivious of these fields.
Fix the logic levels/polarities in the DISPC and DSI registers to a default
value. This is done by overriding these fields in omap_video_timings struct
filled by the panel driver for DISPC, and use the equivalent default values
when programming DSI_CTRL registers. Also, remove the redundant polarity related
fields in omap_dss_dsi_videomode_data.
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Sun, 24 Jun 2012 07:38:10 +0000 (13:08 +0530)]
OMAPDSS: HDMI: Remove custom hdmi_video_timings struct
The hdmi CEA and VESA timings were represented by the struct hdmi_video_timings,
omap_video_timings couldn't be used as it didn't contain the fields hsync/vsync
polarities and interlaced/progressive information.
Remove hdmi_video_timings, and use omap_video_timings instead.
Cc: Mythri P K <mythripk@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Thu, 28 Jun 2012 12:53:18 +0000 (18:23 +0530)]
OMAPFB: Map interlace field in omap_video_timings with fb vmode flags
Use the interlace field in omap_video_timings to configure/retrieve
corresponding fb mode flags in fb_var_screeninfo and fb_videomode.
The interlace field maps with the fb mode flags FB_VMODE_INTERLACED and
FB_VMODE_NONINTERLACED.
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Wed, 6 Jun 2012 10:55:52 +0000 (16:25 +0530)]
OMAPDSS: DISPC/APPLY: Use interlace info in manager timings for dispc_ovl_setup()
Currently the interlace parameter passed to dispc_ovl_setup() is configured by
checking the display type, and set to true if the display type is VENC.
This isn't correct as other panels can take interlaced content too. The
omap_video_timings struct in manager's private data contains the info whether
the panel is in interlaced mode or not.
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Thu, 28 Jun 2012 05:45:51 +0000 (11:15 +0530)]
OMAPDSS: Add interlace parameter to omap_video_timings
Add a parameter called interlace which tells whether the timings are in
interlaced or progressive mode. This aligns the omap_video_timings struct with
the Xorg modeline configuration.
It also removes the hack needed to write to divide the manager height by 2 if
the connected interface is VENC.
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Fri, 29 Jun 2012 06:43:32 +0000 (12:13 +0530)]
OMAPDSS: Remove omap_panel_config enum from omap_dss_device
omap_panel_config contains fields which are finally written to DISPC_POL_FREQo
registers. These are now held by omap_video_timings and are set when the manager
timings are applied.
Remove the omap_panel_config enum, and remove all it's references from panel or
interface drivers.
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Fri, 15 Jun 2012 02:09:47 +0000 (07:39 +0530)]
OMAPFB: Map the newly added omap_video_timings fields with fb sync flags
Use the newly added fields in omap_video_timings(hsync, vsync and data_enable
logic levels and data, hsync and vsync latching related info) to
configure/retrieve corresponding sync flags in fb_var_screeninfo and
fb_videomode.
Out of the new fields, hsync_level and vsync_level can be mapped to the fb sync
flags FB_SYNC_HOR_HIGH_ACT and FB_SYNC_VERT_HIGH_ACT.
When converting fb mode to omap_video_timings, the fields which don't have an
equivalent parameter in fb are kept as the original values if the panel driver
has a get_timings op, else they are set to default values.
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Mon, 25 Jun 2012 07:04:22 +0000 (12:34 +0530)]
OMAPDSS: DISPC: Remove dispc_mgr_set_pol_freq()
dispc_mgr_set_pol_freq() configures the fields in the register DISPC_POL_FREQo.
All these fields have been moved to omap_video_timings struct, and are now
programmed in dispc_mgr_set_lcd_timings(). These will be configured when timings
are applied via dss_mgr_set_timings().
Remove dispc_mgr_set_pol_freq() and it's calls from the interface drivers.
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Thu, 21 Jun 2012 05:07:43 +0000 (10:37 +0530)]
OMAPDSS: DISPC: Configure newly added omap_video_timing fields
Hsync, Vsync, Data enable enable logic levels and latching info of Data lanes,
Hsync and Vsync signals(with respect to pixel clock) are newly added parameters
in omap_video_timings.
Program these in dispc_mgr_set_lcd_timings. These will be configured when the
manager's timings are set via dss_mgr_set_timings().
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Thu, 21 Jun 2012 07:51:02 +0000 (13:21 +0530)]
OMAPDSS: DISPLAY: Ignore newly added omap_video_timings fields for display timings sysfs file
The display sysfs file for viewing/storing display timings is something which
will be deprecated. The new omap_video_timings fields (hsync_level, vsync_level
and others) are not configurable or viewable via this sysfs file.
This prevents the need to make the input more configurable to take the new
fields and at the same time work without these fields for backward
compatibility.
In display_timings_store, the omap_video_timings struct used to set the timings
is initialized to the existing panel timings so that the new fields are taken in
correctly. The other fields are taken from the user as before.
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Mon, 25 Jun 2012 06:56:38 +0000 (12:26 +0530)]
OMAPDSS: Add some new fields to omap_video_timings
Some panel timing related fields are contained in omap_panel_config in the form
of flags. The fields are:
- Hsync logic level
- Vsync logic level
- Data driven on rising/falling edge of pixel clock
- Output enable/Data enable logic level
- HSYNC/VSYNC driven on rising/falling edge of pixel clock
Out of these parameters, Hsync and Vsync logic levels are a part of the timings
in the Xorg modeline configuration. So it makes sense to move the to
omap_video_timings. The rest aren't a part of modeline, but it still makes
sense to move these since they are related to panel timings.
These fields stored in omap_panel_config in dssdev are configured for LCD
panels, and the corresponding LCD managers in the DISPC_POL_FREQo registers.
Add the above fields in omap_video_timings. Represent their state via new enums.
Add these parameters to the omap_video_timings instances in the panel drivers.
Keep the corresponding IVS, IHS, IPC, IEO, RF and ONOFF flags in
omap_panel_config for now. The struct will be removed later.
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Mon, 25 Jun 2012 06:46:22 +0000 (12:16 +0530)]
OMAPDSS: Remove passive matrix LCD support (part 4)
Remove configuration of Ac-bias pins
Ac-bias pins need to be configured only for passive matrix displays. Remove
acbi and acb fields in omap_dss_device and their configuration in panel
drivers. Don't program these fields in DISP_POL_FREQo register any more.
The panel driver for sharp-ls037v7dw01, and the panel config for
Innolux AT070TN8 in generic dpi panel driver set acb to a non zero value. This
is most likely carried over from the old omapfb driver which supported passive
matrix displays.
Cc: Thomas Weber <weber@corscience.de>
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Thu, 21 Jun 2012 04:15:11 +0000 (09:45 +0530)]
OMAPDSS: Remove passive matrix LCD support (part 3)
Remove omap_lcd_display_type enum
The enum omap_lcd_display_type is used to configure the lcd display type in
DISPC. Remove this enum and always set display type to TFT by creating function
dss_mgr_set_lcd_type_tft().
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Thu, 21 Jun 2012 04:11:10 +0000 (09:41 +0530)]
OMAPDSS: Remove passive matrix LCD support (part 2)
Remove OMAP_DSS_LCD_TFT as a omap_panel_config flag.
We don't support passive matrix displays any more. Remove this flag from all the
panel drivers.
Force the display_type to OMAP_DSS_LCD_DISPLAY_TFT in the interface drivers.
Signed-off-by: Archit Taneja <archit@ti.com>
Archit Taneja [Thu, 21 Jun 2012 04:03:55 +0000 (09:33 +0530)]
OMAPDSS: Remove passive matrix LCD support (part 1)
Remove clock constraints related to passive matrix displays.
There is a constraint (pcd_min should be 3) for passive matrix displays. Remove
this constraint in clock divider calculations as we won't support passive
matrix displays any more.
This cleans up the functions which calculate the clock dividers with DSI's PLL
or DSS_FCLK as the clock source.
Signed-off-by: Archit Taneja <archit@ti.com>
Jassi Brar [Wed, 27 Jun 2012 14:04:56 +0000 (19:34 +0530)]
OMAPDSS: HDMI: Replace spinlock with mutex in hdmi_check_hpd_state
State change of HDMI PHY could potentially take many millisecs, we can do
better by protecting things in hdmi_set_phy_pwr() with a mutex rather than
a spin_lock_irqsave.
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Jassi Brar [Wed, 27 Jun 2012 14:04:36 +0000 (19:34 +0530)]
OMAPDSS: HDMI: Discard phy_tx_enabled member
It is simpler to read the current status from a register as compared
to maintaining a state variable to hold the information.
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Chandrabhanu Mahapatra [Thu, 21 Jun 2012 05:53:56 +0000 (11:23 +0530)]
OMAPDSS: Add dump and debug support for LCD3
DISPC functions have been modified to provide clock and register dumps and debug
support for the LCD3 manager.
Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Chandrabhanu Mahapatra [Fri, 29 Jun 2012 05:13:13 +0000 (10:43 +0530)]
OMAPDSS: Add LCD3 overlay manager and Clock and IRQ support
The support for LCD3 manager has been added into the manager module. LCD3 panel
has registers as DISPC_CONTROL3 and DISPC_CONFIG3 just like those in LCD and
LCD2 panels. These registers control the Display Controller (DISPC) module for
LCD3 output. The three LCDs support Display Serial Interface (DSI), Remote Frame
Buffer Interface (RFBI) and Parallel CMOS Output Interface (DPI). These LCDs can
be connected through parallel output interface using DISPC and RFBI or DPI. For
serial interface DSS uses DSI.
The LCD3 panel, just like LCD and LCD2 panels, has a clock switch in DSS_CTRL
register which has been enabled. The clock switch chooses between DSS_CLK and
DPLL_DSI1_C_CLK1 as source for LCD3_CLK. New IRQs as DISPC_IRQ_VSYNC3,
DISPC_IRQ_FRAMEDONE3, DISPC_IRQ_ACBIAS_COUNT_STAT3 and DISPC_IRQ_SYNC_LOST3 have
been added specific to the new manager.
Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Chandrabhanu Mahapatra [Tue, 19 Jun 2012 09:38:16 +0000 (15:08 +0530)]
OMAPDSS: Add support for LCD3 channel
OMAP5 Display Subsystem (DSS) architecture comes with a additional LCD3 channel
with its own dedicated overlay manager. The current patch adds LCD3 channel and
basic register support for LCD3 channel. It adds register addresses for various
Display Controller (DISPC) registers like DISPC_DEFAULT_COLOR, DISPC_TIMING_H,
DISPC_DIVISORo, etc.
Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Chandrabhanu Mahapatra [Thu, 21 Jun 2012 05:37:44 +0000 (11:07 +0530)]
OMAPDSS: Cleanup implementation of LCD channels
The current implementation of LCD channels and managers consists of a number of
if-else construct which has been replaced by a simpler interface. A constant
structure mgr_desc has been created in Display Controller (DISPC) module. The
mgr_desc contains for each channel its name, irqs and is initialized one time
with all registers and their corresponding fields to be written to enable
various features of Display Subsystem. This structure is later used by various
functions of DISPC which simplifies the further implementation of LCD channels
and its corresponding managers.
Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Wed, 27 Jun 2012 13:37:18 +0000 (16:37 +0300)]
OMAPDSS: fix warnings if CONFIG_PM_RUNTIME=n
If runtime PM is not enabled in the kernel config, pm_runtime_get_sync()
will always return 1 and pm_runtime_put_sync() will always return
-ENOSYS. pm_runtime_get_sync() returning 1 presents no problem to the
driver, but -ENOSYS from pm_runtime_put_sync() causes the driver to
print a warning.
One option would be to ignore errors returned by pm_runtime_put_sync()
totally, as they only say that the call was unable to put the hardware
into suspend mode.
However, I chose to ignore the returned -ENOSYS explicitly, and print a
warning for other errors, as I think we should get notified if the HW
failed to go to suspend properly.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Jassi Brar <jaswinder.singh@linaro.org>
Cc: Grazvydas Ignotas <notasas@gmail.com>
Tomi Valkeinen [Tue, 26 Jun 2012 12:52:16 +0000 (15:52 +0300)]
OMAPDSS: Use PM notifiers for system suspend
The current way how omapdss handles system suspend and resume is that
omapdss device (a platform device, which is not part of the device
hierarchy of the DSS HW devices, like DISPC and DSI, or panels.) uses
the suspend and resume callbacks from platform_driver to handle system
suspend. It does this by disabling all enabled panels on suspend, and
resuming the previously disabled panels on resume.
This presents a few problems.
One is that as omapdss device is not related to the panel devices or the
DSS HW devices, there's no ordering in the suspend process. This means
that suspend could be first ran for DSS HW devices and panels, and only
then for omapdss device. Currently this is not a problem, as DSS HW
devices and panels do not handle suspend.
Another, more pressing problem, is that when suspending or resuming, the
runtime PM functions return -EACCES as runtime PM is disabled during
system suspend. This causes the driver to print warnings, and operations
to fail as they think that they failed to bring up the HW.
This patch changes the omapdss suspend handling to use PM notifiers,
which are called before suspend and after resume. This way we have a
normally functioning system when we are suspending and resuming the
panels.
This patch, I believe, creates a problem that somebody could enable or
disable a panel between PM_SUSPEND_PREPARE and the system suspend, and
similarly the other way around in resume. I choose to ignore the problem
for now, as it sounds rather unlikely, and if it happens, it's not
fatal.
In the long run the system suspend handling of omapdss and panels should
be thought out properly. The current approach feels rather hacky.
Perhaps the panel drivers should handle system suspend, or the users of
omapdss (omapfb, omapdrm) should handle system suspend.
Note that after this patch we could probably revert
0eaf9f52e94f756147dbfe1faf1f77a02378dbf9 (OMAPDSS: use sync versions of
pm_runtime_put). But as I said, this patch may be temporary, so let's
leave the sync version still in place.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reported-by: Jassi Brar <jaswinder.singh@linaro.org>
Tested-by: Jassi Brar <jaswinder.singh@linaro.org>
Rajendra Nayak [Wed, 27 Jun 2012 08:51:26 +0000 (14:21 +0530)]
OMAPDSS: add clk_prepare_enable and clk_disable_unprepare
In preparation of OMAP moving to Common Clk Framework(CCF) change
clk_enable() and clk_disable() calls to clk_prepare_enable() and
clk_disable_unprepare() in omapdss. This can be safely done, as omapdss
never enables or disables clocks in atomic context.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: <linux-fbdev@vger.kernel.org>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Mike Turquette <mturquette@linaro.org>
[tomi.valkeinen@ti.com: updated patch description]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Peter Meerwald [Wed, 27 Jun 2012 20:09:22 +0000 (22:09 +0200)]
OMAPDSS: fix specification spelling in Kconfig
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Mon, 25 Jun 2012 08:20:13 +0000 (11:20 +0300)]
OMAPDSS: remove enum omap_dss_overlay_managers
We have two almost the same enums: omap_channel and
omap_dss_overlay_managers. omap_channel is used almost everywhere, and
omap_channel assigns explicit values to the enum values which are needed
for proper operation.
omap_dss_overlay_managers is only used in one place, so it's easy to
remove it, which is what this patch does.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Aditya Nellutla [Wed, 23 May 2012 06:06:31 +0000 (11:36 +0530)]
da8xx-fb: Rounding FB size to satisfy SGX buffer requirements
In the real time use-case when SGX is used for rendering to FB buffers it has been
observed that, the available memory from framebuffer driver is not sufficient for
SGX under certain cases (like 16-bit WVGA resolution). SGX requires 2 swap buffers
with each of the buffers aligned to lcm(line_length, PAGE_SIZE).
Inorder to satisfy this requirement, we have two options,
- Increase number of FB buffers (LCD_NUM_BUFFERS) to 3. This is not
recommended as we end up wasting huge memory in most of the cases.
- Align FB buffers to lcm(line_length, PAGE_SIZE).This ensures framebuffer
size is increased to satisfy SGX requirements keeping alignment intact.
This patch makes sure that FB allocates buffers aligned to above formula.
Signed-off-by: Aditya Nellutla <aditya.n@ti.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Liu Ying [Mon, 11 Jun 2012 01:06:50 +0000 (09:06 +0800)]
mx3fb: avoid screen flash when panning with fb_set_var
Users may call FBIOPUT_VSCREENINFO ioctrl to do pan display.
This ioctrl relies on fb_set_var() to do the job. fb_set_var()
calls custom fb_set_par() method and then calls custom
fb_pan_display() method. The current implementation of mx3fb
reinitializes IPU display controller every time the custom
fb_set_par() method is called, which makes the screen flash
if fb_set_var() is called to do panning frequently. This patch
compares the new var info with the cached old one to decide
whether we really need to reinitialize IPU display controller.
We ignore xoffset and yoffset update because it doesn't require
to reinitialize the controller. Users may specify activate field
of var info with FB_ACTIVATE_NOW and FB_ACTIVATE_FORCE to
reinialize the controller by force.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Liu Ying [Mon, 11 Jun 2012 01:06:49 +0000 (09:06 +0800)]
mx3fb: support pan display with fb_set_var
Users may call FBIOPUT_VSCREENINFO ioctrl to do pan display.
This ioctrl relies on fb_set_var() to do the job. fb_set_var()
calls the custom fb_set_par() method and then calls the custom
fb_pan_display() method. Before calling the custom fb_pan_display()
method, info->var is already updated from the new *var in fb_set_var().
And, the custom fb_pan_display() method checks if xoffset and yoffset
in info->var and the new *var are different before doing actual panning,
which prevents the panning from happening within fb_set_var() context.
This patch caches the current var info locally in mx3fb driver so that
pan display with fb_set_var is supported.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Florian Tobias Schandinat [Sun, 24 Jun 2012 13:58:53 +0000 (13:58 +0000)]
Merge branch 'planes' of git://linuxtv.org/pinchartl/fbdev into fbdev-next
Paul Bolle [Wed, 13 Jun 2012 07:47:31 +0000 (09:47 +0200)]
video: backlight: remove unused header
Commit
9befe40f6e018e508b047eb76d189ede9b4ff03d ("video: backlight:
support s6e8ax0 panel driver based on MIPI DSI") added s6e8ax0.h, but
no file includes it. That's probably a good thing, because it declares
an extern void function that is defined static int in s6e8ax0.c.
Besides, that function is also wrapped in the module_init() macro, which
should do everything needed to make that function available to the code
outside of s6e8ax0.c. This header can safely be removed.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Acked-by: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Jingoo Han [Thu, 21 Jun 2012 09:57:23 +0000 (18:57 +0900)]
video: exynos_dp: remove duplicated declarations from header file
Some functions are declared twice in header file; thus, these
declarations are unnecessary.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Jingoo Han [Wed, 20 Jun 2012 01:25:48 +0000 (10:25 +0900)]
video: exynos_dp: fix build warning due to uninitialized value
This patch fixes build warning due to uninitialized value dereference.
drivers/video/exynos/exynos_dp_core.c: In function 'exynos_dp_set_link_train':
drivers/video/exynos/exynos_dp_core.c:529:18: warning: 'reg' may be used uninitialized in this function [-Wuninitialized]
drivers/video/exynos/exynos_dp_core.c:395:6: note: 'reg' was declared here
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Laurent Pinchart [Mon, 12 Dec 2011 17:43:16 +0000 (18:43 +0100)]
fbdev: sh_mobile_lcdc: Implement overlays support
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Laurent Pinchart [Mon, 21 Nov 2011 23:56:58 +0000 (00:56 +0100)]
fbdev: sh_mobile_lcdc: Rename fb operation handlers with a common prefix
Make all fb operation handlers start with sh_mobile_lcdc_ in preparation
for the multi-plane support.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Laurent Pinchart [Mon, 21 Nov 2011 23:56:58 +0000 (00:56 +0100)]
fbdev: sh_mobile_lcdc: Constify sh_mobile_lcdc_fix structure
The structure is only read, make it const.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Guennadi Liakhovetski [Thu, 14 Jun 2012 07:53:33 +0000 (09:53 +0200)]
fbdev: sh_mipi_dsi: fix a section mismatch
sh_mipi_setup() is called from a .text function, therefore it cannot be
__init. Additionally, sh_mipi_remove() can be moved to the .devexit.text
section.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Linus Torvalds [Sun, 17 Jun 2012 00:25:17 +0000 (17:25 -0700)]
Linux 3.5-rc3
Linus Torvalds [Sun, 17 Jun 2012 00:01:41 +0000 (17:01 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs
Pull btrfs compile warning fixes from Chris Mason.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
Btrfs: cast devid to unsigned long long for printk %llu
Btrfs: init old_generation in get_old_root
Linus Torvalds [Sun, 17 Jun 2012 00:00:15 +0000 (17:00 -0700)]
Merge branch 'stable' of git://git./linux/kernel/git/cmetcalf/linux-tile
Pull arch/tile update from Chris Metcalf:
"This one-line bug fix unbreaks glibc robust mutexes (among other
things no doubt), from code merged in during the 3.5 merge window but
which we had been running internally at Tilera for almost a year."
* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
tile: fix bug in get_user() for 4-byte values
Linus Torvalds [Sat, 16 Jun 2012 23:59:05 +0000 (16:59 -0700)]
Merge tag 'fbdev-fixes-for-3.5-1' of git://github.com/schandinat/linux-2.6
Pull fbdev fixes from Florian Tobias Schandinat:
- two fixes for s3c-fb by Jingoo Han (including a fix for a potential
division by zero)
- a couple of randconfig fixes by Arnd Bergmann
- a cleanup for bfin_adv7393fb by Emil Goode
* tag 'fbdev-fixes-for-3.5-1' of git://github.com/schandinat/linux-2.6:
video: s3c-fb: fix possible division by zero in s3c_fb_calc_pixclk
video: s3c-fb: clear SHADOWCON register when clearing hardware window registers
drivers/tosa: driver needs I2C and SPI to compile
drivers/savagefb: use mdelay instead of udelay
video/console: automatically select a font
video/ili9320: do not mark exported functions __devexit
drivers/video: use correct __devexit_p annotation
video: bfin_adv7393fb: Convert to kstrtouint_from_user
Chris Metcalf [Sat, 16 Jun 2012 20:53:06 +0000 (16:53 -0400)]
tile: fix bug in get_user() for 4-byte values
The definition of 32-bit values in the 64-bit tilegx architecture is that
they should be sign-extended regardless of whether they are considered
signed or unsigned by the compiler. Accordingly, we need to use an
"ld4s" rather than "ld4u" to load and sign-extend for get_user().
This fixes glibc bug 14238 (see http://sourceware.org/bugzilla),
introduced during the 3.5 merge window.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Hugh Dickins [Sat, 16 Jun 2012 00:55:50 +0000 (17:55 -0700)]
swap: fix shmem swapping when more than 8 areas
Minchan Kim reports that when a system has many swap areas, and tmpfs
swaps out to the ninth or more, shmem_getpage_gfp()'s attempts to read
back the page cannot locate it, and the read fails with -ENOMEM.
Whoops. Yes, I blindly followed read_swap_header()'s pte_to_swp_entry(
swp_entry_to_pte()) technique for determining maximum usable swap
offset, without stopping to realize that that actually depends upon the
pte swap encoding shifting swap offset to the higher bits and truncating
it there. Whereas our radix_tree swap encoding leaves offset in the
lower bits: it's swap "type" (that is, index of swap area) that was
truncated.
Fix it by reducing the SWP_TYPE_SHIFT() in swapops.h, and removing the
broken radix_to_swp_entry(swp_to_radix_entry()) from read_swap_header().
This does not reduce the usable size of a swap area any further, it
leaves it as claimed when making the original commit: no change from 3.0
on x86_64, nor on i386 without PAE; but 3.0's 512GB is reduced to 128GB
per swapfile on i386 with PAE. It's not a change I would have risked
five years ago, but with x86_64 supported for ten years, I believe it's
appropriate now.
Hmm, and what if some architecture implements its swap pte with offset
encoded below type? That would equally break the maximum usable swap
offset check. Happily, they all follow the same tradition of encoding
offset above type, but I'll prepare a check on that for next.
Reported-and-Reviewed-and-Tested-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: stable@vger.kernel.org [3.1, 3.2, 3.3, 3.4]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sat, 16 Jun 2012 00:39:32 +0000 (17:39 -0700)]
Merge tag 'scsi-fixes' of git://git./linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley:
"This is a couple of minor fixes, one for a preempt warning in the
mpt2sas driver and one is a config failure with the new sd async
domain."
* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
[SCSI] Fix sd_probe_domain config problem
[SCSI] mpt2sas: Fix unsafe using smp_processor_id() in preemptible
Linus Torvalds [Sat, 16 Jun 2012 00:37:23 +0000 (17:37 -0700)]
Merge tag 'nfs-for-3.5-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client bugfixes from Trond Myklebust:
"Highlights include:
- Fix a couple of mount regressions due to the recent cleanups.
- Fix an Oops in the open recovery code
- Fix an rpc_pipefs upcall hang that results from some of the net
namespace work from 3.4.x (stable kernel candidate).
- Fix a couple of write and o_direct regressions that were found at
last weeks Bakeathon testing event in Ann Arbor."
* tag 'nfs-for-3.5-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
NFS: add an endian notation for sparse
NFSv4.1: integer overflow in decode_cb_sequence_args()
rpc_pipefs: allow rpc_purge_list to take a NULL waitq pointer
NFSv4 do not send an empty SETATTR compound
NFSv2: EOF incorrectly set on short read
NFS: Use the NFS_DEFAULT_VERSION for v2 and v3 mounts
NFS: fix directio refcount bug on commit
NFSv4: Fix unnecessary delegation returns in nfs4_do_open
NFSv4.1: Convert another trivial printk into a dprintk
NFS4: Fix open bug when pnfs module blacklisted
NFS: Remove incorrect BUG_ON in nfs_found_client
NFS: Map minor mismatch error to protocol not support error.
NFS: Fix a commit bug
NFS4: Set parsed mount data version to 4
NFSv4.1: Ensure we clear session state flags after a session creation
NFSv4.1: Convert a trivial printk into a dprintk
NFSv4: Fix up decode_attr_mdsthreshold
NFSv4: Fix an Oops in the open recovery code
NFSv4.1: Fix a request leak on the back channel
Linus Torvalds [Sat, 16 Jun 2012 00:35:01 +0000 (17:35 -0700)]
Merge branch 'fixes-for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping
Pull DMA-mapping fixes from Marek Szyprowski:
"A set of minor fixes for dma-mapping code (ARM and x86) required for
Contiguous Memory Allocator (CMA) patches merged in v3.5-rc1."
* 'fixes-for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
x86: dma-mapping: fix broken allocation when dma_mask has been provided
ARM: dma-mapping: fix debug messages in dmabounce code
ARM: mm: fix type of the arm_dma_limit global variable
ARM: dma-mapping: Add missing static storage class specifier
Linus Torvalds [Sat, 16 Jun 2012 00:28:20 +0000 (17:28 -0700)]
Merge tag 'for-linus' of git://git./linux/kernel/git/paulus/powerpc
Pull PowerPC fix from Paul Mackerras:
"Just one commit, and a one-liner at that, but an important one;
without it hard_irq_disable() does nothing on powerpc."
* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
Make hard_irq_disable() actually hard-disable interrupts
Linus Torvalds [Sat, 16 Jun 2012 00:27:31 +0000 (17:27 -0700)]
Merge branch 'for-3.5' of git://linux-nfs.org/~bfields/linux
Pull two nfsd bugfixes from J. Bruce Fields.
* 'for-3.5' of git://linux-nfs.org/~bfields/linux:
nfsd4: BUG_ON(!is_spin_locked()) no good on UP kernels
NFS: hard-code init_net for NFS callback transports
Linus Torvalds [Sat, 16 Jun 2012 00:17:15 +0000 (17:17 -0700)]
Merge tag 'stable/for-linus-3.5-rc2-tag' of git://git./linux/kernel/git/konrad/xen
Pull five Xen bug-fixes from Konrad Rzeszutek Wilk:
- When booting as PVHVM we would try to use PV console - but would not validate
the parameters causing us to crash during restore b/c we re-use the wrong event
channel.
- When booting on machines with SR-IOV PCI bridge we didn't check for the bridge
and tried to use it.
- Under AMD machines would advertise the APERFMPERF resulting in needless amount
of MSRs from the guest.
- A global value (xen_released_pages) was not subtracted at bootup when pages
were added back in. This resulted in the balloon worker having the wrong
account of how many pages were truly released.
- Fix dead-lock when xen-blkfront is run in the same domain as xen-blkback.
* tag 'stable/for-linus-3.5-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
xen: mark local pages as FOREIGN in the m2p_override
xen/setup: filter APERFMPERF cpuid feature out
xen/balloon: Subtract from xen_released_pages the count that is populated.
xen/pci: Check for PCI bridge before using it.
xen/events: Add WARN_ON when quick lookup found invalid type.
xen/hvc: Check HVM_PARAM_CONSOLE_[EVTCHN|PFN] for correctness.
xen/hvc: Fix error cases around HVM_PARAM_CONSOLE_PFN
xen/hvc: Collapse error logic.
Linus Torvalds [Sat, 16 Jun 2012 00:10:02 +0000 (17:10 -0700)]
Merge tag 'usb-3.5-rc3' of git://git./linux/kernel/git/gregkh/usb
Pull USB fixes from Greg Kroah-Hartman:
"Here are a bunch of tiny fixes for the USB core and drivers for
3.5-rc3
A bunch of gadget fixes, and new device ids, as well as some fixes for
a number of different regressions that have been reported recently.
We also fixed some PCI host controllers to resolve a long-standing bug
with a whole class of host controllers that have been plaguing people
for a number of kernel releases, preventing their systems from
suspending properly.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
* tag 'usb-3.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (41 commits)
USB: fix gathering of interface associations
usb: ehci-sh: fix illegal phy_init() running when platform_data is NULL
usb: cdc-acm: fix devices not unthrottled on open
Fix OMAP EHCI suspend/resume failure (i693)
USB: ohci-hub: Mark ohci_finish_controller_resume() as __maybe_unused
usb: use usb_serial_put in usb_serial_probe errors
USB: EHCI: Fix build warning in xilinx ehci driver
USB: fix PS3 EHCI systems
xHCI: Increase the timeout for controller save/restore state operation
xhci: Don't free endpoints in xhci_mem_cleanup()
xhci: Fix invalid loop check in xhci_free_tt_info()
xhci: Fix error path return value.
USB: Checking the wrong variable in usb_disable_lpm()
usb-storage: Add 090c:1000 to unusal-devs
USB: serial-generic: use a single set of device IDs
USB: serial: Enforce USB driver and USB serial driver match
USB: add NO_D3_DURING_SLEEP flag and revert
151b61284776be2
USB: option: add more YUGA device ids
USB: mos7840: Fix compilation of usb serial driver
USB: option: fix memory leak
...
Linus Torvalds [Sat, 16 Jun 2012 00:07:48 +0000 (17:07 -0700)]
Merge git://git./linux/kernel/git/davem/ide
Pull IDE fixes from David S. Miller:
1) Two fixes to icside, one for a build failure and another for a
warning. From Christian Dietrich.
2) Fix a bit operation that did erroneous masking, from Julia Lawall.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
drivers/ide/ide-cs.c: adjust suspicious bit operation
ide: icside.c: fix printk format string compile warning
ide: icside.c: Fix compile with CONFIG_BLK_DEV_IDEDMA_ICS=n