/* * Copyright (c) 2008, Google Inc. * All rights reserved. * * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #if PLATFORM_MSM7X30 #define MSM_MDP_BASE1 0xA3F00000 #define LCDC_BASE 0xC0000 #elif PLATFORM_MSM8X60 #define MSM_MDP_BASE1 0x05100000 #define LCDC_BASE 0xC0000 #define LCDC_FB_ADDR 0x43E00000 #else #define MSM_MDP_BASE1 0xAA200000 #define LCDC_BASE 0xE0000 #endif #define LCDC_PIXCLK_IN_PS 26 #define LCDC_FB_PHYS 0x16600000 #define LCDC_FB_BPP 16 #define BIT(x) (1<<(x)) #define DMA_DSTC0G_8BITS (BIT(1)|BIT(0)) #define DMA_DSTC1B_8BITS (BIT(3)|BIT(2)) #define DMA_DSTC2R_8BITS (BIT(5)|BIT(4)) #define CLR_G 0x0 #define CLR_B 0x1 #define CLR_R 0x2 #define MDP_GET_PACK_PATTERN(a,x,y,z,bit) (((a)<<(bit*3))|((x)<<(bit*2))|((y)<