Re: [U-Boot] [PATCH 2/3] video: add support for display controller in MB86R0x SoCs

2010-05-01 Thread Anatolij Gustschin
Dear Matthias,

On Thu, 22 Apr 2010 12:30:56 +0200
Matthias Weisser weiss...@arcor.de wrote:
...
 diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
 index d1f47c9..4769cdb 100644
 --- a/drivers/video/cfb_console.c
 +++ b/drivers/video/cfb_console.c
 @@ -153,6 +153,14 @@ CONFIG_VIDEO_HW_CURSOR:   - Uses the hardware cursor 
 capability of the
  #endif
  
  
 /*/
 +/* Defines for the MB86R0xGDC driver  */
 +/*/
 +#ifdef CONFIG_VIDEO_MB86R0xGDC
 +
 +#define VIDEO_FB_16BPP_WORD_SWAP
 +#endif

Please do not add VIDEO_FB_16BPP_WORD_SWAP #define here.
Add it into your include/configs/jadecpu.h file in the video
related section like other boards do. Thanks!

Best regards,
Anatolij
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] video: add support for display controller in MB86R0x SoCs

2010-05-01 Thread Anatolij Gustschin
Dear Matthias,

On Thu, 22 Apr 2010 15:03:55 +0200
Matthias Weißer weiss...@arcor.de wrote:
...
  +/*
  + * Set a RGB color in the LUT
  + */
  +void video_set_lut(unsigned int index, unsigned char r,
  +  unsigned char g, unsigned char b)
  +{
  +
  +}
 
  Code seems to be missing?
 
 The driver doesn't support palletized color format at the moment but 
 removing this function leads to a linker error.
 
 Maybe we should add a config option to disable palletized color format 
 or add a weak function somewhere. Maybe Anatolij can comment on this 
 issue also.

I will send a patch adding weak default video_set_lut() to cfb_console
driver. You can remove empty function then.

Best regards,
Anatolij
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] video: add support for display controller in MB86R0x SoCs

2010-04-28 Thread Matthias Weißer
Am 22.04.2010 14:41, schrieb Wolfgang Denk:
 Dear Matthias Weisser,

 In message1271932257-14618-3-git-send-email-weiss...@arcor.de  you wrote:
 This patch adds support for the display controller in
 the MB86R0x SoCs.

 Signed-off-by: Matthias Weisserweiss...@arcor.de
 ...
 +pGD-memSize = VIDEO_MEM_SIZE;
 +pGD-frameAdrs = PHYS_SDRAM + PHYS_SDRAM_SIZE - VIDEO_MEM_SIZE;

 Please pay attention to the global memory map requirements. PRAM might
 go first.

Can you please explain this a bit more in detail? I checked the source 
and README for CONFIG_PRAM and it seems to be reserving some space at 
the end of RAM. But I have only found reference to it in ppc and m68k code.

What would be the correct way to reserve some 2MB-4MB at the end of 
system RAM as a framebuffer for the integrated graphics device?

Thanks in advance

Matthias
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] video: add support for display controller in MB86R0x SoCs

2010-04-28 Thread Wolfgang Denk
Dear Matthias,

in message 4bd7d5dd.6080...@arcor.de you wrote:

  +  pGD-memSize = VIDEO_MEM_SIZE;
  +  pGD-frameAdrs = PHYS_SDRAM + PHYS_SDRAM_SIZE - VIDEO_MEM_SIZE;
 
  Please pay attention to the global memory map requirements. PRAM might
  go first.
 
 Can you please explain this a bit more in detail? I checked the source 
 and README for CONFIG_PRAM and it seems to be reserving some space at 
 the end of RAM. But I have only found reference to it in ppc and m68k code.

Right. But there is a chance that the ARM implementation might be
reworked soon, and then it will follow the documented approach as
well, so better start correctly from the beginning so you don;t run
into conflicts soon.

 What would be the correct way to reserve some 2MB-4MB at the end of 
 system RAM as a framebuffer for the integrated graphics device?

See the PPC implementation for reference.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Shakespeare's Law of Prototyping: (Hamlet III, iv, 156-160)
O, throw away the worser part of it,
And live the purer with the other half.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] video: add support for display controller in MB86R0x SoCs

2010-04-28 Thread Matthias Weißer
Am 28.04.2010 08:44, schrieb Wolfgang Denk:
 Dear Matthias,


 in message4bd7d5dd.6080...@arcor.de  you wrote:

 +  pGD-memSize = VIDEO_MEM_SIZE;
 +  pGD-frameAdrs = PHYS_SDRAM + PHYS_SDRAM_SIZE - VIDEO_MEM_SIZE;

 Please pay attention to the global memory map requirements. PRAM might
 go first.

 Can you please explain this a bit more in detail? I checked the source
 and README for CONFIG_PRAM and it seems to be reserving some space at
 the end of RAM. But I have only found reference to it in ppc and m68k code.

 Right. But there is a chance that the ARM implementation might be
 reworked soon, and then it will follow the documented approach as
 well, so better start correctly from the beginning so you don;t run
 into conflicts soon.

I totally agree with you, but...

 What would be the correct way to reserve some 2MB-4MB at the end of
 system RAM as a framebuffer for the integrated graphics device?

 See the PPC implementation for reference.

I had a look into the PPC code and its clear to me how it is done there. 
But I currently do not see how this can be done on ARM without a couple 
of changes to arch/arm/lib/board.c

Another question regarding the video driver:
I have seen some video drivers in driver/video/... and some are in 
arch/.../cpu/...

What would be the right place for mine? As it is integrated into the SoC 
I tend to put it in arch/arm/cpu/arm/arm926ejs/mb86r0x and not into 
drivers/video. On the other hand there is a imx31 related video driver 
in drivers/video.

