Commit Graph

11 Commits

Author SHA1 Message Date
Laurent Pinchart
da6cf5125f sh_mobile_meram: Reset ICBs at unregistration time
When ICBs are unregistered and later reused they need to be reset to
avoid data corruption. Set the WBF, WF and RF bits to make sure ICBs get
reset properly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-09-05 16:37:13 +00:00
Laurent Pinchart
8a20974f03 fbdev: sh_mobile_meram: Remove unneeded sh_mobile_meram.h
The drivers/video/sh_mobile_meram.h header contains unused definitions
and declarations. Move the only used macro to sh_mobile_meram.c, and
remove the header.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2011-08-19 08:22:45 +02:00
Laurent Pinchart
d86d29df57 fbdev: sh_mobile_meram: Fix MExxCTL register save on runtime PM suspend
To reset the ICB on resume the MExxCTL register needs to be OR'ed with
MExxCTL_WBF | MExxCTL_WF | MExxCTL_RF, no set to that value. Fix this.

This fixes corruption at the bottom of the display when resuming from
runtime PM.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2011-08-19 08:22:44 +02:00
Laurent Pinchart
7963e21e50 fbdev: sh_mobile_meram: Validate ICB configuration outside mutex
Validate as much of the requested ICB configuration as possible outside
of the mutex-protected region when registering ICBs.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2011-08-19 08:22:43 +02:00
Laurent Pinchart
f0a260fef6 fbdev: sh_mobile_meram: Replace hardcoded register values with macros
Instead of hardcoding register values through the driver, define macros
for individual register bits using the register name and the bit name,
and use the macros.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2011-08-19 08:22:42 +02:00
Damian Hobson-Garcia
0b3bb77c3a fbdev: sh_mobile_meram: Backup/restore device registers on shutdown/resume
Save and reconfigure the MERAM registers when the MERAM is powered down
and restored

Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
2011-08-19 08:11:18 +02:00
Damian Hobson-Garcia
0aa492be88 fbdev: sh_mobile_meram: Move private data from .h to .c
There is no reason for sh_mobile_meram_priv to be in the .h file
since it should be private to sh_mobile_meram.c

Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
2011-08-19 08:11:16 +02:00
Damian Hobson-Garcia
176737782e fbdev: sh_mobile_meram: Enable runtime PM
Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
2011-08-19 08:11:11 +02:00
Damian Hobson-Garcia
06c8a6a3e4 fbdev: sh_mobile_meram: Correct pointer check for YCbCr chroma plane
The check was intended to test if we have a valid pointer to write into,
but it mistakenly checks the pointer contents instead.

Since a valid pointer is mandatory for the chroma data if a YCbCr format
is used, the pointer check has been removed.

Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-06-24 16:40:28 +09:00
Damian
3fedd2ac76 sh_mobile_meram: Add support for NV24 framebuffers
Since the NV24 framebuffer has a CbCr plane that is twice as wide
as the Y plane, it needs to be handled as a special case.

Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-23 16:06:26 +09:00
Damian
7caa4342ca sh_mobile_meram: MERAM framework for LCDC
Based on the patch by Takanari Hayama <taki@igel.co.jp>

Adds support framework necessary to use Media RAM (MERAM)
caching functionality with the LCDC.  The MERAM is accessed
through up to 4 Interconnect Buffers (ICBs).

ICB numbers and MERAM address ranges to use are specified in
by filling in the .meram_cfg member of the LCDC platform data

Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-05-23 16:06:24 +09:00