From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Date: Thu, 19 Jul 2012 10:28:53 +0200 Subject: [U-Boot] [PATCH v3 08/18] tegra: Add SOC support for display/lcd In-Reply-To: <20120719082435.GC14571@chaoj-nv-desktop.nvidia.com> References: <1342106718-3058-1-git-send-email-sjg@chromium.org> <1342106718-3058-9-git-send-email-sjg@chromium.org> <20120719073707.GA27742@avionic-0098.mockup.avionic-design.de> <20120719082435.GC14571@chaoj-nv-desktop.nvidia.com> Message-ID: <20120719082853.GA19853@avionic-0098.mockup.avionic-design.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Jul 19, 2012 at 05:24:35PM +0900, Adam Jiang wrote: > On Thu, Jul 19, 2012 at 03:37:07PM +0800, Thierry Reding wrote: > > * PGP Signed by an unknown key > > > > On Thu, Jul 12, 2012 at 08:25:08AM -0700, Simon Glass wrote: > > > From: Wei Ni > > > > > > Add support for the LCD peripheral at the Tegra2 SOC level. A separate > > > LCD driver will use this functionality to configure the display. > > > > > > Mayuresh Kulkarni: > > > - changes to remove bitfields and clean up for submission > > > > > > Simon Glass: > > > - simplify code, move clock control into here, clean-up > > > > > > Signed-off-by: Mayuresh Kulkarni > > > Signed-off-by: Simon Glass > > > --- > > > Changes in v3: > > > - Add probe function to read in fdt parameters in display driver > > > - Separate display driver and LCD driver more in fdt > > > > > > arch/arm/cpu/armv7/tegra2/Makefile | 2 +- > > > arch/arm/cpu/armv7/tegra2/display.c | 389 ++++++++++++++++++++ > > > arch/arm/include/asm/arch-tegra2/dc.h | 544 ++++++++++++++++++++++++++++ > > > arch/arm/include/asm/arch-tegra2/display.h | 152 ++++++++ > > > include/fdtdec.h | 1 + > > > lib/fdtdec.c | 1 + > > > 6 files changed, 1088 insertions(+), 1 deletions(-) > > > create mode 100644 arch/arm/cpu/armv7/tegra2/display.c > > > create mode 100644 arch/arm/include/asm/arch-tegra2/dc.h > > > create mode 100644 arch/arm/include/asm/arch-tegra2/display.h > > > > > [...] > > > diff --git a/arch/arm/cpu/armv7/tegra2/display.c b/arch/arm/cpu/armv7/tegra2/display.c > > [...] > > > +int setup_window(struct disp_ctl_win *win, struct fdt_disp_config *config) > > > +{ > > > + win->x = 0; > > > + win->y = 0; > > > + win->w = config->width; > > > + win->h = config->height; > > > + win->out_x = 0; > > > + win->out_y = 0; > > > + win->out_w = config->width; > > > + win->out_h = config->height; > > > + win->phys_addr = config->frame_buffer; > > > + win->stride = config->width * (1 << config->log2_bpp) / 8; > > > + debug("%s: depth = %d\n", __func__, config->log2_bpp); > > > + switch (config->log2_bpp) { > > > + case 5: > > > + case 24: > > > > What's the 24 doing here? > > This has been explained in the definition of the log2_bpp. When bpp is > 24, the integer holds 24 itself because there is no 2^N expression for > it. Right, I missed that. Thanks. Thierry -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: not available URL: