summaryrefslogtreecommitdiff
path: root/drivers/video/sh_mobile_lcdcfb.h
AgeCommit message (Collapse)Author
2012-11-21fbdev: sh_mobile_lcdc: Store the backlight brightness internallyLaurent Pinchart
There's no need to query the hardware for the currenty brightness value through a platform data callback when we can cache the value internally in the LCDC driver. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-07-19fbdev: sh_mobile_lcdc: Fix pan offset computation in YUV modeLaurent Pinchart
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>
2012-07-19sh_mobile_meram: Rename operations to cache_[alloc|free|update]Laurent Pinchart
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>
2012-05-22fbdev: sh_mobile_lcdc: Don't confuse line size with pitchLaurent Pinchart
When using the MERAM the LCDC line size needs to be programmed with a MERAM-specific value different than the real frame buffer pitch. Fix it. Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: stable@vger.kernel.org # for 3.4 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-12fbdev: sh_mobile_lcdc: Don't store copy of platform dataLaurent Pinchart
Instead of copying the whole platform data structure to struct sh_mobile_lcdc_chan, store a const pointer to the channel platform data. MERAM configuration information needs to be changed at runtime, so copy it to struct sh_mobile_lcdc_chan. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_meram: Allocate ICBs automaticallyLaurent Pinchart
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-12fbdev: sh_mobile_lcdc: Store configuration in channel structureLaurent Pinchart
Store the frame buffer configuration (colorspace, visible/virtual horizontal and vertical resolutions and line pitch) in the sh_mobile_lcdc_chan structure, and use it instead of accessing fb_info. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_lcdc: Split fb init/cleanup from channel init/cleanupLaurent Pinchart
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_lcdc: Store the format in struct sh_mobile_lcdc_chanLaurent Pinchart
Store the active format in the channel structure, and use it instead of parsing info->var all over the place when the format is needed. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_lcdc: Reorganize the sh_mobile_lcdc_chan structureLaurent Pinchart
Group fields by purpose, and make the separation between core fields and FB-related fields clear. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_lcdc: Store display mode in a struct fb_videomodeLaurent Pinchart
Embed struct fb_videomode instead of struct fb_var_screeninfo in struct sh_mobile_lcdc_chan to store the display mode. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_hdmi: Don't access LCDC fb_infoLaurent Pinchart
The LCDC fb_info structure is only used to retrieve the default video mode in case none of the modes advertised by EDID information is acceptable. Pass a pointer to the default mode through the sh_mobile_lcdc_entity structure instead. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_lcdc: Pass a video mode to the notify callbackLaurent Pinchart
Pass pointers to struct fb_videomode and struct fb_monspecs instead of struct fb_var_screeninfo to the notify callback. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12sh_mobile_lcdc: Add display notify callback to sh_mobile_lcdc_chanLaurent Pinchart
The callback implements 3 notification events: - SH_MOBILE_LCDC_EVENT_DISPLAY_CONNECT notifies the LCDC that the display has been connected - SH_MOBILE_LCDC_EVENT_DISPLAY_DISCONNECT notifies the LCDC that the display has been disconnected - SH_MOBILE_LCDC_EVENT_DISPLAY_MODE notifies that LCDC that a display mode has been detected Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_lcdc: Return display connection state in display_onLaurent Pinchart
Return true if the display is connected and false otherwise. Set the fb info state to FBINFO_STATE_SUSPENDED in the sh_mobile_lcdc driver when the display is not connected. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_lcdc: Remove fb_info parameter to display_on operationLaurent Pinchart
The parameter is unused, remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12sh_mobile_lcdc: Add an lcdc channel pointer to sh_mobile_lcdc_entityLaurent Pinchart
The field will be used by the transmitter drivers to access sh_mobile_lcdc_chan fields such as fb_info. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_lcdc: Handle HDMI/MIPI transmitter device directlyLaurent Pinchart
Pass a pointer to the transmitter device through platform data, retrieve the corresponding sh_mobile_lcdc_entity structure in the probe method and call the transmitter display_on/off methods directly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12fbdev: sh_mobile_lcdc: Add sh_mobile_lcdc_entity definitionLaurent Pinchart
The sh_mobile_lcdc_entity structure will be used to abstract operations performed by transceivers (such as MIPI/DSI and HDMI). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2011-08-19fbdev: sh_mobile_lcdc: Restart LCDC in runtime PM resume handlerLaurent Pinchart
Instead of restoring registers blindly, restart the LCDC by going through the startup sequence when resuming from runtime PM suspend. All registers are now correctly initialized in the right order. As a side effect, this also gets rid fo a possible panning restore issue caused by always saving the frame buffer base address registers from set A instead of the currently active set. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2011-08-19fbdev: sh_mobile_lcdc: Split LCDC start code from sh_mobile_lcdc_startLaurent Pinchart
Splitting the LCDC start code from clock, MERAM and panel management will make the code usable by runtime PM. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2011-05-23sh_mobile_meram: MERAM framework for LCDCDamian
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-03-29Merge branch 'common/fbdev' of ↵Paul Mundt
master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
2011-03-29fbdev: sh_mobile_lcdcfb: add blanking supportAlexandre Courbot
Add a blanking callback to the LCDC driver in order to support both FBIOBLANK and TIOCLINUX blanking ioctls. LCDC clocks are also released if the requested blanking level is superior to FB_BLANK_NORMAL, to allow runtime PM to disable the clocks if possible. Signed-off-by: Alexandre Courbot <gnurou@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-16fbdev: sh_mobile_lcdc: Add YUV framebuffer supportDamian Hobson-Garcia
Supports YCbCr420sp, YCbCr422sp, and YCbCr44sp, formats (bpp = 12, 16, and 24) respectively. When double-buffering both Y planes appear before the C planes (Y-Y-C-C), as opposed to Y-C-Y-C. Set .nonstd in struct sh_mobile_lcdc_chan_cfg to enable YUV mode, and use .bpp to distiguish between the 3 modes. The value of .nonstd is copied to bits 16-31 of LDDFR in the LCDC and should be set accordingly. .nonstd must be set to 0 for RGB mode. Due to the encoding of YUV data, the framebuffer will clear to green instead of black. In YUV 420 mode, panning is only possible in 2 line increments. Additionally in YUV 420 mode the vertical resolution of the framebuffer must be an even number. Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-10fbdev: sh_mobile_lcdcfb: add backlight supportAlexandre Courbot
Support for backlight devices controlled through board-specific routines. Backlights can be defined per-channel and follow fbdev directives to switch off as the LCD blanks or is turned on/off. Signed-off-by: Alexandre Courbot <gnurou@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-09-16fbdev: sh_mobile_lcdc: reconfigure the framebuffer, when freeGuennadi Liakhovetski
Currently the sh_mobile_lcdc driver only reconfigures the hardware interface, when a new monitor is plugged in. This patch adds support for dynamic framebuffer reconfiguration, when no user is holding the framebuffer device node open. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-09-14fbdev: sh_mobile_lcdcfb: separate display variable data from framebuffer dataGuennadi Liakhovetski
This is a preparation for a patch, that shall allow displaying of a smaller framebuffer on a bigger display and of a part of a bigger framebuffer on a smaller display. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-09-14fbdev: sh_mobile_hdmi: implement lockingGuennadi Liakhovetski
The SH-Mobile HDMI driver runs in several contexts: ISR, delayed work-queue, task context, when called from the sh_mobile_lcdc framebuffer driver. This creates ample race possibilities. Even though most these races are purely theoretical, it is better to close them. To trace fb_info validity we install a notification callback in the HDMI driver, and the only way for it to get to driver internal data is by using struct sh_mobile_lcdc_chan, therefore it had to be extracted into a separate common header. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>