video: Add support for TI's AM335x LCD-Controller
PATCH 1/1 video: Add support for TI's AM335x LCD-Controller
- Adds support for a minimal framebuffer driver of TI's AM335x SoC to be compatible with Wolfgang Denk's LCD-Framework (CONFIG_LCD, common/lcd.c)
--- drivers/video/Makefile | 1 + drivers/video/am335x-fb.c | 169 +++++++++++++++++++++++++++++++++++++++++++++ drivers/video/am335x-fb.h | 67 ++++++++++++++++++ 3 files changed, 237 insertions(+) create mode 100644 drivers/video/am335x-fb.c create mode 100644 drivers/video/am335x-fb.h
drivers/video/Makefile +1 -0
@@ -39,3 +39,4 @@ obj-$(CONFIG_VIDEO_SMI_LYNXEM) += smiLynxEM.o videomodes.o obj-$(CONFIG_VIDEO_TEGRA) += tegra.o obj-$(CONFIG_VIDEO_VCXK) += bus_vcxk.o obj-$(CONFIG_FORMIKE) += formike.o +obj-$(CONFIG_AM335X_LCD) += am335x-fb.o
drivers/video/am335x-fb.c new file +169 -0
169 lines not on this page · raw message
drivers/video/am335x-fb.h new file +67 -0
67 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 1/1 video: Add support for TI's AM335x LCD-Controller
Hello Hannes,
Am 06.03.2014 14:39, schrieb Hannes Petermaier:
Quoted 4 lines
- Adds support for a minimal framebuffer driver of TI's AM335x SoC to be compatible with Wolfgang Denk's LCD-Framework (
CONFIG_LCD,common/lcd.c)
Quoted 8 lines
Signed-off-by Hannes Petermaier<[email protected]>--- drivers/video/Makefile | 1 + drivers/video/am335x-fb.c | 169 +++++++++++++++++++++++++++++++++++++++++++++ drivers/video/am335x-fb.h | 67 ++++++++++++++++++ 3 files changed, 237 insertions(+)create mode 100644
drivers/video/am335x-fb.c
create mode 100644drivers/video/am335x-fb.h
Why you cannot use:
u-boot:drivers/video/da8xx-fb.c ?
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 1/1 video: Add support for TI's AM335x LCD-Controller
Quoted 17 lines · Heiko Schocher
Hello Hannes,
Am 06.03.2014 14:39, schrieb Hannes Petermaier:
Quoted 5 lines
- Adds support for a minimal framebuffer driver of TI's AM335x SoC to be compatible with Wolfgang Denk's LCD-Framework (
CONFIG_LCD,common/lcd.c)Signed-off-by Hannes Petermaier<[email protected]>Quoted 8 lines
--- drivers/video/Makefile | 1 + drivers/video/am335x-fb.c | 169 +++++++++++++++++++++++++++++++++++++++++++++ drivers/video/am335x-fb.h | 67 ++++++++++++++++++ 3 files changed, 237 insertions(+)create mode 100644
drivers/video/am335x-fb.c
create mode 100644drivers/video/am335x-fb.h
Quoted 6 lines
Why you cannot use:
u-boot:drivers/video/da8xx-fb.c ?
bye,
Heiko
Hi Heiko,
for my opinion this clone of the linux-driver is very overloaded and difficult to use/configure.
With the words 'small-is-beautiful' and 'keep-it-simple' i've wrote a few lines which do the minimum:
- configure raster-controller
- setup DMA
- powerON Display
maybe we can use the small-version in other projects too.
best regards,
Hannes
PATCH 1/1 video: Add support for TI's AM335x LCD-Controller
Hello Hannes,
Am 06.03.2014 15:24, schrieb Hannes Petermaier:
Quoted 25 lines · Heiko Schocher
Quoted 16 lines
Hello Hannes,
Am 06.03.2014 14:39, schrieb Hannes Petermaier:
Quoted 4 lines
- Adds support for a minimal framebuffer driver of TI's AM335x SoC to be compatible with Wolfgang Denk's LCD-Framework (
CONFIG_LCD,common/lcd.c)Quoted 8 lines
Signed-off-by Hannes Petermaier<[email protected]>---
drivers/video/Makefile| 1 +drivers/video/am335x-fb.c| 169 +++++++++++++++++++++++++++++++++++++++++++++drivers/video/am335x-fb.h| 67 ++++++++++++++++++3 files changed, 237 insertions(+)create mode 100644
drivers/video/am335x-fb.c
create mode 100644drivers/video/am335x-fb.hQuoted 6 lines
Why you cannot use:
u-boot:drivers/video/da8xx-fb.c ?
bye,
HeikoHi Heiko,
Quoted 7 lines
for my opinion this clone of the linux-driver is very overloaded and difficult to use/configure. With the words 'small-is-beautiful' and 'keep-it-simple' i've wrote a few lines which do the minimum:
- configure raster-controller
- setup DMA
- powerON Displaymaybe we can use the small-version in other projects too.
Why is it difficult to use/configure the existing driver?
Look for example into the board/siemens/pxm2/board.c board, which uses this driver. You have to define:
static struct da8xx_panel lcd_panels[]
static const struct display_panel disp_panel
static const struct lcd_ctrl_config lcd_cfg
and call "da8xx_video_init(&lcd_panels[0], &lcd_cfg, lcd_cfg.bpp);"
Thats all ...
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 1/1 video: Add support for TI's AM335x LCD-Controller
Hi Heiko,
Quoted 44 lines · Heiko Schocher
Hello Hannes,
Am 06.03.2014 15:24, schrieb Hannes Petermaier:
Quoted 34 lines · Heiko Schocher
Quoted 17 lines
Hello Hannes,
Am 06.03.2014 14:39, schrieb Hannes Petermaier:
Quoted 5 lines
- Adds support for a minimal framebuffer driver of TI's AM335x SoC to be compatible with Wolfgang Denk's LCD-Framework (
CONFIG_LCD,common/lcd.c)Signed-off-by Hannes Petermaier<[email protected]>Quoted 8 lines
---
drivers/video/Makefile| 1 +drivers/video/am335x-fb.c| 169
+++++++++++++++++++++++++++++++++++++++++++++drivers/video/am335x-fb.h| 67 ++++++++++++++++++3 files changed, 237 insertions(+)create mode 100644
drivers/video/am335x-fb.ccreate mode 100644drivers/video/am335x-fb.hQuoted 6 lines
Why you cannot use:
u-boot:drivers/video/da8xx-fb.c ?
bye,
HeikoHi Heiko,
for my opinion this clone of the linux-driver is very overloaded and difficult to use/configure.
With the words 'small-is-beautiful' and 'keep-it-simple' i've wrote a few lines which do the minimum:
- configure raster-controller
- setup DMA
- powerON DisplayQuoted 1 line
maybe we can use the small-version in other projects too.
Why is it difficult to use/configure the existing driver?
Look for example into the
board/siemens/pxm2/board.cboard, which uses this driver. You have to define:
Quoted 7 lines
static struct
da8xx_panellcd_panels[]
static const structdisplay_paneldisp_panel
static const structlcd_ctrl_configlcd_cfgand call "
da8xx_video_init(&lcd_panels[0], &lcd_cfg, lcd_cfg.bpp);"Thats all ...
i've looked around again for using the da8xx-fb driver and found another detail which motivated me for writing a new instance.
--
par->vram_virt = malloc(par->vram_size);
par->vram_phys = (dma_addr_t) par->vram_virt;
debug("Requesting 0x%x bytes for framebuffer at 0x%x\n",
(unsigned int)par->vram_size,
(unsigned int)par->vram_virt);
if (!par->vram_virt) {
printf("GLCD: malloc for frame buffer failed\n");
goto err_release_fb;
}
gd->fb_base = (int)par->vram_virt;--
da8xx-fb.c does allocate a new framebuffer by itself.
But in my case lcd-framework allready has reserved memory (on top of ram) for framebuffer usage and i want use this memory from lcd-framework for two reasons:
- don't waste memory
- have this memory really on top of ram to give the following OS (in my case vxWorks) a pointer where it have to write Video-data.
maybe there are other possibilites to achieve this. any ideas ?
Quoted 2 lines
bye,
Heiko
many thanks and best regards,
Hannes
PATCH 1/1 video: Add support for TI's AM335x LCD-Controller
Hello Hannes,
Am 07.03.2014 11:28, schrieb Hannes Petermaier:
Quoted 80 lines
Hi Heiko,
Quoted 44 lines · Heiko Schocher
Hello Hannes,
Am 06.03.2014 15:24, schrieb Hannes Petermaier:
Quoted 34 lines · Heiko Schocher
Quoted 17 lines
Hello Hannes,
Am 06.03.2014 14:39, schrieb Hannes Petermaier:
Quoted 5 lines
- Adds support for a minimal framebuffer driver of TI's AM335x SoC to be compatible with Wolfgang Denk's LCD-Framework (
CONFIG_LCD,common/lcd.c)Signed-off-by Hannes Petermaier<[email protected]>Quoted 8 lines
---
drivers/video/Makefile| 1 +drivers/video/am335x-fb.c| 169
+++++++++++++++++++++++++++++++++++++++++++++drivers/video/am335x-fb.h| 67 ++++++++++++++++++3 files changed, 237 insertions(+)create mode 100644
drivers/video/am335x-fb.ccreate mode 100644drivers/video/am335x-fb.hQuoted 6 lines
Why you cannot use:
u-boot:drivers/video/da8xx-fb.c ?
bye,
HeikoHi Heiko,
for my opinion this clone of the linux-driver is very overloaded and difficult to use/configure.
With the words 'small-is-beautiful' and 'keep-it-simple' i've wrote a few lines which do the minimum:
- configure raster-controller
- setup DMA
- powerON DisplayQuoted 1 line
maybe we can use the small-version in other projects too.
Why is it difficult to use/configure the existing driver?
Look for example into the
board/siemens/pxm2/board.cboard, which uses this driver. You have to define:Quoted 7 lines
static struct
da8xx_panellcd_panels[]
static const structdisplay_paneldisp_panel
static const structlcd_ctrl_configlcd_cfgand call "
da8xx_video_init(&lcd_panels[0],&lcd_cfg, lcd_cfg.bpp);"Thats all ...
i've looked around again for using the da8xx-fb driver and found another detail which motivated me for writing a new instance.
--
par->vram_virt = malloc(par->vram_size); par->vram_phys = (dma_addr_t) par->vram_virt; debug("Requesting 0x%x bytes for framebuffer at 0x%x\n", (unsigned int)par->vram_size, (unsigned int)par->vram_virt); if (!par->vram_virt) { printf("GLCD: malloc for frame buffer failed\n"); goto err_release_fb; } gd->fb_base = (int)par->vram_virt;--
da8xx-fb.cdoes allocate a new framebuffer by itself.
But in my case lcd-framework allready has reserved memory (on top of ram) for framebuffer usage and i want use this memory from lcd-framework for two reasons:
- don't waste memory
- have this memory really on top of ram to give the following OS (in my case vxWorks) a pointer where it have to write Video-data.
Quoted 2 lines
maybe there are other possibilites to achieve this. any ideas ?
Maybe you can introduce a common function like this? :
void *get_vram(size_t size)
{
if (gd->fb_base) {
if (gd->fb_size == size)
return gd->fb_base;
printf("fb size does not match\n");
} else {
void *ret = malloc(size);
if (ret) {
gd->fb_base = ret;
gd->fb_size = size;
}
return ret
}
return NULL;
}(gd->fb_size is a new variable ...)
and use in your driver only:
par->vram_virt = get_vram(par->vram_size);
or, just only check in the driver, if "gd->fb_base" has a value, and if so, do not malloc the vram ...
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 1/1 video: Add support for TI's AM335x LCD-Controller
In reply to Hannes PetermaierQuoted 4 lines · On Thu, 6 Mar 2014 14:39:06 +0100 Hannes Petermaier <[email protected]> wrote:
- Adds support for a minimal framebuffer driver of TI's AM335x SoC to be compatible with Wolfgang Denk's LCD-Framework (
CONFIG_LCD,common/lcd.c)
Quoted 8 lines
Signed-off-by Hannes Petermaier <[email protected]>--- drivers/video/Makefile | 1 + drivers/video/am335x-fb.c | 169 +++++++++++++++++++++++++++++++++++++++++++++ drivers/video/am335x-fb.h | 67 ++++++++++++++++++ 3 files changed, 237 insertions(+) create mode 100644 drivers/video/am335x-fb.c create mode 100644 drivers/video/am335x-fb.h
applied to u-boot-video/master. Thanks!
Anatolij