* [PATCH 8/9] [v2] drivers/video: fsl-diu-fb: merge diu_hw into fsl_diu_data
From: Timur Tabi @ 2011-10-05 0:36 UTC (permalink / raw)
To: linux-fbdev
The diu_hw structure contains two fields used to access the DIU registers,
but the only instance of this structure is a global variable, 'dr'.
Eliminate 'dr' by merging its fields into the fsl_diu_data structure,
which is instantiated on the heap for each DIU controller found.
Signed-off-by: Timur Tabi <timur@freescale.com>
---
drivers/video/fsl-diu-fb.c | 69 +++++++++++++++++++------------------------
1 files changed, 31 insertions(+), 38 deletions(-)
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
index 6539e70..f9a95ab 100644
--- a/drivers/video/fsl-diu-fb.c
+++ b/drivers/video/fsl-diu-fb.c
@@ -49,11 +49,6 @@
#define INT_PARERR 0x08 /* Display parameters error interrupt */
#define INT_LS_BF_VS 0x10 /* Lines before vsync. interrupt */
-struct diu_hw {
- struct diu __iomem *diu_reg;
- spinlock_t reg_lock;
-};
-
struct diu_addr {
void *vaddr; /* Virtual address */
dma_addr_t paddr; /* Physical address */
@@ -351,6 +346,8 @@ struct fsl_diu_data {
unsigned int irq;
int fb_enabled;
enum fsl_diu_monitor_port monitor_port;
+ struct diu __iomem *diu_reg;
+ spinlock_t reg_lock;
};
enum mfb_index {
@@ -424,10 +421,6 @@ static struct mfb_info mfb_template[] = {
},
};
-static struct diu_hw dr = {
- .reg_lock = __SPIN_LOCK_UNLOCKED(diu_hw.reg_lock),
-};
-
static struct diu_pool pool;
/**
@@ -506,9 +499,9 @@ void wr_reg_wa(u32 *reg, u32 val)
static void fsl_diu_enable_panel(struct fb_info *info)
{
struct mfb_info *pmfbi, *cmfbi, *mfbi = info->par;
- struct diu *hw = dr.diu_reg;
struct diu_ad *ad = mfbi->ad;
struct fsl_diu_data *machine_data = mfbi->parent;
+ struct diu __iomem *hw = machine_data->diu_reg;
switch (mfbi->index) {
case PLANE0:
@@ -559,9 +552,9 @@ static void fsl_diu_enable_panel(struct fb_info *info)
static void fsl_diu_disable_panel(struct fb_info *info)
{
struct mfb_info *pmfbi, *cmfbi, *mfbi = info->par;
- struct diu *hw = dr.diu_reg;
struct diu_ad *ad = mfbi->ad;
struct fsl_diu_data *machine_data = mfbi->parent;
+ struct diu __iomem *hw = machine_data->diu_reg;
switch (mfbi->index) {
case PLANE0:
@@ -613,9 +606,9 @@ static void fsl_diu_disable_panel(struct fb_info *info)
static void enable_lcdc(struct fb_info *info)
{
- struct diu *hw = dr.diu_reg;
struct mfb_info *mfbi = info->par;
struct fsl_diu_data *machine_data = mfbi->parent;
+ struct diu __iomem *hw = machine_data->diu_reg;
if (!machine_data->fb_enabled) {
out_be32(&hw->diu_mode, MFB_MODE1);
@@ -625,9 +618,9 @@ static void enable_lcdc(struct fb_info *info)
static void disable_lcdc(struct fb_info *info)
{
- struct diu *hw = dr.diu_reg;
struct mfb_info *mfbi = info->par;
struct fsl_diu_data *machine_data = mfbi->parent;
+ struct diu __iomem *hw = machine_data->diu_reg;
if (machine_data->fb_enabled) {
out_be32(&hw->diu_mode, 0);
@@ -822,13 +815,13 @@ static void update_lcdc(struct fb_info *info)
struct fb_var_screeninfo *var = &info->var;
struct mfb_info *mfbi = info->par;
struct fsl_diu_data *machine_data = mfbi->parent;
- struct diu *hw;
+ struct diu __iomem *hw;
int i, j;
char __iomem *cursor_base, *gamma_table_base;
u32 temp;
- hw = dr.diu_reg;
+ hw = machine_data->diu_reg;
diu_ops.set_monitor_port(machine_data->monitor_port);
gamma_table_base = pool.gamma.vaddr;
@@ -939,9 +932,9 @@ static int fsl_diu_set_par(struct fb_info *info)
struct mfb_info *mfbi = info->par;
struct fsl_diu_data *machine_data = mfbi->parent;
struct diu_ad *ad = mfbi->ad;
- struct diu *hw;
+ struct diu __iomem *hw;
- hw = dr.diu_reg;
+ hw = machine_data->diu_reg;
set_fix(info);
mfbi->cursor_reset = 1;
@@ -1344,7 +1337,7 @@ static void uninstall_fb(struct fb_info *info)
static irqreturn_t fsl_diu_isr(int irq, void *dev_id)
{
- struct diu *hw = dr.diu_reg;
+ struct diu __iomem *hw = dev_id;
unsigned int status = in_be32(&hw->int_status);
if (status) {
@@ -1370,18 +1363,16 @@ static irqreturn_t fsl_diu_isr(int irq, void *dev_id)
return IRQ_NONE;
}
-static int request_irq_local(int irq)
+static int request_irq_local(struct fsl_diu_data *machine_data)
{
+ struct diu __iomem *hw = machine_data->diu_reg;
u32 ints;
- struct diu *hw;
int ret;
- hw = dr.diu_reg;
-
/* Read to clear the status */
in_be32(&hw->int_status);
- ret = request_irq(irq, fsl_diu_isr, 0, "fsl-diu-fb", NULL);
+ ret = request_irq(machine_data->irq, fsl_diu_isr, 0, "fsl-diu-fb", hw);
if (!ret) {
ints = INT_PARERR | INT_LS_BF_VS;
#if !defined(CONFIG_NOT_COHERENT_CACHE)
@@ -1396,14 +1387,14 @@ static int request_irq_local(int irq)
return ret;
}
-static void free_irq_local(int irq)
+static void free_irq_local(struct fsl_diu_data *machine_data)
{
- struct diu *hw = dr.diu_reg;
+ struct diu __iomem *hw = machine_data->diu_reg;
/* Disable all LCDC interrupt */
out_be32(&hw->int_mask, 0x1f);
- free_irq(irq, NULL);
+ free_irq(machine_data->irq, NULL);
}
#ifdef CONFIG_PM
@@ -1521,6 +1512,8 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
if (!machine_data)
return -ENOMEM;
+ spin_lock_init(&machine_data->reg_lock);
+
for (i = 0; i < ARRAY_SIZE(machine_data->fsl_diu_info); i++) {
machine_data->fsl_diu_info[i] framebuffer_alloc(sizeof(struct mfb_info), &pdev->dev);
@@ -1545,16 +1538,16 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
}
}
- dr.diu_reg = of_iomap(np, 0);
- if (!dr.diu_reg) {
+ machine_data->diu_reg = of_iomap(np, 0);
+ if (!machine_data->diu_reg) {
dev_err(&pdev->dev, "cannot map DIU registers\n");
ret = -EFAULT;
goto error2;
}
- diu_mode = in_be32(&dr.diu_reg->diu_mode);
+ diu_mode = in_be32(&machine_data->diu_reg->diu_mode);
if (diu_mode = MFB_MODE0)
- out_be32(&dr.diu_reg->diu_mode, 0); /* disable DIU */
+ out_be32(&machine_data->diu_reg->diu_mode, 0); /* disable DIU */
/* Get the IRQ of the DIU */
machine_data->irq = irq_of_parse_and_map(np, 0);
@@ -1607,10 +1600,11 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
* by the bootloader, set dummy area descriptor otherwise.
*/
if (diu_mode = MFB_MODE0)
- out_be32(&dr.diu_reg->desc[0], machine_data->dummy_ad->paddr);
+ out_be32(&machine_data->diu_reg->desc[0],
+ machine_data->dummy_ad->paddr);
- out_be32(&dr.diu_reg->desc[1], machine_data->dummy_ad->paddr);
- out_be32(&dr.diu_reg->desc[2], machine_data->dummy_ad->paddr);
+ out_be32(&machine_data->diu_reg->desc[1], machine_data->dummy_ad->paddr);
+ out_be32(&machine_data->diu_reg->desc[2], machine_data->dummy_ad->paddr);
for (i = 0; i < ARRAY_SIZE(machine_data->fsl_diu_info); i++) {
machine_data->fsl_diu_info[i]->fix.smem_start = 0;
@@ -1625,7 +1619,7 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
}
}
- if (request_irq_local(machine_data->irq)) {
+ if (request_irq_local(machine_data)) {
dev_err(&pdev->dev, "could not claim irq\n");
goto error;
}
@@ -1659,7 +1653,7 @@ error:
32);
if (machine_data->dummy_aoi_virt)
fsl_diu_free(machine_data->dummy_aoi_virt, 64);
- iounmap(dr.diu_reg);
+ iounmap(machine_data->diu_reg);
error2:
for (i = 0; i < ARRAY_SIZE(machine_data->fsl_diu_info); i++)
@@ -1677,7 +1671,7 @@ static int fsl_diu_remove(struct platform_device *pdev)
machine_data = dev_get_drvdata(&pdev->dev);
disable_lcdc(machine_data->fsl_diu_info[0]);
- free_irq_local(machine_data->irq);
+ free_irq_local(machine_data);
for (i = 0; i < ARRAY_SIZE(machine_data->fsl_diu_info); i++)
uninstall_fb(machine_data->fsl_diu_info[i]);
if (pool.ad.vaddr)
@@ -1689,7 +1683,7 @@ static int fsl_diu_remove(struct platform_device *pdev)
free_buf(&pdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2, 32);
if (machine_data->dummy_aoi_virt)
fsl_diu_free(machine_data->dummy_aoi_virt, 64);
- iounmap(dr.diu_reg);
+ iounmap(machine_data->diu_reg);
for (i = 0; i < ARRAY_SIZE(machine_data->fsl_diu_info); i++)
if (machine_data->fsl_diu_info[i])
framebuffer_release(machine_data->fsl_diu_info[i]);
@@ -1812,7 +1806,6 @@ static int __init fsl_diu_init(void)
#if defined(CONFIG_NOT_COHERENT_CACHE)
vfree(coherence_data);
#endif
- iounmap(dr.diu_reg);
}
return ret;
}
--
1.7.4.4
^ permalink raw reply related
* [PATCH 9/9] drivers/video: fsl-diu-fb: merge diu_pool into fsl_diu_data
From: Timur Tabi @ 2011-10-05 0:36 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <1317244795-24671-9-git-send-email-timur@freescale.com>
The diu_pool structure contains diu_addr objects for various objects
allocated in DMA space that are used by the DIU, but the only instance
of this structure is a global variable, 'pool'. Eliminate 'pool' by
merging its fields into the fsl_diu_data structure, which is instantiated
on the heap for each DIU controller found.
Signed-off-by: Timur Tabi <timur@freescale.com>
---
drivers/video/fsl-diu-fb.c | 73 +++++++++++++++++++++----------------------
1 files changed, 36 insertions(+), 37 deletions(-)
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
index f9a95ab..3a5f547 100644
--- a/drivers/video/fsl-diu-fb.c
+++ b/drivers/video/fsl-diu-fb.c
@@ -55,13 +55,6 @@ struct diu_addr {
__u32 offset;
};
-struct diu_pool {
- struct diu_addr ad;
- struct diu_addr gamma;
- struct diu_addr pallete;
- struct diu_addr cursor;
-};
-
/*
* List of supported video modes
*
@@ -348,6 +341,11 @@ struct fsl_diu_data {
enum fsl_diu_monitor_port monitor_port;
struct diu __iomem *diu_reg;
spinlock_t reg_lock;
+ unsigned int mode; /* DIU operation mode */
+ struct diu_addr ad;
+ struct diu_addr gamma;
+ struct diu_addr pallete;
+ struct diu_addr cursor;
};
enum mfb_index {
@@ -421,8 +419,6 @@ static struct mfb_info mfb_template[] = {
},
};
-static struct diu_pool pool;
-
/**
* fsl_diu_name_to_port - convert a port name to a monitor port enum
*
@@ -824,22 +820,23 @@ static void update_lcdc(struct fb_info *info)
hw = machine_data->diu_reg;
diu_ops.set_monitor_port(machine_data->monitor_port);
- gamma_table_base = pool.gamma.vaddr;
- cursor_base = pool.cursor.vaddr;
+ gamma_table_base = machine_data->gamma.vaddr;
+ cursor_base = machine_data->cursor.vaddr;
/* Prep for DIU init - gamma table, cursor table */
for (i = 0; i <= 2; i++)
for (j = 0; j <= 255; j++)
*gamma_table_base++ = j;
- diu_ops.set_gamma_table(machine_data->monitor_port, pool.gamma.vaddr);
+ diu_ops.set_gamma_table(machine_data->monitor_port,
+ machine_data->gamma.vaddr);
disable_lcdc(info);
/* Program DIU registers */
- out_be32(&hw->gamma, pool.gamma.paddr);
- out_be32(&hw->cursor, pool.cursor.paddr);
+ out_be32(&hw->gamma, machine_data->gamma.paddr);
+ out_be32(&hw->cursor, machine_data->cursor.paddr);
out_be32(&hw->bgnd, 0x007F7F7F); /* BGND */
out_be32(&hw->bgnd_wb, 0); /* BGND_WB */
@@ -1560,27 +1557,27 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
machine_data->monitor_port = monitor_port;
/* Area descriptor memory pool aligns to 64-bit boundary */
- if (allocate_buf(&pdev->dev, &pool.ad,
+ if (allocate_buf(&pdev->dev, &machine_data->ad,
sizeof(struct diu_ad) * FSL_AOI_NUM, 8))
return -ENOMEM;
/* Get memory for Gamma Table - 32-byte aligned memory */
- if (allocate_buf(&pdev->dev, &pool.gamma, 768, 32)) {
+ if (allocate_buf(&pdev->dev, &machine_data->gamma, 768, 32)) {
ret = -ENOMEM;
goto error;
}
/* For performance, cursor bitmap buffer aligns to 32-byte boundary */
- if (allocate_buf(&pdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2,
- 32)) {
+ if (allocate_buf(&pdev->dev, &machine_data->cursor,
+ MAX_CURS * MAX_CURS * 2, 32)) {
ret = -ENOMEM;
goto error;
}
i = ARRAY_SIZE(machine_data->fsl_diu_info);
- machine_data->dummy_ad = (struct diu_ad *)
- ((u32)pool.ad.vaddr + pool.ad.offset) + i;
- machine_data->dummy_ad->paddr = pool.ad.paddr +
+ machine_data->dummy_ad = (struct diu_ad *)((u32)machine_data->ad.vaddr +
+ machine_data->ad.offset) + i;
+ machine_data->dummy_ad->paddr = machine_data->ad.paddr +
i * sizeof(struct diu_ad);
machine_data->dummy_aoi_virt = fsl_diu_alloc(64, &dummy_ad_addr);
if (!machine_data->dummy_aoi_virt) {
@@ -1609,9 +1606,10 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
for (i = 0; i < ARRAY_SIZE(machine_data->fsl_diu_info); i++) {
machine_data->fsl_diu_info[i]->fix.smem_start = 0;
mfbi = machine_data->fsl_diu_info[i]->par;
- mfbi->ad = (struct diu_ad *)((u32)pool.ad.vaddr
- + pool.ad.offset) + i;
- mfbi->ad->paddr = pool.ad.paddr + i * sizeof(struct diu_ad);
+ mfbi->ad = (struct diu_ad *)((u32)machine_data->ad.vaddr
+ + machine_data->ad.offset) + i;
+ mfbi->ad->paddr + machine_data->ad.paddr + i * sizeof(struct diu_ad);
ret = install_fb(machine_data->fsl_diu_info[i]);
if (ret) {
dev_err(&pdev->dev, "could not register fb %d\n", i);
@@ -1643,14 +1641,14 @@ error:
for (i = 0; i < ARRAY_SIZE(machine_data->fsl_diu_info); i++)
uninstall_fb(machine_data->fsl_diu_info[i]);
- if (pool.ad.vaddr)
- free_buf(&pdev->dev, &pool.ad,
+ if (machine_data->ad.vaddr)
+ free_buf(&pdev->dev, &machine_data->ad,
sizeof(struct diu_ad) * FSL_AOI_NUM, 8);
- if (pool.gamma.vaddr)
- free_buf(&pdev->dev, &pool.gamma, 768, 32);
- if (pool.cursor.vaddr)
- free_buf(&pdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2,
- 32);
+ if (machine_data->gamma.vaddr)
+ free_buf(&pdev->dev, &machine_data->gamma, 768, 32);
+ if (machine_data->cursor.vaddr)
+ free_buf(&pdev->dev, &machine_data->cursor,
+ MAX_CURS * MAX_CURS * 2, 32);
if (machine_data->dummy_aoi_virt)
fsl_diu_free(machine_data->dummy_aoi_virt, 64);
iounmap(machine_data->diu_reg);
@@ -1674,13 +1672,14 @@ static int fsl_diu_remove(struct platform_device *pdev)
free_irq_local(machine_data);
for (i = 0; i < ARRAY_SIZE(machine_data->fsl_diu_info); i++)
uninstall_fb(machine_data->fsl_diu_info[i]);
- if (pool.ad.vaddr)
- free_buf(&pdev->dev, &pool.ad,
+ if (machine_data->ad.vaddr)
+ free_buf(&pdev->dev, &machine_data->ad,
sizeof(struct diu_ad) * FSL_AOI_NUM, 8);
- if (pool.gamma.vaddr)
- free_buf(&pdev->dev, &pool.gamma, 768, 32);
- if (pool.cursor.vaddr)
- free_buf(&pdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2, 32);
+ if (machine_data->gamma.vaddr)
+ free_buf(&pdev->dev, &machine_data->gamma, 768, 32);
+ if (machine_data->cursor.vaddr)
+ free_buf(&pdev->dev, &machine_data->cursor,
+ MAX_CURS * MAX_CURS * 2, 32);
if (machine_data->dummy_aoi_virt)
fsl_diu_free(machine_data->dummy_aoi_virt, 64);
iounmap(machine_data->diu_reg);
--
1.7.4.4
^ permalink raw reply related
* Re: [PATCH 9/9] drivers/video: fsl-diu-fb: merge diu_pool into fsl_diu_data
From: Florian Tobias Schandinat @ 2011-10-05 1:28 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <1317244795-24671-9-git-send-email-timur@freescale.com>
On 10/05/2011 12:36 AM, Timur Tabi wrote:
> The diu_pool structure contains diu_addr objects for various objects
> allocated in DMA space that are used by the DIU, but the only instance
> of this structure is a global variable, 'pool'. Eliminate 'pool' by
> merging its fields into the fsl_diu_data structure, which is instantiated
> on the heap for each DIU controller found.
>
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> drivers/video/fsl-diu-fb.c | 73 +++++++++++++++++++++----------------------
> 1 files changed, 36 insertions(+), 37 deletions(-)
>
> diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
> index f9a95ab..3a5f547 100644
> --- a/drivers/video/fsl-diu-fb.c
> +++ b/drivers/video/fsl-diu-fb.c
> @@ -55,13 +55,6 @@ struct diu_addr {
> __u32 offset;
> };
>
> -struct diu_pool {
> - struct diu_addr ad;
> - struct diu_addr gamma;
> - struct diu_addr pallete;
> - struct diu_addr cursor;
> -};
> -
> /*
> * List of supported video modes
> *
> @@ -348,6 +341,11 @@ struct fsl_diu_data {
> enum fsl_diu_monitor_port monitor_port;
> struct diu __iomem *diu_reg;
> spinlock_t reg_lock;
> + unsigned int mode; /* DIU operation mode */
And here you are introducing mode again....I think that you did not want to do
this, so I only took the v2 of this series and combined them with the other
patches of your old series (with the addition to the commit message in 4/9 as
you wanted). Please verify that the result in
git://github.com/schandinat/linux-2.6.git fbdev-next
is what you want to have there.
Best regards,
Florian Tobias Schandinat
> + struct diu_addr ad;
> + struct diu_addr gamma;
> + struct diu_addr pallete;
> + struct diu_addr cursor;
> };
>
> enum mfb_index {
> @@ -421,8 +419,6 @@ static struct mfb_info mfb_template[] = {
> },
> };
>
> -static struct diu_pool pool;
> -
> /**
> * fsl_diu_name_to_port - convert a port name to a monitor port enum
> *
> @@ -824,22 +820,23 @@ static void update_lcdc(struct fb_info *info)
> hw = machine_data->diu_reg;
>
> diu_ops.set_monitor_port(machine_data->monitor_port);
> - gamma_table_base = pool.gamma.vaddr;
> - cursor_base = pool.cursor.vaddr;
> + gamma_table_base = machine_data->gamma.vaddr;
> + cursor_base = machine_data->cursor.vaddr;
> /* Prep for DIU init - gamma table, cursor table */
>
> for (i = 0; i <= 2; i++)
> for (j = 0; j <= 255; j++)
> *gamma_table_base++ = j;
>
> - diu_ops.set_gamma_table(machine_data->monitor_port, pool.gamma.vaddr);
> + diu_ops.set_gamma_table(machine_data->monitor_port,
> + machine_data->gamma.vaddr);
>
> disable_lcdc(info);
>
> /* Program DIU registers */
>
> - out_be32(&hw->gamma, pool.gamma.paddr);
> - out_be32(&hw->cursor, pool.cursor.paddr);
> + out_be32(&hw->gamma, machine_data->gamma.paddr);
> + out_be32(&hw->cursor, machine_data->cursor.paddr);
>
> out_be32(&hw->bgnd, 0x007F7F7F); /* BGND */
> out_be32(&hw->bgnd_wb, 0); /* BGND_WB */
> @@ -1560,27 +1557,27 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
> machine_data->monitor_port = monitor_port;
>
> /* Area descriptor memory pool aligns to 64-bit boundary */
> - if (allocate_buf(&pdev->dev, &pool.ad,
> + if (allocate_buf(&pdev->dev, &machine_data->ad,
> sizeof(struct diu_ad) * FSL_AOI_NUM, 8))
> return -ENOMEM;
>
> /* Get memory for Gamma Table - 32-byte aligned memory */
> - if (allocate_buf(&pdev->dev, &pool.gamma, 768, 32)) {
> + if (allocate_buf(&pdev->dev, &machine_data->gamma, 768, 32)) {
> ret = -ENOMEM;
> goto error;
> }
>
> /* For performance, cursor bitmap buffer aligns to 32-byte boundary */
> - if (allocate_buf(&pdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2,
> - 32)) {
> + if (allocate_buf(&pdev->dev, &machine_data->cursor,
> + MAX_CURS * MAX_CURS * 2, 32)) {
> ret = -ENOMEM;
> goto error;
> }
>
> i = ARRAY_SIZE(machine_data->fsl_diu_info);
> - machine_data->dummy_ad = (struct diu_ad *)
> - ((u32)pool.ad.vaddr + pool.ad.offset) + i;
> - machine_data->dummy_ad->paddr = pool.ad.paddr +
> + machine_data->dummy_ad = (struct diu_ad *)((u32)machine_data->ad.vaddr +
> + machine_data->ad.offset) + i;
> + machine_data->dummy_ad->paddr = machine_data->ad.paddr +
> i * sizeof(struct diu_ad);
> machine_data->dummy_aoi_virt = fsl_diu_alloc(64, &dummy_ad_addr);
> if (!machine_data->dummy_aoi_virt) {
> @@ -1609,9 +1606,10 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
> for (i = 0; i < ARRAY_SIZE(machine_data->fsl_diu_info); i++) {
> machine_data->fsl_diu_info[i]->fix.smem_start = 0;
> mfbi = machine_data->fsl_diu_info[i]->par;
> - mfbi->ad = (struct diu_ad *)((u32)pool.ad.vaddr
> - + pool.ad.offset) + i;
> - mfbi->ad->paddr = pool.ad.paddr + i * sizeof(struct diu_ad);
> + mfbi->ad = (struct diu_ad *)((u32)machine_data->ad.vaddr
> + + machine_data->ad.offset) + i;
> + mfbi->ad->paddr > + machine_data->ad.paddr + i * sizeof(struct diu_ad);
> ret = install_fb(machine_data->fsl_diu_info[i]);
> if (ret) {
> dev_err(&pdev->dev, "could not register fb %d\n", i);
> @@ -1643,14 +1641,14 @@ error:
> for (i = 0; i < ARRAY_SIZE(machine_data->fsl_diu_info); i++)
> uninstall_fb(machine_data->fsl_diu_info[i]);
>
> - if (pool.ad.vaddr)
> - free_buf(&pdev->dev, &pool.ad,
> + if (machine_data->ad.vaddr)
> + free_buf(&pdev->dev, &machine_data->ad,
> sizeof(struct diu_ad) * FSL_AOI_NUM, 8);
> - if (pool.gamma.vaddr)
> - free_buf(&pdev->dev, &pool.gamma, 768, 32);
> - if (pool.cursor.vaddr)
> - free_buf(&pdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2,
> - 32);
> + if (machine_data->gamma.vaddr)
> + free_buf(&pdev->dev, &machine_data->gamma, 768, 32);
> + if (machine_data->cursor.vaddr)
> + free_buf(&pdev->dev, &machine_data->cursor,
> + MAX_CURS * MAX_CURS * 2, 32);
> if (machine_data->dummy_aoi_virt)
> fsl_diu_free(machine_data->dummy_aoi_virt, 64);
> iounmap(machine_data->diu_reg);
> @@ -1674,13 +1672,14 @@ static int fsl_diu_remove(struct platform_device *pdev)
> free_irq_local(machine_data);
> for (i = 0; i < ARRAY_SIZE(machine_data->fsl_diu_info); i++)
> uninstall_fb(machine_data->fsl_diu_info[i]);
> - if (pool.ad.vaddr)
> - free_buf(&pdev->dev, &pool.ad,
> + if (machine_data->ad.vaddr)
> + free_buf(&pdev->dev, &machine_data->ad,
> sizeof(struct diu_ad) * FSL_AOI_NUM, 8);
> - if (pool.gamma.vaddr)
> - free_buf(&pdev->dev, &pool.gamma, 768, 32);
> - if (pool.cursor.vaddr)
> - free_buf(&pdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2, 32);
> + if (machine_data->gamma.vaddr)
> + free_buf(&pdev->dev, &machine_data->gamma, 768, 32);
> + if (machine_data->cursor.vaddr)
> + free_buf(&pdev->dev, &machine_data->cursor,
> + MAX_CURS * MAX_CURS * 2, 32);
> if (machine_data->dummy_aoi_virt)
> fsl_diu_free(machine_data->dummy_aoi_virt, 64);
> iounmap(machine_data->diu_reg);
^ permalink raw reply
* Re: [PATCH 9/9] drivers/video: fsl-diu-fb: merge diu_pool into
From: Tabi Timur-B04825 @ 2011-10-05 3:26 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <1317244795-24671-9-git-send-email-timur@freescale.com>
Florian Tobias Schandinat wrote:
>> @@ -348,6 +341,11 @@ struct fsl_diu_data {
>> enum fsl_diu_monitor_port monitor_port;
>> struct diu __iomem *diu_reg;
>> spinlock_t reg_lock;
>> + unsigned int mode; /* DIU operation mode */
>
> And here you are introducing mode again....
I have no idea how that happened. I never touched patch #9 during my
rebase, and I removed that line from patch #8, so I can't explain how it
got added back.
I spent hours verifying the patches to make sure that git-bisect still
works and that each patch is clean. It just never occurred to me to
double-check a commit that I didn't modify.
> I think that you did not want to do
> this, so I only took the v2 of this series and combined them with the other
> patches of your old series (with the addition to the commit message in 4/9 as
> you wanted). Please verify that the result in
> git://github.com/schandinat/linux-2.6.git fbdev-next
> is what you want to have there.
Yes, it looks good. Thanks for taking care of this for me. These are the
last patches for 3.2.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply
* [PATCH 1/2] atmel_lcdfb: Adjust HFP calculation so it matches the manual.
From: Alexander Stein @ 2011-10-05 7:59 UTC (permalink / raw)
To: linux-arm-kernel
In the AT91SAM9263 Manual the HFP part in LCDTIM2 is described as follows:
* HFP: Horizontal Front Porch
Number of idle LCDDOTCK cycles at the end of the line.
Idle period is (HFP+2) LCDDOTCK cycles.
It is only a minor issue. I also changed all boards using atmel_lcdfb
I found to respect the new calculation.
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
---
arch/arm/mach-at91/board-cap9adk.c | 2 +-
arch/arm/mach-at91/board-neocore926.c | 2 +-
arch/arm/mach-at91/board-sam9261ek.c | 4 ++--
arch/arm/mach-at91/board-sam9263ek.c | 2 +-
arch/arm/mach-at91/board-sam9m10g45ek.c | 2 +-
arch/arm/mach-at91/board-sam9rlek.c | 2 +-
drivers/video/atmel_lcdfb.c | 4 ++--
7 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-at91/board-cap9adk.c b/arch/arm/mach-at91/board-cap9adk.c
index 679b0b7..ae962bf 100644
--- a/arch/arm/mach-at91/board-cap9adk.c
+++ b/arch/arm/mach-at91/board-cap9adk.c
@@ -304,7 +304,7 @@ static struct fb_videomode at91_tft_vga_modes[] = {
.xres = 240, .yres = 320,
.pixclock = KHZ2PICOS(4965),
- .left_margin = 1, .right_margin = 33,
+ .left_margin = 1, .right_margin = 34,
.upper_margin = 1, .lower_margin = 0,
.hsync_len = 5, .vsync_len = 1,
diff --git a/arch/arm/mach-at91/board-neocore926.c b/arch/arm/mach-at91/board-neocore926.c
index 9bc6ab3..583878e 100644
--- a/arch/arm/mach-at91/board-neocore926.c
+++ b/arch/arm/mach-at91/board-neocore926.c
@@ -235,7 +235,7 @@ static struct fb_videomode at91_tft_vga_modes[] = {
.xres = 240, .yres = 320,
.pixclock = KHZ2PICOS(5000),
- .left_margin = 1, .right_margin = 33,
+ .left_margin = 1, .right_margin = 34,
.upper_margin = 1, .lower_margin = 0,
.hsync_len = 5, .vsync_len = 1,
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index 5096a0e..8dda83b 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -370,7 +370,7 @@ static struct fb_videomode at91_stn_modes[] = {
.xres = 320, .yres = 240,
.pixclock = KHZ2PICOS(1440),
- .left_margin = 1, .right_margin = 1,
+ .left_margin = 1, .right_margin = 2,
.upper_margin = 0, .lower_margin = 0,
.hsync_len = 1, .vsync_len = 1,
@@ -431,7 +431,7 @@ static struct fb_videomode at91_tft_vga_modes[] = {
.xres = 240, .yres = 320,
.pixclock = KHZ2PICOS(4965),
- .left_margin = 1, .right_margin = 33,
+ .left_margin = 1, .right_margin = 34,
.upper_margin = 1, .lower_margin = 0,
.hsync_len = 5, .vsync_len = 1,
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index ea8f185..e260070 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -258,7 +258,7 @@ static struct fb_videomode at91_tft_vga_modes[] = {
.xres = 240, .yres = 320,
.pixclock = KHZ2PICOS(4965),
- .left_margin = 1, .right_margin = 33,
+ .left_margin = 1, .right_margin = 34,
.upper_margin = 1, .lower_margin = 0,
.hsync_len = 5, .vsync_len = 1,
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c
index ad234cc..5e9a5ca 100644
--- a/arch/arm/mach-at91/board-sam9m10g45ek.c
+++ b/arch/arm/mach-at91/board-sam9m10g45ek.c
@@ -197,7 +197,7 @@ static struct fb_videomode at91_tft_vga_modes[] = {
.xres = 480, .yres = 272,
.pixclock = KHZ2PICOS(9000),
- .left_margin = 1, .right_margin = 1,
+ .left_margin = 1, .right_margin = 2,
.upper_margin = 40, .lower_margin = 1,
.hsync_len = 45, .vsync_len = 1,
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c
index 4f14b54..ad9e5c9 100644
--- a/arch/arm/mach-at91/board-sam9rlek.c
+++ b/arch/arm/mach-at91/board-sam9rlek.c
@@ -154,7 +154,7 @@ static struct fb_videomode at91_tft_vga_modes[] = {
.xres = 240, .yres = 320,
.pixclock = KHZ2PICOS(4965),
- .left_margin = 1, .right_margin = 33,
+ .left_margin = 1, .right_margin = 34,
.upper_margin = 1, .lower_margin = 0,
.hsync_len = 5, .vsync_len = 1,
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 817ab60..816d528 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -393,7 +393,7 @@ static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var,
var->lower_margin = min_t(u32, var->lower_margin,
ATMEL_LCDC_VFP);
var->right_margin = min_t(u32, var->right_margin,
- (ATMEL_LCDC_HFP >> ATMEL_LCDC_HFP_OFFSET) + 1);
+ (ATMEL_LCDC_HFP >> ATMEL_LCDC_HFP_OFFSET) + 2);
var->hsync_len = min_t(u32, var->hsync_len,
(ATMEL_LCDC_HPW >> ATMEL_LCDC_HPW_OFFSET) + 1);
var->left_margin = min_t(u32, var->left_margin,
@@ -578,7 +578,7 @@ static int atmel_lcdfb_set_par(struct fb_info *info)
lcdc_writel(sinfo, ATMEL_LCDC_TIM1, value);
/* Horizontal timing */
- value = (info->var.right_margin - 1) << ATMEL_LCDC_HFP_OFFSET;
+ value = (info->var.right_margin - 2) << ATMEL_LCDC_HFP_OFFSET;
value |= (info->var.hsync_len - 1) << ATMEL_LCDC_HPW_OFFSET;
value |= (info->var.left_margin - 1);
dev_dbg(info->device, " * LCDTIM2 = %08lx\n", value);
--
1.7.3.4
^ permalink raw reply related
* [PATCH 2/2] atmel_lcdfb: Use proper blanking on negative contrast polarity
From: Alexander Stein @ 2011-10-05 7:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1317801598-23757-1-git-send-email-alexander.stein@systec-electronic.com>
If used with negative polarity the PWM unit cannot be disabled. This would
result in a full contrast screen.
Instead let the PWM unit enabled using 0x0 as compare value which darkens
the display.
In result no power saving is possible if inverted contrast polarity
is used.
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
---
drivers/video/atmel_lcdfb.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 816d528..2bd75b5 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -96,8 +96,11 @@ static int atmel_bl_update_status(struct backlight_device *bl)
brightness = 0;
lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_VAL, brightness);
- lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR,
+ if (contrast_ctr & ATMEL_LCDC_POL_POSITIVE)
+ lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR,
brightness ? contrast_ctr : 0);
+ else
+ lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, contrast_ctr);
bl->props.fb_blank = bl->props.power = sinfo->bl_power = power;
--
1.7.3.4
^ permalink raw reply related
* [PATCH] video: platinumfb: Add __devexit_p at necessary place
From: Axel Lin @ 2011-10-05 8:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Florian Tobias Schandinat, linux-fbdev
According to the comments in include/linux/init.h:
"Pointers to __devexit functions must use __devexit_p(function_name), the
wrapper will insert either the function_name or NULL, depending on the config
options."
We have __devexit annotation for platinumfb_remove(), thus add __devexit_p at
necessary place.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/video/platinumfb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c
index 6694923..ae3caa6 100644
--- a/drivers/video/platinumfb.c
+++ b/drivers/video/platinumfb.c
@@ -683,7 +683,7 @@ static struct platform_driver platinum_driver .of_match_table = platinumfb_match,
},
.probe = platinumfb_probe,
- .remove = platinumfb_remove,
+ .remove = __devexit_p(platinumfb_remove),
};
static int __init platinumfb_init(void)
--
1.7.4.1
^ permalink raw reply related
* [PATCH 00/16] ARM: amba: Enable module alias autogeneration for AMBA drivers
From: Dave Martin @ 2011-10-05 16:04 UTC (permalink / raw)
To: linux-arm-kernel
Cc: patches, Paweł Moll, Alan Cox, Alessandro Rubini,
Alessandro Zummo, alsa-devel, Chris Ball, Dan Williams,
Dmitry Torokhov, Grant Likely, Jaroslav Kysela, Julia Lawall,
Linus Walleij, linux-fbdev, linux-input, linux-mmc, linux-serial,
linux-watchdog, Paul Mundt, rtc-linux, Russell King,
spi-devel-general, Takashi Iwai, Vinod Koul, Wim Van Sebroeck
There's no special reason why AMBA device drivers should not be
auto-loadable via udev, but udev currently has no way to map AMBA
device IDs to drivers.
As part of the effort to help enable the building of multiple
ARM platforms into a single kernel image in the future, it's desirable
to be able to build any non-critical platform-specific drivers as
modules.
A straightforward solution is to use modaliases to allow udev to
identify the correct driver module to load.
This series enables the general infrastructure for modalias generation
to work for AMBA devices, and enables it in the affected drivers.
Briefly tested on Versatile Express, including aaci, mmci and amba-clcd
(which appears to have the most interesting modalias match pattern).
For me, the appropiate modules now get loaded at udev trigger time.
Any comments and feedback are welcome.
Dave Martin (16):
ARM: amba: Move definition of struct amba_id to mod_devicetable.h
ARM: amba: Auto-generate AMBA driver module aliases during modpost
hwrng: nomadik: Enable module alias autogeneration for AMBA drivers
dmaengine: pl08x: Enable module alias autogeneration for AMBA drivers
dmaengine: pl330: Enable module alias autogeneration for AMBA drivers
gpio: pl061: Enable module alias autogeneration for AMBA drivers
input: ambakmi: Enable module alias autogeneration for AMBA drivers
mmc: mmci: Enable module alias autogeneration for AMBA drivers
rtc: pl030: Enable module alias autogeneration for AMBA drivers
rtc: pl031: Enable module alias autogeneration for AMBA drivers
spi: pl022: Enable module alias autogeneration for AMBA drivers
serial: pl010: Enable module alias autogeneration for AMBA drivers
serial: pl011: Enable module alias autogeneration for AMBA drivers
fbdev: amba: Enable module alias autogeneration for AMBA drivers
watchdog: sp805: Enable module alias autogeneration for AMBA drivers
sound: aaci: Enable module alias autogeneration for AMBA drivers
drivers/amba/bus.c | 9 ++++-
drivers/char/hw_random/nomadik-rng.c | 2 +
drivers/dma/amba-pl08x.c | 2 +
drivers/dma/pl330.c | 2 +
drivers/gpio/gpio-pl061.c | 2 +
drivers/input/serio/ambakmi.c | 2 +
drivers/mmc/host/mmci.c | 2 +
drivers/rtc/rtc-pl030.c | 2 +
drivers/rtc/rtc-pl031.c | 2 +
drivers/spi/spi-pl022.c | 2 +
drivers/tty/serial/amba-pl010.c | 2 +
drivers/tty/serial/amba-pl011.c | 2 +
drivers/video/amba-clcd.c | 2 +
drivers/watchdog/sp805_wdt.c | 2 +
include/linux/amba/bus.h | 7 +---
include/linux/mod_devicetable.h | 18 ++++++++
scripts/mod/file2alias.c | 72 ++++++++++++++++++++++++++++++++++
sound/arm/aaci.c | 2 +
18 files changed, 127 insertions(+), 7 deletions(-)
--
1.7.4.1
^ permalink raw reply
* [PATCH 14/16] fbdev: amba: Enable module alias autogeneration for AMBA drivers
From: Dave Martin @ 2011-10-05 16:05 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1317830707-17517-1-git-send-email-dave.martin@linaro.org>
Signed-off-by: Dave Martin <dave.martin@linaro.org>
---
drivers/video/amba-clcd.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c
index 2cda6ba..0a2cce7 100644
--- a/drivers/video/amba-clcd.c
+++ b/drivers/video/amba-clcd.c
@@ -621,6 +621,8 @@ static struct amba_id clcdfb_id_table[] = {
{ 0, 0 },
};
+MODULE_DEVICE_TABLE(amba, clcdfb_id_table);
+
static struct amba_driver clcd_driver = {
.drv = {
.name = "clcd-pl11x",
--
1.7.4.1
^ permalink raw reply related
* Re: [PATCHv2 01/28] OMAP: change get_context_loss_count ret value
From: Paul Walmsley @ 2011-10-06 23:11 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev, b-cousson, khilman
In-Reply-To: <1307627810-3768-2-git-send-email-tomi.valkeinen@ti.com>
On Thu, 9 Jun 2011, Tomi Valkeinen wrote:
> get_context_loss_count functions return context loss count as u32, and
> zero means an error. However, zero is also returned when context has
> never been lost and could also be returned when the context loss count
> has wrapped and goes to zero.
>
> Change the functions to return an int, with negative value meaning an
> error.
>
> OMAP HSMMC code uses omap_pm_get_dev_context_loss_count(), but as the
> hsmmc code handles the returned value as an int, with negative value
> meaning an error, this patch actually fixes hsmmc code also.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Acked-by: Kevin Hilman <khilman@ti.com>
Acked-by: Paul Walmsley <paul@pwsan.com>>
- Paul
^ permalink raw reply
* Re: [PATCHv2 01/28] OMAP: change get_context_loss_count ret value
From: Tony Lindgren @ 2011-10-06 23:14 UTC (permalink / raw)
To: Paul Walmsley; +Cc: Tomi Valkeinen, linux-omap, linux-fbdev, b-cousson, khilman
In-Reply-To: <alpine.DEB.2.00.1110061710510.4611@utopia.booyaka.com>
* Paul Walmsley <paul@pwsan.com> [111006 15:37]:
> On Thu, 9 Jun 2011, Tomi Valkeinen wrote:
>
> > get_context_loss_count functions return context loss count as u32, and
> > zero means an error. However, zero is also returned when context has
> > never been lost and could also be returned when the context loss count
> > has wrapped and goes to zero.
> >
> > Change the functions to return an int, with negative value meaning an
> > error.
> >
> > OMAP HSMMC code uses omap_pm_get_dev_context_loss_count(), but as the
> > hsmmc code handles the returned value as an int, with negative value
> > meaning an error, this patch actually fixes hsmmc code also.
> >
> > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> > Acked-by: Kevin Hilman <khilman@ti.com>
>
> Acked-by: Paul Walmsley <paul@pwsan.com>>
Thanks, picking this into fixes-part2 branch as requested by Paul.
Tony
^ permalink raw reply
* [GIT PULL] OMAP DSS for v3.2
From: Tomi Valkeinen @ 2011-10-07 7:20 UTC (permalink / raw)
To: Florian Tobias Schandinat; +Cc: linux-omap mailing list, lfbdev-ml
[-- Attachment #1: Type: text/plain, Size: 12624 bytes --]
Hi Florian,
Please pull OMAP DSS patches for v3.2 merge window.
Note that there are some conflicts with other trees. The board file
conflicts are trivial, changes in code which just happen to be next to
each other. The LCD driver conflicts are even simpler, there were
changes to them from some other tree, but I have removed the files.
The conflicts have been solved properly by Stephen in linux-next:
https://github.com/sfrothwell/linux-next/commit/3e31b3042760e3906d0a275d7adedfaf55ee5b0a
I also attached the output from git show, as github seems to show the
full diff for the merge commit.
Are you ok with the conflicts?
Tomi
The following changes since commit b6fd41e29dea9c6753b1843a77e50433e6123bcb:
Linux 3.1-rc6 (2011-09-12 14:02:02 -0700)
are available in the git repository at:
git://gitorious.org/linux-omap-dss2/linux.git for-florian
Andy Doan (1):
OMAPFB: make debug message more useful
Archit Taneja (26):
OMAP: DSS2: DISPC: Prepare dispc_dump_regs() for shortening
OMAP: DSS2: DISPC: Shorten dispc_dump_regs()
OMAP: DSS2: DISPC: dispc_save_context() and dispc_restore_context() cleanup
OMAP: DSS2: DISPC: Shorten _dispc_set_color_conv_coef()
OMAP: DSS2: Use a macro to declare size of the fifo_size array in dispc.c
OMAP: DSS2: Use MIPI DSI enums from include/video/mipi_display.h
OMAP: DSS2: DSI: Represent L4 and VP as sources of VC instead of modes
OMAP: DSS2: Create enum for DSI operation modes
OMAP: DSS2: DSI: Introduce generic write functions
OMAP: DSS2: DSI: Remove functions dsi_vc_dcs_read_1() and dsi_vc_dcs_read_2()
OMAP: DSS2: DSI: Split dsi_vc_dcs_read() into 2 functions
OMAP: DSS2: DSI: Introduce generic read functions
OMAP: DSS2: Clean up stallmode and io pad mode selection
OMAP: DSS2: Create an enum for DSI pixel formats
OMAP: DSS2: DSI: Send zero length packet in dsi_vc_send_null()
OMAP: DSS2: DSI Video mode support
OMAPDSS: DISPC: Reduce the number of arguments in dispc_ovl_setup()
OMAPDSS: DISPC: Pass overlay params as arguments to dispc_ovl_setup()
OMAPDSS: DISPC: Create helper function dispc_mgr_is_lcd()
OMAPDSS: DISPC: Get correct pixel clock for TV manager
OMAPDSS: DISPC: Remove hardcoded use of PPL in five tap clock calculation
OMAPDSS: DISPC: Clean up scaling related clock and five tap calculations
OMAPDSS: FEATURES: Create a range param to get max downscaling
OMAPDSS/OMAP_VOUT: Fix incorrect OMAP3-alpha compatibility setting
OMAPDSS: DISPC: VIDEO3 pipeline support
OMAPDSS: DISPC: zorder support for DSS overlays
Arnd Bergmann (1):
video/omap: fix build dependencies
Daniel Morsing (1):
OMAP: DSS2: Don't allow moving managers away from enabled displays
Dima Zavin (1):
OMAP: DSS: dispc: enable/disable clocks in error handler
Mayuresh Janorkar (1):
OMAP: DSS2: Add picodlp panel driver
Mythri P K (14):
OMAP4: DSS2: HDMI: HDMI clean up to pass base_address
OMAP4: DSS2: HDMI: Move pll and video configuration
OMAP4: DSS2: HDMI: Use specific HDMI timings structure
OMAP4: DSS2: HDMI: Move HDMI IP independent generic header
OMAP4: DSS2: HDMI: Move the EDID definition from HDMI
OMAP4: DSS2: HDMI: Split the current HDMI driver to move
OMAP4: DSS2: HDMI: Move the HDMI IP dependent audio
OMAP4: DSS2: HDMI: Rename the functions in HDMI IP library
OMAP4: DSS2: HDMI: Function pointer approach to call
OMAP4: DSS2: Rename hdmi_omap4_panel.c to hdmi_panel.c
OMAPDSS: HDMI: Move the comments in avi infoframe
OMAPDSS: HDMI: Replace hdmi_reg struct with u16
OMAPDSS: HDMI: Add missing register definitions
OMAPDSS: HDMI: Add support to dump registers through debugfs
Thomas Weber (2):
OMAP: DSS2: Support for Innolux AT070TN83
OMAP: Devkit8000: Change lcd driver to AT070TN83
Tomi Valkeinen (63):
OMAP: DSS2: PicoDLP: fix error handling in power_on
OMAP: DSS2: check for manager when enabling display
Revert "HACK: OMAP: DSS2: clk hack for OMAP2/3"
Revert "OMAP: DSS2: HDMI: fix hdmi clock name"
OMAP: DSS2: remove unneeded fck enable/disables
OMAP: DSS2: Change DSI device naming
OMAP4: TWL: Add common omapdss supplies
OMAP: DSS2: DSI: Improve dsi_mux_pads parameters
OMAP: DSS2: Implement dsi_mux_pads for OMAP4
OMAP: OMAPFB: make omapfb start even when a display is missing a driver
OMAP: DSS2: fix clock sources on error and uninit
OMAP: DSS2: Handle manager change in apply
OMAP: DSS2: Remove "EXPERIMENTAL" from Kconfig
OMAP: DSS2: Remove support for non-DISPC overlays
OMAP: DSS2: DISPC: use lookup tables for bit shifts
OMAP: DSS2: Add overlay caps to DSS features
OMAP: DSS2: Add GLOBAL_ALPHA & PRE_MULT_ALPHA to ovl caps
OMAP: DSS2: string parsing cleanups
OMAP: OMAPFB: string parsing cleanups
OMAP: DSS2: DISPC: remove non-existing func prototypes
OMAP: DSS2: DISPC: rename overlay related funcs
OMAP: DSS2: DISPC: rename manager related funcs
OMAP: DSS2: reorganize functions in dss.h
OMAP: DSS2: DISPC: Fix minimum PCD value
OMAP: DSS2: HDMI: use default dividers
OMAP: DSS2: HDMI: change regn definition
OMAP: DSS2: DSI: Add comment about regn
OMAP: DSS2: DISPC: Add missing IRQ definitions
OMAP: DSS2: add dss_get_hdmi_venc_clk_source()
OMAP: DSS2: DISPC: improve dispc_mgr_enable_digit_out()
OMAP: DSS2: HDMI: improve hdmi output enable
OMAP: DSS2: add read_edid() to omap_dss_driver struct
OMAP: DSS2: add detect() to omap_dss_driver struct
OMAP: DSS2: HDMI: make set_timing saner
OMAP: DSS2: HDMI: implement read_edid()
OMAP: DSS2: HDMI: remove edid parsing
OMAP: DSS2: HDMI: split hdmi_core_ddc_edid
OMAP: DSS2: HDMI: clean up edid reading & fix checksum
OMAP: DSS2: HDMI: remove error prints in check_timings
OMAP: DSS2: HDMI: implement detect()
OMAP: DSS2: add panel-dvi driver
OMAP: use dvi panel driver instead of generic-dpi
OMAP: stalker: Remove LCD device from board file
OMAP: DSS2: panel-generic-dpi: remove "generic" panel
OMAP: Add DDC i2c_bus_num to board files
OMAPFB: find best mode from edid
OMAPDSS: Taal: remove external backlight support
OMAPFB: Remove unused lcd drivers
OMAPDSS: Port 2430sdp display driver to DSS2
OMAPDSS: Port the H4 display driver to DSS2
OMAPDSS: Port the Apollon display driver to DSS2
OMAPDSS: Add N800 panel driver
OMAPDSS: remove vaddr from overlay info
OMAP: 4430SDP: Remove unneeded lcd config
OMAP4: 4430SDP: Add panel support to board file
OMAP4: 4430SDP: Add picodlp support to board file
OMAP: RX51: Remove unused old omapfb stuff
OMAP: omap3touchbook: Remove unused lcd stuff
OMAP: 2420SDP: Port the display driver to new DSS2
OMAP: LDP: Port the display driver to new DSS2
OMAP: H4: Port the display driver to new DSS2
OMAP: Apollon: Port the display driver to new DSS2
OMAPDSS: picodlp: add missing #include <linux/module.h>
arch/arm/mach-omap2/board-2430sdp.c | 78 +-
arch/arm/mach-omap2/board-3430sdp.c | 7 +-
arch/arm/mach-omap2/board-4430sdp.c | 208 +++-
arch/arm/mach-omap2/board-am3517evm.c | 6 +-
arch/arm/mach-omap2/board-apollon.c | 35 +-
arch/arm/mach-omap2/board-cm-t35.c | 6 +-
arch/arm/mach-omap2/board-devkit8000.c | 10 +-
arch/arm/mach-omap2/board-h4.c | 42 +-
arch/arm/mach-omap2/board-igep0020.c | 8 +-
arch/arm/mach-omap2/board-ldp.c | 123 ++-
arch/arm/mach-omap2/board-omap3beagle.c | 8 +-
arch/arm/mach-omap2/board-omap3evm.c | 7 +-
arch/arm/mach-omap2/board-omap3pandora.c | 2 +-
arch/arm/mach-omap2/board-omap3stalker.c | 40 +-
arch/arm/mach-omap2/board-omap3touchbook.c | 18 -
arch/arm/mach-omap2/board-omap4panda.c | 8 +-
arch/arm/mach-omap2/board-overo.c | 7 +-
arch/arm/mach-omap2/board-rx51.c | 25 -
arch/arm/mach-omap2/display.c | 60 +-
arch/arm/mach-omap2/twl-common.c | 11 +-
drivers/media/video/omap/omap_vout.c | 18 +-
drivers/video/omap/Kconfig | 29 -
drivers/video/omap/Makefile | 8 -
drivers/video/omap/lcd_2430sdp.c | 203 ---
drivers/video/omap/lcd_apollon.c | 136 --
drivers/video/omap/lcd_h4.c | 117 --
drivers/video/omap/lcd_ldp.c | 201 ---
drivers/video/omap/lcd_omap3beagle.c | 130 --
drivers/video/omap/lcd_omap3evm.c | 193 ---
drivers/video/omap/lcd_overo.c | 180 ---
drivers/video/omap2/displays/Kconfig | 28 +-
drivers/video/omap2/displays/Makefile | 3 +
drivers/video/omap2/displays/panel-dvi.c | 363 +++++
drivers/video/omap2/displays/panel-generic-dpi.c | 113 +-
drivers/video/omap2/displays/panel-n8x0.c | 747 +++++++++
drivers/video/omap2/displays/panel-picodlp.c | 594 +++++++
drivers/video/omap2/displays/panel-picodlp.h | 288 ++++
drivers/video/omap2/displays/panel-taal.c | 123 +-
drivers/video/omap2/dss/Kconfig | 2 +-
drivers/video/omap2/dss/Makefile | 2 +-
drivers/video/omap2/dss/core.c | 4 +
drivers/video/omap2/dss/dispc.c | 1700 ++++++++------------
drivers/video/omap2/dss/dispc.h | 57 +
drivers/video/omap2/dss/display.c | 31 +-
drivers/video/omap2/dss/dpi.c | 28 +-
drivers/video/omap2/dss/dsi.c | 929 +++++++-----
drivers/video/omap2/dss/dss.c | 18 +-
drivers/video/omap2/dss/dss.h | 156 +-
drivers/video/omap2/dss/dss_features.c | 130 ++-
drivers/video/omap2/dss/dss_features.h | 17 +-
drivers/video/omap2/dss/hdmi.c | 1260 ++-------------
.../omap2/dss/{hdmi_omap4_panel.c => hdmi_panel.c} | 68 +-
drivers/video/omap2/dss/manager.c | 191 +--
drivers/video/omap2/dss/overlay.c | 122 +-
drivers/video/omap2/dss/rfbi.c | 45 +-
drivers/video/omap2/dss/sdi.c | 19 +-
drivers/video/omap2/dss/ti_hdmi.h | 138 ++
drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c | 1239 ++++++++++++++
.../video/omap2/dss/{hdmi.h => ti_hdmi_4xxx_ip.h} | 400 +++---
drivers/video/omap2/dss/venc.c | 27 +-
drivers/video/omap2/omapfb/Kconfig | 2 +-
drivers/video/omap2/omapfb/omapfb-main.c | 134 ++-
drivers/video/omap2/omapfb/omapfb-sysfs.c | 6 +-
include/video/omap-panel-dvi.h | 37 +
include/video/omap-panel-n8x0.h | 15 +
include/video/omap-panel-nokia-dsi.h | 8 +-
include/video/omap-panel-picodlp.h | 23 +
include/video/omapdss.h | 100 +-
68 files changed, 6495 insertions(+), 4596 deletions(-)
delete mode 100644 drivers/video/omap/lcd_2430sdp.c
delete mode 100644 drivers/video/omap/lcd_apollon.c
delete mode 100644 drivers/video/omap/lcd_h4.c
delete mode 100644 drivers/video/omap/lcd_ldp.c
delete mode 100644 drivers/video/omap/lcd_omap3beagle.c
delete mode 100644 drivers/video/omap/lcd_omap3evm.c
delete mode 100644 drivers/video/omap/lcd_overo.c
create mode 100644 drivers/video/omap2/displays/panel-dvi.c
create mode 100644 drivers/video/omap2/displays/panel-n8x0.c
create mode 100644 drivers/video/omap2/displays/panel-picodlp.c
create mode 100644 drivers/video/omap2/displays/panel-picodlp.h
rename drivers/video/omap2/dss/{hdmi_omap4_panel.c => hdmi_panel.c} (79%)
create mode 100644 drivers/video/omap2/dss/ti_hdmi.h
create mode 100644 drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
rename drivers/video/omap2/dss/{hdmi.h => ti_hdmi_4xxx_ip.h} (54%)
create mode 100644 include/video/omap-panel-dvi.h
create mode 100644 include/video/omap-panel-n8x0.h
create mode 100644 include/video/omap-panel-picodlp.h
[-- Attachment #2: merge.txt --]
[-- Type: text/plain, Size: 9437 bytes --]
commit 3e31b3042760e3906d0a275d7adedfaf55ee5b0a
Merge: 49d6b1b 3e28189
Author: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri Oct 7 14:12:41 2011 +1100
Merge remote-tracking branch 'omap_dss2/for-next'
Conflicts:
arch/arm/mach-omap2/board-2430sdp.c
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/board-apollon.c
arch/arm/mach-omap2/board-h4.c
arch/arm/mach-omap2/board-ldp.c
arch/arm/mach-omap2/board-rx51.c
drivers/video/omap/lcd_apollon.c
drivers/video/omap/lcd_ldp.c
drivers/video/omap/lcd_overo.c
diff --cc arch/arm/mach-omap2/board-2430sdp.c
index 4191743,6ab6350..ba7d92b
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@@ -137,10 -192,12 +192,6 @@@ static inline void board_smc91x_init(vo
#endif
- static struct omap_board_config_kernel sdp2430_config[] __initdata = {
- {OMAP_TAG_LCD, &sdp2430_lcd_config},
- };
-
-static void __init omap_2430sdp_init_early(void)
-{
- omap2_init_common_infrastructure();
- omap2_init_common_devices(NULL, NULL);
-}
-
static struct regulator_consumer_supply sdp2430_vmmc1_supplies[] = {
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
};
diff --cc arch/arm/mach-omap2/board-4430sdp.c
index f3917b3,d3874a6..4d0c8b9
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@@ -381,14 -379,12 +379,6 @@@ static struct platform_device *sdp4430_
&sdp4430_vbat,
};
- static struct omap_lcd_config sdp4430_lcd_config __initdata = {
- .ctrl_name = "internal",
- };
-
- static struct omap_board_config_kernel sdp4430_config[] __initdata = {
- { OMAP_TAG_LCD, &sdp4430_lcd_config },
- };
-
-static void __init omap_4430sdp_init_early(void)
-{
- omap2_init_common_infrastructure();
- omap2_init_common_devices(NULL, NULL);
-}
-
static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_UTMI,
.mode = MUSB_OTG,
diff --cc arch/arm/mach-omap2/board-apollon.c
index 868d5f0,d8eb81e..66f3842
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@@ -265,14 -262,34 +262,28 @@@ static struct omap_usb_config apollon_u
.pins[0] = 6,
};
- static struct omap_lcd_config apollon_lcd_config __initdata = {
- .ctrl_name = "internal",
+ static struct panel_generic_dpi_data apollon_panel_data = {
+ .name = "apollon",
};
- static struct omap_board_config_kernel apollon_config[] __initdata = {
- { OMAP_TAG_LCD, &apollon_lcd_config },
+ static struct omap_dss_device apollon_lcd_device = {
+ .name = "lcd",
+ .driver_name = "generic_dpi_panel",
+ .type = OMAP_DISPLAY_TYPE_DPI,
+ .phy.dpi.data_lines = 18,
+ .data = &apollon_panel_data,
+ };
+
+ static struct omap_dss_device *apollon_dss_devices[] = {
+ &apollon_lcd_device,
+ };
+
+ static struct omap_dss_board_info apollon_dss_data = {
+ .num_devices = ARRAY_SIZE(apollon_dss_devices),
+ .devices = apollon_dss_devices,
+ .default_device = &apollon_lcd_device,
};
-static void __init omap_apollon_init_early(void)
-{
- omap2_init_common_infrastructure();
- omap2_init_common_devices(NULL, NULL);
-}
-
static struct gpio apollon_gpio_leds[] __initdata = {
{ LED0_GPIO13, GPIOF_OUT_INIT_LOW, "LED0" }, /* LED0 - AA10 */
{ LED1_GPIO14, GPIOF_OUT_INIT_LOW, "LED1" }, /* LED1 - AA6 */
@@@ -334,7 -349,8 +343,9 @@@ static void __init omap_apollon_init(vo
*/
platform_add_devices(apollon_devices, ARRAY_SIZE(apollon_devices));
omap_serial_init();
+ omap_sdrc_init(NULL, NULL);
+
+ omap_display_init(&apollon_dss_data);
}
static void __init omap_apollon_map_io(void)
diff --cc arch/arm/mach-omap2/board-h4.c
index f0ddc27,f7c09de..ba81484
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@@ -285,10 -301,12 +300,6 @@@ static struct omap_usb_config h4_usb_co
.hmc_mode = 0x00, /* 0:dev|otg 1:disable 2:disable */
};
- static struct omap_board_config_kernel h4_config[] __initdata = {
- { OMAP_TAG_LCD, &h4_lcd_config },
- };
-
-static void __init omap_h4_init_early(void)
-{
- omap2_init_common_infrastructure();
- omap2_init_common_devices(NULL, NULL);
-}
-
static void __init omap_h4_init_irq(void)
{
omap2_init_irq();
@@@ -364,8 -379,9 +372,10 @@@ static void __init omap_h4_init(void
platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices));
omap2_usbfs_init(&h4_usb_config);
omap_serial_init();
+ omap_sdrc_init(NULL, NULL);
h4_init_flash();
+
+ omap_display_init(&h4_dss_data);
}
static void __init omap_h4_map_io(void)
diff --cc arch/arm/mach-omap2/board-ldp.c
index 5797917,689ed49..e179da0
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@@ -179,19 -183,103 +183,97 @@@ static inline void __init ldp_init_smsc
gpmc_smsc911x_init(&smsc911x_cfg);
}
- static struct platform_device ldp_lcd_device = {
- .name = "ldp_lcd",
- .id = -1,
+ /* LCD */
+
+ static int ldp_backlight_gpio;
+ static int ldp_lcd_enable_gpio;
+
+ #define LCD_PANEL_RESET_GPIO 55
+ #define LCD_PANEL_QVGA_GPIO 56
+
+ static int ldp_panel_enable_lcd(struct omap_dss_device *dssdev)
+ {
+ if (gpio_is_valid(ldp_lcd_enable_gpio))
+ gpio_direction_output(ldp_lcd_enable_gpio, 1);
+ if (gpio_is_valid(ldp_backlight_gpio))
+ gpio_direction_output(ldp_backlight_gpio, 1);
+
+ return 0;
+ }
+
+ static void ldp_panel_disable_lcd(struct omap_dss_device *dssdev)
+ {
+ if (gpio_is_valid(ldp_lcd_enable_gpio))
+ gpio_direction_output(ldp_lcd_enable_gpio, 0);
+ if (gpio_is_valid(ldp_backlight_gpio))
+ gpio_direction_output(ldp_backlight_gpio, 0);
+ }
+
+ static struct panel_generic_dpi_data ldp_panel_data = {
+ .name = "nec_nl2432dr22-11b",
+ .platform_enable = ldp_panel_enable_lcd,
+ .platform_disable = ldp_panel_disable_lcd,
};
- static struct omap_lcd_config ldp_lcd_config __initdata = {
- .ctrl_name = "internal",
+ static struct omap_dss_device ldp_lcd_device = {
+ .name = "lcd",
+ .driver_name = "generic_dpi_panel",
+ .type = OMAP_DISPLAY_TYPE_DPI,
+ .phy.dpi.data_lines = 18,
+ .data = &ldp_panel_data,
+ };
+
+ static struct omap_dss_device *ldp_dss_devices[] = {
+ &ldp_lcd_device,
};
- static struct omap_board_config_kernel ldp_config[] __initdata = {
- { OMAP_TAG_LCD, &ldp_lcd_config },
+ static struct omap_dss_board_info ldp_dss_data = {
+ .num_devices = ARRAY_SIZE(ldp_dss_devices),
+ .devices = ldp_dss_devices,
+ .default_device = &ldp_lcd_device,
};
+ static void __init ldp_display_init(void)
+ {
+ int r;
+
+ static struct gpio gpios[] __initdata = {
+ {LCD_PANEL_RESET_GPIO, GPIOF_OUT_INIT_HIGH, "LCD RESET"},
+ {LCD_PANEL_QVGA_GPIO, GPIOF_OUT_INIT_HIGH, "LCD QVGA"},
+ };
+
+ r = gpio_request_array(gpios, ARRAY_SIZE(gpios));
+ if (r) {
+ pr_err("Cannot request LCD GPIOs, error %d\n", r);
+ return;
+ }
+
+ omap_display_init(&ldp_dss_data);
+ }
+
-static void __init omap_ldp_init_early(void)
-{
- omap2_init_common_infrastructure();
- omap2_init_common_devices(NULL, NULL);
-}
-
+ static int ldp_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned ngpio)
+ {
+ int r;
+
+ struct gpio gpios[] = {
+ {gpio + 7 , GPIOF_OUT_INIT_LOW, "LCD ENABLE"},
+ {gpio + 15, GPIOF_OUT_INIT_LOW, "LCD BACKLIGHT"},
+ };
+
+ r = gpio_request_array(gpios, ARRAY_SIZE(gpios));
+ if (r) {
+ pr_err("Cannot request LCD GPIOs, error %d\n", r);
+ ldp_backlight_gpio = -EINVAL;
+ ldp_lcd_enable_gpio = -EINVAL;
+ return r;
+ }
+
+ ldp_backlight_gpio = gpio + 15;
+ ldp_lcd_enable_gpio = gpio + 7;
+
+ return 0;
+ }
+
static struct twl4030_gpio_platform_data ldp_gpio_data = {
.gpio_base = OMAP_MAX_GPIO_LINES,
.irq_base = TWL4030_GPIO_IRQ_BASE,
diff --cc arch/arm/mach-omap2/board-rx51.c
index e2e958a,9e7dde6..34858c8
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@@ -79,29 -79,15 +79,6 @@@ static struct cpuidle_params rx51_cpuid
{7505 + 15274, 484329, 1},
};
- static struct omap_lcd_config rx51_lcd_config = {
- .ctrl_name = "internal",
- };
-
- static struct omap_fbmem_config rx51_fbmem0_config = {
- .size = 752 * 1024,
- };
-
- static struct omap_fbmem_config rx51_fbmem1_config = {
- .size = 752 * 1024,
- };
-
- static struct omap_fbmem_config rx51_fbmem2_config = {
- .size = 752 * 1024,
- };
-
- static struct omap_board_config_kernel rx51_config[] = {
- { OMAP_TAG_FBMEM, &rx51_fbmem0_config },
- { OMAP_TAG_FBMEM, &rx51_fbmem1_config },
- { OMAP_TAG_FBMEM, &rx51_fbmem2_config },
- { OMAP_TAG_LCD, &rx51_lcd_config },
- };
-
-static void __init rx51_init_early(void)
-{
- struct omap_sdrc_params *sdrc_params;
-
- omap2_init_common_infrastructure();
- sdrc_params = nokia_get_sdram_timings();
- omap2_init_common_devices(sdrc_params, sdrc_params);
-}
-
extern void __init rx51_peripherals_init(void);
#ifdef CONFIG_OMAP_MUX
@@@ -118,17 -104,9 +95,15 @@@ static struct omap_musb_board_data musb
static void __init rx51_init(void)
{
+ struct omap_sdrc_params *sdrc_params;
+
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
- omap_board_config = rx51_config;
- omap_board_config_size = ARRAY_SIZE(rx51_config);
omap3_pm_init_cpuidle(rx51_cpuidle_params);
omap_serial_init();
+
+ sdrc_params = nokia_get_sdram_timings();
+ omap_sdrc_init(sdrc_params, sdrc_params);
+
usb_musb_init(&musb_board_data);
rx51_peripherals_init();
^ permalink raw reply
* linux-next: manual merge of the staging tree with the fbdev tree
From: Stephen Rothwell @ 2011-10-13 6:02 UTC (permalink / raw)
To: Greg KH
Cc: linux-next, linux-kernel, Laurent Pinchart,
Florian Tobias Schandinat, linux-fbdev, Aaro Koskinen
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --]
Hi Greg,
Today's linux-next merge of the staging tree got a conflict in
drivers/staging/xgifb/XGI_main_26.c between commit 0d5c6ca30bb0
("staging: xgifb: use display information in info not in var for
panning") from the fbdev tree and commit fd26d42019cb ("staging: xgifb:
avoid direct references xgi_video_info") from the staging tree.
I fixed it up (I think - see below) and can carry the fix as necessary.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/staging/xgifb/XGI_main_26.c
index f8b88ad,36db231..0000000
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@@ -1363,8 -1300,8 +1300,8 @@@ static int XGIfb_do_set_var(struct fb_v
return 0;
}
- #ifdef XGIFB_PAN
- static int XGIfb_pan_var(struct fb_var_screeninfo *var, struct fb_info *info)
+ static int XGIfb_pan_var(struct xgifb_video_info *xgifb_info,
- struct fb_var_screeninfo *var)
++ struct fb_var_screeninfo *var, struct fb_info *info)
{
unsigned int base;
@@@ -1686,7 -1634,7 +1624,7 @@@ static int XGIfb_pan_display(struct fb_
> info->var.yres_virtual)
return -EINVAL;
}
- err = XGIfb_pan_var(var, info);
- err = XGIfb_pan_var(xgifb_info, var);
++ err = XGIfb_pan_var(xgifb_info, var, info);
if (err < 0)
return err;
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* [PATCH] atmel_lcdfb: support new-style palette format
From: Peter Korsgaard @ 2011-10-13 12:03 UTC (permalink / raw)
To: linux-arm-kernel
The newer Atmel SoCs use normal 16bit 565 BGR/RGB for the palette data,
rather than the special intensity + 555 format.
Fill out palette data correctly on these devices, and at the same time
respect the RGB/BGR wiring mode.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
drivers/video/atmel_lcdfb.c | 32 ++++++++++++++++++++++++--------
1 files changed, 24 insertions(+), 8 deletions(-)
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 63409c1..0e8c38e 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -682,14 +682,30 @@ static int atmel_lcdfb_setcolreg(unsigned int regno, unsigned int red,
case FB_VISUAL_PSEUDOCOLOR:
if (regno < 256) {
- val = ((red >> 11) & 0x001f);
- val |= ((green >> 6) & 0x03e0);
- val |= ((blue >> 1) & 0x7c00);
-
- /*
- * TODO: intensity bit. Maybe something like
- * ~(red[10] ^ green[10] ^ blue[10]) & 1
- */
+ if (cpu_is_at91sam9261() || cpu_is_at91sam9263()
+ || cpu_is_at91sam9rl()) {
+ /* old style I+BGR:555 */
+ val = ((red >> 11) & 0x001f);
+ val |= ((green >> 6) & 0x03e0);
+ val |= ((blue >> 1) & 0x7c00);
+
+ /*
+ * TODO: intensity bit. Maybe something like
+ * ~(red[10] ^ green[10] ^ blue[10]) & 1
+ */
+ } else {
+ /* new style BGR:565 / RGB:565 */
+ if (sinfo->lcd_wiring_mode =
+ ATMEL_LCDC_WIRING_RGB) {
+ val = ((red >> 11) & 0x001f);
+ val |= ((blue >> 0) & 0xf800);
+ } else {
+ val = ((blue >> 11) & 0x001f);
+ val |= ((red >> 0) & 0xf800);
+ }
+
+ val |= ((green >> 5) & 0x07e0);
+ }
lcdc_writel(sinfo, ATMEL_LCDC_LUT(regno), val);
ret = 0;
--
1.7.6.3
^ permalink raw reply related
* Re: [PATCH] atmel_lcdfb: support new-style palette format
From: Peter Korsgaard @ 2011-10-13 14:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1318507395-23143-1-git-send-email-jacmet@sunsite.dk>
>>>>> "Peter" = Peter Korsgaard <jacmet@sunsite.dk> writes:
Peter> The newer Atmel SoCs use normal 16bit 565 BGR/RGB for the palette data,
Peter> rather than the special intensity + 555 format.
Peter> Fill out palette data correctly on these devices, and at the same time
Peter> respect the RGB/BGR wiring mode.
Ups, wrong patch - This has RGB/BGR modes swapped. Will resend.
--
Bye, Peter Korsgaard
^ permalink raw reply
* [PATCHv2] atmel_lcdfb: support new-style palette format
From: Peter Korsgaard @ 2011-10-13 14:45 UTC (permalink / raw)
To: linux-arm-kernel
The newer Atmel SoCs use normal 16bit 565 BGR/RGB for the palette data,
rather than the special intensity + 555 format.
Fill out palette data correctly on these devices, and at the same time
respect the RGB/BGR wiring mode.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
Changes since v1:
- ATMEL_LCDC_WIRING_RGB/BGR was swapped
drivers/video/atmel_lcdfb.c | 32 ++++++++++++++++++++++++--------
1 files changed, 24 insertions(+), 8 deletions(-)
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 63409c1..7ca3eaf 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -682,14 +682,30 @@ static int atmel_lcdfb_setcolreg(unsigned int regno, unsigned int red,
case FB_VISUAL_PSEUDOCOLOR:
if (regno < 256) {
- val = ((red >> 11) & 0x001f);
- val |= ((green >> 6) & 0x03e0);
- val |= ((blue >> 1) & 0x7c00);
-
- /*
- * TODO: intensity bit. Maybe something like
- * ~(red[10] ^ green[10] ^ blue[10]) & 1
- */
+ if (cpu_is_at91sam9261() || cpu_is_at91sam9263()
+ || cpu_is_at91sam9rl()) {
+ /* old style I+BGR:555 */
+ val = ((red >> 11) & 0x001f);
+ val |= ((green >> 6) & 0x03e0);
+ val |= ((blue >> 1) & 0x7c00);
+
+ /*
+ * TODO: intensity bit. Maybe something like
+ * ~(red[10] ^ green[10] ^ blue[10]) & 1
+ */
+ } else {
+ /* new style BGR:565 / RGB:565 */
+ if (sinfo->lcd_wiring_mode =
+ ATMEL_LCDC_WIRING_RGB) {
+ val = ((blue >> 11) & 0x001f);
+ val |= ((red >> 0) & 0xf800);
+ } else {
+ val = ((red >> 11) & 0x001f);
+ val |= ((blue >> 0) & 0xf800);
+ }
+
+ val |= ((green >> 5) & 0x07e0);
+ }
lcdc_writel(sinfo, ATMEL_LCDC_LUT(regno), val);
ret = 0;
--
1.7.6.3
^ permalink raw reply related
* [PATCH] atmel_lcdfb: support 16bit BGR:565 mode, remove unsupported 15bit modes
From: Peter Korsgaard @ 2011-10-13 14:52 UTC (permalink / raw)
To: linux-arm-kernel
Allow framebuffer to be configured in 16bit mode when panel is wired in
(the default) BGR configuration, and don't claim to support 15bit input
modes, which the LCD controller cannot handle.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
drivers/video/atmel_lcdfb.c | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 7ca3eaf..143f6d9 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -418,24 +418,18 @@ static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var,
var->red.length = var->green.length = var->blue.length
= var->bits_per_pixel;
break;
- case 15:
case 16:
if (sinfo->lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB) {
/* RGB:565 mode */
var->red.offset = 11;
var->blue.offset = 0;
- var->green.length = 6;
- } else if (sinfo->lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB555) {
- var->red.offset = 10;
- var->blue.offset = 0;
- var->green.length = 5;
} else {
- /* BGR:555 mode */
+ /* BGR:565 mode */
var->red.offset = 0;
- var->blue.offset = 10;
- var->green.length = 5;
+ var->blue.offset = 11;
}
var->green.offset = 5;
+ var->green.length = 6;
var->red.length = var->blue.length = 5;
break;
case 32:
--
1.7.6.3
^ permalink raw reply related
* Re: linux-next: manual merge of the staging tree with the fbdev tree
From: Greg KH @ 2011-10-13 15:10 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-next, linux-kernel, Laurent Pinchart,
Florian Tobias Schandinat, linux-fbdev, Aaro Koskinen
In-Reply-To: <20111013170225.254bc2d590deee544913ab6c@canb.auug.org.au>
On Thu, Oct 13, 2011 at 05:02:25PM +1100, Stephen Rothwell wrote:
> Hi Greg,
>
> Today's linux-next merge of the staging tree got a conflict in
> drivers/staging/xgifb/XGI_main_26.c between commit 0d5c6ca30bb0
> ("staging: xgifb: use display information in info not in var for
> panning") from the fbdev tree and commit fd26d42019cb ("staging: xgifb:
> avoid direct references xgi_video_info") from the staging tree.
>
> I fixed it up (I think - see below) and can carry the fix as necessary.
The fix looks correct to me, thanks.
greg k-h
^ permalink raw reply
* [PATCH 1/1] OMAP: DSS2: Add TI Boxer display panel driver
From: Javier Martinez Canillas @ 2011-10-15 14:45 UTC (permalink / raw)
To: Tomi Valkeinen
Cc: David Bolcsfoldi, linux-omap, linux-fbdev,
Javier Martinez Canillas
Add panel driver for TI Boxer LCD.
This panel is used on many embedded devices such as
Barnes & Nobles's Nook Color e-reader.
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
---
drivers/video/omap2/displays/Kconfig | 6 +
drivers/video/omap2/displays/Makefile | 1 +
drivers/video/omap2/displays/panel-boxer.c | 333 ++++++++++++++++++++++++++++
3 files changed, 340 insertions(+), 0 deletions(-)
create mode 100644 drivers/video/omap2/displays/panel-boxer.c
diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
index 609a280..6c9fe26 100644
--- a/drivers/video/omap2/displays/Kconfig
+++ b/drivers/video/omap2/displays/Kconfig
@@ -48,4 +48,10 @@ config PANEL_ACX565AKM
select BACKLIGHT_CLASS_DEVICE
help
This is the LCD panel used on Nokia N900
+
+config PANEL_BOXER
+ tristate "TI Boxer Panel"
+ help
+ LCD Panel used in the TI Boxer
+
endmenu
diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile
index 0f601ab3a..26c662e 100644
--- a/drivers/video/omap2/displays/Makefile
+++ b/drivers/video/omap2/displays/Makefile
@@ -6,3 +6,4 @@ obj-$(CONFIG_PANEL_NEC_NL8048HL11_01B) += panel-nec-nl8048hl11-01b.o
obj-$(CONFIG_PANEL_TAAL) += panel-taal.o
obj-$(CONFIG_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o
obj-$(CONFIG_PANEL_ACX565AKM) += panel-acx565akm.o
+obj-$(CONFIG_PANEL_BOXER) += panel-boxer.o
diff --git a/drivers/video/omap2/displays/panel-boxer.c b/drivers/video/omap2/displays/panel-boxer.c
new file mode 100644
index 0000000..6429960
--- /dev/null
+++ b/drivers/video/omap2/displays/panel-boxer.c
@@ -0,0 +1,333 @@
+/*
+ * Boxer panel support
+ *
+ * Copyright (C) 2008 Nokia Corporation
+ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+ *
+ * Copyright (c) 2010 Barnes & Noble
+ * David Bolcsfoldi <dbolcsfoldi@intrinsyc.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.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/delay.h>
+#include <linux/platform_device.h>
+#include <linux/spi/spi.h>
+#include <linux/regulator/consumer.h>
+#include <linux/err.h>
+#include <linux/workqueue.h>
+
+#include <plat/mcspi.h>
+#include <mach/gpio.h>
+#include <mach/gpio.h>
+#include <plat/mux.h>
+#include <asm/mach-types.h>
+
+#include <video/omapdss.h>
+
+/* Delay between Panel configuration and Panel enabling */
+#define LCD_RST_DELAY 100
+#define LCD_INIT_DELAY 200
+
+#define LCD_XRES 1024
+#define LCD_YRES 600
+
+#define LCD_PIXCLOCK_MIN 39000 /* CPT MIN PIX Clock is 39MHz */
+#define Lcd_Pixclock_Typ 45000 /* Typical PIX clock is 45MHz */
+#define LCD_PIXCLOCK_MAX 52000 /* Maximum is 52MHz */
+
+/* Current Pixel clock */
+#define LCD_PIXEL_CLOCK 68000
+
+static struct workqueue_struct *boxer_panel_wq;
+static struct omap_dss_device *boxer_panel_dssdev;
+static struct regulator *boxer_panel_regulator;
+static struct spi_device *boxer_spi_device;
+static atomic_t boxer_panel_is_enabled = ATOMIC_INIT(0);
+
+/*NEC NL8048HL11-01B Manual
+ * defines HFB, HSW, HBP, VFP, VSW, VBP as shown below
+ */
+
+static struct omap_video_timings boxer_panel_timings = {
+ /* 1024 x 600 @ 60 Hz Reduced blanking VESA CVT 0.31M3-R */
+ .x_res = LCD_XRES,
+ .y_res = LCD_YRES,
+ .pixel_clock = LCD_PIXEL_CLOCK,
+ .hfp = 48,
+ .hsw = 40,
+ .hbp = 65,
+ .vfp = 3,
+ .vsw = 10,
+ .vbp = 25,
+};
+
+static void boxer_get_resolution(struct omap_dss_device *dssdev,
+ u16 *xres, u16 *yres)
+{
+
+ *xres = dssdev->panel.timings.x_res;
+ *yres = dssdev->panel.timings.y_res;
+}
+
+int boxer_get_recommended_bpp(struct omap_dss_device *dssdev)
+{
+ return 24;
+}
+
+
+static int boxer_panel_probe(struct omap_dss_device *dssdev)
+{
+ dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
+ OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IPC;
+ dssdev->panel.timings = boxer_panel_timings;
+ return 0;
+}
+
+static void boxer_panel_remove(struct omap_dss_device *dssdev)
+{
+}
+
+static int spi_send(struct spi_device *spi, unsigned char reg_addr,
+ unsigned char reg_data)
+{
+ int ret = 0;
+ uint16_t msg;
+ msg = (reg_addr << 10) | reg_data;
+
+ if (spi_write(spi, (unsigned char *)&msg, 2))
+ printk(KERN_ERR "error in spi_write %x\n", msg);
+
+ udelay(10);
+
+ return ret;
+}
+
+static void boxer_init_panel(void)
+{
+ spi_send(boxer_spi_device, 0, 0x00);
+
+ spi_send(boxer_spi_device, 0, 0xad);
+ spi_send(boxer_spi_device, 1, 0x30);
+ spi_send(boxer_spi_device, 2, 0x40);
+ spi_send(boxer_spi_device, 0xe, 0x5f);
+ spi_send(boxer_spi_device, 0xf, 0xa4);
+ spi_send(boxer_spi_device, 0xd, 0x00);
+ spi_send(boxer_spi_device, 0x2, 0x43);
+ spi_send(boxer_spi_device, 0xa, 0x28);
+ spi_send(boxer_spi_device, 0x10, 0x41);
+}
+
+static void boxer_panel_work_func(struct work_struct *work)
+{
+ if (!regulator_is_enabled(boxer_panel_regulator))
+ regulator_enable(boxer_panel_regulator);
+
+ msleep(LCD_RST_DELAY);
+
+ boxer_spi_device->mode = SPI_MODE_0;
+ boxer_spi_device->bits_per_word = 16;
+ spi_setup(boxer_spi_device);
+
+ boxer_init_panel();
+
+ msleep(LCD_INIT_DELAY);
+
+ if (boxer_panel_dssdev->platform_enable)
+ boxer_panel_dssdev->platform_enable(boxer_panel_dssdev);
+}
+
+static DECLARE_WORK(boxer_panel_work, boxer_panel_work_func);
+
+static int boxer_panel_enable(struct omap_dss_device *dssdev)
+{
+ if (atomic_add_unless(&boxer_panel_is_enabled, 1, 1)) {
+ boxer_panel_dssdev = dssdev;
+ queue_work(boxer_panel_wq, &boxer_panel_work);
+ }
+
+ return 0;
+}
+
+static void boxer_panel_disable(struct omap_dss_device *dssdev)
+{
+ if (atomic_dec_and_test(&boxer_panel_is_enabled)) {
+ cancel_work_sync(&boxer_panel_work);
+
+ if (dssdev->platform_disable)
+ dssdev->platform_disable(dssdev);
+
+ if (regulator_is_enabled(boxer_panel_regulator))
+ regulator_disable(boxer_panel_regulator);
+ } else {
+ printk(KERN_WARNING "%s: attempting to disable panel twice!\n",
+ __func__);
+ WARN_ON(1);
+ }
+}
+
+static int boxer_panel_suspend(struct omap_dss_device *dssdev)
+{
+ boxer_panel_disable(dssdev);
+ return 0;
+}
+
+static int boxer_panel_resume(struct omap_dss_device *dssdev)
+{
+ return boxer_panel_enable(dssdev);
+}
+
+static struct omap_dss_driver boxer_driver = {
+ .probe = boxer_panel_probe,
+ .remove = boxer_panel_remove,
+
+ .enable = boxer_panel_enable,
+ .disable = boxer_panel_disable,
+ .suspend = boxer_panel_suspend,
+ .resume = boxer_panel_resume,
+ .get_resolution = boxer_get_resolution,
+ .get_recommended_bpp = boxer_get_recommended_bpp,
+ .driver = {
+ .name = "boxer_panel",
+ .owner = THIS_MODULE,
+ },
+};
+
+static ssize_t lcd_reg_store(struct device *dev, struct device_attribute *attr,
+ const char *buf, size_t count)
+{
+ int argc;
+ char **args;
+ unsigned long r, val;
+ int ret;
+
+ struct spi_device *spi = to_spi_device(dev);
+
+ args = argv_split(GFP_KERNEL, buf, &argc);
+
+ if (args = NULL) {
+ dev_err(dev, "error getting arguments\n");
+ return count;
+ }
+
+ if (argc = 2) {
+ ret = strict_strtoul(*args, 0, (unsigned long *)&r);
+ if (ret)
+ return ret;
+ args++;
+ ret = strict_strtoul(*args, 0, (unsigned long *)&val);
+ if (ret)
+ return ret;
+ dev_info(dev, "set lcd panel spi reg %lu = %lu\n", r, val);
+ spi_send(spi, r, val);
+ }
+ argv_free(args);
+
+ return count;
+}
+
+
+static DEVICE_ATTR(lcd_reg, S_IWUSR, NULL, lcd_reg_store);
+
+static struct attribute *boxer_lcd_spi_attributes[] = {
+ &dev_attr_lcd_reg,
+ NULL
+};
+
+
+static struct attribute_group boxer_lcd_spi_attributes_group = {
+ .attrs = boxer_lcd_spi_attributes,
+};
+
+
+
+static int boxer_spi_probe(struct spi_device *spi)
+{
+ spi->mode = SPI_MODE_0;
+ spi->bits_per_word = 16;
+ spi_setup(spi);
+
+ boxer_spi_device = spi;
+
+ boxer_init_panel();
+
+ if (sysfs_create_group(&spi->dev.kobj, &boxer_lcd_spi_attributes_group))
+ printk(KERN_WARNING "error creating sysfs entries\n");
+
+ omap_dss_register_driver(&boxer_driver);
+ return 0;
+}
+
+static int boxer_spi_remove(struct spi_device *spi)
+{
+ sysfs_remove_group(&spi->dev.kobj, &boxer_lcd_spi_attributes_group);
+ omap_dss_unregister_driver(&boxer_driver);
+
+ return 0;
+}
+
+
+static struct spi_driver boxer_spi_driver = {
+ .probe = boxer_spi_probe,
+ .remove = __devexit_p(boxer_spi_remove),
+ .driver = {
+ .name = "boxer_disp_spi",
+ .bus = &spi_bus_type,
+ .owner = THIS_MODULE,
+ },
+};
+
+static int __init boxer_lcd_init(void)
+{
+ int ret = 0;
+
+ boxer_panel_wq = create_singlethread_workqueue("boxer-panel-wq");
+
+ printk(KERN_WARNING "Enabling power for LCD\n");
+ boxer_panel_regulator = regulator_get(NULL, "vlcd");
+
+ if (IS_ERR(boxer_panel_regulator)) {
+ printk(KERN_ERR "Unable to get vlcd regulator, reason: %ld!\n",
+ IS_ERR(boxer_panel_regulator));
+ ret = -ENODEV;
+ goto out;
+ }
+
+ ret = regulator_enable(boxer_panel_regulator);
+
+ if (ret) {
+ printk(KERN_ERR "Failed to enable regulator vlcd!\n");
+ regulator_put(boxer_panel_regulator);
+ goto out;
+ }
+
+ return spi_register_driver(&boxer_spi_driver);
+out:
+ return ret;
+}
+
+static void __exit boxer_lcd_exit(void)
+{
+ spi_unregister_driver(&boxer_spi_driver);
+ regulator_disable(boxer_panel_regulator);
+ regulator_put(boxer_panel_regulator);
+ destroy_workqueue(boxer_panel_wq);
+}
+
+
+module_init(boxer_lcd_init);
+module_exit(boxer_lcd_exit);
+MODULE_LICENSE("GPL");
+
--
1.7.4.1
^ permalink raw reply related
* Re: [PATCH] video: platinumfb: Add __devexit_p at necessary place
From: Florian Tobias Schandinat @ 2011-10-16 21:34 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, linux-fbdev
In-Reply-To: <1317801698.12133.1.camel@phoenix>
On 10/05/2011 08:01 AM, Axel Lin wrote:
> According to the comments in include/linux/init.h:
>
> "Pointers to __devexit functions must use __devexit_p(function_name), the
> wrapper will insert either the function_name or NULL, depending on the config
> options."
>
> We have __devexit annotation for platinumfb_remove(), thus add __devexit_p at
> necessary place.
Applied.
Thanks,
Florian Tobias Schandinat
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
> drivers/video/platinumfb.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c
> index 6694923..ae3caa6 100644
> --- a/drivers/video/platinumfb.c
> +++ b/drivers/video/platinumfb.c
> @@ -683,7 +683,7 @@ static struct platform_driver platinum_driver > .of_match_table = platinumfb_match,
> },
> .probe = platinumfb_probe,
> - .remove = platinumfb_remove,
> + .remove = __devexit_p(platinumfb_remove),
> };
>
> static int __init platinumfb_init(void)
^ permalink raw reply
* Re: [GIT PULL] OMAP DSS for v3.2
From: Florian Tobias Schandinat @ 2011-10-16 21:55 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap mailing list, lfbdev-ml
In-Reply-To: <1317972007.2374.12.camel@deskari>
Hi Tomi,
On 10/07/2011 07:20 AM, Tomi Valkeinen wrote:
> Hi Florian,
>
> Please pull OMAP DSS patches for v3.2 merge window.
Pulled.
> Note that there are some conflicts with other trees. The board file
> conflicts are trivial, changes in code which just happen to be next to
> each other. The LCD driver conflicts are even simpler, there were
> changes to them from some other tree, but I have removed the files.
>
> The conflicts have been solved properly by Stephen in linux-next:
>
> https://github.com/sfrothwell/linux-next/commit/3e31b3042760e3906d0a275d7adedfaf55ee5b0a
>
> I also attached the output from git show, as github seems to show the
> full diff for the merge commit.
>
> Are you ok with the conflicts?
No problem.
Well, as I understand, Linus prefers to see (and solve) these conflicts himself,
so I don't have any work with them at all. I'd only have to resolve them if
Linus gave up and that would probably point to a more fundamental issue in the
workflow, like changes going mainline via the wrong tree or such things.
Thanks,
Florian Tobias Schandinat
> The following changes since commit b6fd41e29dea9c6753b1843a77e50433e6123bcb:
>
> Linux 3.1-rc6 (2011-09-12 14:02:02 -0700)
>
> are available in the git repository at:
> git://gitorious.org/linux-omap-dss2/linux.git for-florian
>
> Andy Doan (1):
> OMAPFB: make debug message more useful
>
> Archit Taneja (26):
> OMAP: DSS2: DISPC: Prepare dispc_dump_regs() for shortening
> OMAP: DSS2: DISPC: Shorten dispc_dump_regs()
> OMAP: DSS2: DISPC: dispc_save_context() and dispc_restore_context() cleanup
> OMAP: DSS2: DISPC: Shorten _dispc_set_color_conv_coef()
> OMAP: DSS2: Use a macro to declare size of the fifo_size array in dispc.c
> OMAP: DSS2: Use MIPI DSI enums from include/video/mipi_display.h
> OMAP: DSS2: DSI: Represent L4 and VP as sources of VC instead of modes
> OMAP: DSS2: Create enum for DSI operation modes
> OMAP: DSS2: DSI: Introduce generic write functions
> OMAP: DSS2: DSI: Remove functions dsi_vc_dcs_read_1() and dsi_vc_dcs_read_2()
> OMAP: DSS2: DSI: Split dsi_vc_dcs_read() into 2 functions
> OMAP: DSS2: DSI: Introduce generic read functions
> OMAP: DSS2: Clean up stallmode and io pad mode selection
> OMAP: DSS2: Create an enum for DSI pixel formats
> OMAP: DSS2: DSI: Send zero length packet in dsi_vc_send_null()
> OMAP: DSS2: DSI Video mode support
> OMAPDSS: DISPC: Reduce the number of arguments in dispc_ovl_setup()
> OMAPDSS: DISPC: Pass overlay params as arguments to dispc_ovl_setup()
> OMAPDSS: DISPC: Create helper function dispc_mgr_is_lcd()
> OMAPDSS: DISPC: Get correct pixel clock for TV manager
> OMAPDSS: DISPC: Remove hardcoded use of PPL in five tap clock calculation
> OMAPDSS: DISPC: Clean up scaling related clock and five tap calculations
> OMAPDSS: FEATURES: Create a range param to get max downscaling
> OMAPDSS/OMAP_VOUT: Fix incorrect OMAP3-alpha compatibility setting
> OMAPDSS: DISPC: VIDEO3 pipeline support
> OMAPDSS: DISPC: zorder support for DSS overlays
>
> Arnd Bergmann (1):
> video/omap: fix build dependencies
>
> Daniel Morsing (1):
> OMAP: DSS2: Don't allow moving managers away from enabled displays
>
> Dima Zavin (1):
> OMAP: DSS: dispc: enable/disable clocks in error handler
>
> Mayuresh Janorkar (1):
> OMAP: DSS2: Add picodlp panel driver
>
> Mythri P K (14):
> OMAP4: DSS2: HDMI: HDMI clean up to pass base_address
> OMAP4: DSS2: HDMI: Move pll and video configuration
> OMAP4: DSS2: HDMI: Use specific HDMI timings structure
> OMAP4: DSS2: HDMI: Move HDMI IP independent generic header
> OMAP4: DSS2: HDMI: Move the EDID definition from HDMI
> OMAP4: DSS2: HDMI: Split the current HDMI driver to move
> OMAP4: DSS2: HDMI: Move the HDMI IP dependent audio
> OMAP4: DSS2: HDMI: Rename the functions in HDMI IP library
> OMAP4: DSS2: HDMI: Function pointer approach to call
> OMAP4: DSS2: Rename hdmi_omap4_panel.c to hdmi_panel.c
> OMAPDSS: HDMI: Move the comments in avi infoframe
> OMAPDSS: HDMI: Replace hdmi_reg struct with u16
> OMAPDSS: HDMI: Add missing register definitions
> OMAPDSS: HDMI: Add support to dump registers through debugfs
>
> Thomas Weber (2):
> OMAP: DSS2: Support for Innolux AT070TN83
> OMAP: Devkit8000: Change lcd driver to AT070TN83
>
> Tomi Valkeinen (63):
> OMAP: DSS2: PicoDLP: fix error handling in power_on
> OMAP: DSS2: check for manager when enabling display
> Revert "HACK: OMAP: DSS2: clk hack for OMAP2/3"
> Revert "OMAP: DSS2: HDMI: fix hdmi clock name"
> OMAP: DSS2: remove unneeded fck enable/disables
> OMAP: DSS2: Change DSI device naming
> OMAP4: TWL: Add common omapdss supplies
> OMAP: DSS2: DSI: Improve dsi_mux_pads parameters
> OMAP: DSS2: Implement dsi_mux_pads for OMAP4
> OMAP: OMAPFB: make omapfb start even when a display is missing a driver
> OMAP: DSS2: fix clock sources on error and uninit
> OMAP: DSS2: Handle manager change in apply
> OMAP: DSS2: Remove "EXPERIMENTAL" from Kconfig
> OMAP: DSS2: Remove support for non-DISPC overlays
> OMAP: DSS2: DISPC: use lookup tables for bit shifts
> OMAP: DSS2: Add overlay caps to DSS features
> OMAP: DSS2: Add GLOBAL_ALPHA & PRE_MULT_ALPHA to ovl caps
> OMAP: DSS2: string parsing cleanups
> OMAP: OMAPFB: string parsing cleanups
> OMAP: DSS2: DISPC: remove non-existing func prototypes
> OMAP: DSS2: DISPC: rename overlay related funcs
> OMAP: DSS2: DISPC: rename manager related funcs
> OMAP: DSS2: reorganize functions in dss.h
> OMAP: DSS2: DISPC: Fix minimum PCD value
> OMAP: DSS2: HDMI: use default dividers
> OMAP: DSS2: HDMI: change regn definition
> OMAP: DSS2: DSI: Add comment about regn
> OMAP: DSS2: DISPC: Add missing IRQ definitions
> OMAP: DSS2: add dss_get_hdmi_venc_clk_source()
> OMAP: DSS2: DISPC: improve dispc_mgr_enable_digit_out()
> OMAP: DSS2: HDMI: improve hdmi output enable
> OMAP: DSS2: add read_edid() to omap_dss_driver struct
> OMAP: DSS2: add detect() to omap_dss_driver struct
> OMAP: DSS2: HDMI: make set_timing saner
> OMAP: DSS2: HDMI: implement read_edid()
> OMAP: DSS2: HDMI: remove edid parsing
> OMAP: DSS2: HDMI: split hdmi_core_ddc_edid
> OMAP: DSS2: HDMI: clean up edid reading & fix checksum
> OMAP: DSS2: HDMI: remove error prints in check_timings
> OMAP: DSS2: HDMI: implement detect()
> OMAP: DSS2: add panel-dvi driver
> OMAP: use dvi panel driver instead of generic-dpi
> OMAP: stalker: Remove LCD device from board file
> OMAP: DSS2: panel-generic-dpi: remove "generic" panel
> OMAP: Add DDC i2c_bus_num to board files
> OMAPFB: find best mode from edid
> OMAPDSS: Taal: remove external backlight support
> OMAPFB: Remove unused lcd drivers
> OMAPDSS: Port 2430sdp display driver to DSS2
> OMAPDSS: Port the H4 display driver to DSS2
> OMAPDSS: Port the Apollon display driver to DSS2
> OMAPDSS: Add N800 panel driver
> OMAPDSS: remove vaddr from overlay info
> OMAP: 4430SDP: Remove unneeded lcd config
> OMAP4: 4430SDP: Add panel support to board file
> OMAP4: 4430SDP: Add picodlp support to board file
> OMAP: RX51: Remove unused old omapfb stuff
> OMAP: omap3touchbook: Remove unused lcd stuff
> OMAP: 2420SDP: Port the display driver to new DSS2
> OMAP: LDP: Port the display driver to new DSS2
> OMAP: H4: Port the display driver to new DSS2
> OMAP: Apollon: Port the display driver to new DSS2
> OMAPDSS: picodlp: add missing #include <linux/module.h>
>
> arch/arm/mach-omap2/board-2430sdp.c | 78 +-
> arch/arm/mach-omap2/board-3430sdp.c | 7 +-
> arch/arm/mach-omap2/board-4430sdp.c | 208 +++-
> arch/arm/mach-omap2/board-am3517evm.c | 6 +-
> arch/arm/mach-omap2/board-apollon.c | 35 +-
> arch/arm/mach-omap2/board-cm-t35.c | 6 +-
> arch/arm/mach-omap2/board-devkit8000.c | 10 +-
> arch/arm/mach-omap2/board-h4.c | 42 +-
> arch/arm/mach-omap2/board-igep0020.c | 8 +-
> arch/arm/mach-omap2/board-ldp.c | 123 ++-
> arch/arm/mach-omap2/board-omap3beagle.c | 8 +-
> arch/arm/mach-omap2/board-omap3evm.c | 7 +-
> arch/arm/mach-omap2/board-omap3pandora.c | 2 +-
> arch/arm/mach-omap2/board-omap3stalker.c | 40 +-
> arch/arm/mach-omap2/board-omap3touchbook.c | 18 -
> arch/arm/mach-omap2/board-omap4panda.c | 8 +-
> arch/arm/mach-omap2/board-overo.c | 7 +-
> arch/arm/mach-omap2/board-rx51.c | 25 -
> arch/arm/mach-omap2/display.c | 60 +-
> arch/arm/mach-omap2/twl-common.c | 11 +-
> drivers/media/video/omap/omap_vout.c | 18 +-
> drivers/video/omap/Kconfig | 29 -
> drivers/video/omap/Makefile | 8 -
> drivers/video/omap/lcd_2430sdp.c | 203 ---
> drivers/video/omap/lcd_apollon.c | 136 --
> drivers/video/omap/lcd_h4.c | 117 --
> drivers/video/omap/lcd_ldp.c | 201 ---
> drivers/video/omap/lcd_omap3beagle.c | 130 --
> drivers/video/omap/lcd_omap3evm.c | 193 ---
> drivers/video/omap/lcd_overo.c | 180 ---
> drivers/video/omap2/displays/Kconfig | 28 +-
> drivers/video/omap2/displays/Makefile | 3 +
> drivers/video/omap2/displays/panel-dvi.c | 363 +++++
> drivers/video/omap2/displays/panel-generic-dpi.c | 113 +-
> drivers/video/omap2/displays/panel-n8x0.c | 747 +++++++++
> drivers/video/omap2/displays/panel-picodlp.c | 594 +++++++
> drivers/video/omap2/displays/panel-picodlp.h | 288 ++++
> drivers/video/omap2/displays/panel-taal.c | 123 +-
> drivers/video/omap2/dss/Kconfig | 2 +-
> drivers/video/omap2/dss/Makefile | 2 +-
> drivers/video/omap2/dss/core.c | 4 +
> drivers/video/omap2/dss/dispc.c | 1700 ++++++++------------
> drivers/video/omap2/dss/dispc.h | 57 +
> drivers/video/omap2/dss/display.c | 31 +-
> drivers/video/omap2/dss/dpi.c | 28 +-
> drivers/video/omap2/dss/dsi.c | 929 +++++++-----
> drivers/video/omap2/dss/dss.c | 18 +-
> drivers/video/omap2/dss/dss.h | 156 +-
> drivers/video/omap2/dss/dss_features.c | 130 ++-
> drivers/video/omap2/dss/dss_features.h | 17 +-
> drivers/video/omap2/dss/hdmi.c | 1260 ++-------------
> .../omap2/dss/{hdmi_omap4_panel.c => hdmi_panel.c} | 68 +-
> drivers/video/omap2/dss/manager.c | 191 +--
> drivers/video/omap2/dss/overlay.c | 122 +-
> drivers/video/omap2/dss/rfbi.c | 45 +-
> drivers/video/omap2/dss/sdi.c | 19 +-
> drivers/video/omap2/dss/ti_hdmi.h | 138 ++
> drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c | 1239 ++++++++++++++
> .../video/omap2/dss/{hdmi.h => ti_hdmi_4xxx_ip.h} | 400 +++---
> drivers/video/omap2/dss/venc.c | 27 +-
> drivers/video/omap2/omapfb/Kconfig | 2 +-
> drivers/video/omap2/omapfb/omapfb-main.c | 134 ++-
> drivers/video/omap2/omapfb/omapfb-sysfs.c | 6 +-
> include/video/omap-panel-dvi.h | 37 +
> include/video/omap-panel-n8x0.h | 15 +
> include/video/omap-panel-nokia-dsi.h | 8 +-
> include/video/omap-panel-picodlp.h | 23 +
> include/video/omapdss.h | 100 +-
> 68 files changed, 6495 insertions(+), 4596 deletions(-)
> delete mode 100644 drivers/video/omap/lcd_2430sdp.c
> delete mode 100644 drivers/video/omap/lcd_apollon.c
> delete mode 100644 drivers/video/omap/lcd_h4.c
> delete mode 100644 drivers/video/omap/lcd_ldp.c
> delete mode 100644 drivers/video/omap/lcd_omap3beagle.c
> delete mode 100644 drivers/video/omap/lcd_omap3evm.c
> delete mode 100644 drivers/video/omap/lcd_overo.c
> create mode 100644 drivers/video/omap2/displays/panel-dvi.c
> create mode 100644 drivers/video/omap2/displays/panel-n8x0.c
> create mode 100644 drivers/video/omap2/displays/panel-picodlp.c
> create mode 100644 drivers/video/omap2/displays/panel-picodlp.h
> rename drivers/video/omap2/dss/{hdmi_omap4_panel.c => hdmi_panel.c} (79%)
> create mode 100644 drivers/video/omap2/dss/ti_hdmi.h
> create mode 100644 drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
> rename drivers/video/omap2/dss/{hdmi.h => ti_hdmi_4xxx_ip.h} (54%)
> create mode 100644 include/video/omap-panel-dvi.h
> create mode 100644 include/video/omap-panel-n8x0.h
> create mode 100644 include/video/omap-panel-picodlp.h
>
^ permalink raw reply
* Re: [PATCH 1/1] OMAP: DSS2: Add TI Boxer display panel driver
From: Archit Taneja @ 2011-10-17 6:26 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: Valkeinen, Tomi, David Bolcsfoldi, linux-omap@vger.kernel.org,
linux-fbdev@vger.kernel.org
In-Reply-To: <1318689957-14743-1-git-send-email-martinez.javier@gmail.com>
Hi,
Some comments.
On Saturday 15 October 2011 08:15 PM, Javier Martinez Canillas wrote:
> Add panel driver for TI Boxer LCD.
>
> This panel is used on many embedded devices such as
> Barnes& Nobles's Nook Color e-reader.
>
> Signed-off-by: Javier Martinez Canillas<martinez.javier@gmail.com>
> ---
> drivers/video/omap2/displays/Kconfig | 6 +
> drivers/video/omap2/displays/Makefile | 1 +
> drivers/video/omap2/displays/panel-boxer.c | 333 ++++++++++++++++++++++++++++
> 3 files changed, 340 insertions(+), 0 deletions(-)
> create mode 100644 drivers/video/omap2/displays/panel-boxer.c
>
> diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
> index 609a280..6c9fe26 100644
> --- a/drivers/video/omap2/displays/Kconfig
> +++ b/drivers/video/omap2/displays/Kconfig
> @@ -48,4 +48,10 @@ config PANEL_ACX565AKM
> select BACKLIGHT_CLASS_DEVICE
> help
> This is the LCD panel used on Nokia N900
> +
> +config PANEL_BOXER
> + tristate "TI Boxer Panel"
> + help
> + LCD Panel used in the TI Boxer
> +
> endmenu
> diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile
> index 0f601ab3a..26c662e 100644
> --- a/drivers/video/omap2/displays/Makefile
> +++ b/drivers/video/omap2/displays/Makefile
> @@ -6,3 +6,4 @@ obj-$(CONFIG_PANEL_NEC_NL8048HL11_01B) += panel-nec-nl8048hl11-01b.o
> obj-$(CONFIG_PANEL_TAAL) += panel-taal.o
> obj-$(CONFIG_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o
> obj-$(CONFIG_PANEL_ACX565AKM) += panel-acx565akm.o
> +obj-$(CONFIG_PANEL_BOXER) += panel-boxer.o
> diff --git a/drivers/video/omap2/displays/panel-boxer.c b/drivers/video/omap2/displays/panel-boxer.c
> new file mode 100644
> index 0000000..6429960
> --- /dev/null
> +++ b/drivers/video/omap2/displays/panel-boxer.c
> @@ -0,0 +1,333 @@
> +/*
> + * Boxer panel support
> + *
> + * Copyright (C) 2008 Nokia Corporation
> + * Author: Tomi Valkeinen<tomi.valkeinen@nokia.com>
> + *
> + * Copyright (c) 2010 Barnes& Noble
> + * David Bolcsfoldi<dbolcsfoldi@intrinsyc.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.
> + *
> + * This program is distributed in the hope that it will be useful, but WITHOUT
> + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
> + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
> + * more details.
> + *
> + * You should have received a copy of the GNU General Public License along with
> + * this program. If not, see<http://www.gnu.org/licenses/>.
> + */
> +
> +#include<linux/module.h>
> +#include<linux/kernel.h>
> +#include<linux/delay.h>
> +#include<linux/platform_device.h>
> +#include<linux/spi/spi.h>
> +#include<linux/regulator/consumer.h>
> +#include<linux/err.h>
> +#include<linux/workqueue.h>
> +
> +#include<plat/mcspi.h>
> +#include<mach/gpio.h>
> +#include<mach/gpio.h>
> +#include<plat/mux.h>
> +#include<asm/mach-types.h>
> +
> +#include<video/omapdss.h>
> +
> +/* Delay between Panel configuration and Panel enabling */
> +#define LCD_RST_DELAY 100
> +#define LCD_INIT_DELAY 200
> +
> +#define LCD_XRES 1024
> +#define LCD_YRES 600
> +
> +#define LCD_PIXCLOCK_MIN 39000 /* CPT MIN PIX Clock is 39MHz */
> +#define Lcd_Pixclock_Typ 45000 /* Typical PIX clock is 45MHz */
> +#define LCD_PIXCLOCK_MAX 52000 /* Maximum is 52MHz */
These don't seem to be used. We should remove these.
> +
> +/* Current Pixel clock */
> +#define LCD_PIXEL_CLOCK 68000
> +
> +static struct workqueue_struct *boxer_panel_wq;
> +static struct omap_dss_device *boxer_panel_dssdev;
> +static struct regulator *boxer_panel_regulator;
> +static struct spi_device *boxer_spi_device;
> +static atomic_t boxer_panel_is_enabled = ATOMIC_INIT(0);
It would be cleaner to group these together as one driver data struct.
This struct can then be kzalloc'd at probe, and be linked to the dssdev
struct through 'dev_set_drvdata', this will help the driver support more
than one instances of boxer panel devices running in parallel. You could
see panel-generic-dpi.c for reference.
> +
> +/*NEC NL8048HL11-01B Manual
> + * defines HFB, HSW, HBP, VFP, VSW, VBP as shown below
> + */
Its not clear what the comment above is trying to say. Is panel boxer
"NEC NL8048HL11-01B"?
> +
> +static struct omap_video_timings boxer_panel_timings = {
> + /* 1024 x 600 @ 60 Hz Reduced blanking VESA CVT 0.31M3-R */
> + .x_res = LCD_XRES,
> + .y_res = LCD_YRES,
> + .pixel_clock = LCD_PIXEL_CLOCK,
> + .hfp = 48,
> + .hsw = 40,
> + .hbp = 65,
> + .vfp = 3,
> + .vsw = 10,
> + .vbp = 25,
> +};
> +
> +static void boxer_get_resolution(struct omap_dss_device *dssdev,
> + u16 *xres, u16 *yres)
> +{
> +
> + *xres = dssdev->panel.timings.x_res;
> + *yres = dssdev->panel.timings.y_res;
> +}
> +
> +int boxer_get_recommended_bpp(struct omap_dss_device *dssdev)
> +{
> + return 24;
> +}
> +
> +
> +static int boxer_panel_probe(struct omap_dss_device *dssdev)
> +{
> + dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
> + OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IPC;
> + dssdev->panel.timings = boxer_panel_timings;
> + return 0;
> +}
> +
> +static void boxer_panel_remove(struct omap_dss_device *dssdev)
> +{
> +}
> +
> +static int spi_send(struct spi_device *spi, unsigned char reg_addr,
> + unsigned char reg_data)
> +{
> + int ret = 0;
> + uint16_t msg;
> + msg = (reg_addr<< 10) | reg_data;
> +
> + if (spi_write(spi, (unsigned char *)&msg, 2))
> + printk(KERN_ERR "error in spi_write %x\n", msg);
> +
> + udelay(10);
> +
> + return ret;
> +}
> +
> +static void boxer_init_panel(void)
> +{
> + spi_send(boxer_spi_device, 0, 0x00);
> +
> + spi_send(boxer_spi_device, 0, 0xad);
> + spi_send(boxer_spi_device, 1, 0x30);
> + spi_send(boxer_spi_device, 2, 0x40);
You might want to use hex representations above for consistency.
> + spi_send(boxer_spi_device, 0xe, 0x5f);
> + spi_send(boxer_spi_device, 0xf, 0xa4);
> + spi_send(boxer_spi_device, 0xd, 0x00);
> + spi_send(boxer_spi_device, 0x2, 0x43);
> + spi_send(boxer_spi_device, 0xa, 0x28);
> + spi_send(boxer_spi_device, 0x10, 0x41);
> +}
> +
> +static void boxer_panel_work_func(struct work_struct *work)
> +{
> + if (!regulator_is_enabled(boxer_panel_regulator))
> + regulator_enable(boxer_panel_regulator);
> +
> + msleep(LCD_RST_DELAY);
> +
> + boxer_spi_device->mode = SPI_MODE_0;
> + boxer_spi_device->bits_per_word = 16;
> + spi_setup(boxer_spi_device);
> +
> + boxer_init_panel();
> +
> + msleep(LCD_INIT_DELAY);
> +
> + if (boxer_panel_dssdev->platform_enable)
> + boxer_panel_dssdev->platform_enable(boxer_panel_dssdev);
> +}
> +
> +static DECLARE_WORK(boxer_panel_work, boxer_panel_work_func);
> +
> +static int boxer_panel_enable(struct omap_dss_device *dssdev)
> +{
> + if (atomic_add_unless(&boxer_panel_is_enabled, 1, 1)) {
> + boxer_panel_dssdev = dssdev;
> + queue_work(boxer_panel_wq,&boxer_panel_work);
> + }
> +
You need to set the dssdev->state values correctly in the
enable/disable/suspend/resume functions, otherwise DSS2 won't have the
correct knowledge of the panel state.
> + return 0;
> +}
> +
> +static void boxer_panel_disable(struct omap_dss_device *dssdev)
> +{
> + if (atomic_dec_and_test(&boxer_panel_is_enabled)) {
> + cancel_work_sync(&boxer_panel_work);
> +
> + if (dssdev->platform_disable)
> + dssdev->platform_disable(dssdev);
> +
> + if (regulator_is_enabled(boxer_panel_regulator))
> + regulator_disable(boxer_panel_regulator);
> + } else {
> + printk(KERN_WARNING "%s: attempting to disable panel twice!\n",
> + __func__);
You should use dev_err, dev_warn and dev_info instead of printks using
the dssdev->dev device.
Archit
> + WARN_ON(1);
> + }
> +}
> +
> +static int boxer_panel_suspend(struct omap_dss_device *dssdev)
> +{
> + boxer_panel_disable(dssdev);
> + return 0;
> +}
> +
> +static int boxer_panel_resume(struct omap_dss_device *dssdev)
> +{
> + return boxer_panel_enable(dssdev);
> +}
> +
> +static struct omap_dss_driver boxer_driver = {
> + .probe = boxer_panel_probe,
> + .remove = boxer_panel_remove,
> +
> + .enable = boxer_panel_enable,
> + .disable = boxer_panel_disable,
> + .suspend = boxer_panel_suspend,
> + .resume = boxer_panel_resume,
> + .get_resolution = boxer_get_resolution,
> + .get_recommended_bpp = boxer_get_recommended_bpp,
> + .driver = {
> + .name = "boxer_panel",
> + .owner = THIS_MODULE,
> + },
> +};
> +
> +static ssize_t lcd_reg_store(struct device *dev, struct device_attribute *attr,
> + const char *buf, size_t count)
> +{
> + int argc;
> + char **args;
> + unsigned long r, val;
> + int ret;
> +
> + struct spi_device *spi = to_spi_device(dev);
> +
> + args = argv_split(GFP_KERNEL, buf,&argc);
> +
> + if (args = NULL) {
> + dev_err(dev, "error getting arguments\n");
> + return count;
> + }
> +
> + if (argc = 2) {
> + ret = strict_strtoul(*args, 0, (unsigned long *)&r);
> + if (ret)
> + return ret;
> + args++;
> + ret = strict_strtoul(*args, 0, (unsigned long *)&val);
> + if (ret)
> + return ret;
> + dev_info(dev, "set lcd panel spi reg %lu = %lu\n", r, val);
> + spi_send(spi, r, val);
> + }
> + argv_free(args);
> +
> + return count;
> +}
> +
> +
> +static DEVICE_ATTR(lcd_reg, S_IWUSR, NULL, lcd_reg_store);
> +
> +static struct attribute *boxer_lcd_spi_attributes[] = {
> + &dev_attr_lcd_reg,
> + NULL
> +};
> +
> +
> +static struct attribute_group boxer_lcd_spi_attributes_group = {
> + .attrs = boxer_lcd_spi_attributes,
> +};
> +
> +
> +
> +static int boxer_spi_probe(struct spi_device *spi)
> +{
> + spi->mode = SPI_MODE_0;
> + spi->bits_per_word = 16;
> + spi_setup(spi);
> +
> + boxer_spi_device = spi;
> +
> + boxer_init_panel();
> +
> + if (sysfs_create_group(&spi->dev.kobj,&boxer_lcd_spi_attributes_group))
> + printk(KERN_WARNING "error creating sysfs entries\n");
> +
> + omap_dss_register_driver(&boxer_driver);
> + return 0;
> +}
> +
> +static int boxer_spi_remove(struct spi_device *spi)
> +{
> + sysfs_remove_group(&spi->dev.kobj,&boxer_lcd_spi_attributes_group);
> + omap_dss_unregister_driver(&boxer_driver);
> +
> + return 0;
> +}
> +
> +
> +static struct spi_driver boxer_spi_driver = {
> + .probe = boxer_spi_probe,
> + .remove = __devexit_p(boxer_spi_remove),
> + .driver = {
> + .name = "boxer_disp_spi",
> + .bus =&spi_bus_type,
> + .owner = THIS_MODULE,
> + },
> +};
> +
> +static int __init boxer_lcd_init(void)
> +{
> + int ret = 0;
> +
> + boxer_panel_wq = create_singlethread_workqueue("boxer-panel-wq");
> +
> + printk(KERN_WARNING "Enabling power for LCD\n");
> + boxer_panel_regulator = regulator_get(NULL, "vlcd");
> +
> + if (IS_ERR(boxer_panel_regulator)) {
> + printk(KERN_ERR "Unable to get vlcd regulator, reason: %ld!\n",
> + IS_ERR(boxer_panel_regulator));
> + ret = -ENODEV;
> + goto out;
> + }
> +
> + ret = regulator_enable(boxer_panel_regulator);
> +
> + if (ret) {
> + printk(KERN_ERR "Failed to enable regulator vlcd!\n");
> + regulator_put(boxer_panel_regulator);
> + goto out;
> + }
> +
> + return spi_register_driver(&boxer_spi_driver);
> +out:
> + return ret;
> +}
> +
> +static void __exit boxer_lcd_exit(void)
> +{
> + spi_unregister_driver(&boxer_spi_driver);
> + regulator_disable(boxer_panel_regulator);
> + regulator_put(boxer_panel_regulator);
> + destroy_workqueue(boxer_panel_wq);
> +}
> +
> +
> +module_init(boxer_lcd_init);
> +module_exit(boxer_lcd_exit);
> +MODULE_LICENSE("GPL");
> +
^ permalink raw reply
* Re: [GIT PULL] OMAP DSS for v3.2
From: Tomi Valkeinen @ 2011-10-17 6:49 UTC (permalink / raw)
To: Florian Tobias Schandinat; +Cc: linux-omap mailing list, lfbdev-ml
In-Reply-To: <4E9B52E7.7020601@gmx.de>
On 10/17/2011 12:55 AM, Florian Tobias Schandinat wrote:
> Hi Tomi,
>
> On 10/07/2011 07:20 AM, Tomi Valkeinen wrote:
>> Hi Florian,
>>
>> Please pull OMAP DSS patches for v3.2 merge window.
>
> Pulled.
Thanks.
>> Note that there are some conflicts with other trees. The board file
>> conflicts are trivial, changes in code which just happen to be next to
>> each other. The LCD driver conflicts are even simpler, there were
>> changes to them from some other tree, but I have removed the files.
>>
>> The conflicts have been solved properly by Stephen in linux-next:
>>
>> https://github.com/sfrothwell/linux-next/commit/3e31b3042760e3906d0a275d7adedfaf55ee5b0a
>>
>> I also attached the output from git show, as github seems to show the
>> full diff for the merge commit.
>>
>> Are you ok with the conflicts?
>
> No problem.
> Well, as I understand, Linus prefers to see (and solve) these conflicts himself,
> so I don't have any work with them at all. I'd only have to resolve them if
> Linus gave up and that would probably point to a more fundamental issue in the
> workflow, like changes going mainline via the wrong tree or such things.
This is also my understanding. However, Linus isn't that fond of ARM
board files, which is where the conflicts are...
One could argue that the board file changes should go through the OMAP
tree, but both the driver and the board files need to be changed at the
same time to keep kernel compiling.
Tomi
^ permalink raw reply
* PAYMENT INFORMATION
From: Western Union Money Transfer @ 2011-10-18 7:25 UTC (permalink / raw)
To: linux-fbdev
How are you today?
I write to inform you that we have already sent you $5,000.00USD through Western Union as we have been given the mandate to transfer your full compensation payment of $1.800, 000.00USD via Western Union Money Transfer by the United Nations (ECOWAS). This is because the United Nations and (ECOWAS) are supporting individuals due to the worldwide economy meltdown.
I would have requested for your phone number to give you the information through phone but Internet hackers were many. So i decided to email you the MTCN and sender name so that you can pick up this $5,000.00USD to enable us send another $5,000.00USD by tomorrow as you know that we will be sending you only $5,000.00USD per day. The fund was sent in the name which you use in opening your e-mail address.
Please pick up this information and rush to any Western Union to pick up the $5,000.00USD and send us an email back to enable us send you another payment by tomorrow.
Below is the western union information to pick up the USD5000.00 to pick up.
Payment Information.
MTCN: _______________4661-297-503
Sender's Name: _________Alice Johnson
Text Question: __________How Long
Answer: _______________Immediately
Amount Sent___________$5000.00USD
Country: _______________Nigeria
Email me once you picked up this USD5000.00 today.
Thanks
Mrs. Anita Daniel.
Email: westernunionmoneytransfer_w@yahoo.cn
®Western Union Office.
^ permalink raw reply
* RE: [RFC PATCH 0/3] fbdev driver for dm644x
From: Hadli, Manjunath @ 2011-10-19 11:40 UTC (permalink / raw)
To: linux-fbdev
Hello,
Can some one review this patches, so that I can issue a pull request.
Thanks.
Regards,
--Manju
On Mon, Sep 26, 2011 at 19:05:06, Hadli, Manjunath wrote:
> This patch series adds an fbdev driver for Texas Instruments Davinci SoC.The display subsystem consists of OSD and VENC, with OSD supporting 2 RGb planes and
> 2 video planes.
> http://focus.ti.com/general/docs/lit/
> getliterature.tsp?literatureNumber=sprue37d&fileType=pdf
>
> A good amount of the OSD and VENC enabling code is present in the kernel, and this patch series adds the fbdev interface.
>
> The fbdev driver exports 4 nodes representing each plane to the user - from fb0 to fb3.
>
> Manjunath Hadli (3):
> davinci: vpbe: enable vpbe for fbdev addition
> davinci: vpbe: add fbdev driver for dm644x
> davinci: vpbe: add build infrastructure for fbdev driver
>
> drivers/media/video/davinci/Kconfig | 13 +
> drivers/media/video/davinci/Makefile | 1 +
> drivers/media/video/davinci/vpbe_display.c | 6 +
> drivers/media/video/davinci/vpbe_fb.c | 2537 +++++++++++++++++++++++++++
> drivers/media/video/davinci/vpbe_fb.h | 66 +
> drivers/media/video/davinci/vpbe_fb_ioctl.h | 159 ++
> drivers/media/video/davinci/vpbe_osd.c | 793 +++++++++-
> drivers/media/video/davinci/vpbe_venc.c | 84 +
> include/media/davinci/vpbe_osd.h | 64 +-
> include/media/davinci/vpbe_venc.h | 21 +
> 10 files changed, 3735 insertions(+), 9 deletions(-) create mode 100644 drivers/media/video/davinci/vpbe_fb.c
> create mode 100644 drivers/media/video/davinci/vpbe_fb.h
> create mode 100644 drivers/media/video/davinci/vpbe_fb_ioctl.h
>
>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox