Commit Graph

10 Commits

Author SHA1 Message Date
Laurent Pinchart cdf88b9072 fbdev: sh_mobile_meram: Remove unneeded sanity checks
The meram_register(), meram_unregister() and meram_update() operations
check that the pointers they get from the caller are not NULL. Those
checks can be remove, as the caller already ensures that the pointers
are valid.

The platform sanity checks can also be removed, as the operations can't
be accessed without valid platform data anyway.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12 22:41:14 +01:00
Laurent Pinchart 97d16fe69b fbdev: sh_mobile_meram: Don't perform update in register operation
Remove the RGB or Y/C base address update from the meram_register()
operation, as this belongs to the meram_update() operation.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12 22:41:13 +01:00
Laurent Pinchart d81d5fa8ad fbdev: sh_mobile_meram: Remove unused sh_mobile_meram_icb_cfg fields
The marker_icb and cache_icb fields are not used anymore, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12 22:41:12 +01:00
Laurent Pinchart 481100506b fbdev: sh_mobile_meram: Allocate ICBs automatically
Instead of manually specifying the ICBs to use in platform data,
allocate them automatically at runtime. The range of reserved ICBs (for
instance to be used through UIO), if any, is passed in the platform data
reserved_icbs field as a bitmask.

The MERAM registration function now returns a pointer to an opaque MERAM
object, which is passed to the update and unregistration functions.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12 22:41:11 +01:00
Laurent Pinchart 974d250be2 fbdev: sh_mobile_meram: Use genalloc to manage MERAM allocation
Instead of requiring the users to hardcode MERAM allocation in platform
data, allocate blocks at runtime using genalloc.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12 22:41:10 +01:00
Laurent Pinchart 2a618e0333 fbdev: sh_mobile_meram: Add struct sh_mobile_meram_icb
The new structure stores ICB parameters for ICBs.

Instead of modifying the struct sh_mobile_meram_cfg instances passed by
callers, store the ICB parameters internally and make the public API
take const pointers to sh_mobile_meram_cfg.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12 22:41:09 +01:00
Laurent Pinchart 05432837ae fbdev: sh_mobile_meram: Make variables unsigned where applicable
Many variables, such as loop counters, sizes and offsets, should be
unsigned integers. Make them so.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12 22:41:08 +01:00
Laurent Pinchart d272f428fa fbdev: sh_mobile_meram: Add _cfg suffix to struct sh_mobile_meram_icb
The structure describe ICB configuration, no ICB objects themselves.
Rename it to sh_mobile_meram_icb_cfg in preparation for the addition of
an ICB structure.

All the structure fields are unsigned integers, make them so.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12 22:41:08 +01: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