You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge tag 'fbdev-updates-for-3.6' of git://github.com/schandinat/linux-2.6
Pull fbdev updates from Florian Tobias Schandinat:
- large updates for OMAP
- support for LCD3 overlay manager (omap5)
- omapdss output cleanup
- removal of passive matrix LCD support as there are no drivers for
such panels for DSS or DSS2 and nobody complained (cleanup)
- large updates for SH Mobile
- overlay support
- separating MERAM (cache) from framebuffer driver
- some updates for Exynos and da8xx-fb
- various other small patches
* tag 'fbdev-updates-for-3.6' of git://github.com/schandinat/linux-2.6: (78 commits)
da8xx-fb: fix compile issue due to missing include
fbdev: Make pixel_to_pat() failure mode more friendly
da8xx-fb: do not turn ON LCD backlight unless LCDC is enabled
fbdev: sh_mobile_lcdc: Fix vertical panning step
video: exynos mipi dsi: Fix mipi dsi regulators handling issue
video: da8xx-fb: do clock reset of revision 2 LCDC before enabling
arm: da850: configure LCDC fifo threshold
video: da8xx-fb: configure FIFO threshold to reduce underflow errors
video: da8xx-fb: fix flicker due to 1 frame delay in updated frame
video: da8xx-fb rev2: fix disabling of palette completion interrupt
da8xx-fb: add missing FB_BLANK operations
video: exynos_dp: use usleep_range instead of delay
video: exynos_dp: check the only INTERLANE_ALIGN_DONE bit during Link Training
fb: epson1355fb: Fix section mismatch
video: exynos_dp: fix wrong DPCD address during Link Training
video/smscufx: fix line counting in fb_write
aty128fb: Fix coding style issues
fbdev: sh_mobile_lcdc: Fix pan offset computation in YUV mode
fbdev: sh_mobile_lcdc: Fix overlay registers update during pan operation
fbdev: sh_mobile_lcdc: Support horizontal panning
...
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
What: /sys/devices/platform/sh_mobile_lcdc_fb.[0-3]/graphics/fb[0-9]/ovl_alpha
|
||||
Date: May 2012
|
||||
Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
||||
Description:
|
||||
This file is only available on fb[0-9] devices corresponding
|
||||
to overlay planes.
|
||||
|
||||
Stores the alpha blending value for the overlay. Values range
|
||||
from 0 (transparent) to 255 (opaque). The value is ignored if
|
||||
the mode is not set to Alpha Blending.
|
||||
|
||||
What: /sys/devices/platform/sh_mobile_lcdc_fb.[0-3]/graphics/fb[0-9]/ovl_mode
|
||||
Date: May 2012
|
||||
Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
||||
Description:
|
||||
This file is only available on fb[0-9] devices corresponding
|
||||
to overlay planes.
|
||||
|
||||
Selects the composition mode for the overlay. Possible values
|
||||
are
|
||||
|
||||
0 - Alpha Blending
|
||||
1 - ROP3
|
||||
|
||||
What: /sys/devices/platform/sh_mobile_lcdc_fb.[0-3]/graphics/fb[0-9]/ovl_position
|
||||
Date: May 2012
|
||||
Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
||||
Description:
|
||||
This file is only available on fb[0-9] devices corresponding
|
||||
to overlay planes.
|
||||
|
||||
Stores the x,y overlay position on the display in pixels. The
|
||||
position format is `[0-9]+,[0-9]+'.
|
||||
|
||||
What: /sys/devices/platform/sh_mobile_lcdc_fb.[0-3]/graphics/fb[0-9]/ovl_rop3
|
||||
Date: May 2012
|
||||
Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
||||
Description:
|
||||
This file is only available on fb[0-9] devices corresponding
|
||||
to overlay planes.
|
||||
|
||||
Stores the raster operation (ROP3) for the overlay. Values
|
||||
range from 0 to 255. The value is ignored if the mode is not
|
||||
set to ROP3.
|
||||
@@ -546,6 +546,7 @@ static struct lcd_ctrl_config lcd_cfg = {
|
||||
.sync_edge = 0,
|
||||
.sync_ctrl = 1,
|
||||
.raster_order = 0,
|
||||
.fifo_th = 6,
|
||||
};
|
||||
|
||||
struct da8xx_lcdc_platform_data sharp_lcd035q3dg01_pdata = {
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#define DISPC_CONTROL 0x0040
|
||||
#define DISPC_CONTROL2 0x0238
|
||||
#define DISPC_CONTROL3 0x0848
|
||||
#define DISPC_IRQSTATUS 0x0018
|
||||
|
||||
#define DSS_SYSCONFIG 0x10
|
||||
@@ -52,6 +53,7 @@
|
||||
#define EVSYNC_EVEN_IRQ_SHIFT 2
|
||||
#define EVSYNC_ODD_IRQ_SHIFT 3
|
||||
#define FRAMEDONE2_IRQ_SHIFT 22
|
||||
#define FRAMEDONE3_IRQ_SHIFT 30
|
||||
#define FRAMEDONETV_IRQ_SHIFT 24
|
||||
|
||||
/*
|
||||
@@ -376,7 +378,7 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
|
||||
static void dispc_disable_outputs(void)
|
||||
{
|
||||
u32 v, irq_mask = 0;
|
||||
bool lcd_en, digit_en, lcd2_en = false;
|
||||
bool lcd_en, digit_en, lcd2_en = false, lcd3_en = false;
|
||||
int i;
|
||||
struct omap_dss_dispc_dev_attr *da;
|
||||
struct omap_hwmod *oh;
|
||||
@@ -405,7 +407,13 @@ static void dispc_disable_outputs(void)
|
||||
lcd2_en = v & LCD_EN_MASK;
|
||||
}
|
||||
|
||||
if (!(lcd_en | digit_en | lcd2_en))
|
||||
/* store value of LCDENABLE for LCD3 */
|
||||
if (da->manager_count > 3) {
|
||||
v = omap_hwmod_read(oh, DISPC_CONTROL3);
|
||||
lcd3_en = v & LCD_EN_MASK;
|
||||
}
|
||||
|
||||
if (!(lcd_en | digit_en | lcd2_en | lcd3_en))
|
||||
return; /* no managers currently enabled */
|
||||
|
||||
/*
|
||||
@@ -426,10 +434,12 @@ static void dispc_disable_outputs(void)
|
||||
|
||||
if (lcd2_en)
|
||||
irq_mask |= 1 << FRAMEDONE2_IRQ_SHIFT;
|
||||
if (lcd3_en)
|
||||
irq_mask |= 1 << FRAMEDONE3_IRQ_SHIFT;
|
||||
|
||||
/*
|
||||
* clear any previous FRAMEDONE, FRAMEDONETV,
|
||||
* EVSYNC_EVEN/ODD or FRAMEDONE2 interrupts
|
||||
* EVSYNC_EVEN/ODD, FRAMEDONE2 or FRAMEDONE3 interrupts
|
||||
*/
|
||||
omap_hwmod_write(irq_mask, oh, DISPC_IRQSTATUS);
|
||||
|
||||
@@ -445,12 +455,19 @@ static void dispc_disable_outputs(void)
|
||||
omap_hwmod_write(v, oh, DISPC_CONTROL2);
|
||||
}
|
||||
|
||||
/* disable LCD3 manager */
|
||||
if (da->manager_count > 3) {
|
||||
v = omap_hwmod_read(oh, DISPC_CONTROL3);
|
||||
v &= ~LCD_EN_MASK;
|
||||
omap_hwmod_write(v, oh, DISPC_CONTROL3);
|
||||
}
|
||||
|
||||
i = 0;
|
||||
while ((omap_hwmod_read(oh, DISPC_IRQSTATUS) & irq_mask) !=
|
||||
irq_mask) {
|
||||
i++;
|
||||
if (i > FRAMEDONE_IRQ_TIMEOUT) {
|
||||
pr_err("didn't get FRAMEDONE1/2 or TV interrupt\n");
|
||||
pr_err("didn't get FRAMEDONE1/2/3 or TV interrupt\n");
|
||||
break;
|
||||
}
|
||||
mdelay(1);
|
||||
|
||||
@@ -90,7 +90,8 @@
|
||||
#undef DEBUG
|
||||
|
||||
#ifdef DEBUG
|
||||
#define DBG(fmt, args...) printk(KERN_DEBUG "aty128fb: %s " fmt, __func__, ##args);
|
||||
#define DBG(fmt, args...) \
|
||||
printk(KERN_DEBUG "aty128fb: %s " fmt, __func__, ##args);
|
||||
#else
|
||||
#define DBG(fmt, args...)
|
||||
#endif
|
||||
@@ -449,8 +450,9 @@ static int aty128_decode_var(struct fb_var_screeninfo *var,
|
||||
struct aty128fb_par *par);
|
||||
#if 0
|
||||
static void __devinit aty128_get_pllinfo(struct aty128fb_par *par,
|
||||
void __iomem *bios);
|
||||
static void __devinit __iomem *aty128_map_ROM(struct pci_dev *pdev, const struct aty128fb_par *par);
|
||||
void __iomem *bios);
|
||||
static void __devinit __iomem *aty128_map_ROM(struct pci_dev *pdev,
|
||||
const struct aty128fb_par *par);
|
||||
#endif
|
||||
static void aty128_timings(struct aty128fb_par *par);
|
||||
static void aty128_init_engine(struct aty128fb_par *par);
|
||||
@@ -779,7 +781,8 @@ static u32 depth_to_dst(u32 depth)
|
||||
|
||||
|
||||
#ifndef __sparc__
|
||||
static void __iomem * __devinit aty128_map_ROM(const struct aty128fb_par *par, struct pci_dev *dev)
|
||||
static void __iomem * __devinit aty128_map_ROM(const struct aty128fb_par *par,
|
||||
struct pci_dev *dev)
|
||||
{
|
||||
u16 dptr;
|
||||
u8 rom_type;
|
||||
@@ -811,13 +814,14 @@ static void __iomem * __devinit aty128_map_ROM(const struct aty128fb_par *par, s
|
||||
/* Look for the PCI data to check the ROM type */
|
||||
dptr = BIOS_IN16(0x18);
|
||||
|
||||
/* Check the PCI data signature. If it's wrong, we still assume a normal x86 ROM
|
||||
* for now, until I've verified this works everywhere. The goal here is more
|
||||
* to phase out Open Firmware images.
|
||||
/* Check the PCI data signature. If it's wrong, we still assume a normal
|
||||
* x86 ROM for now, until I've verified this works everywhere.
|
||||
* The goal here is more to phase out Open Firmware images.
|
||||
*
|
||||
* Currently, we only look at the first PCI data, we could iteratre and deal with
|
||||
* them all, and we should use fb_bios_start relative to start of image and not
|
||||
* relative start of ROM, but so far, I never found a dual-image ATI card
|
||||
* Currently, we only look at the first PCI data, we could iteratre and
|
||||
* deal with them all, and we should use fb_bios_start relative to start
|
||||
* of image and not relative start of ROM, but so far, I never found a
|
||||
* dual-image ATI card.
|
||||
*
|
||||
* typedef struct {
|
||||
* u32 signature; + 0x00
|
||||
@@ -852,7 +856,8 @@ static void __iomem * __devinit aty128_map_ROM(const struct aty128fb_par *par, s
|
||||
printk(KERN_INFO "aty128fb: Found HP PA-RISC ROM Image\n");
|
||||
goto failed;
|
||||
default:
|
||||
printk(KERN_INFO "aty128fb: Found unknown type %d ROM Image\n", rom_type);
|
||||
printk(KERN_INFO "aty128fb: Found unknown type %d ROM Image\n",
|
||||
rom_type);
|
||||
goto failed;
|
||||
}
|
||||
anyway:
|
||||
@@ -863,7 +868,8 @@ static void __iomem * __devinit aty128_map_ROM(const struct aty128fb_par *par, s
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void __devinit aty128_get_pllinfo(struct aty128fb_par *par, unsigned char __iomem *bios)
|
||||
static void __devinit aty128_get_pllinfo(struct aty128fb_par *par,
|
||||
unsigned char __iomem *bios)
|
||||
{
|
||||
unsigned int bios_hdr;
|
||||
unsigned int bios_pll;
|
||||
@@ -1247,10 +1253,13 @@ static int aty128_crtc_to_var(const struct aty128_crtc *crtc,
|
||||
static void aty128_set_crt_enable(struct aty128fb_par *par, int on)
|
||||
{
|
||||
if (on) {
|
||||
aty_st_le32(CRTC_EXT_CNTL, aty_ld_le32(CRTC_EXT_CNTL) | CRT_CRTC_ON);
|
||||
aty_st_le32(DAC_CNTL, (aty_ld_le32(DAC_CNTL) | DAC_PALETTE2_SNOOP_EN));
|
||||
aty_st_le32(CRTC_EXT_CNTL, aty_ld_le32(CRTC_EXT_CNTL) |
|
||||
CRT_CRTC_ON);
|
||||
aty_st_le32(DAC_CNTL, (aty_ld_le32(DAC_CNTL) |
|
||||
DAC_PALETTE2_SNOOP_EN));
|
||||
} else
|
||||
aty_st_le32(CRTC_EXT_CNTL, aty_ld_le32(CRTC_EXT_CNTL) & ~CRT_CRTC_ON);
|
||||
aty_st_le32(CRTC_EXT_CNTL, aty_ld_le32(CRTC_EXT_CNTL) &
|
||||
~CRT_CRTC_ON);
|
||||
}
|
||||
|
||||
static void aty128_set_lcd_enable(struct aty128fb_par *par, int on)
|
||||
@@ -1281,7 +1290,8 @@ static void aty128_set_lcd_enable(struct aty128fb_par *par, int on)
|
||||
}
|
||||
}
|
||||
|
||||
static void aty128_set_pll(struct aty128_pll *pll, const struct aty128fb_par *par)
|
||||
static void aty128_set_pll(struct aty128_pll *pll,
|
||||
const struct aty128fb_par *par)
|
||||
{
|
||||
u32 div3;
|
||||
|
||||
@@ -1366,7 +1376,8 @@ static int aty128_var_to_pll(u32 period_in_ps, struct aty128_pll *pll,
|
||||
}
|
||||
|
||||
|
||||
static int aty128_pll_to_var(const struct aty128_pll *pll, struct fb_var_screeninfo *var)
|
||||
static int aty128_pll_to_var(const struct aty128_pll *pll,
|
||||
struct fb_var_screeninfo *var)
|
||||
{
|
||||
var->pixclock = 100000000 / pll->vclk;
|
||||
|
||||
@@ -1512,7 +1523,8 @@ static int aty128fb_set_par(struct fb_info *info)
|
||||
* encode/decode the User Defined Part of the Display
|
||||
*/
|
||||
|
||||
static int aty128_decode_var(struct fb_var_screeninfo *var, struct aty128fb_par *par)
|
||||
static int aty128_decode_var(struct fb_var_screeninfo *var,
|
||||
struct aty128fb_par *par)
|
||||
{
|
||||
int err;
|
||||
struct aty128_crtc crtc;
|
||||
@@ -1559,7 +1571,8 @@ static int aty128_encode_var(struct fb_var_screeninfo *var,
|
||||
}
|
||||
|
||||
|
||||
static int aty128fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
|
||||
static int aty128fb_check_var(struct fb_var_screeninfo *var,
|
||||
struct fb_info *info)
|
||||
{
|
||||
struct aty128fb_par par;
|
||||
int err;
|
||||
@@ -1575,7 +1588,8 @@ static int aty128fb_check_var(struct fb_var_screeninfo *var, struct fb_info *inf
|
||||
/*
|
||||
* Pan or Wrap the Display
|
||||
*/
|
||||
static int aty128fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *fb)
|
||||
static int aty128fb_pan_display(struct fb_var_screeninfo *var,
|
||||
struct fb_info *fb)
|
||||
{
|
||||
struct aty128fb_par *par = fb->par;
|
||||
u32 xoffset, yoffset;
|
||||
@@ -1594,7 +1608,8 @@ static int aty128fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *f
|
||||
par->crtc.xoffset = xoffset;
|
||||
par->crtc.yoffset = yoffset;
|
||||
|
||||
offset = ((yoffset * par->crtc.vxres + xoffset)*(par->crtc.bpp >> 3)) & ~7;
|
||||
offset = ((yoffset * par->crtc.vxres + xoffset) * (par->crtc.bpp >> 3))
|
||||
& ~7;
|
||||
|
||||
if (par->crtc.bpp == 24)
|
||||
offset += 8 * (offset % 3); /* Must be multiple of 8 and 3 */
|
||||
@@ -1620,11 +1635,13 @@ static void aty128_st_pal(u_int regno, u_int red, u_int green, u_int blue,
|
||||
* do mirroring
|
||||
*/
|
||||
|
||||
aty_st_le32(DAC_CNTL, aty_ld_le32(DAC_CNTL) | DAC_PALETTE_ACCESS_CNTL);
|
||||
aty_st_le32(DAC_CNTL, aty_ld_le32(DAC_CNTL) |
|
||||
DAC_PALETTE_ACCESS_CNTL);
|
||||
aty_st_8(PALETTE_INDEX, regno);
|
||||
aty_st_le32(PALETTE_DATA, (red<<16)|(green<<8)|blue);
|
||||
#endif
|
||||
aty_st_le32(DAC_CNTL, aty_ld_le32(DAC_CNTL) & ~DAC_PALETTE_ACCESS_CNTL);
|
||||
aty_st_le32(DAC_CNTL, aty_ld_le32(DAC_CNTL) &
|
||||
~DAC_PALETTE_ACCESS_CNTL);
|
||||
}
|
||||
|
||||
aty_st_8(PALETTE_INDEX, regno);
|
||||
@@ -1753,7 +1770,8 @@ static int aty128_bl_update_status(struct backlight_device *bd)
|
||||
aty_st_le32(LVDS_GEN_CNTL, reg);
|
||||
}
|
||||
reg &= ~LVDS_BL_MOD_LEVEL_MASK;
|
||||
reg |= (aty128_bl_get_level_brightness(par, level) << LVDS_BL_MOD_LEVEL_SHIFT);
|
||||
reg |= (aty128_bl_get_level_brightness(par, level) <<
|
||||
LVDS_BL_MOD_LEVEL_SHIFT);
|
||||
#ifdef BACKLIGHT_LVDS_OFF
|
||||
reg |= LVDS_ON | LVDS_EN;
|
||||
reg &= ~LVDS_DISPLAY_DIS;
|
||||
@@ -1764,7 +1782,8 @@ static int aty128_bl_update_status(struct backlight_device *bd)
|
||||
#endif
|
||||
} else {
|
||||
reg &= ~LVDS_BL_MOD_LEVEL_MASK;
|
||||
reg |= (aty128_bl_get_level_brightness(par, 0) << LVDS_BL_MOD_LEVEL_SHIFT);
|
||||
reg |= (aty128_bl_get_level_brightness(par, 0) <<
|
||||
LVDS_BL_MOD_LEVEL_SHIFT);
|
||||
#ifdef BACKLIGHT_LVDS_OFF
|
||||
reg |= LVDS_DISPLAY_DIS;
|
||||
aty_st_le32(LVDS_GEN_CNTL, reg);
|
||||
@@ -1869,7 +1888,8 @@ static void aty128_early_resume(void *data)
|
||||
}
|
||||
#endif /* CONFIG_PPC_PMAC */
|
||||
|
||||
static int __devinit aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
static int __devinit aty128_init(struct pci_dev *pdev,
|
||||
const struct pci_device_id *ent)
|
||||
{
|
||||
struct fb_info *info = pci_get_drvdata(pdev);
|
||||
struct aty128fb_par *par = info->par;
|
||||
@@ -1887,7 +1907,8 @@ static int __devinit aty128_init(struct pci_dev *pdev, const struct pci_device_i
|
||||
|
||||
/* range check to make sure */
|
||||
if (ent->driver_data < ARRAY_SIZE(r128_family))
|
||||
strlcat(video_card, r128_family[ent->driver_data], sizeof(video_card));
|
||||
strlcat(video_card, r128_family[ent->driver_data],
|
||||
sizeof(video_card));
|
||||
|
||||
printk(KERN_INFO "aty128fb: %s [chip rev 0x%x] ", video_card, chip_rev);
|
||||
|
||||
@@ -1911,11 +1932,11 @@ static int __devinit aty128_init(struct pci_dev *pdev, const struct pci_device_i
|
||||
/* Indicate sleep capability */
|
||||
if (par->chip_gen == rage_M3) {
|
||||
pmac_call_feature(PMAC_FTR_DEVICE_CAN_WAKE, NULL, 0, 1);
|
||||
#if 0 /* Disable the early video resume hack for now as it's causing problems, among
|
||||
* others we now rely on the PCI core restoring the config space for us, which
|
||||
* isn't the case with that hack, and that code path causes various things to
|
||||
* be called with interrupts off while they shouldn't. I'm leaving the code in
|
||||
* as it can be useful for debugging purposes
|
||||
#if 0 /* Disable the early video resume hack for now as it's causing problems,
|
||||
* among others we now rely on the PCI core restoring the config space
|
||||
* for us, which isn't the case with that hack, and that code path causes
|
||||
* various things to be called with interrupts off while they shouldn't.
|
||||
* I'm leaving the code in as it can be useful for debugging purposes
|
||||
*/
|
||||
pmac_set_early_video_resume(aty128_early_resume, par);
|
||||
#endif
|
||||
@@ -1953,11 +1974,11 @@ static int __devinit aty128_init(struct pci_dev *pdev, const struct pci_device_i
|
||||
default_vmode = VMODE_1152_768_60;
|
||||
|
||||
if (default_cmode > 16)
|
||||
default_cmode = CMODE_32;
|
||||
default_cmode = CMODE_32;
|
||||
else if (default_cmode > 8)
|
||||
default_cmode = CMODE_16;
|
||||
default_cmode = CMODE_16;
|
||||
else
|
||||
default_cmode = CMODE_8;
|
||||
default_cmode = CMODE_8;
|
||||
|
||||
if (mac_vmode_to_var(default_vmode, default_cmode, &var))
|
||||
var = default_var;
|
||||
@@ -2018,7 +2039,8 @@ static int __devinit aty128_init(struct pci_dev *pdev, const struct pci_device_i
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
/* register a card ++ajoshi */
|
||||
static int __devinit aty128_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
static int __devinit aty128_probe(struct pci_dev *pdev,
|
||||
const struct pci_device_id *ent)
|
||||
{
|
||||
unsigned long fb_addr, reg_addr;
|
||||
struct aty128fb_par *par;
|
||||
@@ -2318,39 +2340,39 @@ static inline void aty128_rectcopy(int srcx, int srcy, int dstx, int dsty,
|
||||
u_int width, u_int height,
|
||||
struct fb_info_aty128 *par)
|
||||
{
|
||||
u32 save_dp_datatype, save_dp_cntl, dstval;
|
||||
u32 save_dp_datatype, save_dp_cntl, dstval;
|
||||
|
||||
if (!width || !height)
|
||||
return;
|
||||
if (!width || !height)
|
||||
return;
|
||||
|
||||
dstval = depth_to_dst(par->current_par.crtc.depth);
|
||||
if (dstval == DST_24BPP) {
|
||||
srcx *= 3;
|
||||
dstx *= 3;
|
||||
width *= 3;
|
||||
} else if (dstval == -EINVAL) {
|
||||
printk("aty128fb: invalid depth or RGBA\n");
|
||||
return;
|
||||
}
|
||||
dstval = depth_to_dst(par->current_par.crtc.depth);
|
||||
if (dstval == DST_24BPP) {
|
||||
srcx *= 3;
|
||||
dstx *= 3;
|
||||
width *= 3;
|
||||
} else if (dstval == -EINVAL) {
|
||||
printk("aty128fb: invalid depth or RGBA\n");
|
||||
return;
|
||||
}
|
||||
|
||||
wait_for_fifo(2, par);
|
||||
save_dp_datatype = aty_ld_le32(DP_DATATYPE);
|
||||
save_dp_cntl = aty_ld_le32(DP_CNTL);
|
||||
wait_for_fifo(2, par);
|
||||
save_dp_datatype = aty_ld_le32(DP_DATATYPE);
|
||||
save_dp_cntl = aty_ld_le32(DP_CNTL);
|
||||
|
||||
wait_for_fifo(6, par);
|
||||
aty_st_le32(SRC_Y_X, (srcy << 16) | srcx);
|
||||
aty_st_le32(DP_MIX, ROP3_SRCCOPY | DP_SRC_RECT);
|
||||
aty_st_le32(DP_CNTL, DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM);
|
||||
aty_st_le32(DP_DATATYPE, save_dp_datatype | dstval | SRC_DSTCOLOR);
|
||||
wait_for_fifo(6, par);
|
||||
aty_st_le32(SRC_Y_X, (srcy << 16) | srcx);
|
||||
aty_st_le32(DP_MIX, ROP3_SRCCOPY | DP_SRC_RECT);
|
||||
aty_st_le32(DP_CNTL, DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM);
|
||||
aty_st_le32(DP_DATATYPE, save_dp_datatype | dstval | SRC_DSTCOLOR);
|
||||
|
||||
aty_st_le32(DST_Y_X, (dsty << 16) | dstx);
|
||||
aty_st_le32(DST_HEIGHT_WIDTH, (height << 16) | width);
|
||||
aty_st_le32(DST_Y_X, (dsty << 16) | dstx);
|
||||
aty_st_le32(DST_HEIGHT_WIDTH, (height << 16) | width);
|
||||
|
||||
par->blitter_may_be_busy = 1;
|
||||
par->blitter_may_be_busy = 1;
|
||||
|
||||
wait_for_fifo(2, par);
|
||||
aty_st_le32(DP_DATATYPE, save_dp_datatype);
|
||||
aty_st_le32(DP_CNTL, save_dp_cntl);
|
||||
wait_for_fifo(2, par);
|
||||
aty_st_le32(DP_DATATYPE, save_dp_datatype);
|
||||
aty_st_le32(DP_CNTL, save_dp_cntl);
|
||||
}
|
||||
|
||||
|
||||
@@ -2358,17 +2380,17 @@ static inline void aty128_rectcopy(int srcx, int srcy, int dstx, int dsty,
|
||||
* Text mode accelerated functions
|
||||
*/
|
||||
|
||||
static void fbcon_aty128_bmove(struct display *p, int sy, int sx, int dy, int dx,
|
||||
int height, int width)
|
||||
static void fbcon_aty128_bmove(struct display *p, int sy, int sx, int dy,
|
||||
int dx, int height, int width)
|
||||
{
|
||||
sx *= fontwidth(p);
|
||||
sy *= fontheight(p);
|
||||
dx *= fontwidth(p);
|
||||
dy *= fontheight(p);
|
||||
width *= fontwidth(p);
|
||||
height *= fontheight(p);
|
||||
sx *= fontwidth(p);
|
||||
sy *= fontheight(p);
|
||||
dx *= fontwidth(p);
|
||||
dy *= fontheight(p);
|
||||
width *= fontwidth(p);
|
||||
height *= fontheight(p);
|
||||
|
||||
aty128_rectcopy(sx, sy, dx, dy, width, height,
|
||||
aty128_rectcopy(sx, sy, dx, dy, width, height,
|
||||
(struct fb_info_aty128 *)p->fb_info);
|
||||
}
|
||||
#endif /* 0 */
|
||||
|
||||
+60
-18
@@ -30,7 +30,10 @@
|
||||
#include <linux/clk.h>
|
||||
#include <linux/cpufreq.h>
|
||||
#include <linux/console.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/lcm.h>
|
||||
#include <video/da8xx-fb.h>
|
||||
#include <asm/div64.h>
|
||||
|
||||
@@ -160,6 +163,13 @@ struct da8xx_fb_par {
|
||||
wait_queue_head_t vsync_wait;
|
||||
int vsync_flag;
|
||||
int vsync_timeout;
|
||||
spinlock_t lock_for_chan_update;
|
||||
|
||||
/*
|
||||
* LCDC has 2 ping pong DMA channels, channel 0
|
||||
* and channel 1.
|
||||
*/
|
||||
unsigned int which_dma_channel_done;
|
||||
#ifdef CONFIG_CPU_FREQ
|
||||
struct notifier_block freq_transition;
|
||||
unsigned int lcd_fck_rate;
|
||||
@@ -260,10 +270,18 @@ static inline void lcd_enable_raster(void)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
/* Put LCDC in reset for several cycles */
|
||||
if (lcd_revision == LCD_VERSION_2)
|
||||
/* Write 1 to reset LCDC */
|
||||
lcdc_write(LCD_CLK_MAIN_RESET, LCD_CLK_RESET_REG);
|
||||
mdelay(1);
|
||||
|
||||
/* Bring LCDC out of reset */
|
||||
if (lcd_revision == LCD_VERSION_2)
|
||||
lcdc_write(0, LCD_CLK_RESET_REG);
|
||||
mdelay(1);
|
||||
|
||||
/* Above reset sequence doesnot reset register context */
|
||||
reg = lcdc_read(LCD_RASTER_CTRL_REG);
|
||||
if (!(reg & LCD_RASTER_ENABLE))
|
||||
lcdc_write(reg | LCD_RASTER_ENABLE, LCD_RASTER_CTRL_REG);
|
||||
@@ -277,10 +295,6 @@ static inline void lcd_disable_raster(void)
|
||||
reg = lcdc_read(LCD_RASTER_CTRL_REG);
|
||||
if (reg & LCD_RASTER_ENABLE)
|
||||
lcdc_write(reg & ~LCD_RASTER_ENABLE, LCD_RASTER_CTRL_REG);
|
||||
|
||||
if (lcd_revision == LCD_VERSION_2)
|
||||
/* Write 1 to reset LCDC */
|
||||
lcdc_write(LCD_CLK_MAIN_RESET, LCD_CLK_RESET_REG);
|
||||
}
|
||||
|
||||
static void lcd_blit(int load_mode, struct da8xx_fb_par *par)
|
||||
@@ -344,8 +358,8 @@ static void lcd_blit(int load_mode, struct da8xx_fb_par *par)
|
||||
lcd_enable_raster();
|
||||
}
|
||||
|
||||
/* Configure the Burst Size of DMA */
|
||||
static int lcd_cfg_dma(int burst_size)
|
||||
/* Configure the Burst Size and fifo threhold of DMA */
|
||||
static int lcd_cfg_dma(int burst_size, int fifo_th)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
@@ -369,6 +383,9 @@ static int lcd_cfg_dma(int burst_size)
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
reg |= (fifo_th << 8);
|
||||
|
||||
lcdc_write(reg, LCD_DMA_CTRL_REG);
|
||||
|
||||
return 0;
|
||||
@@ -670,8 +687,8 @@ static int lcd_init(struct da8xx_fb_par *par, const struct lcd_ctrl_config *cfg,
|
||||
lcdc_write((lcdc_read(LCD_RASTER_TIMING_2_REG) &
|
||||
~LCD_INVERT_PIXEL_CLOCK), LCD_RASTER_TIMING_2_REG);
|
||||
|
||||
/* Configure the DMA burst size. */
|
||||
ret = lcd_cfg_dma(cfg->dma_burst_sz);
|
||||
/* Configure the DMA burst size and fifo threshold. */
|
||||
ret = lcd_cfg_dma(cfg->dma_burst_sz, cfg->fifo_th);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
@@ -715,7 +732,6 @@ static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg)
|
||||
{
|
||||
struct da8xx_fb_par *par = arg;
|
||||
u32 stat = lcdc_read(LCD_MASKED_STAT_REG);
|
||||
u32 reg_int;
|
||||
|
||||
if ((stat & LCD_SYNC_LOST) && (stat & LCD_FIFO_UNDERFLOW)) {
|
||||
lcd_disable_raster();
|
||||
@@ -732,10 +748,8 @@ static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg)
|
||||
|
||||
lcdc_write(stat, LCD_MASKED_STAT_REG);
|
||||
|
||||
/* Disable PL completion inerrupt */
|
||||
reg_int = lcdc_read(LCD_INT_ENABLE_CLR_REG) |
|
||||
(LCD_V2_PL_INT_ENA);
|
||||
lcdc_write(reg_int, LCD_INT_ENABLE_CLR_REG);
|
||||
/* Disable PL completion interrupt */
|
||||
lcdc_write(LCD_V2_PL_INT_ENA, LCD_INT_ENABLE_CLR_REG);
|
||||
|
||||
/* Setup and start data loading mode */
|
||||
lcd_blit(LOAD_DATA, par);
|
||||
@@ -743,6 +757,7 @@ static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg)
|
||||
lcdc_write(stat, LCD_MASKED_STAT_REG);
|
||||
|
||||
if (stat & LCD_END_OF_FRAME0) {
|
||||
par->which_dma_channel_done = 0;
|
||||
lcdc_write(par->dma_start,
|
||||
LCD_DMA_FRM_BUF_BASE_ADDR_0_REG);
|
||||
lcdc_write(par->dma_end,
|
||||
@@ -752,6 +767,7 @@ static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg)
|
||||
}
|
||||
|
||||
if (stat & LCD_END_OF_FRAME1) {
|
||||
par->which_dma_channel_done = 1;
|
||||
lcdc_write(par->dma_start,
|
||||
LCD_DMA_FRM_BUF_BASE_ADDR_1_REG);
|
||||
lcdc_write(par->dma_end,
|
||||
@@ -798,6 +814,7 @@ static irqreturn_t lcdc_irq_handler_rev01(int irq, void *arg)
|
||||
lcdc_write(stat, LCD_STAT_REG);
|
||||
|
||||
if (stat & LCD_END_OF_FRAME0) {
|
||||
par->which_dma_channel_done = 0;
|
||||
lcdc_write(par->dma_start,
|
||||
LCD_DMA_FRM_BUF_BASE_ADDR_0_REG);
|
||||
lcdc_write(par->dma_end,
|
||||
@@ -807,6 +824,7 @@ static irqreturn_t lcdc_irq_handler_rev01(int irq, void *arg)
|
||||
}
|
||||
|
||||
if (stat & LCD_END_OF_FRAME1) {
|
||||
par->which_dma_channel_done = 1;
|
||||
lcdc_write(par->dma_start,
|
||||
LCD_DMA_FRM_BUF_BASE_ADDR_1_REG);
|
||||
lcdc_write(par->dma_end,
|
||||
@@ -1021,11 +1039,14 @@ static int cfb_blank(int blank, struct fb_info *info)
|
||||
par->blank = blank;
|
||||
switch (blank) {
|
||||
case FB_BLANK_UNBLANK:
|
||||
lcd_enable_raster();
|
||||
|
||||
if (par->panel_power_ctrl)
|
||||
par->panel_power_ctrl(1);
|
||||
|
||||
lcd_enable_raster();
|
||||
break;
|
||||
case FB_BLANK_NORMAL:
|
||||
case FB_BLANK_VSYNC_SUSPEND:
|
||||
case FB_BLANK_HSYNC_SUSPEND:
|
||||
case FB_BLANK_POWERDOWN:
|
||||
if (par->panel_power_ctrl)
|
||||
par->panel_power_ctrl(0);
|
||||
@@ -1052,6 +1073,7 @@ static int da8xx_pan_display(struct fb_var_screeninfo *var,
|
||||
struct fb_fix_screeninfo *fix = &fbi->fix;
|
||||
unsigned int end;
|
||||
unsigned int start;
|
||||
unsigned long irq_flags;
|
||||
|
||||
if (var->xoffset != fbi->var.xoffset ||
|
||||
var->yoffset != fbi->var.yoffset) {
|
||||
@@ -1069,6 +1091,21 @@ static int da8xx_pan_display(struct fb_var_screeninfo *var,
|
||||
end = start + fbi->var.yres * fix->line_length - 1;
|
||||
par->dma_start = start;
|
||||
par->dma_end = end;
|
||||
spin_lock_irqsave(&par->lock_for_chan_update,
|
||||
irq_flags);
|
||||
if (par->which_dma_channel_done == 0) {
|
||||
lcdc_write(par->dma_start,
|
||||
LCD_DMA_FRM_BUF_BASE_ADDR_0_REG);
|
||||
lcdc_write(par->dma_end,
|
||||
LCD_DMA_FRM_BUF_CEILING_ADDR_0_REG);
|
||||
} else if (par->which_dma_channel_done == 1) {
|
||||
lcdc_write(par->dma_start,
|
||||
LCD_DMA_FRM_BUF_BASE_ADDR_1_REG);
|
||||
lcdc_write(par->dma_end,
|
||||
LCD_DMA_FRM_BUF_CEILING_ADDR_1_REG);
|
||||
}
|
||||
spin_unlock_irqrestore(&par->lock_for_chan_update,
|
||||
irq_flags);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1114,6 +1151,7 @@ static int __devinit fb_probe(struct platform_device *device)
|
||||
struct da8xx_fb_par *par;
|
||||
resource_size_t len;
|
||||
int ret, i;
|
||||
unsigned long ulcm;
|
||||
|
||||
if (fb_pdata == NULL) {
|
||||
dev_err(&device->dev, "Can not get platform data\n");
|
||||
@@ -1209,7 +1247,8 @@ static int __devinit fb_probe(struct platform_device *device)
|
||||
|
||||
/* allocate frame buffer */
|
||||
par->vram_size = lcdc_info->width * lcdc_info->height * lcd_cfg->bpp;
|
||||
par->vram_size = PAGE_ALIGN(par->vram_size/8);
|
||||
ulcm = lcm((lcdc_info->width * lcd_cfg->bpp)/8, PAGE_SIZE);
|
||||
par->vram_size = roundup(par->vram_size/8, ulcm);
|
||||
par->vram_size = par->vram_size * LCD_NUM_BUFFERS;
|
||||
|
||||
par->vram_virt = dma_alloc_coherent(NULL,
|
||||
@@ -1296,6 +1335,8 @@ static int __devinit fb_probe(struct platform_device *device)
|
||||
/* initialize the vsync wait queue */
|
||||
init_waitqueue_head(&par->vsync_wait);
|
||||
par->vsync_timeout = HZ / 5;
|
||||
par->which_dma_channel_done = -1;
|
||||
spin_lock_init(&par->lock_for_chan_update);
|
||||
|
||||
/* Register the Frame Buffer */
|
||||
if (register_framebuffer(da8xx_fb_info) < 0) {
|
||||
@@ -1382,11 +1423,12 @@ static int fb_resume(struct platform_device *dev)
|
||||
struct da8xx_fb_par *par = info->par;
|
||||
|
||||
console_lock();
|
||||
clk_enable(par->lcdc_clk);
|
||||
lcd_enable_raster();
|
||||
|
||||
if (par->panel_power_ctrl)
|
||||
par->panel_power_ctrl(1);
|
||||
|
||||
clk_enable(par->lcdc_clk);
|
||||
lcd_enable_raster();
|
||||
fb_set_suspend(info, 0);
|
||||
console_unlock();
|
||||
|
||||
|
||||
@@ -477,11 +477,11 @@ static __init unsigned int get_fb_size(struct fb_info *info)
|
||||
return size;
|
||||
}
|
||||
|
||||
static int epson1355_width_tab[2][4] __initdata =
|
||||
static int epson1355_width_tab[2][4] __devinitdata =
|
||||
{ {4, 8, 16, -1}, {9, 12, 16, -1} };
|
||||
static int epson1355_bpp_tab[8] __initdata = { 1, 2, 4, 8, 15, 16 };
|
||||
static int epson1355_bpp_tab[8] __devinitdata = { 1, 2, 4, 8, 15, 16 };
|
||||
|
||||
static void __init fetch_hw_state(struct fb_info *info, struct epson1355_par *par)
|
||||
static void __devinit fetch_hw_state(struct fb_info *info, struct epson1355_par *par)
|
||||
{
|
||||
struct fb_var_screeninfo *var = &info->var;
|
||||
struct fb_fix_screeninfo *fix = &info->fix;
|
||||
@@ -601,7 +601,7 @@ static int epson1355fb_remove(struct platform_device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int __devinit epson1355fb_probe(struct platform_device *dev)
|
||||
static int __devinit epson1355fb_probe(struct platform_device *dev)
|
||||
{
|
||||
struct epson1355_par *default_par;
|
||||
struct fb_info *info;
|
||||
|
||||
@@ -47,7 +47,7 @@ static int exynos_dp_detect_hpd(struct exynos_dp_device *dp)
|
||||
|
||||
exynos_dp_init_hpd(dp);
|
||||
|
||||
udelay(200);
|
||||
usleep_range(200, 210);
|
||||
|
||||
while (exynos_dp_get_plug_in_status(dp) != 0) {
|
||||
timeout_loop++;
|
||||
@@ -55,7 +55,7 @@ static int exynos_dp_detect_hpd(struct exynos_dp_device *dp)
|
||||
dev_err(dp->dev, "failed to get hpd plug status\n");
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
udelay(10);
|
||||
usleep_range(10, 11);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -304,7 +304,7 @@ static void exynos_dp_link_start(struct exynos_dp_device *dp)
|
||||
buf[lane] = DPCD_PRE_EMPHASIS_PATTERN2_LEVEL0 |
|
||||
DPCD_VOLTAGE_SWING_PATTERN1_LEVEL0;
|
||||
exynos_dp_write_bytes_to_dpcd(dp,
|
||||
DPCD_ADDR_TRAINING_PATTERN_SET,
|
||||
DPCD_ADDR_TRAINING_LANE0_SET,
|
||||
lane_count, buf);
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ static int exynos_dp_channel_eq_ok(u8 link_status[6], int lane_count)
|
||||
u8 lane_status;
|
||||
|
||||
lane_align = link_status[2];
|
||||
if ((lane_align == DPCD_INTERLANE_ALIGN_DONE) == 0)
|
||||
if ((lane_align & DPCD_INTERLANE_ALIGN_DONE) == 0)
|
||||
return -EINVAL;
|
||||
|
||||
for (lane = 0; lane < lane_count; lane++) {
|
||||
@@ -407,6 +407,9 @@ static unsigned int exynos_dp_get_lane_link_training(
|
||||
case 3:
|
||||
reg = exynos_dp_get_lane3_link_training(dp);
|
||||
break;
|
||||
default:
|
||||
WARN_ON(1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return reg;
|
||||
@@ -483,7 +486,7 @@ static int exynos_dp_process_clock_recovery(struct exynos_dp_device *dp)
|
||||
u8 pre_emphasis;
|
||||
u8 training_lane;
|
||||
|
||||
udelay(100);
|
||||
usleep_range(100, 101);
|
||||
|
||||
exynos_dp_read_bytes_from_dpcd(dp, DPCD_ADDR_LANE0_1_STATUS,
|
||||
6, link_status);
|
||||
@@ -501,7 +504,7 @@ static int exynos_dp_process_clock_recovery(struct exynos_dp_device *dp)
|
||||
buf[0] = DPCD_SCRAMBLING_DISABLED |
|
||||
DPCD_TRAINING_PATTERN_2;
|
||||
exynos_dp_write_byte_to_dpcd(dp,
|
||||
DPCD_ADDR_TRAINING_LANE0_SET,
|
||||
DPCD_ADDR_TRAINING_PATTERN_SET,
|
||||
buf[0]);
|
||||
|
||||
for (lane = 0; lane < lane_count; lane++) {
|
||||
@@ -568,7 +571,7 @@ static int exynos_dp_process_equalizer_training(struct exynos_dp_device *dp)
|
||||
|
||||
u8 adjust_request[2];
|
||||
|
||||
udelay(400);
|
||||
usleep_range(400, 401);
|
||||
|
||||
exynos_dp_read_bytes_from_dpcd(dp, DPCD_ADDR_LANE0_1_STATUS,
|
||||
6, link_status);
|
||||
@@ -736,7 +739,7 @@ static int exynos_dp_set_link_train(struct exynos_dp_device *dp,
|
||||
if (retval == 0)
|
||||
break;
|
||||
|
||||
udelay(100);
|
||||
usleep_range(100, 110);
|
||||
}
|
||||
|
||||
return retval;
|
||||
@@ -770,7 +773,7 @@ static int exynos_dp_config_video(struct exynos_dp_device *dp,
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
udelay(1);
|
||||
usleep_range(1, 2);
|
||||
}
|
||||
|
||||
/* Set to use the register calculated M/N video */
|
||||
@@ -804,7 +807,7 @@ static int exynos_dp_config_video(struct exynos_dp_device *dp,
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
mdelay(1);
|
||||
usleep_range(1000, 1001);
|
||||
}
|
||||
|
||||
if (retval != 0)
|
||||
|
||||
@@ -85,10 +85,6 @@ void exynos_dp_set_link_bandwidth(struct exynos_dp_device *dp, u32 bwtype);
|
||||
void exynos_dp_get_link_bandwidth(struct exynos_dp_device *dp, u32 *bwtype);
|
||||
void exynos_dp_set_lane_count(struct exynos_dp_device *dp, u32 count);
|
||||
void exynos_dp_get_lane_count(struct exynos_dp_device *dp, u32 *count);
|
||||
void exynos_dp_set_link_bandwidth(struct exynos_dp_device *dp, u32 bwtype);
|
||||
void exynos_dp_get_link_bandwidth(struct exynos_dp_device *dp, u32 *bwtype);
|
||||
void exynos_dp_set_lane_count(struct exynos_dp_device *dp, u32 count);
|
||||
void exynos_dp_get_lane_count(struct exynos_dp_device *dp, u32 *count);
|
||||
void exynos_dp_enable_enhanced_mode(struct exynos_dp_device *dp, bool enable);
|
||||
void exynos_dp_set_training_pattern(struct exynos_dp_device *dp,
|
||||
enum pattern_set pattern);
|
||||
|
||||
@@ -122,7 +122,7 @@ void exynos_dp_reset(struct exynos_dp_device *dp)
|
||||
LS_CLK_DOMAIN_FUNC_EN_N;
|
||||
writel(reg, dp->reg_base + EXYNOS_DP_FUNC_EN_2);
|
||||
|
||||
udelay(20);
|
||||
usleep_range(20, 30);
|
||||
|
||||
exynos_dp_lane_swap(dp, 0);
|
||||
|
||||
@@ -988,7 +988,7 @@ void exynos_dp_reset_macro(struct exynos_dp_device *dp)
|
||||
writel(reg, dp->reg_base + EXYNOS_DP_PHY_TEST);
|
||||
|
||||
/* 10 us is the minimum reset time. */
|
||||
udelay(10);
|
||||
usleep_range(10, 20);
|
||||
|
||||
reg &= ~MACRO_RST;
|
||||
writel(reg, dp->reg_base + EXYNOS_DP_PHY_TEST);
|
||||
|
||||
@@ -154,7 +154,7 @@ static int exynos_mipi_dsi_blank_mode(struct mipi_dsim_device *dsim, int power)
|
||||
if (client_drv && client_drv->power_on)
|
||||
client_drv->power_on(client_dev, 1);
|
||||
|
||||
exynos_mipi_regulator_disable(dsim);
|
||||
exynos_mipi_regulator_enable(dsim);
|
||||
|
||||
/* enable MIPI-DSI PHY. */
|
||||
if (dsim->pd->phy_enable)
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* linux/drivers/video/backlight/s6e8ax0.h
|
||||
*
|
||||
* MIPI-DSI based s6e8ax0 AMOLED LCD Panel definitions.
|
||||
*
|
||||
* Copyright (c) 2011 Samsung Electronics
|
||||
*
|
||||
* Inki Dae, <inki.dae@samsung.com>
|
||||
* Donghwa Lee <dh09.lee@samsung.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef _S6E8AX0_H
|
||||
#define _S6E8AX0_H
|
||||
|
||||
extern void s6e8ax0_init(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <asm/types.h>
|
||||
#include <linux/fb.h>
|
||||
#include <linux/bug.h>
|
||||
|
||||
/*
|
||||
* Compose two values, using a bitmask as decision value
|
||||
@@ -41,7 +42,8 @@ pixel_to_pat( u32 bpp, u32 pixel)
|
||||
case 32:
|
||||
return 0x0000000100000001ul*pixel;
|
||||
default:
|
||||
panic("pixel_to_pat(): unsupported pixelformat\n");
|
||||
WARN(1, "pixel_to_pat(): unsupported pixelformat %d\n", bpp);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#else
|
||||
@@ -66,7 +68,8 @@ pixel_to_pat( u32 bpp, u32 pixel)
|
||||
case 32:
|
||||
return 0x00000001ul*pixel;
|
||||
default:
|
||||
panic("pixel_to_pat(): unsupported pixelformat\n");
|
||||
WARN(1, "pixel_to_pat(): unsupported pixelformat %d\n", bpp);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
+22
-25
@@ -354,7 +354,7 @@ static int __devinit grvga_probe(struct platform_device *dev)
|
||||
*/
|
||||
if (fb_get_options("grvga", &options)) {
|
||||
retval = -ENODEV;
|
||||
goto err;
|
||||
goto free_fb;
|
||||
}
|
||||
|
||||
if (!options || !*options)
|
||||
@@ -370,7 +370,7 @@ static int __devinit grvga_probe(struct platform_device *dev)
|
||||
if (grvga_parse_custom(this_opt, &info->var) < 0) {
|
||||
dev_err(&dev->dev, "Failed to parse custom mode (%s).\n", this_opt);
|
||||
retval = -EINVAL;
|
||||
goto err1;
|
||||
goto free_fb;
|
||||
}
|
||||
} else if (!strncmp(this_opt, "addr", 4))
|
||||
grvga_fix_addr = simple_strtoul(this_opt + 5, NULL, 16);
|
||||
@@ -387,10 +387,11 @@ static int __devinit grvga_probe(struct platform_device *dev)
|
||||
info->flags = FBINFO_DEFAULT | FBINFO_PARTIAL_PAN_OK | FBINFO_HWACCEL_YPAN;
|
||||
info->fix.smem_len = grvga_mem_size;
|
||||
|
||||
if (!request_mem_region(dev->resource[0].start, resource_size(&dev->resource[0]), "grlib-svgactrl regs")) {
|
||||
if (!devm_request_mem_region(&dev->dev, dev->resource[0].start,
|
||||
resource_size(&dev->resource[0]), "grlib-svgactrl regs")) {
|
||||
dev_err(&dev->dev, "registers already mapped\n");
|
||||
retval = -EBUSY;
|
||||
goto err;
|
||||
goto free_fb;
|
||||
}
|
||||
|
||||
par->regs = of_ioremap(&dev->resource[0], 0,
|
||||
@@ -400,14 +401,14 @@ static int __devinit grvga_probe(struct platform_device *dev)
|
||||
if (!par->regs) {
|
||||
dev_err(&dev->dev, "failed to map registers\n");
|
||||
retval = -ENOMEM;
|
||||
goto err1;
|
||||
goto free_fb;
|
||||
}
|
||||
|
||||
retval = fb_alloc_cmap(&info->cmap, 256, 0);
|
||||
if (retval < 0) {
|
||||
dev_err(&dev->dev, "failed to allocate mem with fb_alloc_cmap\n");
|
||||
retval = -ENOMEM;
|
||||
goto err2;
|
||||
goto unmap_regs;
|
||||
}
|
||||
|
||||
if (mode_opt) {
|
||||
@@ -415,7 +416,7 @@ static int __devinit grvga_probe(struct platform_device *dev)
|
||||
grvga_modedb, sizeof(grvga_modedb), &grvga_modedb[0], 8);
|
||||
if (!retval || retval == 4) {
|
||||
retval = -EINVAL;
|
||||
goto err3;
|
||||
goto dealloc_cmap;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -427,10 +428,11 @@ static int __devinit grvga_probe(struct platform_device *dev)
|
||||
|
||||
physical_start = grvga_fix_addr;
|
||||
|
||||
if (!request_mem_region(physical_start, grvga_mem_size, dev->name)) {
|
||||
if (!devm_request_mem_region(&dev->dev, physical_start,
|
||||
grvga_mem_size, dev->name)) {
|
||||
dev_err(&dev->dev, "failed to request memory region\n");
|
||||
retval = -ENOMEM;
|
||||
goto err3;
|
||||
goto dealloc_cmap;
|
||||
}
|
||||
|
||||
virtual_start = (unsigned long) ioremap(physical_start, grvga_mem_size);
|
||||
@@ -438,7 +440,7 @@ static int __devinit grvga_probe(struct platform_device *dev)
|
||||
if (!virtual_start) {
|
||||
dev_err(&dev->dev, "error mapping framebuffer memory\n");
|
||||
retval = -ENOMEM;
|
||||
goto err4;
|
||||
goto dealloc_cmap;
|
||||
}
|
||||
} else { /* Allocate frambuffer memory */
|
||||
|
||||
@@ -451,7 +453,7 @@ static int __devinit grvga_probe(struct platform_device *dev)
|
||||
"unable to allocate framebuffer memory (%lu bytes)\n",
|
||||
grvga_mem_size);
|
||||
retval = -ENOMEM;
|
||||
goto err3;
|
||||
goto dealloc_cmap;
|
||||
}
|
||||
|
||||
physical_start = dma_map_single(&dev->dev, (void *)virtual_start, grvga_mem_size, DMA_TO_DEVICE);
|
||||
@@ -484,7 +486,7 @@ static int __devinit grvga_probe(struct platform_device *dev)
|
||||
retval = register_framebuffer(info);
|
||||
if (retval < 0) {
|
||||
dev_err(&dev->dev, "failed to register framebuffer\n");
|
||||
goto err4;
|
||||
goto free_mem;
|
||||
}
|
||||
|
||||
__raw_writel(physical_start, &par->regs->fb_pos);
|
||||
@@ -493,21 +495,18 @@ static int __devinit grvga_probe(struct platform_device *dev)
|
||||
|
||||
return 0;
|
||||
|
||||
err4:
|
||||
free_mem:
|
||||
dev_set_drvdata(&dev->dev, NULL);
|
||||
if (grvga_fix_addr) {
|
||||
release_mem_region(physical_start, grvga_mem_size);
|
||||
if (grvga_fix_addr)
|
||||
iounmap((void *)virtual_start);
|
||||
} else
|
||||
else
|
||||
kfree((void *)virtual_start);
|
||||
err3:
|
||||
dealloc_cmap:
|
||||
fb_dealloc_cmap(&info->cmap);
|
||||
err2:
|
||||
unmap_regs:
|
||||
of_iounmap(&dev->resource[0], par->regs,
|
||||
resource_size(&dev->resource[0]));
|
||||
err1:
|
||||
release_mem_region(dev->resource[0].start, resource_size(&dev->resource[0]));
|
||||
err:
|
||||
free_fb:
|
||||
framebuffer_release(info);
|
||||
|
||||
return retval;
|
||||
@@ -524,12 +523,10 @@ static int __devexit grvga_remove(struct platform_device *device)
|
||||
|
||||
of_iounmap(&device->resource[0], par->regs,
|
||||
resource_size(&device->resource[0]));
|
||||
release_mem_region(device->resource[0].start, resource_size(&device->resource[0]));
|
||||
|
||||
if (!par->fb_alloced) {
|
||||
release_mem_region(info->fix.smem_start, info->fix.smem_len);
|
||||
if (!par->fb_alloced)
|
||||
iounmap(info->screen_base);
|
||||
} else
|
||||
else
|
||||
kfree((void *)info->screen_base);
|
||||
|
||||
framebuffer_release(info);
|
||||
|
||||
+47
-8
@@ -269,7 +269,7 @@ struct mx3fb_info {
|
||||
dma_cookie_t cookie;
|
||||
struct scatterlist sg[2];
|
||||
|
||||
u32 sync; /* preserve var->sync flags */
|
||||
struct fb_var_screeninfo cur_var; /* current var info */
|
||||
};
|
||||
|
||||
static void mx3fb_dma_done(void *);
|
||||
@@ -698,9 +698,29 @@ static void mx3fb_dma_done(void *arg)
|
||||
complete(&mx3_fbi->flip_cmpl);
|
||||
}
|
||||
|
||||
static bool mx3fb_must_set_par(struct fb_info *fbi)
|
||||
{
|
||||
struct mx3fb_info *mx3_fbi = fbi->par;
|
||||
struct fb_var_screeninfo old_var = mx3_fbi->cur_var;
|
||||
struct fb_var_screeninfo new_var = fbi->var;
|
||||
|
||||
if ((fbi->var.activate & FB_ACTIVATE_FORCE) &&
|
||||
(fbi->var.activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW)
|
||||
return true;
|
||||
|
||||
/*
|
||||
* Ignore xoffset and yoffset update,
|
||||
* because pan display handles this case.
|
||||
*/
|
||||
old_var.xoffset = new_var.xoffset;
|
||||
old_var.yoffset = new_var.yoffset;
|
||||
|
||||
return !!memcmp(&old_var, &new_var, sizeof(struct fb_var_screeninfo));
|
||||
}
|
||||
|
||||
static int __set_par(struct fb_info *fbi, bool lock)
|
||||
{
|
||||
u32 mem_len;
|
||||
u32 mem_len, cur_xoffset, cur_yoffset;
|
||||
struct ipu_di_signal_cfg sig_cfg;
|
||||
enum ipu_panel mode = IPU_PANEL_TFT;
|
||||
struct mx3fb_info *mx3_fbi = fbi->par;
|
||||
@@ -780,8 +800,25 @@ static int __set_par(struct fb_info *fbi, bool lock)
|
||||
video->out_height = fbi->var.yres;
|
||||
video->out_stride = fbi->var.xres_virtual;
|
||||
|
||||
if (mx3_fbi->blank == FB_BLANK_UNBLANK)
|
||||
if (mx3_fbi->blank == FB_BLANK_UNBLANK) {
|
||||
sdc_enable_channel(mx3_fbi);
|
||||
/*
|
||||
* sg[0] points to fb smem_start address
|
||||
* and is actually active in controller.
|
||||
*/
|
||||
mx3_fbi->cur_var.xoffset = 0;
|
||||
mx3_fbi->cur_var.yoffset = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Preserve xoffset and yoffest in case they are
|
||||
* inactive in controller as fb is blanked.
|
||||
*/
|
||||
cur_xoffset = mx3_fbi->cur_var.xoffset;
|
||||
cur_yoffset = mx3_fbi->cur_var.yoffset;
|
||||
mx3_fbi->cur_var = fbi->var;
|
||||
mx3_fbi->cur_var.xoffset = cur_xoffset;
|
||||
mx3_fbi->cur_var.yoffset = cur_yoffset;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -802,7 +839,7 @@ static int mx3fb_set_par(struct fb_info *fbi)
|
||||
|
||||
mutex_lock(&mx3_fbi->mutex);
|
||||
|
||||
ret = __set_par(fbi, true);
|
||||
ret = mx3fb_must_set_par(fbi) ? __set_par(fbi, true) : 0;
|
||||
|
||||
mutex_unlock(&mx3_fbi->mutex);
|
||||
|
||||
@@ -901,8 +938,8 @@ static int mx3fb_check_var(struct fb_var_screeninfo *var, struct fb_info *fbi)
|
||||
var->grayscale = 0;
|
||||
|
||||
/* Preserve sync flags */
|
||||
var->sync |= mx3_fbi->sync;
|
||||
mx3_fbi->sync |= var->sync;
|
||||
var->sync |= mx3_fbi->cur_var.sync;
|
||||
mx3_fbi->cur_var.sync |= var->sync;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1043,8 +1080,8 @@ static int mx3fb_pan_display(struct fb_var_screeninfo *var,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (fbi->var.xoffset == var->xoffset &&
|
||||
fbi->var.yoffset == var->yoffset)
|
||||
if (mx3_fbi->cur_var.xoffset == var->xoffset &&
|
||||
mx3_fbi->cur_var.yoffset == var->yoffset)
|
||||
return 0; /* No change, do nothing */
|
||||
|
||||
y_bottom = var->yoffset;
|
||||
@@ -1127,6 +1164,8 @@ static int mx3fb_pan_display(struct fb_var_screeninfo *var,
|
||||
else
|
||||
fbi->var.vmode &= ~FB_VMODE_YWRAP;
|
||||
|
||||
mx3_fbi->cur_var = fbi->var;
|
||||
|
||||
mutex_unlock(&mx3_fbi->mutex);
|
||||
|
||||
dev_dbg(fbi->device, "Update complete\n");
|
||||
|
||||
@@ -487,6 +487,13 @@ static struct omap_video_timings acx_panel_timings = {
|
||||
.vfp = 3,
|
||||
.vsw = 3,
|
||||
.vbp = 4,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
|
||||
};
|
||||
|
||||
static int acx_panel_probe(struct omap_dss_device *dssdev)
|
||||
@@ -498,8 +505,7 @@ static int acx_panel_probe(struct omap_dss_device *dssdev)
|
||||
struct backlight_properties props;
|
||||
|
||||
dev_dbg(&dssdev->dev, "%s\n", __func__);
|
||||
dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
|
||||
OMAP_DSS_LCD_IHS;
|
||||
|
||||
/* FIXME AC bias ? */
|
||||
dssdev->panel.timings = acx_panel_timings;
|
||||
|
||||
|
||||
@@ -40,12 +40,6 @@
|
||||
struct panel_config {
|
||||
struct omap_video_timings timings;
|
||||
|
||||
int acbi; /* ac-bias pin transitions per interrupt */
|
||||
/* Unit: line clocks */
|
||||
int acb; /* ac-bias pin frequency */
|
||||
|
||||
enum omap_panel_config config;
|
||||
|
||||
int power_on_delay;
|
||||
int power_off_delay;
|
||||
|
||||
@@ -73,11 +67,13 @@ static struct panel_config generic_dpi_panels[] = {
|
||||
.vsw = 11,
|
||||
.vfp = 3,
|
||||
.vbp = 2,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
|
||||
},
|
||||
.acbi = 0x0,
|
||||
.acb = 0x0,
|
||||
.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
|
||||
OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IEO,
|
||||
.power_on_delay = 50,
|
||||
.power_off_delay = 100,
|
||||
.name = "sharp_lq",
|
||||
@@ -98,11 +94,13 @@ static struct panel_config generic_dpi_panels[] = {
|
||||
.vsw = 1,
|
||||
.vfp = 1,
|
||||
.vbp = 1,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
|
||||
},
|
||||
.acbi = 0x0,
|
||||
.acb = 0x28,
|
||||
.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
|
||||
OMAP_DSS_LCD_IHS,
|
||||
.power_on_delay = 50,
|
||||
.power_off_delay = 100,
|
||||
.name = "sharp_ls",
|
||||
@@ -123,12 +121,13 @@ static struct panel_config generic_dpi_panels[] = {
|
||||
.vfp = 4,
|
||||
.vsw = 2,
|
||||
.vbp = 2,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
|
||||
},
|
||||
.acbi = 0x0,
|
||||
.acb = 0x0,
|
||||
.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
|
||||
OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IPC |
|
||||
OMAP_DSS_LCD_ONOFF,
|
||||
.power_on_delay = 0,
|
||||
.power_off_delay = 0,
|
||||
.name = "toppoly_tdo35s",
|
||||
@@ -149,11 +148,13 @@ static struct panel_config generic_dpi_panels[] = {
|
||||
.vfp = 4,
|
||||
.vsw = 10,
|
||||
.vbp = 12 - 10,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
|
||||
},
|
||||
.acbi = 0x0,
|
||||
.acb = 0x0,
|
||||
.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
|
||||
OMAP_DSS_LCD_IHS,
|
||||
.power_on_delay = 0,
|
||||
.power_off_delay = 0,
|
||||
.name = "samsung_lte430wq_f0c",
|
||||
@@ -174,11 +175,13 @@ static struct panel_config generic_dpi_panels[] = {
|
||||
.vsw = 2,
|
||||
.vfp = 4,
|
||||
.vbp = 11,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
|
||||
},
|
||||
.acbi = 0x0,
|
||||
.acb = 0x0,
|
||||
.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
|
||||
OMAP_DSS_LCD_IHS,
|
||||
.power_on_delay = 0,
|
||||
.power_off_delay = 0,
|
||||
.name = "seiko_70wvw1tz3",
|
||||
@@ -199,11 +202,13 @@ static struct panel_config generic_dpi_panels[] = {
|
||||
.vsw = 10,
|
||||
.vfp = 2,
|
||||
.vbp = 2,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
|
||||
},
|
||||
.acbi = 0x0,
|
||||
.acb = 0x0,
|
||||
.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
|
||||
OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IEO,
|
||||
.power_on_delay = 0,
|
||||
.power_off_delay = 0,
|
||||
.name = "powertip_ph480272t",
|
||||
@@ -224,11 +229,13 @@ static struct panel_config generic_dpi_panels[] = {
|
||||
.vsw = 3,
|
||||
.vfp = 12,
|
||||
.vbp = 25,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
|
||||
},
|
||||
.acbi = 0x0,
|
||||
.acb = 0x28,
|
||||
.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
|
||||
OMAP_DSS_LCD_IHS,
|
||||
.power_on_delay = 0,
|
||||
.power_off_delay = 0,
|
||||
.name = "innolux_at070tn83",
|
||||
@@ -249,9 +256,13 @@ static struct panel_config generic_dpi_panels[] = {
|
||||
.vsw = 1,
|
||||
.vfp = 2,
|
||||
.vbp = 7,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
|
||||
},
|
||||
.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
|
||||
OMAP_DSS_LCD_IHS,
|
||||
.name = "nec_nl2432dr22-11b",
|
||||
},
|
||||
|
||||
@@ -270,9 +281,13 @@ static struct panel_config generic_dpi_panels[] = {
|
||||
.vsw = 1,
|
||||
.vfp = 1,
|
||||
.vbp = 1,
|
||||
},
|
||||
.config = OMAP_DSS_LCD_TFT,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
|
||||
},
|
||||
.name = "h4",
|
||||
},
|
||||
|
||||
@@ -291,10 +306,13 @@ static struct panel_config generic_dpi_panels[] = {
|
||||
.vsw = 10,
|
||||
.vfp = 2,
|
||||
.vbp = 2,
|
||||
},
|
||||
.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
|
||||
OMAP_DSS_LCD_IHS,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
|
||||
},
|
||||
.name = "apollon",
|
||||
},
|
||||
/* FocalTech ETM070003DH6 */
|
||||
@@ -312,9 +330,13 @@ static struct panel_config generic_dpi_panels[] = {
|
||||
.vsw = 3,
|
||||
.vfp = 13,
|
||||
.vbp = 29,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
|
||||
},
|
||||
.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
|
||||
OMAP_DSS_LCD_IHS,
|
||||
.name = "focaltech_etm070003dh6",
|
||||
},
|
||||
|
||||
@@ -333,11 +355,13 @@ static struct panel_config generic_dpi_panels[] = {
|
||||
.vsw = 23,
|
||||
.vfp = 1,
|
||||
.vbp = 1,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
|
||||
},
|
||||
.acbi = 0x0,
|
||||
.acb = 0x0,
|
||||
.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
|
||||
OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IPC,
|
||||
.power_on_delay = 0,
|
||||
.power_off_delay = 0,
|
||||
.name = "microtips_umsh_8173md",
|
||||
@@ -358,9 +382,13 @@ static struct panel_config generic_dpi_panels[] = {
|
||||
.vsw = 10,
|
||||
.vfp = 4,
|
||||
.vbp = 2,
|
||||
},
|
||||
.config = OMAP_DSS_LCD_TFT,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
|
||||
},
|
||||
.name = "ortustech_com43h4m10xtc",
|
||||
},
|
||||
|
||||
@@ -379,11 +407,13 @@ static struct panel_config generic_dpi_panels[] = {
|
||||
.vsw = 10,
|
||||
.vfp = 12,
|
||||
.vbp = 23,
|
||||
},
|
||||
.acb = 0x0,
|
||||
.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
|
||||
OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IEO,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
|
||||
},
|
||||
.name = "innolux_at080tn52",
|
||||
},
|
||||
|
||||
@@ -401,8 +431,13 @@ static struct panel_config generic_dpi_panels[] = {
|
||||
.vsw = 1,
|
||||
.vfp = 26,
|
||||
.vbp = 1,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
|
||||
},
|
||||
.config = OMAP_DSS_LCD_TFT,
|
||||
.name = "mitsubishi_aa084sb01",
|
||||
},
|
||||
/* EDT ET0500G0DH6 */
|
||||
@@ -419,8 +454,13 @@ static struct panel_config generic_dpi_panels[] = {
|
||||
.vsw = 2,
|
||||
.vfp = 35,
|
||||
.vbp = 10,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
|
||||
},
|
||||
.config = OMAP_DSS_LCD_TFT,
|
||||
.name = "edt_et0500g0dh6",
|
||||
},
|
||||
|
||||
@@ -439,9 +479,13 @@ static struct panel_config generic_dpi_panels[] = {
|
||||
.vsw = 2,
|
||||
.vfp = 10,
|
||||
.vbp = 33,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
|
||||
},
|
||||
.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
|
||||
OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IPC,
|
||||
.name = "primeview_pd050vl1",
|
||||
},
|
||||
|
||||
@@ -460,9 +504,13 @@ static struct panel_config generic_dpi_panels[] = {
|
||||
.vsw = 2,
|
||||
.vfp = 10,
|
||||
.vbp = 33,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
|
||||
},
|
||||
.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
|
||||
OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IPC,
|
||||
.name = "primeview_pm070wl4",
|
||||
},
|
||||
|
||||
@@ -481,9 +529,13 @@ static struct panel_config generic_dpi_panels[] = {
|
||||
.vsw = 4,
|
||||
.vfp = 1,
|
||||
.vbp = 23,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
|
||||
},
|
||||
.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
|
||||
OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IPC,
|
||||
.name = "primeview_pd104slf",
|
||||
},
|
||||
};
|
||||
@@ -573,10 +625,7 @@ static int generic_dpi_panel_probe(struct omap_dss_device *dssdev)
|
||||
if (!panel_config)
|
||||
return -EINVAL;
|
||||
|
||||
dssdev->panel.config = panel_config->config;
|
||||
dssdev->panel.timings = panel_config->timings;
|
||||
dssdev->panel.acb = panel_config->acb;
|
||||
dssdev->panel.acbi = panel_config->acbi;
|
||||
|
||||
drv_data = kzalloc(sizeof(*drv_data), GFP_KERNEL);
|
||||
if (!drv_data)
|
||||
|
||||
@@ -40,6 +40,12 @@ static struct omap_video_timings lb035q02_timings = {
|
||||
.vsw = 2,
|
||||
.vfp = 4,
|
||||
.vbp = 18,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
|
||||
};
|
||||
|
||||
static int lb035q02_panel_power_on(struct omap_dss_device *dssdev)
|
||||
@@ -82,8 +88,6 @@ static int lb035q02_panel_probe(struct omap_dss_device *dssdev)
|
||||
struct lb035q02_data *ld;
|
||||
int r;
|
||||
|
||||
dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
|
||||
OMAP_DSS_LCD_IHS;
|
||||
dssdev->panel.timings = lb035q02_timings;
|
||||
|
||||
ld = kzalloc(sizeof(*ld), GFP_KERNEL);
|
||||
|
||||
@@ -473,7 +473,6 @@ static int n8x0_panel_probe(struct omap_dss_device *dssdev)
|
||||
|
||||
mutex_init(&ddata->lock);
|
||||
|
||||
dssdev->panel.config = OMAP_DSS_LCD_TFT;
|
||||
dssdev->panel.timings.x_res = 800;
|
||||
dssdev->panel.timings.y_res = 480;
|
||||
dssdev->ctrl.pixel_size = 16;
|
||||
|
||||
@@ -76,6 +76,12 @@ static struct omap_video_timings nec_8048_panel_timings = {
|
||||
.vfp = 3,
|
||||
.vsw = 1,
|
||||
.vbp = 4,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
|
||||
};
|
||||
|
||||
static int nec_8048_bl_update_status(struct backlight_device *bl)
|
||||
@@ -116,9 +122,6 @@ static int nec_8048_panel_probe(struct omap_dss_device *dssdev)
|
||||
struct backlight_properties props;
|
||||
int r;
|
||||
|
||||
dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
|
||||
OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_RF |
|
||||
OMAP_DSS_LCD_ONOFF;
|
||||
dssdev->panel.timings = nec_8048_panel_timings;
|
||||
|
||||
necd = kzalloc(sizeof(*necd), GFP_KERNEL);
|
||||
|
||||
@@ -69,6 +69,12 @@ static struct omap_video_timings pico_ls_timings = {
|
||||
.vsw = 2,
|
||||
.vfp = 3,
|
||||
.vbp = 14,
|
||||
|
||||
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
|
||||
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
|
||||
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
|
||||
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_FALLING_EDGE,
|
||||
};
|
||||
|
||||
static inline struct picodlp_panel_data
|
||||
@@ -414,9 +420,6 @@ static int picodlp_panel_probe(struct omap_dss_device *dssdev)
|
||||
struct i2c_client *picodlp_i2c_client;
|
||||
int r = 0, picodlp_adapter_id;
|
||||
|
||||
dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_ONOFF |
|
||||
OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IVS;
|
||||
dssdev->panel.acb = 0x0;
|
||||
dssdev->panel.timings = pico_ls_timings;
|
||||
|
||||
picod = kzalloc(sizeof(struct picodlp_data), GFP_KERNEL);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user