* [U-Boot] [PATCH 1/2] video:cache:fix: Proper buffer alignment for lcd subsystem
@ 2013-01-07 9:23 Lukasz Majewski
2013-01-07 9:23 ` [U-Boot] [PATCH 2/2] video:cache:fix:trats: Enable dcache flush for TRATS board's LCD subsystem Lukasz Majewski
2013-01-08 1:07 ` [U-Boot] [PATCH 1/2] video:cache:fix: Proper buffer alignment for lcd subsystem Simon Glass
0 siblings, 2 replies; 8+ messages in thread
From: Lukasz Majewski @ 2013-01-07 9:23 UTC (permalink / raw)
To: u-boot
This commit makes the video subsystem code cache aware.
Memory allocated for decompressed BMP memory is now cache line aligned.
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Anatolij Gustschin <agust@denx.de>
---
common/cmd_bmp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c
index 5a52edd..57f3eb5 100644
--- a/common/cmd_bmp.c
+++ b/common/cmd_bmp.c
@@ -55,7 +55,7 @@ bmp_image_t *gunzip_bmp(unsigned long addr, unsigned long *lenp)
* Decompress bmp image
*/
len = CONFIG_SYS_VIDEO_LOGO_MAX_SIZE;
- dst = malloc(CONFIG_SYS_VIDEO_LOGO_MAX_SIZE);
+ dst = memalign(CONFIG_SYS_CACHELINE_SIZE, len);
if (dst == NULL) {
puts("Error: malloc in gunzip failed!\n");
return NULL;
--
1.7.2.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] video:cache:fix:trats: Enable dcache flush for TRATS board's LCD subsystem
2013-01-07 9:23 [U-Boot] [PATCH 1/2] video:cache:fix: Proper buffer alignment for lcd subsystem Lukasz Majewski
@ 2013-01-07 9:23 ` Lukasz Majewski
2013-01-08 0:55 ` Minkyu Kang
` (2 more replies)
2013-01-08 1:07 ` [U-Boot] [PATCH 1/2] video:cache:fix: Proper buffer alignment for lcd subsystem Simon Glass
1 sibling, 3 replies; 8+ messages in thread
From: Lukasz Majewski @ 2013-01-07 9:23 UTC (permalink / raw)
To: u-boot
lcd_set_flush_dcache(1) function is called from trats configuration file
to enable lcd_sync function.
Tested-at: TRATS (Exynos 4210)
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
---
board/samsung/trats/trats.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index 88d193d..5d0fdd0 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -789,5 +789,8 @@ void init_panel_info(vidinfo_t *vid)
s6e8ax0_init();
exynos_set_dsim_platform_data(&s6e8ax0_platform_data);
+ /* Enable flushing after LCD writes if requested */
+ lcd_set_flush_dcache(1);
+
setenv("lcdinfo", "lcd=s6e8ax0");
}
--
1.7.2.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] video:cache:fix:trats: Enable dcache flush for TRATS board's LCD subsystem
2013-01-07 9:23 ` [U-Boot] [PATCH 2/2] video:cache:fix:trats: Enable dcache flush for TRATS board's LCD subsystem Lukasz Majewski
@ 2013-01-08 0:55 ` Minkyu Kang
2013-01-08 1:08 ` Simon Glass
2013-01-08 9:43 ` Minkyu Kang
2 siblings, 0 replies; 8+ messages in thread
From: Minkyu Kang @ 2013-01-08 0:55 UTC (permalink / raw)
To: u-boot
On 07/01/13 18:23, Lukasz Majewski wrote:
> lcd_set_flush_dcache(1) function is called from trats configuration file
> to enable lcd_sync function.
>
> Tested-at: TRATS (Exynos 4210)
> Tested-by: Lukasz Majewski <l.majewski@samsung.com>
> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Minkyu Kang <mk7.kang@samsung.com>
> ---
> board/samsung/trats/trats.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
> index 88d193d..5d0fdd0 100644
> --- a/board/samsung/trats/trats.c
> +++ b/board/samsung/trats/trats.c
> @@ -789,5 +789,8 @@ void init_panel_info(vidinfo_t *vid)
> s6e8ax0_init();
> exynos_set_dsim_platform_data(&s6e8ax0_platform_data);
>
> + /* Enable flushing after LCD writes if requested */
> + lcd_set_flush_dcache(1);
> +
> setenv("lcdinfo", "lcd=s6e8ax0");
> }
>
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
---
Thanks,
Minkyu Kang.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] video:cache:fix: Proper buffer alignment for lcd subsystem
2013-01-07 9:23 [U-Boot] [PATCH 1/2] video:cache:fix: Proper buffer alignment for lcd subsystem Lukasz Majewski
2013-01-07 9:23 ` [U-Boot] [PATCH 2/2] video:cache:fix:trats: Enable dcache flush for TRATS board's LCD subsystem Lukasz Majewski
@ 2013-01-08 1:07 ` Simon Glass
2013-01-08 8:28 ` Lukasz Majewski
1 sibling, 1 reply; 8+ messages in thread
From: Simon Glass @ 2013-01-08 1:07 UTC (permalink / raw)
To: u-boot
Hi Lukasz,
On Mon, Jan 7, 2013 at 1:23 AM, Lukasz Majewski <l.majewski@samsung.com> wrote:
> This commit makes the video subsystem code cache aware.
> Memory allocated for decompressed BMP memory is now cache line aligned.
>
> Tested-by: Lukasz Majewski <l.majewski@samsung.com>
> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Anatolij Gustschin <agust@denx.de>
> ---
> common/cmd_bmp.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c
> index 5a52edd..57f3eb5 100644
> --- a/common/cmd_bmp.c
> +++ b/common/cmd_bmp.c
> @@ -55,7 +55,7 @@ bmp_image_t *gunzip_bmp(unsigned long addr, unsigned long *lenp)
> * Decompress bmp image
> */
> len = CONFIG_SYS_VIDEO_LOGO_MAX_SIZE;
> - dst = malloc(CONFIG_SYS_VIDEO_LOGO_MAX_SIZE);
> + dst = memalign(CONFIG_SYS_CACHELINE_SIZE, len);
> if (dst == NULL) {
> puts("Error: malloc in gunzip failed!\n");
> return NULL;
Sorry, I still have a question. Does this 'dst' address get used as
the actual LCD frame buffer on your board, or is it just copied to the
frame buffer?
Regards,
Simon
> --
> 1.7.2.3
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] video:cache:fix:trats: Enable dcache flush for TRATS board's LCD subsystem
2013-01-07 9:23 ` [U-Boot] [PATCH 2/2] video:cache:fix:trats: Enable dcache flush for TRATS board's LCD subsystem Lukasz Majewski
2013-01-08 0:55 ` Minkyu Kang
@ 2013-01-08 1:08 ` Simon Glass
2013-01-08 9:43 ` Minkyu Kang
2 siblings, 0 replies; 8+ messages in thread
From: Simon Glass @ 2013-01-08 1:08 UTC (permalink / raw)
To: u-boot
On Mon, Jan 7, 2013 at 1:23 AM, Lukasz Majewski <l.majewski@samsung.com> wrote:
> lcd_set_flush_dcache(1) function is called from trats configuration file
> to enable lcd_sync function.
>
> Tested-at: TRATS (Exynos 4210)
> Tested-by: Lukasz Majewski <l.majewski@samsung.com>
> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Minkyu Kang <mk7.kang@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
> ---
> board/samsung/trats/trats.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
> index 88d193d..5d0fdd0 100644
> --- a/board/samsung/trats/trats.c
> +++ b/board/samsung/trats/trats.c
> @@ -789,5 +789,8 @@ void init_panel_info(vidinfo_t *vid)
> s6e8ax0_init();
> exynos_set_dsim_platform_data(&s6e8ax0_platform_data);
>
> + /* Enable flushing after LCD writes if requested */
> + lcd_set_flush_dcache(1);
> +
> setenv("lcdinfo", "lcd=s6e8ax0");
> }
> --
> 1.7.2.3
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] video:cache:fix: Proper buffer alignment for lcd subsystem
2013-01-08 1:07 ` [U-Boot] [PATCH 1/2] video:cache:fix: Proper buffer alignment for lcd subsystem Simon Glass
@ 2013-01-08 8:28 ` Lukasz Majewski
2013-01-08 14:54 ` Simon Glass
0 siblings, 1 reply; 8+ messages in thread
From: Lukasz Majewski @ 2013-01-08 8:28 UTC (permalink / raw)
To: u-boot
Hi Simon,
> Hi Lukasz,
>
> On Mon, Jan 7, 2013 at 1:23 AM, Lukasz Majewski
> <l.majewski@samsung.com> wrote:
> > This commit makes the video subsystem code cache aware.
> > Memory allocated for decompressed BMP memory is now cache line
> > aligned.
> >
> > Tested-by: Lukasz Majewski <l.majewski@samsung.com>
> > Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> > Cc: Anatolij Gustschin <agust@denx.de>
> > ---
> > common/cmd_bmp.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c
> > index 5a52edd..57f3eb5 100644
> > --- a/common/cmd_bmp.c
> > +++ b/common/cmd_bmp.c
> > @@ -55,7 +55,7 @@ bmp_image_t *gunzip_bmp(unsigned long addr,
> > unsigned long *lenp)
> > * Decompress bmp image
> > */
> > len = CONFIG_SYS_VIDEO_LOGO_MAX_SIZE;
> > - dst = malloc(CONFIG_SYS_VIDEO_LOGO_MAX_SIZE);
> > + dst = memalign(CONFIG_SYS_CACHELINE_SIZE, len);
> > if (dst == NULL) {
> > puts("Error: malloc in gunzip failed!\n");
> > return NULL;
>
> Sorry, I still have a question. Does this 'dst' address get used as
> the actual LCD frame buffer on your board, or is it just copied to the
> frame buffer?
>
I must admit, that I've misunderstood the LCD code a bit. Reply to this
post from Anatolij helped me.
The buffer (dst) is only the "internal" buffer from which we are
assigning BMP data to actual frame buffer area. Then only the frame
buffer (pointed by fb pointer) area needs cache flush (which is done at
lcd_sync()).
To sum up - this patch shall be dropped.
However the second patch -
[PATCH 2/2] video:cache:fix:trats: Enable dcache flush for TRATS
board's LCD subsystem
is crucial to fix the BMP image display distortion.
> Regards,
> Simon
>
> > --
> > 1.7.2.3
> >
--
Best regards,
Lukasz Majewski
Samsung R&D Poland (SRPOL) | Linux Platform Group
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] video:cache:fix:trats: Enable dcache flush for TRATS board's LCD subsystem
2013-01-07 9:23 ` [U-Boot] [PATCH 2/2] video:cache:fix:trats: Enable dcache flush for TRATS board's LCD subsystem Lukasz Majewski
2013-01-08 0:55 ` Minkyu Kang
2013-01-08 1:08 ` Simon Glass
@ 2013-01-08 9:43 ` Minkyu Kang
2 siblings, 0 replies; 8+ messages in thread
From: Minkyu Kang @ 2013-01-08 9:43 UTC (permalink / raw)
To: u-boot
Dear Lukasz,
On 07/01/13 18:23, Lukasz Majewski wrote:
> lcd_set_flush_dcache(1) function is called from trats configuration file
> to enable lcd_sync function.
>
> Tested-at: TRATS (Exynos 4210)
> Tested-by: Lukasz Majewski <l.majewski@samsung.com>
> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Minkyu Kang <mk7.kang@samsung.com>
> ---
> board/samsung/trats/trats.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
> index 88d193d..5d0fdd0 100644
> --- a/board/samsung/trats/trats.c
> +++ b/board/samsung/trats/trats.c
> @@ -789,5 +789,8 @@ void init_panel_info(vidinfo_t *vid)
> s6e8ax0_init();
> exynos_set_dsim_platform_data(&s6e8ax0_platform_data);
>
> + /* Enable flushing after LCD writes if requested */
> + lcd_set_flush_dcache(1);
Please move it into exynos_fb.c (lcd_ctrl_init? or somewhere)
> +
> setenv("lcdinfo", "lcd=s6e8ax0");
> }
>
Thanks,
Minkyu Kang.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] video:cache:fix: Proper buffer alignment for lcd subsystem
2013-01-08 8:28 ` Lukasz Majewski
@ 2013-01-08 14:54 ` Simon Glass
0 siblings, 0 replies; 8+ messages in thread
From: Simon Glass @ 2013-01-08 14:54 UTC (permalink / raw)
To: u-boot
Hi Lukasz,
On Tue, Jan 8, 2013 at 12:28 AM, Lukasz Majewski <l.majewski@samsung.com> wrote:
> Hi Simon,
>
>> Hi Lukasz,
>>
>> On Mon, Jan 7, 2013 at 1:23 AM, Lukasz Majewski
>> <l.majewski@samsung.com> wrote:
>> > This commit makes the video subsystem code cache aware.
>> > Memory allocated for decompressed BMP memory is now cache line
>> > aligned.
>> >
>> > Tested-by: Lukasz Majewski <l.majewski@samsung.com>
>> > Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
>> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>> > Cc: Anatolij Gustschin <agust@denx.de>
>> > ---
>> > common/cmd_bmp.c | 2 +-
>> > 1 files changed, 1 insertions(+), 1 deletions(-)
>> >
>> > diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c
>> > index 5a52edd..57f3eb5 100644
>> > --- a/common/cmd_bmp.c
>> > +++ b/common/cmd_bmp.c
>> > @@ -55,7 +55,7 @@ bmp_image_t *gunzip_bmp(unsigned long addr,
>> > unsigned long *lenp)
>> > * Decompress bmp image
>> > */
>> > len = CONFIG_SYS_VIDEO_LOGO_MAX_SIZE;
>> > - dst = malloc(CONFIG_SYS_VIDEO_LOGO_MAX_SIZE);
>> > + dst = memalign(CONFIG_SYS_CACHELINE_SIZE, len);
>> > if (dst == NULL) {
>> > puts("Error: malloc in gunzip failed!\n");
>> > return NULL;
>>
>> Sorry, I still have a question. Does this 'dst' address get used as
>> the actual LCD frame buffer on your board, or is it just copied to the
>> frame buffer?
>>
>
> I must admit, that I've misunderstood the LCD code a bit. Reply to this
> post from Anatolij helped me.
> The buffer (dst) is only the "internal" buffer from which we are
> assigning BMP data to actual frame buffer area. Then only the frame
> buffer (pointed by fb pointer) area needs cache flush (which is done at
> lcd_sync()).
OK that makes sense, thanks.
>
> To sum up - this patch shall be dropped.
> However the second patch -
>
> [PATCH 2/2] video:cache:fix:trats: Enable dcache flush for TRATS
> board's LCD subsystem
>
> is crucial to fix the BMP image display distortion.
Yes I agree.
Regards,
Simon
> --
> Best regards,
>
> Lukasz Majewski
>
> Samsung R&D Poland (SRPOL) | Linux Platform Group
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-01-08 14:54 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-07 9:23 [U-Boot] [PATCH 1/2] video:cache:fix: Proper buffer alignment for lcd subsystem Lukasz Majewski
2013-01-07 9:23 ` [U-Boot] [PATCH 2/2] video:cache:fix:trats: Enable dcache flush for TRATS board's LCD subsystem Lukasz Majewski
2013-01-08 0:55 ` Minkyu Kang
2013-01-08 1:08 ` Simon Glass
2013-01-08 9:43 ` Minkyu Kang
2013-01-08 1:07 ` [U-Boot] [PATCH 1/2] video:cache:fix: Proper buffer alignment for lcd subsystem Simon Glass
2013-01-08 8:28 ` Lukasz Majewski
2013-01-08 14:54 ` Simon Glass
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.