Thanks for you patience
Matthias
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] video: add support for display controller in MB86R0x SoCs

2010-04-22 Thread Wolfgang Denk
Dear Matthias Weisser,

In message 1271932257-14618-3-git-send-email-weiss...@arcor.de you wrote:
 This patch adds support for the display controller in
 the MB86R0x SoCs.
 
 Signed-off-by: Matthias Weisser weiss...@arcor.de
...
 + pGD-memSize = VIDEO_MEM_SIZE;
 + pGD-frameAdrs = PHYS_SDRAM + PHYS_SDRAM_SIZE - VIDEO_MEM_SIZE;

Please pay attention to the global memory map requirements. PRAM might
go first.


 + writel(dcm1, dspBase[i] + GC_DCM1);
 + writel(dcm2, dspBase[i] + GC_DCM2);
 + writel(dcm3, dspBase[i] + GC_DCM3);
 +
 + writew(htp, dspBase[i] + GC_HTP);
 + writew(hdp, dspBase[i] + GC_HDP);
 + writew(hdb, dspBase[i] + GC_HDB);
 + writew(hsp, dspBase[i] + GC_HSP);
 + writeb(hsw, dspBase[i] + GC_HSW);
 +
 + writeb(vsw, dspBase[i] + GC_VSW);
 + writew(vtr, dspBase[i] + GC_VTR);
 + writew(vsp, dspBase[i] + GC_VSP);
 + writew(vdp, dspBase[i] + GC_VDP);
 +
 + writel(l2m, dspBase[i] + GC_L2M);
 + writel(l2em, dspBase[i] + GC_L2EM);
 + writel(l2oa0, dspBase[i] + GC_L2OA0);
 + writel(l2da0, dspBase[i] + GC_L2DA0);
 + writel(l2oa1, dspBase[i] + GC_L2OA1);
 + writel(l2da1, dspBase[i] + GC_L2DA1);
 + writew(l2dx, dspBase[i] + GC_L2DX);
 + writew(l2dy, dspBase[i] + GC_L2DY);
 + writew(l2wx, dspBase[i] + GC_L2WX);
 + writew(l2wy, dspBase[i] + GC_L2WY);
 + writew(l2ww, dspBase[i] + GC_L2WW);
 + writew(l2wh, dspBase[i] + GC_L2WH);
 +
 + writel(dcm1 | (1  18) | (1  31), dspBase[i] + GC_DCM1);

Please use a C struct instead.

 +/*
 + * Set a RGB color in the LUT
 + */
 +void video_set_lut(unsigned int index, unsigned char r,
 + unsigned char g, unsigned char b)
 +{
 +
 +}

Code seems to be missing?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
The more we disagree, the more chance there is that at least  one  of
us is right.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] video: add support for display controller in MB86R0x SoCs

2010-04-22 Thread Matthias Weißer
Am 22.04.2010 14:41, schrieb Wolfgang Denk:
 Dear Matthias Weisser,

 In message1271932257-14618-3-git-send-email-weiss...@arcor.de  you wrote:
 This patch adds support for the display controller in
 the MB86R0x SoCs.

 Signed-off-by: Matthias Weisserweiss...@arcor.de
 ...
 +pGD-memSize = VIDEO_MEM_SIZE;
 +pGD-frameAdrs = PHYS_SDRAM + PHYS_SDRAM_SIZE - VIDEO_MEM_SIZE;

 Please pay attention to the global memory map requirements. PRAM might
 go first.


 +writel(dcm1, dspBase[i] + GC_DCM1);
 +writel(dcm2, dspBase[i] + GC_DCM2);
 +writel(dcm3, dspBase[i] + GC_DCM3);
 +
 +writew(htp, dspBase[i] + GC_HTP);
 +writew(hdp, dspBase[i] + GC_HDP);
 +writew(hdb, dspBase[i] + GC_HDB);
 +writew(hsp, dspBase[i] + GC_HSP);
 +writeb(hsw, dspBase[i] + GC_HSW);
 +
 +writeb(vsw, dspBase[i] + GC_VSW);
 +writew(vtr, dspBase[i] + GC_VTR);
 +writew(vsp, dspBase[i] + GC_VSP);
 +writew(vdp, dspBase[i] + GC_VDP);
 +
 +writel(l2m, dspBase[i] + GC_L2M);
 +writel(l2em, dspBase[i] + GC_L2EM);
 +writel(l2oa0, dspBase[i] + GC_L2OA0);
 +writel(l2da0, dspBase[i] + GC_L2DA0);
 +writel(l2oa1, dspBase[i] + GC_L2OA1);
 +writel(l2da1, dspBase[i] + GC_L2DA1);
 +writew(l2dx, dspBase[i] + GC_L2DX);
 +writew(l2dy, dspBase[i] + GC_L2DY);
 +writew(l2wx, dspBase[i] + GC_L2WX);
 +writew(l2wy, dspBase[i] + GC_L2WY);
 +writew(l2ww, dspBase[i] + GC_L2WW);
 +writew(l2wh, dspBase[i] + GC_L2WH);
 +
 +writel(dcm1 | (1  18) | (1  31), dspBase[i] + GC_DCM1);

 Please use a C struct instead.

This driver is mainly copied from mb862xx (sharing the header as offsets 
are the same) and that was the approach used there. I will add the 
structures and use them.

 +/*
 + * Set a RGB color in the LUT
 + */
 +void video_set_lut(unsigned int index, unsigned char r,
 +unsigned char g, unsigned char b)
 +{
 +
 +}

 Code seems to be missing?

The driver doesn't support palletized color format at the moment but 
removing this function leads to a linker error.

Maybe we should add a config option to disable palletized color format 
or add a weak function somewhere. Maybe Anatolij can comment on this 
issue also.

Regards,
Matthias
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot