public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom <Tom.Rix@windriver.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Add support for Jade display controller
Date: Sat, 16 Jan 2010 10:30:58 -0600	[thread overview]
Message-ID: <4B51E9C2.6080206@windriver.com> (raw)
In-Reply-To: <1263230330-19728-3-git-send-email-matthias.weisser@graf-syteco.de>

Matthias Weisser wrote:
> Signed-off-by: Matthias Weisser <matthias.weisser@graf-syteco.de>
> ---
>  drivers/video/Makefile      |    1 +
>  drivers/video/cfb_console.c |    2 +-
>  drivers/video/jadegdc.c     |  193 +++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 195 insertions(+), 1 deletions(-)
>  create mode 100644 drivers/video/jadegdc.c
> 
> diff --git a/drivers/video/Makefile b/drivers/video/Makefile
> index bb6b5a0..aadc149 100644
> --- a/drivers/video/Makefile
> +++ b/drivers/video/Makefile
> @@ -30,6 +30,7 @@ COBJS-$(CONFIG_ATMEL_LCD) += atmel_lcdfb.o
>  COBJS-$(CONFIG_CFB_CONSOLE) += cfb_console.o
>  COBJS-$(CONFIG_S6E63D6) += s6e63d6.o
>  COBJS-$(CONFIG_VIDEO_CT69000) += ct69000.o
> +COBJS-$(CONFIG_VIDEO_JADEGDC) += jadegdc.o
>  COBJS-$(CONFIG_VIDEO_MB862xx) += mb862xx.o
>  COBJS-$(CONFIG_VIDEO_MX3) += mx3fb.o
>  COBJS-$(CONFIG_VIDEO_SED13806) += sed13806.o
> diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
> index c07a26e..506337b 100644
> --- a/drivers/video/cfb_console.c
> +++ b/drivers/video/cfb_console.c
> @@ -321,7 +321,7 @@ void	console_cursor (int state);
>  #else
>  #define SWAP16(x)	 (x)
>  #define SWAP32(x)	 (x)
> -#if defined(VIDEO_FB_16BPP_WORD_SWAP)
> +#if defined(VIDEO_FB_16BPP_WORD_SWAP) || defined(CONFIG_VIDEO_JADEGDC)

Instead of adding CONFIG_VIDEO_JADEGDC, define VIDEO_FB_16BPP_WORD_SWAP
in your board config file or a more appropriate file.

>  #define SHORTSWAP32(x)	 ( ((x) >> 16) | ((x) << 16) )
>  #else
>  #define SHORTSWAP32(x)	 (x)
> diff --git a/drivers/video/jadegdc.c b/drivers/video/jadegdc.c
<snip>

> + * 4MB (at the end of system RAM)
> + */
> +#define VIDEO_MEM_SIZE		0x400000
> +
> +/*
> + * Graphic Device
> + */
> +GraphicDevice jadegdc;

It does not look like this global is accessed output of this function
It should be declared static.

> +
> +void *video_hw_init(void)
> +{
> +	GraphicDevice *pGD = &jadegdc;
> +	struct ctfb_res_modes var_mode[2];
> +	unsigned long *vid;
> +	unsigned long div;
> +	unsigned long dspBase[2];
> +	char *penv;
> +	int bpp;
> +	int i, j;
> +
> +	memset(pGD, 0, sizeof(GraphicDevice));
> +
> +	dspBase[0] = JADE_GDC_DISP0_PHYS_BASE;
> +	dspBase[1] = JADE_GDC_DISP1_PHYS_BASE;
> +
> +	pGD->gdfIndex = GDF_15BIT_555RGB;
> +	pGD->gdfBytesPP = 2;
> +
> +	pGD->memSize = VIDEO_MEM_SIZE;
> +	pGD->frameAdrs = PHYS_SDRAM + PHYS_SDRAM_SIZE - VIDEO_MEM_SIZE;
> +	vid = (unsigned long *)pGD->frameAdrs;
> +
> +	for (i = 0; i < 2; i++) {
> +		char varName[32];
> +		u32 dcm1, dcm2, dcm3;
> +		u16 htp, hdp, hdb, hsp, vtr, vsp, vdp;
> +		u8 hsw, vsw;
> +		u32 l2m, l2em, l2oa0, l2da0, l2oa1, l2da1;
> +		u16 l2dx, l2dy, l2wx, l2wy, l2ww, l2wh;
> +
> +		sprintf(varName, "gs_dsp_%d_param", i);
> +
> +		penv = getenv(varName);
> +		if (penv == NULL) {
> +			penv = getenv("videomode");
> +			if ((i == 1) || (penv == NULL))
> +				continue;

This check for (i == 1) should be moved before the getenv

> +		}
> +
> +		bpp = 0;

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

If leaving this a noop is intentional, add a comment.

Tom

  parent reply	other threads:[~2010-01-16 16:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-11 17:18 [U-Boot] Adding support for MB86R01 Matthias Weisser
2010-01-11 17:18 ` [U-Boot] [PATCH] Add support for MB86R01 from Fujitsu Matthias Weisser
2010-01-11 17:18   ` [U-Boot] [PATCH] Add support for Jade display controller Matthias Weisser
2010-01-11 17:18     ` [U-Boot] [PATCH] Adding new vendor logo Matthias Weisser
2010-01-11 17:18       ` [U-Boot] [PATCH] Add support for jadecpu board Matthias Weisser
2010-01-16 19:18         ` Tom
2010-01-16 20:11           ` Wolfgang Denk
2010-01-18  7:05             ` [U-Boot] Antw: " Matthias Weisser
2010-01-18  7:57               ` Wolfgang Denk
2010-01-18  8:21                 ` Matthias Weißer
2010-01-18  8:55                   ` Wolfgang Denk
2010-01-18  7:54           ` [U-Boot] " Matthias Weißer
2010-01-18  8:52             ` Wolfgang Denk
2010-01-18 12:10               ` Matthias Weißer
2010-01-18 13:11                 ` Tom
2010-01-21 19:52                 ` Tom
2010-01-16 16:43       ` [U-Boot] [PATCH] Adding new vendor logo Tom
2010-01-18 13:55         ` Matthias Weißer
2010-01-16 16:30     ` Tom [this message]
2010-01-18 14:06       ` [U-Boot] [PATCH] Add support for Jade display controller Matthias Weißer
2010-01-16 15:39   ` [U-Boot] [PATCH] Add support for MB86R01 from Fujitsu Tom
2010-01-18 14:01     ` Matthias Weißer
2010-01-16 15:40 ` [U-Boot] Adding support for MB86R01 Tom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B51E9C2.6080206@windriver.com \
    --to=tom.rix@windriver.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox