exynos: video: Convert exynos LCD driver to use driver model
Subsystems (10)
v2 cover exynos: video: Convert exynos LCD driver to use driver model
This series converts the exynos LCD driver to work with driver model. Only the eDP display is converted - the MIPI display is left mostly alone as I do not have a device to test with.
The conversion involves some refactoring to simplify the code, reduce the amount of global/static data and allow boards to be built without LCD support.
The series is tested with snow, spring, pit and pi. It disables LCD on other exynos boards so that they will still build with these changes. Further work will be needed (by someone with a board) to convert the others. I am not sure when this series can be applied.
The series also brings in device tree features from Linux v4.4. It would be useful to do a full sync with the kernel on these files, but this is really a job for the Samsung maintainer :-)
The series is available at u-boot-dm/rkg-working.
Changes in v2:
- Rebase to master
- Rebase to master
Simon Glass (25):
exynos: video: Move driver files into their own directory
exynos: video: Drop dead code
exynos: video: Remove use of vidinfo_t typedef
exynos: video: Drop the static lcd_base_addr variable
exynos: video: Drop static variables in exynos_fimd.c
exynos: video: Drop static variables in exynos_fb.c
exynos: video: Drop static variables in exynos_dp_lowlevel.c
exynos: video: Move dsim_config_dt into a function
exynos: video: Move struct exynos_platform_mipi_dsim into vidinfo
exynos: video: Move mipi_lcd_device_dt into a function
exynos: video: Combine LCD driver into one file
exynos: pwm: Add a driver for the exynos5 PWM
video: Add an enum for active low/high
exynos: dts: Add pwm device tree node
exynos: Allow tizen to be built without an LCD
exynos: Allow CONFIG_MISC_COMMON to be build without an LCD
exynos: Disable LCD display for boards we can't convert
dts: Add clock and regulator binding files for max77802
exynos: Allow PWM0 pinmux to be set up
exynos: Simplify calling of exynos_dp_phy_ctrl()
exynos: dts: Add display-related device tree fragments
exynos: video: Rename edp_device_info to exynos_dp_priv
exynos: video: Rename variables for driver model
exynos: video: Convert several boards to driver model for video
exynos: video: Drop old unused code
arch/arm/cpu/armv7/s5p-common/timer.c | 3 +
arch/arm/dts/exynos5.dtsi | 3 +-
arch/arm/dts/exynos5250-snow.dts | 44 ++
arch/arm/dts/exynos5250-spring.dts | 53 ++
arch/arm/dts/exynos5250.dtsi | 7 +
arch/arm/dts/exynos5420-peach-pit.dts | 55 ++
arch/arm/dts/exynos54xx.dtsi | 11 +-
arch/arm/dts/exynos5800-peach-pi.dts | 40 ++
arch/arm/mach-exynos/include/mach/cpu.h | 2 -
arch/arm/mach-exynos/include/mach/dp_info.h | 5 +-
arch/arm/mach-exynos/include/mach/mipi_dsim.h | 10 +-
arch/arm/mach-exynos/include/mach/power.h | 2 +-
arch/arm/mach-exynos/pinmux.c | 6 +
arch/arm/mach-exynos/power.c | 2 +-
board/samsung/common/board.c | 15 -
board/samsung/common/exynos5-dt.c | 158 -----
board/samsung/common/misc.c | 10 +
board/samsung/trats/trats.c | 2 +
board/samsung/universal_c210/universal.c | 2 +
configs/peach-pi_defconfig | 4 +
configs/peach-pit_defconfig | 4 +
configs/snow_defconfig | 4 +
configs/spring_defconfig | 4 +
drivers/pwm/Kconfig | 9 +
drivers/pwm/Makefile | 1 +
drivers/pwm/exynos_pwm.c | 120 ++++
drivers/video/Makefile | 6 +-
drivers/video/exynos/Makefile | 12 +
drivers/video/{ => exynos}/exynos_dp.c | 599 ++++++++++-------
drivers/video/{ => exynos}/exynos_dp_lowlevel.c | 268 ++++----
drivers/video/exynos/exynos_dp_lowlevel.h | 89 +++
drivers/video/exynos/exynos_fb.c | 720 +++++++++++++++++++++
drivers/video/{ => exynos}/exynos_mipi_dsi.c | 71 +-
.../video/{ => exynos}/exynos_mipi_dsi_common.c | 6 +-
.../video/{ => exynos}/exynos_mipi_dsi_common.h | 0
.../video/{ => exynos}/exynos_mipi_dsi_lowlevel.c | 0
.../video/{ => exynos}/exynos_mipi_dsi_lowlevel.h | 0
drivers/video/{ => exynos}/exynos_pwm_bl.c | 0
drivers/video/exynos_dp_lowlevel.h | 68 --
drivers/video/exynos_fb.c | 330 ----------
drivers/video/exynos_fb.h | 41 --
drivers/video/exynos_fimd.c | 409 ------------
drivers/video/s6e8ax0.c | 4 +-
drivers/video/simple_panel.c | 2 +
include/configs/exynos5-common.h | 1 -
include/configs/exynos5-dt-common.h | 5 +-
include/configs/s5pc210_universal.h | 3 -
include/configs/smdk5250.h | 3 +
include/configs/smdk5420.h | 4 +
include/configs/trats.h | 4 -
include/configs/trats2.h | 4 -
include/dt-bindings/clock/maxim,max77802.h | 22 +
include/dt-bindings/regulator/maxim,max77802.h | 18 +
include/exynos_lcd.h | 4 +-
include/libtizen.h | 2 +
include/video.h | 5 +
lib/tizen/tizen.c | 2 +
57 files changed, 1804 insertions(+), 1474 deletions(-)
create mode 100644 drivers/pwm/exynos_pwm.c
create mode 100644 drivers/video/exynos/Makefile
rename drivers/video/{ => exynos}/exynos_dp.c (50%)
rename drivers/video/{ => exynos}/exynos_dp_lowlevel.c (77%)
create mode 100644 drivers/video/exynos/exynos_dp_lowlevel.h
create mode 100644 drivers/video/exynos/exynos_fb.c
rename drivers/video/{ => exynos}/exynos_mipi_dsi.c (80%)
rename drivers/video/{ => exynos}/exynos_mipi_dsi_common.c (99%)
rename drivers/video/{ => exynos}/exynos_mipi_dsi_common.h (100%)
rename drivers/video/{ => exynos}/exynos_mipi_dsi_lowlevel.c (100%)
rename drivers/video/{ => exynos}/exynos_mipi_dsi_lowlevel.h (100%)
rename drivers/video/{ => exynos}/exynos_pwm_bl.c (100%)
delete mode 100644 drivers/video/exynos_dp_lowlevel.h
delete mode 100644 drivers/video/exynos_fb.c
delete mode 100644 drivers/video/exynos_fb.h
delete mode 100644 drivers/video/exynos_fimd.c
create mode 100644 include/dt-bindings/clock/maxim,max77802.h
create mode 100644 include/dt-bindings/regulator/maxim,max77802.hSignature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 1/25 exynos: video: Move driver files into their own directory
Move all the exynos video drivers into one place for ease of maintenance.
---
Changes in v2: None
drivers/video/Makefile | 6 +-----
drivers/video/exynos/Makefile | 12 ++++++++++++
drivers/video/{ => exynos}/exynos_dp.c | 0
drivers/video/{ => exynos}/exynos_dp_lowlevel.c | 0
drivers/video/{ => exynos}/exynos_dp_lowlevel.h | 0
drivers/video/{ => exynos}/exynos_fb.c | 0
drivers/video/{ => exynos}/exynos_fb.h | 0
drivers/video/{ => exynos}/exynos_fimd.c | 0
drivers/video/{ => exynos}/exynos_mipi_dsi.c | 0
drivers/video/{ => exynos}/exynos_mipi_dsi_common.c | 0
drivers/video/{ => exynos}/exynos_mipi_dsi_common.h | 0
drivers/video/{ => exynos}/exynos_mipi_dsi_lowlevel.c | 0
drivers/video/{ => exynos}/exynos_mipi_dsi_lowlevel.h | 0
drivers/video/{ => exynos}/exynos_pwm_bl.c | 0
drivers/video/s6e8ax0.c | 4 ++--
15 files changed, 15 insertions(+), 7 deletions(-)
create mode 100644 drivers/video/exynos/Makefile
rename drivers/video/{ => exynos}/exynos_dp.c (100%)
rename drivers/video/{ => exynos}/exynos_dp_lowlevel.c (100%)
rename drivers/video/{ => exynos}/exynos_dp_lowlevel.h (100%)
rename drivers/video/{ => exynos}/exynos_fb.c (100%)
rename drivers/video/{ => exynos}/exynos_fb.h (100%)
rename drivers/video/{ => exynos}/exynos_fimd.c (100%)
rename drivers/video/{ => exynos}/exynos_mipi_dsi.c (100%)
rename drivers/video/{ => exynos}/exynos_mipi_dsi_common.c (100%)
rename drivers/video/{ => exynos}/exynos_mipi_dsi_common.h (100%)
rename drivers/video/{ => exynos}/exynos_mipi_dsi_lowlevel.c (100%)
rename drivers/video/{ => exynos}/exynos_mipi_dsi_lowlevel.h (100%)
rename drivers/video/{ => exynos}/exynos_pwm_bl.c (100%)drivers/video/Makefile +1 -5
@@ -23,11 +23,6 @@ obj-$(CONFIG_ATI_RADEON_FB) += ati_radeon_fb.o videomodes.o obj-$(CONFIG_ATMEL_HLCD) += atmel_hlcdfb.o obj-$(CONFIG_ATMEL_LCD) += atmel_lcdfb.o obj-$(CONFIG_CFB_CONSOLE) += cfb_console.o -obj-$(CONFIG_EXYNOS_DP) += exynos_dp.o exynos_dp_lowlevel.o -obj-$(CONFIG_EXYNOS_FB) += exynos_fb.o exynos_fimd.o -obj-$(CONFIG_EXYNOS_MIPI_DSIM) += exynos_mipi_dsi.o exynos_mipi_dsi_common.o \ - exynos_mipi_dsi_lowlevel.o -obj-$(CONFIG_EXYNOS_PWM_BL) += exynos_pwm_bl.o obj-$(CONFIG_FSL_DIU_FB) += fsl_diu_fb.o videomodes.o obj-$(CONFIG_FSL_DCU_FB) += fsl_dcu_fb.o videomodes.o obj-$(CONFIG_L5F31188) += l5f31188.o
@@ -65,6 +60,7 @@ obj-$(CONFIG_LG4573) += lg4573.o obj-$(CONFIG_AM335X_LCD) += am335x-fb.o obj-${CONFIG_VIDEO_TEGRA124} += tegra124/ +obj-${CONFIG_EXYNOS_FB} += exynos/ obj-${CONFIG_VIDEO_ROCKCHIP} += rockchip/ obj-y += bridge/
drivers/video/exynos/Makefile new file +12 -0
@@ -0,0 +1,12 @@ +# +# (C) Copyright 2000-2007 +# Wolfgang Denk, DENX Software Engineering, wd at denx.de. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-$(CONFIG_EXYNOS_DP) += exynos_dp.o exynos_dp_lowlevel.o +obj-$(CONFIG_EXYNOS_FB) += exynos_fb.o exynos_fimd.o +obj-$(CONFIG_EXYNOS_MIPI_DSIM) += exynos_mipi_dsi.o exynos_mipi_dsi_common.o \ + exynos_mipi_dsi_lowlevel.o +obj-$(CONFIG_EXYNOS_PWM_BL) += exynos_pwm_bl.o
drivers/video/exynos/exynos_dp.c renamed from drivers/video/exynos_dp.c +0 -0
drivers/video/exynos/exynos_dp_lowlevel.c renamed from drivers/video/exynos_dp_lowlevel.c +0 -0
drivers/video/exynos/exynos_dp_lowlevel.h renamed from drivers/video/exynos_dp_lowlevel.h +0 -0
drivers/video/exynos/exynos_fb.c renamed from drivers/video/exynos_fb.c +0 -0
drivers/video/exynos/exynos_fb.h renamed from drivers/video/exynos_fb.h +0 -0
drivers/video/exynos/exynos_fimd.c renamed from drivers/video/exynos_fimd.c +0 -0
drivers/video/exynos/exynos_mipi_dsi.c renamed from drivers/video/exynos_mipi_dsi.c +0 -0
drivers/video/exynos/exynos_mipi_dsi_common.c renamed from drivers/video/exynos_mipi_dsi_common.c +0 -0
drivers/video/exynos/exynos_mipi_dsi_common.h renamed from drivers/video/exynos_mipi_dsi_common.h +0 -0
drivers/video/exynos/exynos_mipi_dsi_lowlevel.c renamed from drivers/video/exynos_mipi_dsi_lowlevel.c +0 -0
drivers/video/exynos/exynos_mipi_dsi_lowlevel.h renamed from drivers/video/exynos_mipi_dsi_lowlevel.h +0 -0
drivers/video/exynos/exynos_pwm_bl.c renamed from drivers/video/exynos_pwm_bl.c +0 -0
drivers/video/s6e8ax0.c +2 -2
@@ -9,8 +9,8 @@#include <common.h> #include <asm/arch/mipi_dsim.h> -#include "exynos_mipi_dsi_lowlevel.h" -#include "exynos_mipi_dsi_common.h" +#include "exynos/exynos_mipi_dsi_lowlevel.h" +#include "exynos/exynos_mipi_dsi_common.h" static void s6e8ax0_panel_cond (struct mipi_dsim_device *dsim_dev) {
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 1/25 exynos: video: Move driver files into their own directory
Quoted 3 lines · On Sun, 21 Feb 2016 21:08:38 -0700 Simon Glass sjg at chromium.org wrote:
Move all the exynos video drivers into one place for ease of maintenance.
Signed-off-by Simon Glass <[email protected]>
PATCH v2 2/25 exynos: video: Drop dead code
In reply to Simon GlassWe always use device tree with video, so can drop these #ifdefs. Some of the hardware addresses are not needed either.
---
Changes in v2: None
arch/arm/mach-exynos/include/mach/cpu.h | 2 -- drivers/video/exynos/exynos_dp_lowlevel.c | 4 ---- drivers/video/exynos/exynos_fb.c | 11 ----------- drivers/video/exynos/exynos_fimd.c | 7 ------- drivers/video/exynos/exynos_mipi_dsi.c | 4 ---- include/exynos_lcd.h | 2 -- 6 files changed, 30 deletions(-)
arch/arm/mach-exynos/include/mach/cpu.h +0 -2
@@ -288,9 +288,7 @@ static inline unsigned int __attribute__((no_instrument_function)) \ SAMSUNG_BASE(adc, ADC_BASE) SAMSUNG_BASE(clock, CLOCK_BASE) SAMSUNG_BASE(ace_sfr, ACE_SFR_BASE) -SAMSUNG_BASE(dp, DP_BASE) SAMSUNG_BASE(sysreg, SYSREG_BASE) -SAMSUNG_BASE(fimd, FIMD_BASE) SAMSUNG_BASE(i2c, I2C_BASE) SAMSUNG_BASE(i2s, I2S_BASE)SAMSUNG_BASE (mipi_dsim,MIPI_DSIM_BASE )
drivers/video/exynos/exynos_dp_lowlevel.c +0 -4
@@ -22,7 +22,6 @@ struct exynos_dp *dp_regs;void exynos_dp_set_base_addr (void ) { -#if CONFIG_IS_ENABLED (OF_CONTROL )unsigned int node =fdtdec_next_compatible (gd->fdt_blob,0 ,COMPAT_SAMSUNG_EXYNOS5_DP );if (node <=0 )
@@ -32,9 +31,6 @@ void exynos_dp_set_base_addr(void) node, "reg");if (dp_regs ==NULL )debug ("Can't get the DP base address\n" ); -#else - dp_regs = (struct exynos_dp *)samsung_get_base_dp (); -#endif }static void exynos_dp_enable_video_input (unsigned int enable)
drivers/video/exynos/exynos_fb.c +0 -11
@@ -28,7 +28,6 @@ DECLARE_GLOBAL_DATA_PTR;static unsigned int panel_width, panel_height; -#if CONFIG_IS_ENABLED (OF_CONTROL )vidinfo_t panel_info = {/* * Insert a value here so that we don't end up in the BSS
@@ -36,7 +35,6 @@ vidinfo_t panel_info = {*/ .vl_col = -1, }; -#endif ushort *configuration_get_cmap (void ) {
@@ -126,7 +124,6 @@ static void lcd_panel_on(vidinfo_t *vid)exynos_backlight_on (1 ); -#if CONFIG_IS_ENABLED (OF_CONTROL ) node =fdtdec_next_compatible (gd->fdt_blob,0 ,COMPAT_SAMSUNG_EXYNOS_FIMD );if (node <=0 ) {
@@ -141,7 +138,6 @@ static void lcd_panel_on(vidinfo_t *vid) &bl_en_gpio, GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); -#endif exynos_cfg_ldo ();exynos_enable_ldo (1 );
@@ -150,7 +146,6 @@ static void lcd_panel_on(vidinfo_t *vid)exynos_mipi_dsi_init (); } -#if CONFIG_IS_ENABLED (OF_CONTROL )int exynos_lcd_early_init (const void *blob) {unsigned int node;
@@ -288,22 +283,16 @@ int exynos_lcd_early_init(const void *blob)return 0 ; } -#endif void lcd_ctrl_init (void *lcdbase) {set_system_display_ctrl ();set_lcd_clk (); -#if CONFIG_IS_ENABLED (OF_CONTROL )#ifdef CONFIG_EXYNOS_MIPI_DSIM exynos_init_dsim_platform_data (&panel_info);#endif exynos_lcd_misc_init (&panel_info); -#else -/* initialize parameters which is specific to panel. */ -init_panel_info (&panel_info); -#endif panel_width = panel_info.vl_width; panel_height = panel_info.vl_height;
drivers/video/exynos/exynos_fimd.c +0 -7
@@ -251,7 +251,6 @@ void exynos_fimd_window_off(unsigned int win_id)writel (cfg, &fimd_ctrl->winshmap); } -#if CONFIG_IS_ENABLED (OF_CONTROL )/* * The reset value for FIMD SYSMMU register MMU_CTRL is 3 * on Exynos5420 and newer versions.
@@ -289,13 +288,11 @@ void exynos_fimd_disable_sysmmu(void)writel (0x0 , sysmmufimd); } } -#endif void exynos_fimd_lcd_init (vidinfo_t *vid) {unsigned int cfg =0 , rgb_mode;unsigned int offset; -#if CONFIG_IS_ENABLED (OF_CONTROL )unsigned int node; node = fdtdec_next_compatible(gd->fdt_blob,
@@ -311,10 +308,6 @@ void exynos_fimd_lcd_init(vidinfo_t *vid)if (fdtdec_get_bool (gd->fdt_blob, node,"samsung,disable-sysmmu" ))exynos_fimd_disable_sysmmu (); -#else - fimd_ctrl = (struct exynos_fb *)samsung_get_base_fimd (); -#endif - offset =exynos_fimd_get_base_offset ();/* store panel info to global variable */
drivers/video/exynos/exynos_mipi_dsi.c +0 -4
@@ -28,11 +28,9 @@DECLARE_GLOBAL_DATA_PTR ;static struct exynos_platform_mipi_dsim *dsim_pd; -#if CONFIG_IS_ENABLED (OF_CONTROL )static struct mipi_dsim_config dsim_config_dt;static struct exynos_platform_mipi_dsim dsim_platform_data_dt;static struct mipi_dsim_lcd_device mipi_lcd_device_dt; -#endif struct mipi_dsim_ddi {int bus_id;
@@ -249,7 +247,6 @@ void exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd) dsim_pd = pd; } -#if CONFIG_IS_ENABLED (OF_CONTROL )int exynos_dsim_config_parse_dt (const void *blob) {int node;
@@ -334,4 +331,3 @@ void exynos_init_dsim_platform_data(vidinfo_t *vid) dsim_pd = &dsim_platform_data_dt; } -#endif
include/exynos_lcd.h +0 -2
@@ -77,6 +77,4 @@ typedef struct vidinfo { unsigned int dual_lcd_enabled; } vidinfo_t; -void init_panel_info (vidinfo_t *vid); -#endif
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 2/25 exynos: video: Drop dead code
Quoted 4 lines · On Sun, 21 Feb 2016 21:08:39 -0700 Simon Glass sjg at chromium.org wrote:
We always use device tree with video, so can drop these #ifdefs. Some of the hardware addresses are not needed either.
Signed-off-by Simon Glass <[email protected]>
PATCH v2 2/25 exynos: video: Drop dead code
In reply to Simon GlassQuoted 4 lines · On Sun, 21 Feb 2016 21:08:39 -0700 Simon Glass sjg at chromium.org wrote:
We always use device tree with video, so can drop these #ifdefs. Some of the hardware addresses are not needed either.
Signed-off-by Simon Glass <[email protected]>
PATCH v2 3/25 exynos: video: Remove use of vidinfo_t typedef
In reply to Simon GlassUse 'struct vidinfo' instead so that we can change this to a struct with a different name in future.
---
Changes in v2: None
arch/arm/mach-exynos/include/mach/mipi_dsim.h | 3 ++- drivers/video/exynos/exynos_fb.c | 10 +++++----- drivers/video/exynos/exynos_fimd.c | 6 +++--- drivers/video/exynos/exynos_mipi_dsi_common.c | 6 +++--- 4 files changed, 13 insertions(+), 12 deletions(-)
arch/arm/mach-exynos/include/mach/mipi_dsim.h +2 -1
@@ -369,7 +369,8 @@ int exynos_mipi_dsi_register_lcd_device(struct mipi_dsim_lcd_device *lcd_dev);void exynos_set_dsim_platform_data (struct exynos_platform_mipi_dsim *pd); -void exynos_init_dsim_platform_data (vidinfo_t *vid); +struct vidinfo ; +void exynos_init_dsim_platform_data (struct vidinfo *vid);/* panel driver init based on mipi dsi interface */ void s6e8ax0_init (void );
drivers/video/exynos/exynos_fb.c +5 -5
@@ -28,7 +28,7 @@ DECLARE_GLOBAL_DATA_PTR;static unsigned int panel_width, panel_height; -vidinfo_t panel_info = { +struct vidinfo panel_info = {/* * Insert a value here so that we don't end up in the BSS * Reference: drivers/video/tegra.c
@@ -45,7 +45,7 @@ ushort *configuration_get_cmap(void)#endif } -static void exynos_lcd_init_mem (void *lcdbase,vidinfo_t *vid) +static void exynos_lcd_init_mem (void *lcdbase,struct vidinfo *vid) {unsigned long palette_size;unsigned int fb_size;
@@ -58,7 +58,7 @@ static void exynos_lcd_init_mem(void *lcdbase, vidinfo_t *vid) (unsigned long)fb_size, palette_size); } -static void exynos_lcd_init (vidinfo_t *vid) +static void exynos_lcd_init (struct vidinfo *vid) {exynos_fimd_lcd_init (vid);
@@ -94,12 +94,12 @@ __weak void exynos_backlight_reset(void) { } -__weak int exynos_lcd_misc_init (vidinfo_t *vid) +__weak int exynos_lcd_misc_init (struct vidinfo *vid) {return 0 ; } -static void lcd_panel_on (vidinfo_t *vid) +static void lcd_panel_on (struct vidinfo *vid) {struct gpio_desc pwm_out_gpio;struct gpio_desc bl_en_gpio;
drivers/video/exynos/exynos_fimd.c +3 -3
@@ -22,7 +22,7 @@DECLARE_GLOBAL_DATA_PTR ;static unsigned long *lcd_base_addr; -static vidinfo_t *pvid; +static struct vidinfo *pvid;static struct exynos_fb *fimd_ctrl; void exynos_fimd_lcd_init_mem(u_long screen_base, u_long fb_size,
@@ -123,7 +123,7 @@ static void exynos_fimd_set_buffer_address(unsigned int win_id) EXYNOS_BUFFER_OFFSET(win_id)); } -static void exynos_fimd_set_clock (vidinfo_t *pvid) +static void exynos_fimd_set_clock (struct vidinfo *pvid) {unsigned int cfg =0 , div =0 , remainder, remainder_div;unsigned long pixel_clock;
@@ -289,7 +289,7 @@ void exynos_fimd_disable_sysmmu(void) } } -void exynos_fimd_lcd_init (vidinfo_t *vid) +void exynos_fimd_lcd_init (struct vidinfo *vid) {unsigned int cfg =0 , rgb_mode;unsigned int offset;
drivers/video/exynos/exynos_mipi_dsi_common.c +3 -3
@@ -465,7 +465,7 @@ int exynos_mipi_dsi_enable_frame_done_int(struct mipi_dsim_device *dsim, }static void convert_to_fb_videomode (struct fb_videomode *mode1, -vidinfo_t *mode2) +struct vidinfo *mode2) { mode1->xres = mode2->vl_width; mode1->yres = mode2->vl_height;
@@ -482,10 +482,10 @@ int exynos_mipi_dsi_set_display_mode(struct mipi_dsim_device *dsim, {struct exynos_platform_mipi_dsim *dsim_pd;struct fb_videomode lcd_video; -vidinfo_t *vid; +struct vidinfo *vid; dsim_pd = (struct exynos_platform_mipi_dsim *)dsim->pd; - vid = (vidinfo_t *)dsim_pd->lcd_panel_info; + vid = (struct vidinfo *)dsim_pd->lcd_panel_info;convert_to_fb_videomode (&lcd_video, vid);
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 3/25 exynos: video: Remove use of vidinfo_t typedef
Quoted 4 lines · On Sun, 21 Feb 2016 21:08:40 -0700 Simon Glass sjg at chromium.org wrote:
Use 'struct vidinfo' instead so that we can change this to a struct with a different name in future.
Signed-off-by Simon Glass <[email protected]>
PATCH v2 4/25 exynos: video: Drop the static lcd_base_addr variable
In reply to Simon GlassDrop this and use parameters instead.
---
Changes in v2: None
drivers/video/exynos/exynos_fb.c | 21 +++------------------ drivers/video/exynos/exynos_fb.h | 2 +- drivers/video/exynos/exynos_fimd.c | 26 +++++++++++--------------- 3 files changed, 15 insertions(+), 34 deletions(-)
drivers/video/exynos/exynos_fb.c +3 -18
@@ -45,22 +45,9 @@ ushort *configuration_get_cmap(void)#endif } -static void exynos_lcd_init_mem (void *lcdbase,struct vidinfo *vid) +static void exynos_lcd_init (struct vidinfo *vid,ulong lcd_base) { -unsigned long palette_size; -unsigned int fb_size; - - fb_size = vid->vl_row * vid->vl_col * (NBITS (vid->vl_bpix) >>3 ); - - palette_size =NBITS (vid->vl_bpix) ==8 ?256 :16 ; - -exynos_fimd_lcd_init_mem ((unsigned long )lcdbase, - (unsigned long )fb_size, palette_size); -} - -static void exynos_lcd_init (struct vidinfo *vid) -{ -exynos_fimd_lcd_init (vid); +exynos_fimd_lcd_init (vid, lcd_base);/* Enable flushing after LCD writes if requested */ lcd_set_flush_dcache (1 );
@@ -297,9 +284,7 @@ void lcd_ctrl_init(void *lcdbase) panel_width = panel_info.vl_width; panel_height = panel_info.vl_height; -exynos_lcd_init_mem (lcdbase, &panel_info); - -exynos_lcd_init (&panel_info); +exynos_lcd_init (&panel_info, (ulong )lcdbase); }void lcd_enable (void )
drivers/video/exynos/exynos_fb.h +1 -1
@@ -35,7 +35,7 @@ enum exynos_cpu_auto_cmd_rate {void exynos_fimd_lcd_init_mem (unsigned long screen_base,unsigned long fb_size,unsigned long palette_size); -void exynos_fimd_lcd_init (vidinfo_t *vid); +void exynos_fimd_lcd_init (struct vidinfo *vid,ulong lcd_base_address);unsigned long exynos_fimd_calc_fbsize (void );#endif
drivers/video/exynos/exynos_fimd.c +11 -15
@@ -21,16 +21,9 @@DECLARE_GLOBAL_DATA_PTR ; -static unsigned long *lcd_base_addr;static struct vidinfo *pvid;static struct exynos_fb *fimd_ctrl; -void exynos_fimd_lcd_init_mem (u_long screen_base,u_long fb_size, -u_long palette_size) -{ - lcd_base_addr = (unsigned long *)screen_base; -} -static void exynos_fimd_set_dualrgb (unsigned int enabled) {unsigned int cfg =0 ;
@@ -47,7 +40,8 @@ static void exynos_fimd_set_dualrgb(unsigned int enabled)writel (cfg, &fimd_ctrl->dualrgb); } -static void exynos_fimd_set_dp_clkcon (unsigned int enabled) +static void exynos_fimd_set_dp_clkcon (struct vidinfo *pvid, +unsigned int enabled) {unsigned int cfg =0 ;
@@ -57,7 +51,7 @@ static void exynos_fimd_set_dp_clkcon(unsigned int enabled)writel (cfg, &fimd_ctrl->dp_mie_clkcon); } -static void exynos_fimd_set_par (unsigned int win_id) +static void exynos_fimd_set_par (struct vidinfo *pvid,unsigned int win_id) {unsigned int cfg =0 ;
@@ -109,11 +103,13 @@ static void exynos_fimd_set_par(unsigned int win_id) EXYNOS_VIDOSD(win_id)); } -static void exynos_fimd_set_buffer_address (unsigned int win_id) +static void exynos_fimd_set_buffer_address (struct vidinfo *pvid, +unsigned int win_id, +ulong lcd_base_addr) {unsigned long start_addr, end_addr; - start_addr = (unsigned long )lcd_base_addr; + start_addr = lcd_base_addr; end_addr = start_addr + ((pvid->vl_col * (NBITS (pvid->vl_bpix) /8 )) * pvid->vl_row);
@@ -289,7 +285,7 @@ void exynos_fimd_disable_sysmmu(void) } } -void exynos_fimd_lcd_init (struct vidinfo *vid) +void exynos_fimd_lcd_init (struct vidinfo *vid,ulong lcd_base_address) {unsigned int cfg =0 , rgb_mode;unsigned int offset;
@@ -367,10 +363,10 @@ void exynos_fimd_lcd_init(struct vidinfo *vid)writel (cfg, &fimd_ctrl->vidcon0);/* set par */ -exynos_fimd_set_par (pvid->win_id); +exynos_fimd_set_par (pvid, pvid->win_id);/* set memory address */ -exynos_fimd_set_buffer_address (pvid->win_id); +exynos_fimd_set_buffer_address (pvid, pvid->win_id, lcd_base_address);/* set buffer size */ cfg = EXYNOS_VIDADDR_PAGEWIDTH(pvid->vl_col * NBITS(pvid->vl_bpix) / 8) |
@@ -393,7 +389,7 @@ void exynos_fimd_lcd_init(struct vidinfo *vid)/* window on */ exynos_fimd_window_on (pvid->win_id); -exynos_fimd_set_dp_clkcon (pvid->dp_enabled); +exynos_fimd_set_dp_clkcon (pvid, pvid->dp_enabled); }unsigned long exynos_fimd_calc_fbsize (void )
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 4/25 exynos: video: Drop the static lcd_base_addr variable
Quoted 3 lines · On Sun, 21 Feb 2016 21:08:41 -0700 Simon Glass sjg at chromium.org wrote:
Drop this and use parameters instead.
Signed-off-by Simon Glass <[email protected]>
PATCH v2 5/25 exynos: video: Drop static variables in exynos_fimd.c
In reply to Simon GlassDrop these and use parameters instead.
---
Changes in v2: None
drivers/video/exynos/exynos_fb.h | 2 +- drivers/video/exynos/exynos_fimd.c | 51 ++++++++++++++++++++++---------------- include/exynos_lcd.h | 1 + 3 files changed, 31 insertions(+), 23 deletions(-)
drivers/video/exynos/exynos_fb.h +1 -1
@@ -36,6 +36,6 @@ enum exynos_cpu_auto_cmd_rate {void exynos_fimd_lcd_init_mem (unsigned long screen_base,unsigned long fb_size,unsigned long palette_size);void exynos_fimd_lcd_init (struct vidinfo *vid,ulong lcd_base_address); -unsigned long exynos_fimd_calc_fbsize (void ); +unsigned long exynos_fimd_calc_fbsize (struct vidinfo *pvid);#endif
drivers/video/exynos/exynos_fimd.c +29 -22
160 lines not on this page · raw message
include/exynos_lcd.h +1 -0
@@ -75,6 +75,7 @@ typedef struct vidinfo {unsigned int sclk_div;unsigned int dual_lcd_enabled; + struct exynos_fb *fimd_ctrl; } vidinfo_t;#endif
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 5/25 exynos: video: Drop static variables in exynos_fimd.c
Quoted 3 lines · On Sun, 21 Feb 2016 21:08:42 -0700 Simon Glass sjg at chromium.org wrote:
Drop these and use parameters instead.
Signed-off-by Simon Glass <[email protected]>
PATCH v2 6/25 exynos: video: Drop static variables in exynos_fb.c
In reply to Simon GlassDrop these and use the existing variables instead.
---
Changes in v2: None
drivers/video/exynos/exynos_fb.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/video/exynos/exynos_fb.c +2 -6
@@ -26,8 +26,6 @@DECLARE_GLOBAL_DATA_PTR ; -static unsigned int panel_width, panel_height; -struct vidinfo panel_info = {/* * Insert a value here so that we don't end up in the BSS
@@ -281,16 +279,14 @@ void lcd_ctrl_init(void *lcdbase)#endif exynos_lcd_misc_init (&panel_info); - panel_width = panel_info.vl_width; - panel_height = panel_info.vl_height; -exynos_lcd_init (&panel_info, (ulong )lcdbase); }void lcd_enable (void ) {if (panel_info.logo_on) { -memset ((void *) gd->fb_base,0 , panel_width * panel_height * +memset ((void *)gd->fb_base,0 , + panel_info.vl_width * panel_info.vl_height * (NBITS (panel_info.vl_bpix) >>3 )); }
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 6/25 exynos: video: Drop static variables in exynos_fb.c
Quoted 3 lines · On Sun, 21 Feb 2016 21:08:43 -0700 Simon Glass sjg at chromium.org wrote:
Drop these and use the existing variables instead.
Signed-off-by Simon Glass <[email protected]>
PATCH v2 7/25 exynos: video: Drop static variables in exynos_dp_lowlevel.c
In reply to Simon GlassDrop these and use parameters instead.
---
Changes in v2:
- Rebase to master
drivers/video/exynos/exynos_dp.c | 310 +++++++++++++++++------------- drivers/video/exynos/exynos_dp_lowlevel.c | 195 ++++++++++--------- drivers/video/exynos/exynos_dp_lowlevel.h | 131 +++++++------ 3 files changed, 351 insertions(+), 285 deletions(-)
drivers/video/exynos/exynos_dp.c +174 -136
@@ -38,20 +38,20 @@ static void exynos_dp_disp_info(struct edp_disp_info *disp_info)return ; } -static int exynos_dp_init_dp (void ) +static int exynos_dp_init_dp (struct exynos_dp *dp_regs) {int ret; -exynos_dp_reset (); +exynos_dp_reset (dp_regs);/* SW defined function Normal operation */ -exynos_dp_enable_sw_func (DP_ENABLE ); +exynos_dp_enable_sw_func (dp_regs,DP_ENABLE ); - ret =exynos_dp_init_analog_func (); + ret =exynos_dp_init_analog_func (dp_regs);if (ret !=EXYNOS_DP_SUCCESS )return ret; -exynos_dp_init_hpd (); -exynos_dp_init_aux (); +exynos_dp_init_hpd (dp_regs); +exynos_dp_init_aux (dp_regs);return ret; }
@@ -67,7 +67,7 @@ static unsigned char exynos_dp_calc_edid_check_sum(unsigned char *edid_data)return sum; } -static unsigned int exynos_dp_read_edid (void ) +static unsigned int exynos_dp_read_edid (struct exynos_dp *dp_regs) {unsigned char edid[EDID_BLOCK_LENGTH *2 ];unsigned int extend_block =0 ;
@@ -82,14 +82,15 @@ static unsigned int exynos_dp_read_edid(void)*/ /* Read Extension Flag, Number of 128-byte EDID extension blocks */ -exynos_dp_read_byte_from_i2c (I2C_EDID_DEVICE_ADDR ,EDID_EXTENSION_FLAG , - &extend_block); +exynos_dp_read_byte_from_i2c (dp_regs,I2C_EDID_DEVICE_ADDR , +EDID_EXTENSION_FLAG , &extend_block);if (extend_block >0 ) {printf ("DP EDID data includes a single extension!\n" );/* Read EDID data */ - retval =exynos_dp_read_bytes_from_i2c (I2C_EDID_DEVICE_ADDR , + retval =exynos_dp_read_bytes_from_i2c (dp_regs, +I2C_EDID_DEVICE_ADDR ,EDID_HEADER_PATTERN ,EDID_BLOCK_LENGTH , &edid[EDID_HEADER_PATTERN ]);
@@ -104,7 +105,8 @@ static unsigned int exynos_dp_read_edid(void) }/* Read additional EDID data */ - retval =exynos_dp_read_bytes_from_i2c (I2C_EDID_DEVICE_ADDR , + retval =exynos_dp_read_bytes_from_i2c (dp_regs, +I2C_EDID_DEVICE_ADDR ,EDID_BLOCK_LENGTH ,EDID_BLOCK_LENGTH , &edid[EDID_BLOCK_LENGTH ]);
@@ -118,19 +120,22 @@ static unsigned int exynos_dp_read_edid(void)return -1 ; } -exynos_dp_read_byte_from_dpcd (DPCD_TEST_REQUEST , - &test_vector); +exynos_dp_read_byte_from_dpcd (dp_regs,DPCD_TEST_REQUEST , + &test_vector);if (test_vector &DPCD_TEST_EDID_READ ) { -exynos_dp_write_byte_to_dpcd (DPCD_TEST_EDID_CHECKSUM , +exynos_dp_write_byte_to_dpcd (dp_regs, +DPCD_TEST_EDID_CHECKSUM , edid[EDID_BLOCK_LENGTH +EDID_CHECKSUM ]); -exynos_dp_write_byte_to_dpcd (DPCD_TEST_RESPONSE , +exynos_dp_write_byte_to_dpcd (dp_regs, +DPCD_TEST_RESPONSE ,DPCD_TEST_EDID_CHECKSUM_WRITE ); } }else {debug ("DP EDID data does not include any extensions.\n" );/* Read EDID data */ - retval =exynos_dp_read_bytes_from_i2c (I2C_EDID_DEVICE_ADDR , + retval =exynos_dp_read_bytes_from_i2c (dp_regs, +I2C_EDID_DEVICE_ADDR ,EDID_HEADER_PATTERN ,EDID_BLOCK_LENGTH , &edid[EDID_HEADER_PATTERN ]);
@@ -145,12 +150,13 @@ static unsigned int exynos_dp_read_edid(void)return -1 ; } -exynos_dp_read_byte_from_dpcd (DPCD_TEST_REQUEST , +exynos_dp_read_byte_from_dpcd (dp_regs,DPCD_TEST_REQUEST , &test_vector);if (test_vector &DPCD_TEST_EDID_READ ) { -exynos_dp_write_byte_to_dpcd (DPCD_TEST_EDID_CHECKSUM , - edid[EDID_CHECKSUM ]); -exynos_dp_write_byte_to_dpcd (DPCD_TEST_RESPONSE , +exynos_dp_write_byte_to_dpcd (dp_regs, +DPCD_TEST_EDID_CHECKSUM , edid[EDID_CHECKSUM ]); +exynos_dp_write_byte_to_dpcd (dp_regs, +DPCD_TEST_RESPONSE ,DPCD_TEST_EDID_CHECKSUM_WRITE ); } }
@@ -160,7 +166,8 @@ static unsigned int exynos_dp_read_edid(void)return 0 ; } -static unsigned int exynos_dp_handle_edid (struct edp_device_info *edp_info) +static unsigned int exynos_dp_handle_edid (struct exynos_dp *dp_regs, +struct edp_device_info *edp_info) {unsigned char buf[12 ];unsigned int ret;
@@ -178,8 +185,8 @@ static unsigned int exynos_dp_handle_edid(struct edp_device_info *edp_info) retry_cnt =5 ;while (retry_cnt) {/* Read DPCD 0x0000-0x000b */ - ret =exynos_dp_read_bytes_from_dpcd (DPCD_DPCD_REV ,12 , - buf); + ret =exynos_dp_read_bytes_from_dpcd (dp_regs,DPCD_DPCD_REV ,12 , + buf);if (ret !=EXYNOS_DP_SUCCESS ) {if (retry_cnt ==0 ) {printf ("DP read_byte_from_dpcd() failed\n" );
@@ -227,7 +234,7 @@ static unsigned int exynos_dp_handle_edid(struct edp_device_info *edp_info)return -EINVAL ; } - ret =exynos_dp_read_edid (); + ret =exynos_dp_read_edid (dp_regs);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP exynos_dp_read_edid() failed\n" );return -EINVAL ;
@@ -236,19 +243,20 @@ static unsigned int exynos_dp_handle_edid(struct edp_device_info *edp_info)return ret; } -static void exynos_dp_init_training (void ) +static void exynos_dp_init_training (struct exynos_dp *dp_regs) {/* * MACRO_RST must be applied after the PLL_LOCK to avoid * the DP inter pair skew issue for at least 10 us */ -exynos_dp_reset_macro (); +exynos_dp_reset_macro (dp_regs);/* All DP analog module power up */ -exynos_dp_set_analog_power_down (POWER_ALL ,0 ); +exynos_dp_set_analog_power_down (dp_regs,POWER_ALL ,0 ); } -static unsigned int exynos_dp_link_start (struct edp_device_info *edp_info) +static unsigned int exynos_dp_link_start (struct exynos_dp *dp_regs, +struct edp_device_info *edp_info) {unsigned char buf[5 ];unsigned int ret =0 ;
@@ -263,33 +271,32 @@ static unsigned int exynos_dp_link_start(struct edp_device_info *edp_info) edp_info->lt_info.cr_loop[3 ] =0 ;/* Set sink to D0 (Sink Not Ready) mode. */ - ret =exynos_dp_write_byte_to_dpcd (DPCD_SINK_POWER_STATE , -DPCD_SET_POWER_STATE_D0 ); + ret =exynos_dp_write_byte_to_dpcd (dp_regs,DPCD_SINK_POWER_STATE , +DPCD_SET_POWER_STATE_D0 );if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP write_dpcd_byte failed\n" );return ret; }/* Set link rate and count as you want to establish */ -exynos_dp_set_link_bandwidth (edp_info->lane_bw); -exynos_dp_set_lane_count (edp_info->lane_cnt); +exynos_dp_set_link_bandwidth (dp_regs, edp_info->lane_bw); +exynos_dp_set_lane_count (dp_regs, edp_info->lane_cnt);/* Setup RX configuration */ buf[0 ] = edp_info->lane_bw; buf[1 ] = edp_info->lane_cnt; - ret =exynos_dp_write_bytes_to_dpcd (DPCD_LINK_BW_SET ,2 , - buf); + ret =exynos_dp_write_bytes_to_dpcd (dp_regs,DPCD_LINK_BW_SET ,2 , buf);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP write_dpcd_byte failed\n" );return ret; } -exynos_dp_set_lane_pre_emphasis (PRE_EMPHASIS_LEVEL_0 , +exynos_dp_set_lane_pre_emphasis (dp_regs,PRE_EMPHASIS_LEVEL_0 , edp_info->lane_cnt);/* Set training pattern 1 */ -exynos_dp_set_training_pattern (TRAINING_PTN1 ); +exynos_dp_set_training_pattern (dp_regs,TRAINING_PTN1 );/* Set RX training pattern */ buf[0 ] =DPCD_SCRAMBLING_DISABLED |DPCD_TRAINING_PATTERN_1 ;
@@ -303,8 +310,8 @@ static unsigned int exynos_dp_link_start(struct edp_device_info *edp_info) buf[4 ] =DPCD_PRE_EMPHASIS_SET_PATTERN_2_LEVEL_0 |DPCD_VOLTAGE_SWING_SET_PATTERN_1_LEVEL_0 ; - ret =exynos_dp_write_bytes_to_dpcd (DPCD_TRAINING_PATTERN_SET , -5 , buf); + ret =exynos_dp_write_bytes_to_dpcd (dp_regs,DPCD_TRAINING_PATTERN_SET , +5 , buf);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP write_dpcd_byte failed\n" );return ret;
@@ -313,14 +320,14 @@ static unsigned int exynos_dp_link_start(struct edp_device_info *edp_info)return ret; } -static unsigned int exynos_dp_training_pattern_dis (void ) +static unsigned int exynos_dp_training_pattern_dis (struct exynos_dp *dp_regs) {unsigned int ret =EXYNOS_DP_SUCCESS ; -exynos_dp_set_training_pattern (DP_NONE ); +exynos_dp_set_training_pattern (dp_regs,DP_NONE ); - ret =exynos_dp_write_byte_to_dpcd (DPCD_TRAINING_PATTERN_SET , -DPCD_TRAINING_PATTERN_DISABLED ); + ret =exynos_dp_write_byte_to_dpcd (dp_regs,DPCD_TRAINING_PATTERN_SET , +DPCD_TRAINING_PATTERN_DISABLED );if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP request_link_training_req failed\n" );return -EAGAIN ;
@@ -329,13 +336,14 @@ static unsigned int exynos_dp_training_pattern_dis(void)return ret; } -static unsigned int exynos_dp_enable_rx_to_enhanced_mode (unsigned char enable) +static unsigned int exynos_dp_enable_rx_to_enhanced_mode ( +struct exynos_dp *dp_regs,unsigned char enable) {unsigned char data;unsigned int ret =EXYNOS_DP_SUCCESS ; - ret =exynos_dp_read_byte_from_dpcd (DPCD_LANE_COUNT_SET , - &data); + ret =exynos_dp_read_byte_from_dpcd (dp_regs,DPCD_LANE_COUNT_SET , + &data);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP read_from_dpcd failed\n" );return -EAGAIN ;
@@ -346,8 +354,7 @@ static unsigned int exynos_dp_enable_rx_to_enhanced_mode(unsigned char enable)else data =DPCD_LN_COUNT_SET (data); - ret =exynos_dp_write_byte_to_dpcd (DPCD_LANE_COUNT_SET , - data); + ret =exynos_dp_write_byte_to_dpcd (dp_regs,DPCD_LANE_COUNT_SET , data);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP write_to_dpcd failed\n" );return -EAGAIN ;
@@ -357,23 +364,25 @@ static unsigned int exynos_dp_enable_rx_to_enhanced_mode(unsigned char enable)return ret; } -static unsigned int exynos_dp_set_enhanced_mode (unsigned char enhance_mode) +static unsigned int exynos_dp_set_enhanced_mode (struct exynos_dp *dp_regs, +unsigned char enhance_mode) {unsigned int ret =EXYNOS_DP_SUCCESS ; - ret =exynos_dp_enable_rx_to_enhanced_mode (enhance_mode); + ret =exynos_dp_enable_rx_to_enhanced_mode (dp_regs, enhance_mode);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP rx_enhance_mode failed\n" );return -EAGAIN ; } -exynos_dp_enable_enhanced_mode (enhance_mode); +exynos_dp_enable_enhanced_mode (dp_regs, enhance_mode);return ret; } -static int exynos_dp_read_dpcd_lane_stat (struct edp_device_info *edp_info, -unsigned char *status) +static int exynos_dp_read_dpcd_lane_stat (struct exynos_dp *dp_regs, +struct edp_device_info *edp_info, +unsigned char *status) {unsigned int ret, i;unsigned char buf[2 ];
@@ -385,7 +394,8 @@ static int exynos_dp_read_dpcd_lane_stat(struct edp_device_info *edp_info, shift_val[2 ] =0 ; shift_val[3 ] =4 ; - ret =exynos_dp_read_bytes_from_dpcd (DPCD_LANE0_1_STATUS ,2 , buf); + ret =exynos_dp_read_bytes_from_dpcd (dp_regs,DPCD_LANE0_1_STATUS ,2 , + buf);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP read lane status failed\n" );return ret;
@@ -404,8 +414,8 @@ static int exynos_dp_read_dpcd_lane_stat(struct edp_device_info *edp_info,return ret; } -static unsigned int exynos_dp_read_dpcd_adj_req (unsigned char lane_num, -unsigned char *sw,unsigned char *em) +static unsigned int exynos_dp_read_dpcd_adj_req (struct exynos_dp *dp_regs, +unsigned char lane_num,unsigned char *sw,unsigned char *em) {unsigned int ret =EXYNOS_DP_SUCCESS ;unsigned char buf;
@@ -415,7 +425,7 @@ static unsigned int exynos_dp_read_dpcd_adj_req(unsigned char lane_num,/* lane_num value is used as array index, so this range 0 ~ 3 */ dpcd_addr =DPCD_ADJUST_REQUEST_LANE0_1 + (lane_num /2 ); - ret =exynos_dp_read_byte_from_dpcd (dpcd_addr, &buf); + ret =exynos_dp_read_byte_from_dpcd (dp_regs, dpcd_addr, &buf);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP read adjust request failed\n" );return -EAGAIN ;
@@ -427,17 +437,18 @@ static unsigned int exynos_dp_read_dpcd_adj_req(unsigned char lane_num,return ret; } -static int exynos_dp_equalizer_err_link (struct edp_device_info *edp_info) +static int exynos_dp_equalizer_err_link (struct exynos_dp *dp_regs, +struct edp_device_info *edp_info) {int ret; - ret =exynos_dp_training_pattern_dis (); + ret =exynos_dp_training_pattern_dis (dp_regs);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP training_pattern_disable() failed\n" ); edp_info->lt_info.lt_status =DP_LT_FAIL ; } - ret =exynos_dp_set_enhanced_mode (edp_info->dpcd_efc); + ret =exynos_dp_set_enhanced_mode (dp_regs, edp_info->dpcd_efc);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP set_enhanced_mode() failed\n" ); edp_info->lt_info.lt_status =DP_LT_FAIL ;
@@ -446,7 +457,8 @@ static int exynos_dp_equalizer_err_link(struct edp_device_info *edp_info)return ret; } -static int exynos_dp_reduce_link_rate (struct edp_device_info *edp_info) +static int exynos_dp_reduce_link_rate (struct exynos_dp *dp_regs, +struct edp_device_info *edp_info) {int ret;
@@ -456,11 +468,11 @@ static int exynos_dp_reduce_link_rate(struct edp_device_info *edp_info) edp_info->lt_info.lt_status =DP_LT_START ; ret =EXYNOS_DP_SUCCESS ; }else { - ret =exynos_dp_training_pattern_dis (); + ret =exynos_dp_training_pattern_dis (dp_regs);if (ret !=EXYNOS_DP_SUCCESS )printf ("DP training_patter_disable() failed\n" ); - ret =exynos_dp_set_enhanced_mode (edp_info->dpcd_efc); + ret =exynos_dp_set_enhanced_mode (dp_regs, edp_info->dpcd_efc);if (ret !=EXYNOS_DP_SUCCESS )printf ("DP set_enhanced_mode() failed\n" );
@@ -470,8 +482,8 @@ static int exynos_dp_reduce_link_rate(struct edp_device_info *edp_info)return ret; } -static unsigned int exynos_dp_process_clock_recovery (struct edp_device_info - *edp_info) +static unsigned int exynos_dp_process_clock_recovery (struct exynos_dp *dp_regs, +struct edp_device_info *edp_info) {unsigned int ret =EXYNOS_DP_SUCCESS ;unsigned char lane_stat;
@@ -484,7 +496,7 @@ static unsigned int exynos_dp_process_clock_recovery(struct edp_device_infodebug ("DP: %s was called\n" , __func__);mdelay (1 ); - ret =exynos_dp_read_dpcd_lane_stat (edp_info, &lane_stat); + ret =exynos_dp_read_dpcd_lane_stat (dp_regs, edp_info, &lane_stat);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP read lane status failed\n" ); edp_info->lt_info.lt_status =DP_LT_FAIL ;
@@ -493,11 +505,11 @@ static unsigned int exynos_dp_process_clock_recovery(struct edp_device_infoif (lane_stat &DP_LANE_STAT_CR_DONE ) {debug ("DP clock Recovery training succeed\n" ); -exynos_dp_set_training_pattern (TRAINING_PTN2 ); +exynos_dp_set_training_pattern (dp_regs,TRAINING_PTN2 );for (i =0 ; i < edp_info->lane_cnt; i++) { - ret =exynos_dp_read_dpcd_adj_req (i, &adj_req_sw, - &adj_req_em); + ret =exynos_dp_read_dpcd_adj_req (dp_regs, i, + &adj_req_sw, &adj_req_em);if (ret !=EXYNOS_DP_SUCCESS ) { edp_info->lt_info.lt_status =DP_LT_FAIL ;return ret;
@@ -511,7 +523,8 @@ static unsigned int exynos_dp_process_clock_recovery(struct edp_device_info lt_ctl_val[i] |=MAX_DRIVE_CURRENT_REACH_3 |MAX_PRE_EMPHASIS_REACH_3 ; } -exynos_dp_set_lanex_pre_emphasis (lt_ctl_val[i], i); +exynos_dp_set_lanex_pre_emphasis (dp_regs, + lt_ctl_val[i], i); } buf[0 ] =DPCD_SCRAMBLING_DISABLED |DPCD_TRAINING_PATTERN_2 ;
@@ -520,7 +533,7 @@ static unsigned int exynos_dp_process_clock_recovery(struct edp_device_info buf[3 ] = lt_ctl_val[2 ]; buf[4 ] = lt_ctl_val[3 ]; - ret =exynos_dp_write_bytes_to_dpcd ( + ret =exynos_dp_write_bytes_to_dpcd (dp_regs,DPCD_TRAINING_PATTERN_SET ,5 , buf);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP write training pattern1 failed\n" );
@@ -530,8 +543,9 @@ static unsigned int exynos_dp_process_clock_recovery(struct edp_device_info edp_info->lt_info.lt_status =DP_LT_ET ; }else {for (i =0 ; i < edp_info->lane_cnt; i++) { - lt_ctl_val[i] =exynos_dp_get_lanex_pre_emphasis (i); - ret =exynos_dp_read_dpcd_adj_req (i, + lt_ctl_val[i] =exynos_dp_get_lanex_pre_emphasis ( + dp_regs, i); + ret =exynos_dp_read_dpcd_adj_req (dp_regs, i, &adj_req_sw, &adj_req_em);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP read adj req failed\n" );
@@ -541,7 +555,8 @@ static unsigned int exynos_dp_process_clock_recovery(struct edp_device_infoif ((adj_req_sw ==VOLTAGE_LEVEL_3 ) || (adj_req_em ==PRE_EMPHASIS_LEVEL_3 )) - ret =exynos_dp_reduce_link_rate (edp_info); + ret =exynos_dp_reduce_link_rate (dp_regs, + edp_info); if ((DRIVE_CURRENT_SET_0_GET(lt_ctl_val[i]) == adj_req_sw) &&
@@ -550,7 +565,7 @@ static unsigned int exynos_dp_process_clock_recovery(struct edp_device_info edp_info->lt_info.cr_loop[i]++;if (edp_info->lt_info.cr_loop[i] ==MAX_CR_LOOP ) ret =exynos_dp_reduce_link_rate ( - edp_info); + dp_regs, edp_info); } lt_ctl_val[i] =0 ;
@@ -561,10 +576,11 @@ static unsigned int exynos_dp_process_clock_recovery(struct edp_device_info lt_ctl_val[i] |=MAX_DRIVE_CURRENT_REACH_3 |MAX_PRE_EMPHASIS_REACH_3 ; } -exynos_dp_set_lanex_pre_emphasis (lt_ctl_val[i], i); +exynos_dp_set_lanex_pre_emphasis (dp_regs, + lt_ctl_val[i], i); } - ret =exynos_dp_write_bytes_to_dpcd ( + ret =exynos_dp_write_bytes_to_dpcd (dp_regs,DPCD_TRAINING_LANE0_SET ,4 , lt_ctl_val);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP write training pattern2 failed\n" );
@@ -576,8 +592,8 @@ static unsigned int exynos_dp_process_clock_recovery(struct edp_device_inforeturn ret; } -static unsigned int exynos_dp_process_equalizer_training (struct edp_device_info - *edp_info) +static unsigned int exynos_dp_process_equalizer_training ( +struct exynos_dp *dp_regs,struct edp_device_info *edp_info) {unsigned int ret =EXYNOS_DP_SUCCESS ;unsigned char lane_stat, adj_req_sw, adj_req_em, i;
@@ -589,7 +605,7 @@ static unsigned int exynos_dp_process_equalizer_training(struct edp_device_infomdelay (1 ); - ret =exynos_dp_read_dpcd_lane_stat (edp_info, &lane_stat); + ret =exynos_dp_read_dpcd_lane_stat (dp_regs, edp_info, &lane_stat);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP read lane status failed\n" ); edp_info->lt_info.lt_status =DP_LT_FAIL ;
@@ -599,8 +615,9 @@ static unsigned int exynos_dp_process_equalizer_training(struct edp_device_infodebug ("DP lane stat : %x\n" , lane_stat);if (lane_stat &DP_LANE_STAT_CR_DONE ) { - ret =exynos_dp_read_byte_from_dpcd (DPCD_LN_ALIGN_UPDATED , - &sink_stat); + ret =exynos_dp_read_byte_from_dpcd (dp_regs, +DPCD_LN_ALIGN_UPDATED , + &sink_stat);if (ret !=EXYNOS_DP_SUCCESS ) { edp_info->lt_info.lt_status =DP_LT_FAIL ;
@@ -610,7 +627,7 @@ static unsigned int exynos_dp_process_equalizer_training(struct edp_device_info interlane_aligned = (sink_stat &DPCD_INTERLANE_ALIGN_DONE );for (i =0 ; i < edp_info->lane_cnt; i++) { - ret =exynos_dp_read_dpcd_adj_req (i, + ret =exynos_dp_read_dpcd_adj_req (dp_regs, i, &adj_req_sw, &adj_req_em);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP read adj req 1 failed\n" );
@@ -634,15 +651,15 @@ static unsigned int exynos_dp_process_equalizer_training(struct edp_device_info && (interlane_aligned == DPCD_INTERLANE_ALIGN_DONE)) {debug ("DP Equalizer training succeed\n" ); - f_bw =exynos_dp_get_link_bandwidth (); - f_lane_cnt =exynos_dp_get_lane_count (); + f_bw =exynos_dp_get_link_bandwidth (dp_regs); + f_lane_cnt =exynos_dp_get_lane_count (dp_regs);debug ("DP final BandWidth : %x\n" , f_bw);debug ("DP final Lane Count : %x\n" , f_lane_cnt); edp_info->lt_info.lt_status =DP_LT_FINISHED ; -exynos_dp_equalizer_err_link (edp_info); +exynos_dp_equalizer_err_link (dp_regs, edp_info); } else { edp_info->lt_info.ep_loop++;
@@ -650,46 +667,49 @@ static unsigned int exynos_dp_process_equalizer_training(struct edp_device_infoif (edp_info->lt_info.ep_loop >MAX_EQ_LOOP ) {if (edp_info->lane_bw ==DP_LANE_BW_2_70 ) { ret =exynos_dp_reduce_link_rate ( - edp_info); + dp_regs, edp_info); }else { edp_info->lt_info.lt_status =DP_LT_FAIL ; -exynos_dp_equalizer_err_link (edp_info); +exynos_dp_equalizer_err_link (dp_regs, + edp_info); } }else {for (i =0 ; i < edp_info->lane_cnt; i++)exynos_dp_set_lanex_pre_emphasis ( - lt_ctl_val[i], i); + dp_regs, lt_ctl_val[i], i); - ret =exynos_dp_write_bytes_to_dpcd ( -DPCD_TRAINING_LANE0_SET , -4 , lt_ctl_val); + ret =exynos_dp_write_bytes_to_dpcd (dp_regs, +DPCD_TRAINING_LANE0_SET , +4 , lt_ctl_val);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP set lt pattern failed\n" ); edp_info->lt_info.lt_status =DP_LT_FAIL ; -exynos_dp_equalizer_err_link (edp_info); +exynos_dp_equalizer_err_link (dp_regs, + edp_info); } } } }else if (edp_info->lane_bw ==DP_LANE_BW_2_70 ) { - ret =exynos_dp_reduce_link_rate (edp_info); + ret =exynos_dp_reduce_link_rate (dp_regs, edp_info); }else { edp_info->lt_info.lt_status =DP_LT_FAIL ; -exynos_dp_equalizer_err_link (edp_info); +exynos_dp_equalizer_err_link (dp_regs, edp_info); }return ret; } -static unsigned int exynos_dp_sw_link_training (struct edp_device_info *edp_info) +static unsigned int exynos_dp_sw_link_training (struct exynos_dp *dp_regs, +struct edp_device_info *edp_info) {unsigned int ret =0 ;int training_finished;/* Turn off unnecessary lane */ if (edp_info->lane_cnt ==1 ) -exynos_dp_set_analog_power_down (CH1_BLOCK ,1 ); +exynos_dp_set_analog_power_down (dp_regs,CH1_BLOCK ,1 ); training_finished =0 ;
@@ -699,21 +719,23 @@ static unsigned int exynos_dp_sw_link_training(struct edp_device_info *edp_info)while (!training_finished) {switch (edp_info->lt_info.lt_status) {case DP_LT_START : - ret =exynos_dp_link_start (edp_info); + ret =exynos_dp_link_start (dp_regs, edp_info);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP LT:link start failed\n" );return ret; }break ;case DP_LT_CR : - ret =exynos_dp_process_clock_recovery (edp_info); + ret =exynos_dp_process_clock_recovery (dp_regs, + edp_info);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP LT:clock recovery failed\n" );return ret; }break ;case DP_LT_ET : - ret =exynos_dp_process_equalizer_training (edp_info); + ret =exynos_dp_process_equalizer_training (dp_regs, + edp_info);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP LT:equalizer training failed\n" );return ret;
@@ -730,40 +752,43 @@ static unsigned int exynos_dp_sw_link_training(struct edp_device_info *edp_info)return ret; } -static unsigned int exynos_dp_set_link_train (struct edp_device_info *edp_info) +static unsigned int exynos_dp_set_link_train (struct exynos_dp *dp_regs, +struct edp_device_info *edp_info) {unsigned int ret; -exynos_dp_init_training (); +exynos_dp_init_training (dp_regs); - ret =exynos_dp_sw_link_training (edp_info); + ret =exynos_dp_sw_link_training (dp_regs, edp_info);if (ret !=EXYNOS_DP_SUCCESS )printf ("DP dp_sw_link_training() failed\n" );return ret; } -static void exynos_dp_enable_scramble (unsigned int enable) +static void exynos_dp_enable_scramble (struct exynos_dp *dp_regs, +unsigned int enable) {unsigned char data;if (enable) { -exynos_dp_enable_scrambling (DP_ENABLE ); +exynos_dp_enable_scrambling (dp_regs,DP_ENABLE ); -exynos_dp_read_byte_from_dpcd (DPCD_TRAINING_PATTERN_SET , - &data); -exynos_dp_write_byte_to_dpcd (DPCD_TRAINING_PATTERN_SET , +exynos_dp_read_byte_from_dpcd (dp_regs, +DPCD_TRAINING_PATTERN_SET , &data); +exynos_dp_write_byte_to_dpcd (dp_regs,DPCD_TRAINING_PATTERN_SET , (u8)(data & ~DPCD_SCRAMBLING_DISABLED )); }else { -exynos_dp_enable_scrambling (DP_DISABLE ); -exynos_dp_read_byte_from_dpcd (DPCD_TRAINING_PATTERN_SET , - &data); -exynos_dp_write_byte_to_dpcd (DPCD_TRAINING_PATTERN_SET , +exynos_dp_enable_scrambling (dp_regs,DP_DISABLE ); +exynos_dp_read_byte_from_dpcd (dp_regs, +DPCD_TRAINING_PATTERN_SET , &data); +exynos_dp_write_byte_to_dpcd (dp_regs,DPCD_TRAINING_PATTERN_SET , (u8)(data |DPCD_SCRAMBLING_DISABLED )); } } -static unsigned int exynos_dp_config_video (struct edp_device_info *edp_info) +static unsigned int exynos_dp_config_video (struct exynos_dp *dp_regs, +struct edp_device_info *edp_info) {unsigned int ret =0 ;unsigned int retry_cnt;
@@ -775,17 +800,18 @@ static unsigned int exynos_dp_config_video(struct edp_device_info *edp_info)return -ENODEV ; }else {/* debug slave */ -exynos_dp_config_video_slave_mode (&edp_info->video_info); +exynos_dp_config_video_slave_mode (dp_regs, + &edp_info->video_info); } -exynos_dp_set_video_color_format (&edp_info->video_info); +exynos_dp_set_video_color_format (dp_regs, &edp_info->video_info);if (edp_info->video_info.bist_mode) { -if (exynos_dp_config_video_bist (edp_info) !=0 ) +if (exynos_dp_config_video_bist (dp_regs, edp_info) !=0 )return -1 ; } - ret =exynos_dp_get_pll_lock_status (); + ret =exynos_dp_get_pll_lock_status (dp_regs);if (ret !=PLL_LOCKED ) {printf ("DP PLL is not locked yet\n" );return -EIO ;
@@ -794,7 +820,7 @@ static unsigned int exynos_dp_config_video(struct edp_device_info *edp_info)if (edp_info->video_info.master_mode ==0 ) { retry_cnt =10 ;while (retry_cnt) { - ret =exynos_dp_is_slave_video_stream_clock_on (); + ret =exynos_dp_is_slave_video_stream_clock_on (dp_regs);if (ret !=EXYNOS_DP_SUCCESS ) {if (retry_cnt ==0 ) {printf ("DP stream_clock_on failed\n" );
@@ -808,32 +834,34 @@ static unsigned int exynos_dp_config_video(struct edp_device_info *edp_info) }/* Set to use the register calculated M/N video */ -exynos_dp_set_video_cr_mn (CALCULATED_M ,0 ,0 ); +exynos_dp_set_video_cr_mn (dp_regs,CALCULATED_M ,0 ,0 );/* For video bist, Video timing must be generated by register */ -exynos_dp_set_video_timing_mode (VIDEO_TIMING_FROM_CAPTURE ); +exynos_dp_set_video_timing_mode (dp_regs,VIDEO_TIMING_FROM_CAPTURE );/* Enable video bist */ if (edp_info->video_info.bist_pattern !=COLOR_RAMP && edp_info->video_info.bist_pattern !=BALCK_WHITE_V_LINES && edp_info->video_info.bist_pattern !=COLOR_SQUARE ) -exynos_dp_enable_video_bist (edp_info->video_info.bist_mode); +exynos_dp_enable_video_bist (dp_regs, + edp_info->video_info.bist_mode);else -exynos_dp_enable_video_bist (DP_DISABLE ); +exynos_dp_enable_video_bist (dp_regs,DP_DISABLE );/* Disable video mute */ -exynos_dp_enable_video_mute (DP_DISABLE ); +exynos_dp_enable_video_mute (dp_regs,DP_DISABLE );/* Configure video Master or Slave mode */ -exynos_dp_enable_video_master (edp_info->video_info.master_mode); +exynos_dp_enable_video_master (dp_regs, + edp_info->video_info.master_mode);/* Enable video */ -exynos_dp_start_video (); +exynos_dp_start_video (dp_regs);if (edp_info->video_info.master_mode ==0 ) { retry_cnt =100 ;while (retry_cnt) { - ret =exynos_dp_is_video_stream_on (); + ret =exynos_dp_is_video_stream_on (dp_regs);if (ret !=EXYNOS_DP_SUCCESS ) {if (retry_cnt ==0 ) {printf ("DP Timeout of video stream\n" );
@@ -907,6 +935,8 @@ unsigned int exynos_init_dp(void) {unsigned int ret;struct edp_device_info *edp_info; +struct exynos_dp *dp_regs; +int node; edp_info =kzalloc (sizeof (struct edp_device_info ),GFP_KERNEL );if (!edp_info) {
@@ -917,39 +947,47 @@ unsigned int exynos_init_dp(void)if (exynos_dp_parse_dt (gd->fdt_blob, edp_info))debug ("unable to parse DP DT node\n" ); -exynos_dp_set_base_addr (); + node =fdtdec_next_compatible (gd->fdt_blob,0 , +COMPAT_SAMSUNG_EXYNOS5_DP ); +if (node <=0 ) +debug ("exynos_dp: Can't get device node for dp\n" ); + + dp_regs = (struct exynos_dp *)fdtdec_get_addr (gd->fdt_blob, node, +"reg" ); +if (dp_regs ==NULL ) +debug ("Can't get the DP base address\n" );exynos_dp_disp_info (&edp_info->disp_info);exynos_set_dp_phy (1 ); - ret =exynos_dp_init_dp (); + ret =exynos_dp_init_dp (dp_regs);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP exynos_dp_init_dp() failed\n" );return ret; } - ret =exynos_dp_handle_edid (edp_info); + ret =exynos_dp_handle_edid (dp_regs, edp_info);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("EDP handle_edid fail\n" );return ret; } - ret =exynos_dp_set_link_train (edp_info); + ret =exynos_dp_set_link_train (dp_regs, edp_info);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP link training fail\n" );return ret; } -exynos_dp_enable_scramble (DP_ENABLE ); -exynos_dp_enable_rx_to_enhanced_mode (DP_ENABLE ); -exynos_dp_enable_enhanced_mode (DP_ENABLE ); +exynos_dp_enable_scramble (dp_regs,DP_ENABLE ); +exynos_dp_enable_rx_to_enhanced_mode (dp_regs,DP_ENABLE ); +exynos_dp_enable_enhanced_mode (dp_regs,DP_ENABLE ); -exynos_dp_set_link_bandwidth (edp_info->lane_bw); -exynos_dp_set_lane_count (edp_info->lane_cnt); +exynos_dp_set_link_bandwidth (dp_regs, edp_info->lane_bw); +exynos_dp_set_lane_count (dp_regs, edp_info->lane_cnt); -exynos_dp_init_video (); - ret =exynos_dp_config_video (edp_info); +exynos_dp_init_video (dp_regs); + ret =exynos_dp_config_video (dp_regs, edp_info);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("Exynos DP init failed\n" );return ret;
drivers/video/exynos/exynos_dp_lowlevel.c +101 -94
563 lines not on this page · raw message
drivers/video/exynos/exynos_dp_lowlevel.h +76 -55
136 lines not on this page · raw message
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 7/25 exynos: video: Drop static variables in exynos_dp_lowlevel.c
Quoted 3 lines · On Sun, 21 Feb 2016 21:08:44 -0700 Simon Glass sjg at chromium.org wrote:
Drop these and use parameters instead.
Signed-off-by Simon Glass <[email protected]>
PATCH v2 8/25 exynos: video: Move dsim_config_dt into a function
In reply to Simon GlassIn preparation for making this a parameter, move it into the function that sets it up.
---
Changes in v2: None
drivers/video/exynos/exynos_mipi_dsi.c | 37 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 18 deletions(-)
drivers/video/exynos/exynos_mipi_dsi.c +19 -18
@@ -28,7 +28,6 @@DECLARE_GLOBAL_DATA_PTR ;static struct exynos_platform_mipi_dsim *dsim_pd; -static struct mipi_dsim_config dsim_config_dt;static struct exynos_platform_mipi_dsim dsim_platform_data_dt;static struct mipi_dsim_lcd_device mipi_lcd_device_dt;
@@ -247,7 +246,7 @@ void exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd) dsim_pd = pd; } -int exynos_dsim_config_parse_dt (const void *blob) +int exynos_dsim_config_parse_dt (const void *blob,struct mipi_dsim_config *dt) {int node;
@@ -257,47 +256,47 @@ int exynos_dsim_config_parse_dt(const void *blob)return -ENODEV ; } - dsim_config_dt.e_interface =fdtdec_get_int (blob, node, + dt->e_interface =fdtdec_get_int (blob, node,"samsung,dsim-config-e-interface" ,0 ); - dsim_config_dt.e_virtual_ch =fdtdec_get_int (blob, node, + dt->e_virtual_ch =fdtdec_get_int (blob, node,"samsung,dsim-config-e-virtual-ch" ,0 ); - dsim_config_dt.e_pixel_format =fdtdec_get_int (blob, node, + dt->e_pixel_format =fdtdec_get_int (blob, node,"samsung,dsim-config-e-pixel-format" ,0 ); - dsim_config_dt.e_burst_mode =fdtdec_get_int (blob, node, + dt->e_burst_mode =fdtdec_get_int (blob, node,"samsung,dsim-config-e-burst-mode" ,0 ); - dsim_config_dt.e_no_data_lane =fdtdec_get_int (blob, node, + dt->e_no_data_lane =fdtdec_get_int (blob, node,"samsung,dsim-config-e-no-data-lane" ,0 ); - dsim_config_dt.e_byte_clk =fdtdec_get_int (blob, node, + dt->e_byte_clk =fdtdec_get_int (blob, node,"samsung,dsim-config-e-byte-clk" ,0 ); - dsim_config_dt.hfp =fdtdec_get_int (blob, node, + dt->hfp =fdtdec_get_int (blob, node,"samsung,dsim-config-hfp" ,0 ); - dsim_config_dt.p =fdtdec_get_int (blob, node, + dt->p =fdtdec_get_int (blob, node,"samsung,dsim-config-p" ,0 ); - dsim_config_dt.m =fdtdec_get_int (blob, node, + dt->m =fdtdec_get_int (blob, node,"samsung,dsim-config-m" ,0 ); - dsim_config_dt.s =fdtdec_get_int (blob, node, + dt->s =fdtdec_get_int (blob, node,"samsung,dsim-config-s" ,0 ); - dsim_config_dt.pll_stable_time =fdtdec_get_int (blob, node, + dt->pll_stable_time =fdtdec_get_int (blob, node,"samsung,dsim-config-pll-stable-time" ,0 ); - dsim_config_dt.esc_clk =fdtdec_get_int (blob, node, + dt->esc_clk =fdtdec_get_int (blob, node,"samsung,dsim-config-esc-clk" ,0 ); - dsim_config_dt.stop_holding_cnt =fdtdec_get_int (blob, node, + dt->stop_holding_cnt =fdtdec_get_int (blob, node,"samsung,dsim-config-stop-holding-cnt" ,0 ); - dsim_config_dt.bta_timeout =fdtdec_get_int (blob, node, + dt->bta_timeout =fdtdec_get_int (blob, node,"samsung,dsim-config-bta-timeout" ,0 ); - dsim_config_dt.rx_timeout =fdtdec_get_int (blob, node, + dt->rx_timeout =fdtdec_get_int (blob, node,"samsung,dsim-config-rx-timeout" ,0 ); mipi_lcd_device_dt.name = fdtdec_get_config_string(blob,
@@ -317,7 +316,9 @@ int exynos_dsim_config_parse_dt(const void *blob)void exynos_init_dsim_platform_data (vidinfo_t *vid) { -if (exynos_dsim_config_parse_dt (gd->fdt_blob)) +struct mipi_dsim_config dsim_config_dt; + +if (exynos_dsim_config_parse_dt (gd->fdt_blob, &dsim_config_dt))debug ("Can't get proper dsim config.\n" );strcpy (dsim_platform_data_dt.lcd_panel_name, mipi_lcd_device_dt.name);
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 8/25 exynos: video: Move dsim_config_dt into a function
Quoted 4 lines · On Sun, 21 Feb 2016 21:08:45 -0700 Simon Glass sjg at chromium.org wrote:
In preparation for making this a parameter, move it into the function that sets it up.
Signed-off-by Simon Glass <[email protected]>
PATCH v2 9/25 exynos: video: Move struct exynos_platform_mipi_dsim into vidinfo
In reply to Simon GlassPut the pointer to this structure in struct vidinfo so that we can reference it without it being global.
---
Changes in v2: None
arch/arm/mach-exynos/include/mach/mipi_dsim.h | 5 +++-- drivers/video/exynos/exynos_fb.c | 2 +- drivers/video/exynos/exynos_mipi_dsi.c | 19 ++++--------------- include/exynos_lcd.h | 1 + 4 files changed, 9 insertions(+), 18 deletions(-)
arch/arm/mach-exynos/include/mach/mipi_dsim.h +3 -2
@@ -347,9 +347,10 @@ struct mipi_dsim_lcd_driver { };#ifdef CONFIG_EXYNOS_MIPI_DSIM -int exynos_mipi_dsi_init (void ); +int exynos_mipi_dsi_init (struct exynos_platform_mipi_dsim *dsim_pd);#else -static inline int exynos_mipi_dsi_init (void ) +static inline int exynos_mipi_dsi_init ( +struct exynos_platform_mipi_dsim *dsim_pd) {return 0 ; }
drivers/video/exynos/exynos_fb.c +1 -1
@@ -128,7 +128,7 @@ static void lcd_panel_on(struct vidinfo *vid)exynos_enable_ldo (1 );if (vid->mipi_enabled) -exynos_mipi_dsi_init (); +exynos_mipi_dsi_init (panel_info.dsim_platform_data_dt); }int exynos_lcd_early_init (const void *blob)
drivers/video/exynos/exynos_mipi_dsi.c +4 -15
@@ -27,8 +27,6 @@DECLARE_GLOBAL_DATA_PTR ; -static struct exynos_platform_mipi_dsim *dsim_pd; -static struct exynos_platform_mipi_dsim dsim_platform_data_dt;static struct mipi_dsim_lcd_device mipi_lcd_device_dt;struct mipi_dsim_ddi {
@@ -175,7 +173,7 @@ static struct mipi_dsim_master_ops master_ops = { .clear_dsim_frame_done = exynos_mipi_dsi_clear_frame_done, }; -int exynos_mipi_dsi_init (void ) +int exynos_mipi_dsi_init (struct exynos_platform_mipi_dsim *dsim_pd) {struct mipi_dsim_device *dsim;struct mipi_dsim_config *dsim_config;
@@ -236,16 +234,6 @@ int exynos_mipi_dsi_init(void)return 0 ; } -void exynos_set_dsim_platform_data (struct exynos_platform_mipi_dsim *pd) -{ -if (pd ==NULL ) { -debug ("pd is NULL\n" ); -return ; - } - - dsim_pd = pd; -} -int exynos_dsim_config_parse_dt (const void *blob,struct mipi_dsim_config *dt) {int node;
@@ -316,7 +304,8 @@ int exynos_dsim_config_parse_dt(const void *blob, struct mipi_dsim_config *dt)void exynos_init_dsim_platform_data (vidinfo_t *vid) { -struct mipi_dsim_config dsim_config_dt; +static struct mipi_dsim_config dsim_config_dt; +static struct exynos_platform_mipi_dsim dsim_platform_data_dt;if (exynos_dsim_config_parse_dt (gd->fdt_blob, &dsim_config_dt))debug ("Can't get proper dsim config.\n" );
@@ -330,5 +319,5 @@ void exynos_init_dsim_platform_data(vidinfo_t *vid) mipi_lcd_device_dt.platform_data = (void *)&dsim_platform_data_dt;exynos_mipi_dsi_register_lcd_device (&mipi_lcd_device_dt); - dsim_pd = &dsim_platform_data_dt; + vid->dsim_platform_data_dt = &dsim_platform_data_dt; }
include/exynos_lcd.h +1 -0
@@ -76,6 +76,7 @@ typedef struct vidinfo {unsigned int dual_lcd_enabled;struct exynos_fb *fimd_ctrl; + struct exynos_platform_mipi_dsim *dsim_platform_data_dt; } vidinfo_t;#endif
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 9/25 exynos: video: Move struct exynos_platform_mipi_dsim into vidinfo
Quoted 4 lines · On Sun, 21 Feb 2016 21:08:46 -0700 Simon Glass sjg at chromium.org wrote:
Put the pointer to this structure in struct vidinfo so that we can reference it without it being global.
Signed-off-by Simon Glass <[email protected]>
PATCH v2 10/25 exynos: video: Move mipi_lcd_device_dt into a function
In reply to Simon GlassIn preparation for making this a parameter, move it into the function that sets it up.
---
Changes in v2: None
arch/arm/mach-exynos/include/mach/mipi_dsim.h | 2 +- drivers/video/exynos/exynos_mipi_dsi.c | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-)
arch/arm/mach-exynos/include/mach/mipi_dsim.h +1 -1
@@ -320,7 +320,7 @@ struct mipi_dsim_lcd_device {int reverse_panel;struct mipi_dsim_device *master; -void *platform_data; +struct exynos_platform_mipi_dsim *platform_data; };/*
drivers/video/exynos/exynos_mipi_dsi.c +9 -8
@@ -27,8 +27,6 @@DECLARE_GLOBAL_DATA_PTR ; -static struct mipi_dsim_lcd_device mipi_lcd_device_dt; -struct mipi_dsim_ddi {int bus_id;struct list_head list;
@@ -234,7 +232,8 @@ int exynos_mipi_dsi_init(struct exynos_platform_mipi_dsim *dsim_pd)return 0 ; } -int exynos_dsim_config_parse_dt (const void *blob,struct mipi_dsim_config *dt) +int exynos_dsim_config_parse_dt (const void *blob,struct mipi_dsim_config *dt, +struct mipi_dsim_lcd_device *lcd_dt) {int node;
@@ -287,16 +286,16 @@ int exynos_dsim_config_parse_dt(const void *blob, struct mipi_dsim_config *dt) dt->rx_timeout =fdtdec_get_int (blob, node,"samsung,dsim-config-rx-timeout" ,0 ); - mipi_lcd_device_dt.name =fdtdec_get_config_string (blob, + lcd_dt->name =fdtdec_get_config_string (blob,"samsung,dsim-device-name" ); - mipi_lcd_device_dt.id =fdtdec_get_int (blob, node, + lcd_dt->id =fdtdec_get_int (blob, node,"samsung,dsim-device-id" ,0 ); - mipi_lcd_device_dt.bus_id =fdtdec_get_int (blob, node, + lcd_dt->bus_id =fdtdec_get_int (blob, node,"samsung,dsim-device-bus_id" ,0 ); - mipi_lcd_device_dt.reverse_panel =fdtdec_get_int (blob, node, + lcd_dt->reverse_panel =fdtdec_get_int (blob, node,"samsung,dsim-device-reverse-panel" ,0 );return 0 ;
@@ -306,8 +305,10 @@ void exynos_init_dsim_platform_data(vidinfo_t *vid) {static struct mipi_dsim_config dsim_config_dt;static struct exynos_platform_mipi_dsim dsim_platform_data_dt; +static struct mipi_dsim_lcd_device mipi_lcd_device_dt; -if (exynos_dsim_config_parse_dt (gd->fdt_blob, &dsim_config_dt)) +if (exynos_dsim_config_parse_dt (gd->fdt_blob, &dsim_config_dt, + &mipi_lcd_device_dt))debug ("Can't get proper dsim config.\n" );strcpy (dsim_platform_data_dt.lcd_panel_name, mipi_lcd_device_dt.name);
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 10/25 exynos: video: Move mipi_lcd_device_dt into a function
Quoted 4 lines · On Sun, 21 Feb 2016 21:08:47 -0700 Simon Glass sjg at chromium.org wrote:
In preparation for making this a parameter, move it into the function that sets it up.
Signed-off-by Simon Glass <[email protected]>
PATCH v2 11/25 exynos: video: Combine LCD driver into one file
In reply to Simon GlassAt present exynos_fimd.c is the controller and exynos_fb.c is the U-Boot LCD interface. With driver model we want these in one file, so join them in preparation.
---
Changes in v2: None
drivers/video/exynos/Makefile | 2 +- drivers/video/exynos/exynos_fb.c | 386 +++++++++++++++++++++++++++++++++++ drivers/video/exynos/exynos_fimd.c | 405 ------------------------------------- 3 files changed, 387 insertions(+), 406 deletions(-) delete mode 100644 drivers/video/exynos/exynos_fimd.c
drivers/video/exynos/Makefile +1 -1
@@ -6,7 +6,7 @@ # obj-$(CONFIG_EXYNOS_DP) += exynos_dp.o exynos_dp_lowlevel.o -obj-$(CONFIG_EXYNOS_FB) += exynos_fb.o exynos_fimd.o +obj-$(CONFIG_EXYNOS_FB) += exynos_fb.o obj-$(CONFIG_EXYNOS_MIPI_DSIM) += exynos_mipi_dsi.o exynos_mipi_dsi_common.o \ exynos_mipi_dsi_lowlevel.o obj-$(CONFIG_EXYNOS_PWM_BL) += exynos_pwm_bl.o
drivers/video/exynos/exynos_fb.c +386 -0
398 lines not on this page · raw message
drivers/video/exynos/exynos_fimd.c deleted +0 -405
405 lines not on this page · raw message
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 11/25 exynos: video: Combine LCD driver into one file
Quoted 5 lines · On Sun, 21 Feb 2016 21:08:48 -0700 Simon Glass sjg at chromium.org wrote:
At present
exynos_fimd.cis the controller andexynos_fb.cis the U-Boot LCD interface. With driver model we want these in one file, so join them in preparation.Signed-off-by Simon Glass <[email protected]>
PATCH v2 12/25 exynos: pwm: Add a driver for the exynos5 PWM
In reply to Simon GlassThis driver supports the standard PWM API. There are 5 PWMs. Four are used normally and the last is normally used as a timer.
---
Changes in v2: None
arch/arm/cpu/armv7/s5p-common/timer.c | 3 + drivers/pwm/Kconfig | 9 +++ drivers/pwm/Makefile | 1 + drivers/pwm/exynos_pwm.c | 120 ++++++++++++++++++++++++++++++++++ 4 files changed, 133 insertions(+) create mode 100644 drivers/pwm/exynos_pwm.c
arch/arm/cpu/armv7/s5p-common/timer.c +3 -0
@@ -12,6 +12,9 @@#include <asm/io.h> #include <asm/arch/pwm.h> #include <asm/arch/clk.h> + +/* Use the old PWM interface for now */ +#undef CONFIG_DM_PWM#include <pwm.h> DECLARE_GLOBAL_DATA_PTR ;
drivers/pwm/Kconfig +9 -0
@@ -9,6 +9,15 @@ config DM_PWM frequency/period can be controlled along with the proportion of that time that the signal is high. +config PWM_EXYNOS + bool "Enable support for the Exynos PWM" + depends on DM_PWM + help + This PWM is found on Samsung Exynos 5250 and other Samsung SoCs. It + supports a programmable period and duty cycle. A 32-bit counter is + used. It provides 5 channels which can be independently + programmed. Channel 4 (the last) is normally used as a timer. + config PWM_ROCKCHIP bool "Enable support for the Rockchip PWM" depends on DM_PWM
drivers/pwm/Makefile +1 -0
@@ -15,4 +15,5 @@ obj-$(CONFIG_PWM_ROCKCHIP) += rk_pwm.o obj-$(CONFIG_PWM_IMX) += pwm-imx.o pwm-imx-util.o ifdef CONFIG_DM_PWM obj-$(CONFIG_PWM_TEGRA) += tegra_pwm.o +obj-$(CONFIG_PWM_EXYNOS) += exynos_pwm.o endif
drivers/pwm/exynos_pwm.c new file +120 -0
120 lines not on this page · raw message
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 13/25 video: Add an enum for active low/high
In reply to Simon GlassThis is used for video signals in some drivers so provide a standard way of representing it in an enum.
---
Changes in v2: None
include/video.h | 5 +++++ 1 file changed, 5 insertions(+)
include/video.h +5 -0
@@ -23,6 +23,11 @@ struct video_uc_platdata {ulong base; }; +enum video_polarity { +VIDEO_ACTIVE_HIGH ,/* Pins are active high */ +VIDEO_ACTIVE_LOW ,/* Pins are active low */ +}; +/* * Bits per pixel selector. Each value n is such that the bits-per-pixel is * 2 ^ n
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 13/25 video: Add an enum for active low/high
Quoted 4 lines · On Sun, 21 Feb 2016 21:08:50 -0700 Simon Glass sjg at chromium.org wrote:
This is used for video signals in some drivers so provide a standard way of representing it in an enum.
Signed-off-by Simon Glass <[email protected]>
PATCH v2 14/25 exynos: dts: Add pwm device tree node
In reply to Simon GlassAdd this node from Linux v4.4 so that PWMs can be used in U-Boot.
---
Changes in v2: None
arch/arm/dts/exynos5250.dtsi | 7 +++++++ arch/arm/dts/exynos54xx.dtsi | 7 +++++++ 2 files changed, 14 insertions(+)
arch/arm/dts/exynos5250.dtsi +7 -0
@@ -116,4 +116,11 @@ }; }; + pwm: pwm at 12dd0000 { + compatible = "samsung,exynos4210-pwm"; + reg = <0x12dd0000 0x100>; + samsung,pwm-outputs = <0>, <1>, <2>, <3>; + #pwm-cells = <3>; + }; + };
arch/arm/dts/exynos54xx.dtsi +7 -0
@@ -197,6 +197,13 @@ mem-type = "ddr3"; }; + pwm: pwm at 12dd0000 { + compatible = "samsung,exynos4210-pwm"; + reg = <0x12dd0000 0x100>; + samsung,pwm-outputs = <0>, <1>, <2>, <3>; + #pwm-cells = <3>; + }; + xhci1: xhci at 12400000 { compatible = "samsung,exynos5250-xhci"; reg = <0x12400000 0x10000>;
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 15/25 exynos: Allow tizen to be built without an LCD
In reply to Simon GlassThis file currently requires an LCD. Adjust it to work without one.
---
Changes in v2: None
include/libtizen.h | 2 ++ lib/tizen/tizen.c | 2 ++ 2 files changed, 4 insertions(+)
include/libtizen.h +2 -0
@@ -10,6 +10,8 @@#define HD_RESOLUTION 0 +#ifdef CONFIG_LCD void get_tizen_logo_info (vidinfo_t *vid); +#endif #endif /* _LIBTIZEN_H_ */
lib/tizen/tizen.c +2 -0
@@ -12,6 +12,7 @@#include "tizen_logo_16bpp.h" #include "tizen_logo_16bpp_gzip.h" +#ifdef CONFIG_LCD void get_tizen_logo_info (vidinfo_t *vid) {switch (vid->vl_bpix) {
@@ -31,3 +32,4 @@ void get_tizen_logo_info(vidinfo_t *vid) break; } } +#endif
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 16/25 exynos: Allow CONFIG_MISC_COMMON to be build without an LCD
In reply to Simon GlassThis file currently requires LCD support. Adjust it so that it can still be built without LCD support (even thought it won't work fully).
---
Changes in v2: None
board/samsung/common/misc.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
board/samsung/common/misc.c +10 -0
@@ -147,6 +147,7 @@ static int key_pressed(int key)return value; } +#ifdef CONFIG_LCD static int check_keys (void ) {int keys =0 ;
@@ -235,9 +236,11 @@ static void display_board_info(void) lcd_printf("\tDisplay BPP: %u\n", 1 << vid->vl_bpix); } +#endif static int mode_leave_menu (int mode) { +#ifdef CONFIG_LCD char *exit_option;char *exit_reset ="reset" ;char *exit_back ="back" ;
@@ -301,8 +304,12 @@ static int mode_leave_menu(int mode)lcd_clear ();return leave; +#else +return 0 ; +#endif } +#ifdef CONFIG_LCD static void display_download_menu (int mode) {char *selection[BOOT_MODE_EXIT +1 ];
@@ -320,9 +327,11 @@ static void display_download_menu(int mode)lcd_printf ("\t%s %s - %s\n\n" , selection[i], mode_name[i][0], mode_info[i]); } +#endif static void download_menu (void ) { +#ifdef CONFIG_LCD int mode =0 ;int last_mode =0 ;int run;
@@ -393,6 +402,7 @@ static void download_menu(void) }lcd_clear (); +#endif }void check_boot_mode (void )
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 17/25 exynos: Disable LCD display for boards we can't convert
In reply to Simon GlassSome boards have the LCD enabled but I cannot test operation for the driver model conversion. Disable the LCD on these to avoid build errors.
---
Changes in v2: None
board/samsung/trats/trats.c | 2 ++ board/samsung/universal_c210/universal.c | 2 ++ include/configs/s5pc210_universal.h | 3 --- include/configs/smdk5250.h | 3 +++ include/configs/smdk5420.h | 4 ++++ include/configs/trats.h | 4 ---- include/configs/trats2.h | 4 ---- 7 files changed, 11 insertions(+), 11 deletions(-)
board/samsung/trats/trats.c +2 -0
@@ -596,6 +596,7 @@ int mipi_power(void)return 0 ; } +#ifdef CONFIG_LCD void exynos_lcd_misc_init (vidinfo_t *vid) {#ifdef CONFIG_TIZEN
@@ -606,3 +607,4 @@ void exynos_lcd_misc_init(vidinfo_t *vid)setenv ("lcdinfo" ,"lcd=s6e8ax0" ); #endif } +#endif
board/samsung/universal_c210/universal.c +2 -0
@@ -367,6 +367,7 @@ int exynos_init(void)return 0 ; } +#ifdef CONFIG_LCD void exynos_lcd_misc_init (vidinfo_t *vid) {#ifdef CONFIG_TIZEN
@@ -379,3 +380,4 @@ void exynos_lcd_misc_init(vidinfo_t *vid) setenv("lcdinfo", "lcd=ld9040"); } +#endif
include/configs/s5pc210_universal.h +0 -3
@@ -222,9 +222,6 @@ int universal_spi_read(void);/* * LCD Settings */ -#define CONFIG_EXYNOS_FB -#define CONFIG_LCD -#define CONFIG_CMD_BMP #define CONFIG_BMP_16BPP #define CONFIG_LD9040 #define CONFIG_VIDEO_BMP_GZIP
include/configs/smdk5250.h +3 -0
@@ -13,6 +13,9 @@#include <configs/exynos5-dt-common.h> #include <configs/exynos5-common.h> +#undef CONFIG_LCD +#undef CONFIG_EXYNOS_FB +#undef CONFIG_EXYNOS_DP#undef CONFIG_KEYBOARD#define CONFIG_BOARD_COMMON
include/configs/smdk5420.h +4 -0
@@ -13,6 +13,10 @@#include <configs/exynos5-dt-common.h> #include <configs/exynos5-common.h> +#undef CONFIG_LCD +#undef CONFIG_EXYNOS_FB +#undef CONFIG_EXYNOS_DP +#undef CONFIG_KEYBOARD#define CONFIG_BOARD_COMMON
include/configs/trats.h +0 -4
@@ -247,12 +247,8 @@#define CONFIG_SYS_WHITE_ON_BLACK /* LCD */ -#define CONFIG_EXYNOS_FB -#define CONFIG_LCD -#define CONFIG_CMD_BMP #define CONFIG_BMP_16BPP #define CONFIG_FB_ADDR 0x52504000 -#define CONFIG_S6E8AX0 #define CONFIG_EXYNOS_MIPI_DSIM #define CONFIG_VIDEO_BMP_GZIP #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE ((500 * 160 * 4) + 54)
include/configs/trats2.h +0 -4
@@ -226,12 +226,8 @@ int get_soft_i2c_sda_pin(void);#define CONFIG_SYS_WHITE_ON_BLACK /* LCD */ -#define CONFIG_EXYNOS_FB -#define CONFIG_LCD -#define CONFIG_CMD_BMP #define CONFIG_BMP_16BPP #define CONFIG_FB_ADDR 0x52504000 -#define CONFIG_S6E8AX0 #define CONFIG_EXYNOS_MIPI_DSIM #define CONFIG_VIDEO_BMP_GZIP #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE ((500 * 160 * 4) + 54)
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 18/25 dts: Add clock and regulator binding files for max77802
In reply to Simon GlassThese are used by peach_pit and peach_pi. Add them so they can be referenced in the device tree files.
---
Changes in v2: None
include/dt-bindings/clock/maxim,max77802.h | 22 ++++++++++++++++++++++ include/dt-bindings/regulator/maxim,max77802.h | 18 ++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 include/dt-bindings/clock/maxim,max77802.h create mode 100644 include/dt-bindings/regulator/maxim,max77802.h
include/dt-bindings/clock/maxim,max77802.h new file +22 -0
@@ -0,0 +1,22 @@ +/* +* Copyright (C) 2014 Google, Inc +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* Device Tree binding constants clocks for the Maxim 77802 PMIC. +*/ + +#ifndef _DT_BINDINGS_CLOCK_MAXIM_MAX77802_CLOCK_H +#define _DT_BINDINGS_CLOCK_MAXIM_MAX77802_CLOCK_H + +/* Fixed rate clocks. */ + +#define MAX77802_CLK_32K_AP 0 +#define MAX77802_CLK_32K_CP 1 + +/* Total number of clocks. */ +#define MAX77802_CLKS_NUM (MAX77802_CLK_32K_CP + 1) + +#endif /* _DT_BINDINGS_CLOCK_MAXIM_MAX77802_CLOCK_H */
include/dt-bindings/regulator/maxim,max77802.h new file +18 -0
@@ -0,0 +1,18 @@ +/* +* Copyright (C) 2014 Google, Inc +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* Device Tree binding constants for the Maxim 77802 PMIC regulators +*/ + +#ifndef _DT_BINDINGS_REGULATOR_MAXIM_MAX77802_H +#define _DT_BINDINGS_REGULATOR_MAXIM_MAX77802_H + +/* Regulator operating modes */ +#define MAX77802_OPMODE_LP 1 +#define MAX77802_OPMODE_NORMAL 3 + +#endif /* _DT_BINDINGS_REGULATOR_MAXIM_MAX77802_H */
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 19/25 exynos: Allow PWM0 pinmux to be set up
In reply to Simon GlassThis is commonly used for LCD backlight control. Add pinmux support for it on exynos5250 and 5420.
---
Changes in v2: None
arch/arm/mach-exynos/pinmux.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/mach-exynos/pinmux.c +6 -0
@@ -506,6 +506,9 @@ static int exynos5_pinmux_config(int peripheral, int flags)*/ gpio_set_pull (EXYNOS5_GPIO_X07 ,S5P_GPIO_PULL_NONE );break ; +case PERIPH_ID_PWM0 : +gpio_cfg_pin (EXYNOS5_GPIO_B20 ,S5P_GPIO_FUNC (2 )); +break ;default :debug ("%s: invalid peripheral %d" , __func__, peripheral);return -1 ;
@@ -548,6 +551,9 @@ static int exynos5420_pinmux_config(int peripheral, int flags)case PERIPH_ID_I2C10 :exynos5420_i2c_config (peripheral);break ; +case PERIPH_ID_PWM0 : +gpio_cfg_pin (EXYNOS5420_GPIO_B20 ,S5P_GPIO_FUNC (2 )); +break ;default :debug ("%s: invalid peripheral %d" , __func__, peripheral);return -1 ;
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 20/25 exynos: Simplify calling of exynos_dp_phy_ctrl()
In reply to Simon GlassThis function controls enabling the EDP PHY. Rename it and drop the existing weak functions, which are confusing.
---
Changes in v2: None
arch/arm/mach-exynos/include/mach/power.h | 2 +- arch/arm/mach-exynos/power.c | 2 +- board/samsung/common/exynos5-dt.c | 5 ----- drivers/video/exynos/exynos_dp.c | 9 ++------- 4 files changed, 4 insertions(+), 14 deletions(-)
arch/arm/mach-exynos/include/mach/power.h +1 -1
@@ -1717,7 +1717,7 @@ void set_usbdrd_phy_ctrl(unsigned int enable);#define POWER_USB_DRD_PHY_CTRL_EN (1 << 0)#define POWER_USB_DRD_PHY_CTRL_DISABLE (0 << 0) -void set_dp_phy_ctrl (unsigned int enable); +void exynos_dp_phy_ctrl (unsigned int enable);#define EXYNOS_DP_PHY_ENABLE (1 << 0)
arch/arm/mach-exynos/power.c +1 -1
@@ -147,7 +147,7 @@ static void exynos5_dp_phy_control(unsigned int enable)writel (cfg, &power->dptx_phy_control); } -void set_dp_phy_ctrl (unsigned int enable) +void exynos_dp_phy_ctrl (unsigned int enable) {if (cpu_is_exynos5 ())exynos5_dp_phy_control (enable);
board/samsung/common/exynos5-dt.c +0 -5
@@ -235,11 +235,6 @@ void exynos_cfg_lcd_gpio(void)gpio_set_value (EXYNOS5_GPIO_B20 ,1 ); } -void exynos_set_dp_phy (unsigned int onoff) -{ -set_dp_phy_ctrl (onoff); -} -static int board_dp_set_backlight (int percent) {struct udevice *dev;
drivers/video/exynos/exynos_dp.c +2 -7
@@ -15,6 +15,7 @@#include <asm/arch/cpu.h> #include <asm/arch/dp_info.h> #include <asm/arch/dp.h> +#include <asm/arch/power.h> #include <fdtdec.h> #include <libfdt.h>
@@ -22,12 +23,6 @@DECLARE_GLOBAL_DATA_PTR ; -void __exynos_set_dp_phy (unsigned int onoff) -{ -} -void exynos_set_dp_phy (unsigned int onoff) - __attribute__((weak,alias ("__exynos_set_dp_phy" ))); -static void exynos_dp_disp_info (struct edp_disp_info *disp_info) { disp_info->h_total = disp_info->h_res + disp_info->h_sync_width +
@@ -959,7 +954,7 @@ unsigned int exynos_init_dp(void)exynos_dp_disp_info (&edp_info->disp_info); -exynos_set_dp_phy (1 ); +exynos_dp_phy_ctrl (1 ); ret =exynos_dp_init_dp (dp_regs);if (ret !=EXYNOS_DP_SUCCESS ) {
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 21/25 exynos: dts: Add display-related device tree fragments
In reply to Simon GlassBring in device tree pieces related to display from Linux 4.4 for:
- snow
- peach_pit
- peach_pi
- spring
---
Changes in v2: None
arch/arm/dts/exynos5.dtsi | 3 +- arch/arm/dts/exynos5250-snow.dts | 44 ++++++++++++++++++++++++++++ arch/arm/dts/exynos5250-spring.dts | 53 +++++++++++++++++++++++++++++++++ arch/arm/dts/exynos5420-peach-pit.dts | 55 +++++++++++++++++++++++++++++++++++ arch/arm/dts/exynos54xx.dtsi | 4 +-- arch/arm/dts/exynos5800-peach-pi.dts | 40 +++++++++++++++++++++++++ 6 files changed, 196 insertions(+), 3 deletions(-)
arch/arm/dts/exynos5.dtsi +2 -1
@@ -163,13 +163,14 @@ }; fimd at 14400000 { + u-boot,dm-pre-reloc; compatible = "samsung,exynos-fimd"; reg = <0x14400000 0x10000>; #address-cells = <1>; #size-cells = <1>; }; - dp at 145b0000 { + dp: dp at 145b0000 { compatible = "samsung,exynos5-dp"; reg = <0x145b0000 0x1000>; #address-cells = <1>;
arch/arm/dts/exynos5250-snow.dts +44 -0
62 lines not on this page · raw message
arch/arm/dts/exynos5250-spring.dts +53 -0
71 lines not on this page · raw message
arch/arm/dts/exynos5420-peach-pit.dts +55 -0
85 lines not on this page · raw message
arch/arm/dts/exynos54xx.dtsi +2 -2
@@ -49,7 +49,7 @@ status = "disabled"; }; - i2c at 12CA0000 { + hsi2c_4: i2c at 12CA0000 { #address-cells = <1>; #size-cells = <0>; compatible = "samsung,exynos5-hsi2c";
@@ -178,7 +178,7 @@ samsung,pwm-out-gpio = <&gpb2 0 GPIO_ACTIVE_HIGH>; }; - dp at 145b0000 { + dp: dp at 145b0000 { samsung,lt-status = <0>; samsung,master-mode = <0>;
arch/arm/dts/exynos5800-peach-pi.dts +40 -0
@@ -30,6 +30,27 @@ i2c104 = &i2c_tunnel; }; + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm 0 1000000 0>; + brightness-levels = <0 100 500 1000 1500 2000 2500 2800>; + default-brightness-level = <7>; + enable-gpios = <&gpx2 2 GPIO_ACTIVE_HIGH>; + power-supply = <&tps65090_fet1>; + }; + + panel: panel { + compatible = "auo,b133htn01"; + power-supply = <&tps65090_fet6>; + backlight = <&backlight>; + + port { + panel_in: endpoint { + remote-endpoint = <&dp_out>; + }; + }; + }; + dmc { mem-manuf = "samsung"; mem-type = "ddr3";
@@ -132,6 +153,25 @@ }; }; +&dp { + status = "okay"; + samsung,color-space = <0>; + samsung,dynamic-range = <0>; + samsung,ycbcr-coeff = <0>; + samsung,color-depth = <1>; + samsung,link-rate = <0x0a>; + samsung,lane-count = <2>; + samsung,hpd-gpio = <&gpx2 6 GPIO_ACTIVE_HIGH>; + + ports { + port { + dp_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; +}; + &spi_2 { spi-max-frequency = <3125000>; spi-deactivate-delay = <200>;
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 22/25 exynos: video: Rename edp_device_info to exynos_dp_priv
In reply to Simon GlassRename this function to better fit with driver model. It is the private data for the exynos EDP driver.
---
Changes in v2: None
arch/arm/mach-exynos/include/mach/dp_info.h | 4 ++-- drivers/video/exynos/exynos_dp.c | 26 +++++++++++++------------- drivers/video/exynos/exynos_dp_lowlevel.c | 2 +- drivers/video/exynos/exynos_dp_lowlevel.h | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-)
arch/arm/mach-exynos/include/mach/dp_info.h +2 -2
@@ -61,7 +61,7 @@ struct edp_video_info {unsigned int color_depth; }; -struct edp_device_info { +struct exynos_dp_priv {struct edp_disp_info disp_info;struct edp_link_train_info lt_info;struct edp_video_info video_info;
@@ -185,7 +185,7 @@ enum {struct exynos_dp_platform_data { -struct edp_device_info *edp_dev_info; +struct exynos_dp_priv *edp_dev_info; };#ifdef CONFIG_EXYNOS_DP
drivers/video/exynos/exynos_dp.c +13 -13
@@ -162,7 +162,7 @@ static unsigned int exynos_dp_read_edid(struct exynos_dp *dp_regs) }static unsigned int exynos_dp_handle_edid (struct exynos_dp *dp_regs, -struct edp_device_info *edp_info) +struct exynos_dp_priv *edp_info) {unsigned char buf[12 ];unsigned int ret;
@@ -251,7 +251,7 @@ static void exynos_dp_init_training(struct exynos_dp *dp_regs) }static unsigned int exynos_dp_link_start (struct exynos_dp *dp_regs, -struct edp_device_info *edp_info) +struct exynos_dp_priv *edp_info) {unsigned char buf[5 ];unsigned int ret =0 ;
@@ -376,7 +376,7 @@ static unsigned int exynos_dp_set_enhanced_mode(struct exynos_dp *dp_regs, }static int exynos_dp_read_dpcd_lane_stat (struct exynos_dp *dp_regs, -struct edp_device_info *edp_info, +struct exynos_dp_priv *edp_info,unsigned char *status) {unsigned int ret, i;
@@ -433,7 +433,7 @@ static unsigned int exynos_dp_read_dpcd_adj_req(struct exynos_dp *dp_regs, }static int exynos_dp_equalizer_err_link (struct exynos_dp *dp_regs, -struct edp_device_info *edp_info) +struct exynos_dp_priv *edp_info) {int ret;
@@ -453,7 +453,7 @@ static int exynos_dp_equalizer_err_link(struct exynos_dp *dp_regs, }static int exynos_dp_reduce_link_rate (struct exynos_dp *dp_regs, -struct edp_device_info *edp_info) +struct exynos_dp_priv *edp_info) {int ret;
@@ -478,7 +478,7 @@ static int exynos_dp_reduce_link_rate(struct exynos_dp *dp_regs, }static unsigned int exynos_dp_process_clock_recovery (struct exynos_dp *dp_regs, -struct edp_device_info *edp_info) +struct exynos_dp_priv *edp_info) {unsigned int ret =EXYNOS_DP_SUCCESS ;unsigned char lane_stat;
@@ -588,7 +588,7 @@ static unsigned int exynos_dp_process_clock_recovery(struct exynos_dp *dp_regs, }static unsigned int exynos_dp_process_equalizer_training ( -struct exynos_dp *dp_regs,struct edp_device_info *edp_info) +struct exynos_dp *dp_regs,struct exynos_dp_priv *edp_info) {unsigned int ret =EXYNOS_DP_SUCCESS ;unsigned char lane_stat, adj_req_sw, adj_req_em, i;
@@ -697,7 +697,7 @@ static unsigned int exynos_dp_process_equalizer_training( }static unsigned int exynos_dp_sw_link_training (struct exynos_dp *dp_regs, -struct edp_device_info *edp_info) +struct exynos_dp_priv *edp_info) {unsigned int ret =0 ;int training_finished;
@@ -748,7 +748,7 @@ static unsigned int exynos_dp_sw_link_training(struct exynos_dp *dp_regs, }static unsigned int exynos_dp_set_link_train (struct exynos_dp *dp_regs, -struct edp_device_info *edp_info) +struct exynos_dp_priv *edp_info) {unsigned int ret;
@@ -783,7 +783,7 @@ static void exynos_dp_enable_scramble(struct exynos_dp *dp_regs, }static unsigned int exynos_dp_config_video (struct exynos_dp *dp_regs, -struct edp_device_info *edp_info) +struct exynos_dp_priv *edp_info) {unsigned int ret =0 ;unsigned int retry_cnt;
@@ -872,7 +872,7 @@ static unsigned int exynos_dp_config_video(struct exynos_dp *dp_regs,return ret; } -int exynos_dp_parse_dt (const void *blob,struct edp_device_info *edp_info) +int exynos_dp_parse_dt (const void *blob,struct exynos_dp_priv *edp_info) {unsigned int node =fdtdec_next_compatible (blob,0 ,COMPAT_SAMSUNG_EXYNOS5_DP );
@@ -929,11 +929,11 @@ int exynos_dp_parse_dt(const void *blob, struct edp_device_info *edp_info)unsigned int exynos_init_dp (void ) {unsigned int ret; -struct edp_device_info *edp_info; +struct exynos_dp_priv *edp_info;struct exynos_dp *dp_regs;int node; - edp_info =kzalloc (sizeof (struct edp_device_info ),GFP_KERNEL ); + edp_info =kzalloc (sizeof (struct exynos_dp_priv ),GFP_KERNEL );if (!edp_info) {debug ("failed to allocate edp device object.\n" );return -EFAULT ;
drivers/video/exynos/exynos_dp_lowlevel.c +1 -1
@@ -1066,7 +1066,7 @@ void exynos_dp_set_video_color_format(struct exynos_dp *dp_regs, }int exynos_dp_config_video_bist (struct exynos_dp *dp_regs, -struct edp_device_info *edp_info) +struct exynos_dp_priv *edp_info) {unsigned int reg;unsigned int bist_type =0 ;
drivers/video/exynos/exynos_dp_lowlevel.h +1 -1
@@ -74,7 +74,7 @@ void exynos_dp_config_video_slave_mode(struct exynos_dp *dp_regs,void exynos_dp_set_video_color_format (struct exynos_dp *dp_regs,struct edp_video_info *video_info);int exynos_dp_config_video_bist (struct exynos_dp *dp_regs, -struct edp_device_info *edp_info); +struct exynos_dp_priv *edp_info);unsigned int exynos_dp_is_slave_video_stream_clock_on (struct exynos_dp *dp_regs); void exynos_dp_set_video_cr_mn(struct exynos_dp *dp_regs, unsigned int type,
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 22/25 exynos: video: Rename edp_device_info to exynos_dp_priv
Quoted 4 lines · On Sun, 21 Feb 2016 21:08:59 -0700 Simon Glass sjg at chromium.org wrote:
Rename this function to better fit with driver model. It is the private data for the exynos EDP driver.
Signed-off-by Simon Glass <[email protected]>
PATCH v2 23/25 exynos: video: Rename variables for driver model
In reply to Simon GlassUse 'priv' for a private pointer and 'regs' for a register pointer.
---
Changes in v2: None
drivers/video/exynos/exynos_dp.c | 434 +++++++++++++++--------------- drivers/video/exynos/exynos_dp_lowlevel.c | 71 +++-- drivers/video/exynos/exynos_dp_lowlevel.h | 2 +- drivers/video/exynos/exynos_fb.c | 234 ++++++++-------- include/exynos_lcd.h | 2 +- 5 files changed, 370 insertions(+), 373 deletions(-)
drivers/video/exynos/exynos_dp.c +217 -217
@@ -33,20 +33,20 @@ static void exynos_dp_disp_info(struct edp_disp_info *disp_info)return ; } -static int exynos_dp_init_dp (struct exynos_dp *dp_regs) +static int exynos_dp_init_dp (struct exynos_dp *regs) {int ret; -exynos_dp_reset (dp_regs); +exynos_dp_reset (regs);/* SW defined function Normal operation */ -exynos_dp_enable_sw_func (dp_regs,DP_ENABLE ); +exynos_dp_enable_sw_func (regs,DP_ENABLE ); - ret =exynos_dp_init_analog_func (dp_regs); + ret =exynos_dp_init_analog_func (regs);if (ret !=EXYNOS_DP_SUCCESS )return ret; -exynos_dp_init_hpd (dp_regs); -exynos_dp_init_aux (dp_regs); +exynos_dp_init_hpd (regs); +exynos_dp_init_aux (regs);return ret; }
@@ -62,7 +62,7 @@ static unsigned char exynos_dp_calc_edid_check_sum(unsigned char *edid_data)return sum; } -static unsigned int exynos_dp_read_edid (struct exynos_dp *dp_regs) +static unsigned int exynos_dp_read_edid (struct exynos_dp *regs) {unsigned char edid[EDID_BLOCK_LENGTH *2 ];unsigned int extend_block =0 ;
@@ -77,14 +77,14 @@ static unsigned int exynos_dp_read_edid(struct exynos_dp *dp_regs)*/ /* Read Extension Flag, Number of 128-byte EDID extension blocks */ -exynos_dp_read_byte_from_i2c (dp_regs,I2C_EDID_DEVICE_ADDR , +exynos_dp_read_byte_from_i2c (regs,I2C_EDID_DEVICE_ADDR ,EDID_EXTENSION_FLAG , &extend_block);if (extend_block >0 ) {printf ("DP EDID data includes a single extension!\n" );/* Read EDID data */ - retval = exynos_dp_read_bytes_from_i2c(dp_regs, + retval = exynos_dp_read_bytes_from_i2c(regs, I2C_EDID_DEVICE_ADDR, EDID_HEADER_PATTERN, EDID_BLOCK_LENGTH,
@@ -100,7 +100,7 @@ static unsigned int exynos_dp_read_edid(struct exynos_dp *dp_regs) }/* Read additional EDID data */ - retval = exynos_dp_read_bytes_from_i2c(dp_regs, + retval = exynos_dp_read_bytes_from_i2c(regs, I2C_EDID_DEVICE_ADDR, EDID_BLOCK_LENGTH, EDID_BLOCK_LENGTH,
@@ -115,13 +115,13 @@ static unsigned int exynos_dp_read_edid(struct exynos_dp *dp_regs)return -1 ; } -exynos_dp_read_byte_from_dpcd (dp_regs,DPCD_TEST_REQUEST , +exynos_dp_read_byte_from_dpcd (regs,DPCD_TEST_REQUEST , &test_vector);if (test_vector &DPCD_TEST_EDID_READ ) { -exynos_dp_write_byte_to_dpcd (dp_regs, +exynos_dp_write_byte_to_dpcd (regs,DPCD_TEST_EDID_CHECKSUM , edid[EDID_BLOCK_LENGTH +EDID_CHECKSUM ]); -exynos_dp_write_byte_to_dpcd (dp_regs, +exynos_dp_write_byte_to_dpcd (regs,DPCD_TEST_RESPONSE ,DPCD_TEST_EDID_CHECKSUM_WRITE ); }
@@ -129,7 +129,7 @@ static unsigned int exynos_dp_read_edid(struct exynos_dp *dp_regs)debug ("DP EDID data does not include any extensions.\n" );/* Read EDID data */ - retval = exynos_dp_read_bytes_from_i2c(dp_regs, + retval = exynos_dp_read_bytes_from_i2c(regs, I2C_EDID_DEVICE_ADDR, EDID_HEADER_PATTERN, EDID_BLOCK_LENGTH,
@@ -145,12 +145,12 @@ static unsigned int exynos_dp_read_edid(struct exynos_dp *dp_regs)return -1 ; } -exynos_dp_read_byte_from_dpcd (dp_regs,DPCD_TEST_REQUEST , +exynos_dp_read_byte_from_dpcd (regs,DPCD_TEST_REQUEST , &test_vector);if (test_vector &DPCD_TEST_EDID_READ ) { -exynos_dp_write_byte_to_dpcd (dp_regs, +exynos_dp_write_byte_to_dpcd (regs,DPCD_TEST_EDID_CHECKSUM , edid[EDID_CHECKSUM ]); -exynos_dp_write_byte_to_dpcd (dp_regs, +exynos_dp_write_byte_to_dpcd (regs,DPCD_TEST_RESPONSE ,DPCD_TEST_EDID_CHECKSUM_WRITE ); }
@@ -161,8 +161,8 @@ static unsigned int exynos_dp_read_edid(struct exynos_dp *dp_regs)return 0 ; } -static unsigned int exynos_dp_handle_edid (struct exynos_dp *dp_regs, -struct exynos_dp_priv *edp_info) +static unsigned int exynos_dp_handle_edid (struct exynos_dp *regs, +struct exynos_dp_priv *priv) {unsigned char buf[12 ];unsigned int ret;
@@ -180,7 +180,7 @@ static unsigned int exynos_dp_handle_edid(struct exynos_dp *dp_regs, retry_cnt =5 ;while (retry_cnt) {/* Read DPCD 0x0000-0x000b */ - ret =exynos_dp_read_bytes_from_dpcd (dp_regs,DPCD_DPCD_REV ,12 , + ret =exynos_dp_read_bytes_from_dpcd (regs,DPCD_DPCD_REV ,12 , buf);if (ret !=EXYNOS_DP_SUCCESS ) {if (retry_cnt ==0 ) {
@@ -195,7 +195,7 @@ static unsigned int exynos_dp_handle_edid(struct exynos_dp *dp_regs,/* */ temp = buf[DPCD_DPCD_REV ];if (temp ==DP_DPCD_REV_10 || temp ==DP_DPCD_REV_11 ) - edp_info->dpcd_rev = temp; + priv->dpcd_rev = temp;else {printf ("DP Wrong DPCD Rev : %x\n" , temp);return -ENODEV ;
@@ -203,33 +203,33 @@ static unsigned int exynos_dp_handle_edid(struct exynos_dp *dp_regs, temp = buf[DPCD_MAX_LINK_RATE ];if (temp ==DP_LANE_BW_1_62 || temp ==DP_LANE_BW_2_70 ) - edp_info->lane_bw = temp; + priv->lane_bw = temp;else {printf ("DP Wrong MAX LINK RATE : %x\n" , temp);return -EINVAL ; }/* Refer VESA Display Port Standard Ver1.1a Page 120 */ -if (edp_info->dpcd_rev ==DP_DPCD_REV_11 ) { +if (priv->dpcd_rev ==DP_DPCD_REV_11 ) { temp = buf[DPCD_MAX_LANE_COUNT ] &0x1f ;if (buf[DPCD_MAX_LANE_COUNT ] &0x80 ) - edp_info->dpcd_efc =1 ; + priv->dpcd_efc =1 ;else - edp_info->dpcd_efc =0 ; + priv->dpcd_efc =0 ; }else { temp = buf[DPCD_MAX_LANE_COUNT ]; - edp_info->dpcd_efc =0 ; + priv->dpcd_efc =0 ; }if (temp ==DP_LANE_CNT_1 || temp ==DP_LANE_CNT_2 || temp ==DP_LANE_CNT_4 ) { - edp_info->lane_cnt = temp; + priv->lane_cnt = temp; }else {printf ("DP Wrong MAX LANE COUNT : %x\n" , temp);return -EINVAL ; } - ret =exynos_dp_read_edid (dp_regs); + ret =exynos_dp_read_edid (regs);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP exynos_dp_read_edid() failed\n" );return -EINVAL ;
@@ -238,35 +238,35 @@ static unsigned int exynos_dp_handle_edid(struct exynos_dp *dp_regs,return ret; } -static void exynos_dp_init_training (struct exynos_dp *dp_regs) +static void exynos_dp_init_training (struct exynos_dp *regs) {/* * MACRO_RST must be applied after the PLL_LOCK to avoid * the DP inter pair skew issue for at least 10 us */ -exynos_dp_reset_macro (dp_regs); +exynos_dp_reset_macro (regs);/* All DP analog module power up */ -exynos_dp_set_analog_power_down (dp_regs,POWER_ALL ,0 ); +exynos_dp_set_analog_power_down (regs,POWER_ALL ,0 ); } -static unsigned int exynos_dp_link_start (struct exynos_dp *dp_regs, -struct exynos_dp_priv *edp_info) +static unsigned int exynos_dp_link_start (struct exynos_dp *regs, +struct exynos_dp_priv *priv) {unsigned char buf[5 ];unsigned int ret =0 ;debug ("DP: %s was called\n" , __func__); - edp_info->lt_info.lt_status =DP_LT_CR ; - edp_info->lt_info.ep_loop =0 ; - edp_info->lt_info.cr_loop[0 ] =0 ; - edp_info->lt_info.cr_loop[1 ] =0 ; - edp_info->lt_info.cr_loop[2 ] =0 ; - edp_info->lt_info.cr_loop[3 ] =0 ; + priv->lt_info.lt_status =DP_LT_CR ; + priv->lt_info.ep_loop =0 ; + priv->lt_info.cr_loop[0 ] =0 ; + priv->lt_info.cr_loop[1 ] =0 ; + priv->lt_info.cr_loop[2 ] =0 ; + priv->lt_info.cr_loop[3 ] =0 ;/* Set sink to D0 (Sink Not Ready) mode. */ - ret =exynos_dp_write_byte_to_dpcd (dp_regs,DPCD_SINK_POWER_STATE , + ret =exynos_dp_write_byte_to_dpcd (regs,DPCD_SINK_POWER_STATE ,DPCD_SET_POWER_STATE_D0 );if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP write_dpcd_byte failed\n" );
@@ -274,24 +274,24 @@ static unsigned int exynos_dp_link_start(struct exynos_dp *dp_regs, }/* Set link rate and count as you want to establish */ -exynos_dp_set_link_bandwidth (dp_regs, edp_info->lane_bw); -exynos_dp_set_lane_count (dp_regs, edp_info->lane_cnt); +exynos_dp_set_link_bandwidth (regs, priv->lane_bw); +exynos_dp_set_lane_count (regs, priv->lane_cnt);/* Setup RX configuration */ - buf[0 ] = edp_info->lane_bw; - buf[1 ] = edp_info->lane_cnt; + buf[0 ] = priv->lane_bw; + buf[1 ] = priv->lane_cnt; - ret =exynos_dp_write_bytes_to_dpcd (dp_regs,DPCD_LINK_BW_SET ,2 , buf); + ret =exynos_dp_write_bytes_to_dpcd (regs,DPCD_LINK_BW_SET ,2 , buf);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP write_dpcd_byte failed\n" );return ret; } -exynos_dp_set_lane_pre_emphasis (dp_regs,PRE_EMPHASIS_LEVEL_0 , - edp_info->lane_cnt); +exynos_dp_set_lane_pre_emphasis (regs,PRE_EMPHASIS_LEVEL_0 , + priv->lane_cnt);/* Set training pattern 1 */ -exynos_dp_set_training_pattern (dp_regs,TRAINING_PTN1 ); +exynos_dp_set_training_pattern (regs,TRAINING_PTN1 );/* Set RX training pattern */ buf[0 ] =DPCD_SCRAMBLING_DISABLED |DPCD_TRAINING_PATTERN_1 ;
@@ -305,7 +305,7 @@ static unsigned int exynos_dp_link_start(struct exynos_dp *dp_regs, buf[4 ] =DPCD_PRE_EMPHASIS_SET_PATTERN_2_LEVEL_0 |DPCD_VOLTAGE_SWING_SET_PATTERN_1_LEVEL_0 ; - ret =exynos_dp_write_bytes_to_dpcd (dp_regs,DPCD_TRAINING_PATTERN_SET , + ret =exynos_dp_write_bytes_to_dpcd (regs,DPCD_TRAINING_PATTERN_SET ,5 , buf);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP write_dpcd_byte failed\n" );
@@ -315,13 +315,13 @@ static unsigned int exynos_dp_link_start(struct exynos_dp *dp_regs,return ret; } -static unsigned int exynos_dp_training_pattern_dis (struct exynos_dp *dp_regs) +static unsigned int exynos_dp_training_pattern_dis (struct exynos_dp *regs) {unsigned int ret =EXYNOS_DP_SUCCESS ; -exynos_dp_set_training_pattern (dp_regs,DP_NONE ); +exynos_dp_set_training_pattern (regs,DP_NONE ); - ret =exynos_dp_write_byte_to_dpcd (dp_regs,DPCD_TRAINING_PATTERN_SET , + ret =exynos_dp_write_byte_to_dpcd (regs,DPCD_TRAINING_PATTERN_SET ,DPCD_TRAINING_PATTERN_DISABLED );if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP request_link_training_req failed\n" );
@@ -332,12 +332,12 @@ static unsigned int exynos_dp_training_pattern_dis(struct exynos_dp *dp_regs) }static unsigned int exynos_dp_enable_rx_to_enhanced_mode ( -struct exynos_dp *dp_regs,unsigned char enable) +struct exynos_dp *regs,unsigned char enable) {unsigned char data;unsigned int ret =EXYNOS_DP_SUCCESS ; - ret =exynos_dp_read_byte_from_dpcd (dp_regs,DPCD_LANE_COUNT_SET , + ret =exynos_dp_read_byte_from_dpcd (regs,DPCD_LANE_COUNT_SET , &data);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP read_from_dpcd failed\n" );
@@ -349,7 +349,7 @@ static unsigned int exynos_dp_enable_rx_to_enhanced_mode(else data =DPCD_LN_COUNT_SET (data); - ret =exynos_dp_write_byte_to_dpcd (dp_regs,DPCD_LANE_COUNT_SET , data); + ret =exynos_dp_write_byte_to_dpcd (regs,DPCD_LANE_COUNT_SET , data);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP write_to_dpcd failed\n" );return -EAGAIN ;
@@ -359,24 +359,24 @@ static unsigned int exynos_dp_enable_rx_to_enhanced_mode(return ret; } -static unsigned int exynos_dp_set_enhanced_mode (struct exynos_dp *dp_regs, +static unsigned int exynos_dp_set_enhanced_mode (struct exynos_dp *regs,unsigned char enhance_mode) {unsigned int ret =EXYNOS_DP_SUCCESS ; - ret =exynos_dp_enable_rx_to_enhanced_mode (dp_regs, enhance_mode); + ret =exynos_dp_enable_rx_to_enhanced_mode (regs, enhance_mode);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP rx_enhance_mode failed\n" );return -EAGAIN ; } -exynos_dp_enable_enhanced_mode (dp_regs, enhance_mode); +exynos_dp_enable_enhanced_mode (regs, enhance_mode);return ret; } -static int exynos_dp_read_dpcd_lane_stat (struct exynos_dp *dp_regs, -struct exynos_dp_priv *edp_info, +static int exynos_dp_read_dpcd_lane_stat (struct exynos_dp *regs, +struct exynos_dp_priv *priv,unsigned char *status) {unsigned int ret, i;
@@ -389,14 +389,14 @@ static int exynos_dp_read_dpcd_lane_stat(struct exynos_dp *dp_regs, shift_val[2 ] =0 ; shift_val[3 ] =4 ; - ret =exynos_dp_read_bytes_from_dpcd (dp_regs,DPCD_LANE0_1_STATUS ,2 , + ret =exynos_dp_read_bytes_from_dpcd (regs,DPCD_LANE0_1_STATUS ,2 , buf);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP read lane status failed\n" );return ret; } -for (i =0 ; i < edp_info->lane_cnt; i++) { +for (i =0 ; i < priv->lane_cnt; i++) { lane_stat[i] = (buf[(i /2 )] >> shift_val[i]) &0x0f ;if (lane_stat[0 ] != lane_stat[i]) {printf ("Wrong lane status\n" );
@@ -409,7 +409,7 @@ static int exynos_dp_read_dpcd_lane_stat(struct exynos_dp *dp_regs,return ret; } -static unsigned int exynos_dp_read_dpcd_adj_req (struct exynos_dp *dp_regs, +static unsigned int exynos_dp_read_dpcd_adj_req (struct exynos_dp *regs,unsigned char lane_num,unsigned char *sw,unsigned char *em) {unsigned int ret =EXYNOS_DP_SUCCESS ;
@@ -420,7 +420,7 @@ static unsigned int exynos_dp_read_dpcd_adj_req(struct exynos_dp *dp_regs,/* lane_num value is used as array index, so this range 0 ~ 3 */ dpcd_addr =DPCD_ADJUST_REQUEST_LANE0_1 + (lane_num /2 ); - ret =exynos_dp_read_byte_from_dpcd (dp_regs, dpcd_addr, &buf); + ret =exynos_dp_read_byte_from_dpcd (regs, dpcd_addr, &buf);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP read adjust request failed\n" );return -EAGAIN ;
@@ -432,53 +432,53 @@ static unsigned int exynos_dp_read_dpcd_adj_req(struct exynos_dp *dp_regs,return ret; } -static int exynos_dp_equalizer_err_link (struct exynos_dp *dp_regs, -struct exynos_dp_priv *edp_info) +static int exynos_dp_equalizer_err_link (struct exynos_dp *regs, +struct exynos_dp_priv *priv) {int ret; - ret =exynos_dp_training_pattern_dis (dp_regs); + ret =exynos_dp_training_pattern_dis (regs);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP training_pattern_disable() failed\n" ); - edp_info->lt_info.lt_status =DP_LT_FAIL ; + priv->lt_info.lt_status =DP_LT_FAIL ; } - ret =exynos_dp_set_enhanced_mode (dp_regs, edp_info->dpcd_efc); + ret =exynos_dp_set_enhanced_mode (regs, priv->dpcd_efc);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP set_enhanced_mode() failed\n" ); - edp_info->lt_info.lt_status =DP_LT_FAIL ; + priv->lt_info.lt_status =DP_LT_FAIL ; }return ret; } -static int exynos_dp_reduce_link_rate (struct exynos_dp *dp_regs, -struct exynos_dp_priv *edp_info) +static int exynos_dp_reduce_link_rate (struct exynos_dp *regs, +struct exynos_dp_priv *priv) {int ret; -if (edp_info->lane_bw ==DP_LANE_BW_2_70 ) { - edp_info->lane_bw =DP_LANE_BW_1_62 ; +if (priv->lane_bw ==DP_LANE_BW_2_70 ) { + priv->lane_bw =DP_LANE_BW_1_62 ;printf ("DP Change lane bw to 1.62Gbps\n" ); - edp_info->lt_info.lt_status =DP_LT_START ; + priv->lt_info.lt_status =DP_LT_START ; ret =EXYNOS_DP_SUCCESS ; }else { - ret =exynos_dp_training_pattern_dis (dp_regs); + ret =exynos_dp_training_pattern_dis (regs);if (ret !=EXYNOS_DP_SUCCESS )printf ("DP training_patter_disable() failed\n" ); - ret =exynos_dp_set_enhanced_mode (dp_regs, edp_info->dpcd_efc); + ret =exynos_dp_set_enhanced_mode (regs, priv->dpcd_efc);if (ret !=EXYNOS_DP_SUCCESS )printf ("DP set_enhanced_mode() failed\n" ); - edp_info->lt_info.lt_status =DP_LT_FAIL ; + priv->lt_info.lt_status =DP_LT_FAIL ; }return ret; } -static unsigned int exynos_dp_process_clock_recovery (struct exynos_dp *dp_regs, -struct exynos_dp_priv *edp_info) +static unsigned int exynos_dp_process_clock_recovery (struct exynos_dp *regs, +struct exynos_dp_priv *priv) {unsigned int ret =EXYNOS_DP_SUCCESS ;unsigned char lane_stat;
@@ -491,22 +491,22 @@ static unsigned int exynos_dp_process_clock_recovery(struct exynos_dp *dp_regs,debug ("DP: %s was called\n" , __func__);mdelay (1 ); - ret =exynos_dp_read_dpcd_lane_stat (dp_regs, edp_info, &lane_stat); + ret =exynos_dp_read_dpcd_lane_stat (regs, priv, &lane_stat);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP read lane status failed\n" ); - edp_info->lt_info.lt_status =DP_LT_FAIL ; + priv->lt_info.lt_status =DP_LT_FAIL ;return ret; }if (lane_stat &DP_LANE_STAT_CR_DONE ) {debug ("DP clock Recovery training succeed\n" ); -exynos_dp_set_training_pattern (dp_regs,TRAINING_PTN2 ); +exynos_dp_set_training_pattern (regs,TRAINING_PTN2 ); -for (i =0 ; i < edp_info->lane_cnt; i++) { - ret =exynos_dp_read_dpcd_adj_req (dp_regs, i, +for (i =0 ; i < priv->lane_cnt; i++) { + ret =exynos_dp_read_dpcd_adj_req (regs, i, &adj_req_sw, &adj_req_em);if (ret !=EXYNOS_DP_SUCCESS ) { - edp_info->lt_info.lt_status =DP_LT_FAIL ; + priv->lt_info.lt_status =DP_LT_FAIL ;return ret; }
@@ -518,7 +518,7 @@ static unsigned int exynos_dp_process_clock_recovery(struct exynos_dp *dp_regs, lt_ctl_val[i] |=MAX_DRIVE_CURRENT_REACH_3 |MAX_PRE_EMPHASIS_REACH_3 ; } -exynos_dp_set_lanex_pre_emphasis (dp_regs, +exynos_dp_set_lanex_pre_emphasis (regs, lt_ctl_val[i], i); }
@@ -528,39 +528,39 @@ static unsigned int exynos_dp_process_clock_recovery(struct exynos_dp *dp_regs, buf[3 ] = lt_ctl_val[2 ]; buf[4 ] = lt_ctl_val[3 ]; - ret =exynos_dp_write_bytes_to_dpcd (dp_regs, + ret =exynos_dp_write_bytes_to_dpcd (regs,DPCD_TRAINING_PATTERN_SET ,5 , buf);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP write training pattern1 failed\n" ); - edp_info->lt_info.lt_status =DP_LT_FAIL ; + priv->lt_info.lt_status =DP_LT_FAIL ;return ret; }else - edp_info->lt_info.lt_status =DP_LT_ET ; + priv->lt_info.lt_status =DP_LT_ET ; }else { -for (i =0 ; i < edp_info->lane_cnt; i++) { +for (i =0 ; i < priv->lane_cnt; i++) { lt_ctl_val[i] =exynos_dp_get_lanex_pre_emphasis ( - dp_regs, i); - ret =exynos_dp_read_dpcd_adj_req (dp_regs, i, + regs, i); + ret =exynos_dp_read_dpcd_adj_req (regs, i, &adj_req_sw, &adj_req_em);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP read adj req failed\n" ); - edp_info->lt_info.lt_status =DP_LT_FAIL ; + priv->lt_info.lt_status =DP_LT_FAIL ;return ret; }if ((adj_req_sw ==VOLTAGE_LEVEL_3 ) || (adj_req_em ==PRE_EMPHASIS_LEVEL_3 )) - ret =exynos_dp_reduce_link_rate (dp_regs, - edp_info); + ret =exynos_dp_reduce_link_rate (regs, + priv);if ((DRIVE_CURRENT_SET_0_GET (lt_ctl_val[i]) == adj_req_sw) && (PRE_EMPHASIS_SET_0_GET (lt_ctl_val[i]) == adj_req_em)) { - edp_info->lt_info.cr_loop[i]++; -if (edp_info->lt_info.cr_loop[i] ==MAX_CR_LOOP ) + priv->lt_info.cr_loop[i]++; +if (priv->lt_info.cr_loop[i] ==MAX_CR_LOOP ) ret =exynos_dp_reduce_link_rate ( - dp_regs, edp_info); + regs, priv); } lt_ctl_val[i] =0 ;
@@ -571,15 +571,15 @@ static unsigned int exynos_dp_process_clock_recovery(struct exynos_dp *dp_regs, lt_ctl_val[i] |=MAX_DRIVE_CURRENT_REACH_3 |MAX_PRE_EMPHASIS_REACH_3 ; } -exynos_dp_set_lanex_pre_emphasis (dp_regs, +exynos_dp_set_lanex_pre_emphasis (regs, lt_ctl_val[i], i); } - ret =exynos_dp_write_bytes_to_dpcd (dp_regs, + ret =exynos_dp_write_bytes_to_dpcd (regs,DPCD_TRAINING_LANE0_SET ,4 , lt_ctl_val);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP write training pattern2 failed\n" ); - edp_info->lt_info.lt_status =DP_LT_FAIL ; + priv->lt_info.lt_status =DP_LT_FAIL ;return ret; } }
@@ -588,7 +588,7 @@ static unsigned int exynos_dp_process_clock_recovery(struct exynos_dp *dp_regs, }static unsigned int exynos_dp_process_equalizer_training ( -struct exynos_dp *dp_regs,struct exynos_dp_priv *edp_info) +struct exynos_dp *regs,struct exynos_dp_priv *priv) {unsigned int ret =EXYNOS_DP_SUCCESS ;unsigned char lane_stat, adj_req_sw, adj_req_em, i;
@@ -600,33 +600,33 @@ static unsigned int exynos_dp_process_equalizer_training(mdelay (1 ); - ret =exynos_dp_read_dpcd_lane_stat (dp_regs, edp_info, &lane_stat); + ret =exynos_dp_read_dpcd_lane_stat (regs, priv, &lane_stat);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP read lane status failed\n" ); - edp_info->lt_info.lt_status =DP_LT_FAIL ; + priv->lt_info.lt_status =DP_LT_FAIL ;return ret; }debug ("DP lane stat : %x\n" , lane_stat);if (lane_stat &DP_LANE_STAT_CR_DONE ) { - ret =exynos_dp_read_byte_from_dpcd (dp_regs, + ret =exynos_dp_read_byte_from_dpcd (regs,DPCD_LN_ALIGN_UPDATED , &sink_stat);if (ret !=EXYNOS_DP_SUCCESS ) { - edp_info->lt_info.lt_status =DP_LT_FAIL ; + priv->lt_info.lt_status =DP_LT_FAIL ;return ret; } interlane_aligned = (sink_stat &DPCD_INTERLANE_ALIGN_DONE ); -for (i =0 ; i < edp_info->lane_cnt; i++) { - ret =exynos_dp_read_dpcd_adj_req (dp_regs, i, +for (i =0 ; i < priv->lane_cnt; i++) { + ret =exynos_dp_read_dpcd_adj_req (regs, i, &adj_req_sw, &adj_req_em);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP read adj req 1 failed\n" ); - edp_info->lt_info.lt_status =DP_LT_FAIL ; + priv->lt_info.lt_status =DP_LT_FAIL ;return ret; }
@@ -646,91 +646,91 @@ static unsigned int exynos_dp_process_equalizer_training( && (interlane_aligned == DPCD_INTERLANE_ALIGN_DONE)) {debug ("DP Equalizer training succeed\n" ); - f_bw =exynos_dp_get_link_bandwidth (dp_regs); - f_lane_cnt =exynos_dp_get_lane_count (dp_regs); + f_bw =exynos_dp_get_link_bandwidth (regs); + f_lane_cnt =exynos_dp_get_lane_count (regs);debug ("DP final BandWidth : %x\n" , f_bw);debug ("DP final Lane Count : %x\n" , f_lane_cnt); - edp_info->lt_info.lt_status =DP_LT_FINISHED ; + priv->lt_info.lt_status =DP_LT_FINISHED ; -exynos_dp_equalizer_err_link (dp_regs, edp_info); +exynos_dp_equalizer_err_link (regs, priv); } else { - edp_info->lt_info.ep_loop++; + priv->lt_info.ep_loop++; -if (edp_info->lt_info.ep_loop >MAX_EQ_LOOP ) { -if (edp_info->lane_bw ==DP_LANE_BW_2_70 ) { +if (priv->lt_info.ep_loop >MAX_EQ_LOOP ) { +if (priv->lane_bw ==DP_LANE_BW_2_70 ) { ret =exynos_dp_reduce_link_rate ( - dp_regs, edp_info); + regs, priv); }else { - edp_info->lt_info.lt_status = + priv->lt_info.lt_status =DP_LT_FAIL ; -exynos_dp_equalizer_err_link (dp_regs, - edp_info); +exynos_dp_equalizer_err_link (regs, + priv); } }else { -for (i =0 ; i < edp_info->lane_cnt; i++) +for (i =0 ; i < priv->lane_cnt; i++)exynos_dp_set_lanex_pre_emphasis ( - dp_regs, lt_ctl_val[i], i); + regs, lt_ctl_val[i], i); - ret =exynos_dp_write_bytes_to_dpcd (dp_regs, + ret =exynos_dp_write_bytes_to_dpcd (regs,DPCD_TRAINING_LANE0_SET ,4 , lt_ctl_val);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP set lt pattern failed\n" ); - edp_info->lt_info.lt_status = + priv->lt_info.lt_status =DP_LT_FAIL ; -exynos_dp_equalizer_err_link (dp_regs, - edp_info); +exynos_dp_equalizer_err_link (regs, + priv); } } } - }else if (edp_info->lane_bw ==DP_LANE_BW_2_70 ) { - ret =exynos_dp_reduce_link_rate (dp_regs, edp_info); + }else if (priv->lane_bw ==DP_LANE_BW_2_70 ) { + ret =exynos_dp_reduce_link_rate (regs, priv); }else { - edp_info->lt_info.lt_status =DP_LT_FAIL ; -exynos_dp_equalizer_err_link (dp_regs, edp_info); + priv->lt_info.lt_status =DP_LT_FAIL ; +exynos_dp_equalizer_err_link (regs, priv); }return ret; } -static unsigned int exynos_dp_sw_link_training (struct exynos_dp *dp_regs, -struct exynos_dp_priv *edp_info) +static unsigned int exynos_dp_sw_link_training (struct exynos_dp *regs, +struct exynos_dp_priv *priv) {unsigned int ret =0 ;int training_finished;/* Turn off unnecessary lane */ -if (edp_info->lane_cnt ==1 ) -exynos_dp_set_analog_power_down (dp_regs,CH1_BLOCK ,1 ); +if (priv->lane_cnt ==1 ) +exynos_dp_set_analog_power_down (regs,CH1_BLOCK ,1 ); training_finished =0 ; - edp_info->lt_info.lt_status =DP_LT_START ; + priv->lt_info.lt_status =DP_LT_START ;/* Process here */ while (!training_finished) { -switch (edp_info->lt_info.lt_status) { +switch (priv->lt_info.lt_status) {case DP_LT_START : - ret =exynos_dp_link_start (dp_regs, edp_info); + ret =exynos_dp_link_start (regs, priv);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP LT:link start failed\n" );return ret; }break ;case DP_LT_CR : - ret =exynos_dp_process_clock_recovery (dp_regs, - edp_info); + ret =exynos_dp_process_clock_recovery (regs, + priv);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP LT:clock recovery failed\n" );return ret; }break ;case DP_LT_ET : - ret =exynos_dp_process_equalizer_training (dp_regs, - edp_info); + ret =exynos_dp_process_equalizer_training (regs, + priv);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP LT:equalizer training failed\n" );return ret;
@@ -747,75 +747,75 @@ static unsigned int exynos_dp_sw_link_training(struct exynos_dp *dp_regs,return ret; } -static unsigned int exynos_dp_set_link_train (struct exynos_dp *dp_regs, -struct exynos_dp_priv *edp_info) +static unsigned int exynos_dp_set_link_train (struct exynos_dp *regs, +struct exynos_dp_priv *priv) {unsigned int ret; -exynos_dp_init_training (dp_regs); +exynos_dp_init_training (regs); - ret =exynos_dp_sw_link_training (dp_regs, edp_info); + ret =exynos_dp_sw_link_training (regs, priv);if (ret !=EXYNOS_DP_SUCCESS )printf ("DP dp_sw_link_training() failed\n" );return ret; } -static void exynos_dp_enable_scramble (struct exynos_dp *dp_regs, +static void exynos_dp_enable_scramble (struct exynos_dp *regs,unsigned int enable) {unsigned char data;if (enable) { -exynos_dp_enable_scrambling (dp_regs,DP_ENABLE ); +exynos_dp_enable_scrambling (regs,DP_ENABLE ); -exynos_dp_read_byte_from_dpcd (dp_regs, +exynos_dp_read_byte_from_dpcd (regs,DPCD_TRAINING_PATTERN_SET , &data); -exynos_dp_write_byte_to_dpcd (dp_regs,DPCD_TRAINING_PATTERN_SET , +exynos_dp_write_byte_to_dpcd (regs,DPCD_TRAINING_PATTERN_SET , (u8)(data & ~DPCD_SCRAMBLING_DISABLED )); }else { -exynos_dp_enable_scrambling (dp_regs,DP_DISABLE ); -exynos_dp_read_byte_from_dpcd (dp_regs, +exynos_dp_enable_scrambling (regs,DP_DISABLE ); +exynos_dp_read_byte_from_dpcd (regs,DPCD_TRAINING_PATTERN_SET , &data); -exynos_dp_write_byte_to_dpcd (dp_regs,DPCD_TRAINING_PATTERN_SET , +exynos_dp_write_byte_to_dpcd (regs,DPCD_TRAINING_PATTERN_SET , (u8)(data |DPCD_SCRAMBLING_DISABLED )); } } -static unsigned int exynos_dp_config_video (struct exynos_dp *dp_regs, -struct exynos_dp_priv *edp_info) +static unsigned int exynos_dp_config_video (struct exynos_dp *regs, +struct exynos_dp_priv *priv) {unsigned int ret =0 ;unsigned int retry_cnt;mdelay (1 ); -if (edp_info->video_info.master_mode) { +if (priv->video_info.master_mode) {printf ("DP does not support master mode\n" );return -ENODEV ; }else {/* debug slave */ -exynos_dp_config_video_slave_mode (dp_regs, - &edp_info->video_info); +exynos_dp_config_video_slave_mode (regs, + &priv->video_info); } -exynos_dp_set_video_color_format (dp_regs, &edp_info->video_info); +exynos_dp_set_video_color_format (regs, &priv->video_info); -if (edp_info->video_info.bist_mode) { -if (exynos_dp_config_video_bist (dp_regs, edp_info) !=0 ) +if (priv->video_info.bist_mode) { +if (exynos_dp_config_video_bist (regs, priv) !=0 )return -1 ; } - ret =exynos_dp_get_pll_lock_status (dp_regs); + ret =exynos_dp_get_pll_lock_status (regs);if (ret !=PLL_LOCKED ) {printf ("DP PLL is not locked yet\n" );return -EIO ; } -if (edp_info->video_info.master_mode ==0 ) { +if (priv->video_info.master_mode ==0 ) { retry_cnt =10 ;while (retry_cnt) { - ret =exynos_dp_is_slave_video_stream_clock_on (dp_regs); + ret =exynos_dp_is_slave_video_stream_clock_on (regs);if (ret !=EXYNOS_DP_SUCCESS ) {if (retry_cnt ==0 ) {printf ("DP stream_clock_on failed\n" );
@@ -829,34 +829,34 @@ static unsigned int exynos_dp_config_video(struct exynos_dp *dp_regs, }/* Set to use the register calculated M/N video */ -exynos_dp_set_video_cr_mn (dp_regs,CALCULATED_M ,0 ,0 ); +exynos_dp_set_video_cr_mn (regs,CALCULATED_M ,0 ,0 );/* For video bist, Video timing must be generated by register */ -exynos_dp_set_video_timing_mode (dp_regs,VIDEO_TIMING_FROM_CAPTURE ); +exynos_dp_set_video_timing_mode (regs,VIDEO_TIMING_FROM_CAPTURE );/* Enable video bist */ -if (edp_info->video_info.bist_pattern !=COLOR_RAMP && - edp_info->video_info.bist_pattern !=BALCK_WHITE_V_LINES && - edp_info->video_info.bist_pattern !=COLOR_SQUARE ) -exynos_dp_enable_video_bist (dp_regs, - edp_info->video_info.bist_mode); +if (priv->video_info.bist_pattern !=COLOR_RAMP && + priv->video_info.bist_pattern !=BALCK_WHITE_V_LINES && + priv->video_info.bist_pattern !=COLOR_SQUARE ) +exynos_dp_enable_video_bist (regs, + priv->video_info.bist_mode);else -exynos_dp_enable_video_bist (dp_regs,DP_DISABLE ); +exynos_dp_enable_video_bist (regs,DP_DISABLE );/* Disable video mute */ -exynos_dp_enable_video_mute (dp_regs,DP_DISABLE ); +exynos_dp_enable_video_mute (regs,DP_DISABLE );/* Configure video Master or Slave mode */ -exynos_dp_enable_video_master (dp_regs, - edp_info->video_info.master_mode); +exynos_dp_enable_video_master (regs, + priv->video_info.master_mode);/* Enable video */ -exynos_dp_start_video (dp_regs); +exynos_dp_start_video (regs); -if (edp_info->video_info.master_mode ==0 ) { +if (priv->video_info.master_mode ==0 ) { retry_cnt =100 ;while (retry_cnt) { - ret =exynos_dp_is_video_stream_on (dp_regs); + ret =exynos_dp_is_video_stream_on (regs);if (ret !=EXYNOS_DP_SUCCESS ) {if (retry_cnt ==0 ) {printf ("DP Timeout of video stream\n" );
@@ -872,7 +872,7 @@ static unsigned int exynos_dp_config_video(struct exynos_dp *dp_regs,return ret; } -int exynos_dp_parse_dt (const void *blob,struct exynos_dp_priv *edp_info) +int exynos_dp_parse_dt (const void *blob,struct exynos_dp_priv *priv) {unsigned int node =fdtdec_next_compatible (blob,0 ,COMPAT_SAMSUNG_EXYNOS5_DP );
@@ -881,47 +881,47 @@ int exynos_dp_parse_dt(const void *blob, struct exynos_dp_priv *edp_info)return -ENODEV ; } - edp_info->disp_info.h_res =fdtdec_get_int (blob, node, + priv->disp_info.h_res =fdtdec_get_int (blob, node,"samsung,h-res" ,0 ); - edp_info->disp_info.h_sync_width =fdtdec_get_int (blob, node, + priv->disp_info.h_sync_width =fdtdec_get_int (blob, node,"samsung,h-sync-width" ,0 ); - edp_info->disp_info.h_back_porch =fdtdec_get_int (blob, node, + priv->disp_info.h_back_porch =fdtdec_get_int (blob, node,"samsung,h-back-porch" ,0 ); - edp_info->disp_info.h_front_porch =fdtdec_get_int (blob, node, + priv->disp_info.h_front_porch =fdtdec_get_int (blob, node,"samsung,h-front-porch" ,0 ); - edp_info->disp_info.v_res =fdtdec_get_int (blob, node, + priv->disp_info.v_res =fdtdec_get_int (blob, node,"samsung,v-res" ,0 ); - edp_info->disp_info.v_sync_width =fdtdec_get_int (blob, node, + priv->disp_info.v_sync_width =fdtdec_get_int (blob, node,"samsung,v-sync-width" ,0 ); - edp_info->disp_info.v_back_porch =fdtdec_get_int (blob, node, + priv->disp_info.v_back_porch =fdtdec_get_int (blob, node,"samsung,v-back-porch" ,0 ); - edp_info->disp_info.v_front_porch =fdtdec_get_int (blob, node, + priv->disp_info.v_front_porch =fdtdec_get_int (blob, node,"samsung,v-front-porch" ,0 ); - edp_info->disp_info.v_sync_rate =fdtdec_get_int (blob, node, + priv->disp_info.v_sync_rate =fdtdec_get_int (blob, node,"samsung,v-sync-rate" ,0 ); - edp_info->lt_info.lt_status =fdtdec_get_int (blob, node, + priv->lt_info.lt_status =fdtdec_get_int (blob, node,"samsung,lt-status" ,0 ); - edp_info->video_info.master_mode =fdtdec_get_int (blob, node, + priv->video_info.master_mode =fdtdec_get_int (blob, node,"samsung,master-mode" ,0 ); - edp_info->video_info.bist_mode =fdtdec_get_int (blob, node, + priv->video_info.bist_mode =fdtdec_get_int (blob, node,"samsung,bist-mode" ,0 ); - edp_info->video_info.bist_pattern =fdtdec_get_int (blob, node, + priv->video_info.bist_pattern =fdtdec_get_int (blob, node,"samsung,bist-pattern" ,0 ); - edp_info->video_info.h_sync_polarity =fdtdec_get_int (blob, node, + priv->video_info.h_sync_polarity =fdtdec_get_int (blob, node,"samsung,h-sync-polarity" ,0 ); - edp_info->video_info.v_sync_polarity =fdtdec_get_int (blob, node, + priv->video_info.v_sync_polarity =fdtdec_get_int (blob, node,"samsung,v-sync-polarity" ,0 ); - edp_info->video_info.interlaced =fdtdec_get_int (blob, node, + priv->video_info.interlaced =fdtdec_get_int (blob, node,"samsung,interlaced" ,0 ); - edp_info->video_info.color_space =fdtdec_get_int (blob, node, + priv->video_info.color_space =fdtdec_get_int (blob, node,"samsung,color-space" ,0 ); - edp_info->video_info.dynamic_range =fdtdec_get_int (blob, node, + priv->video_info.dynamic_range =fdtdec_get_int (blob, node,"samsung,dynamic-range" ,0 ); - edp_info->video_info.ycbcr_coeff =fdtdec_get_int (blob, node, + priv->video_info.ycbcr_coeff =fdtdec_get_int (blob, node,"samsung,ycbcr-coeff" ,0 ); - edp_info->video_info.color_depth =fdtdec_get_int (blob, node, + priv->video_info.color_depth =fdtdec_get_int (blob, node,"samsung,color-depth" ,0 );return 0 ; }
@@ -929,17 +929,17 @@ int exynos_dp_parse_dt(const void *blob, struct exynos_dp_priv *edp_info)unsigned int exynos_init_dp (void ) {unsigned int ret; -struct exynos_dp_priv *edp_info; -struct exynos_dp *dp_regs; +struct exynos_dp_priv *priv; +struct exynos_dp *regs;int node; - edp_info =kzalloc (sizeof (struct exynos_dp_priv ),GFP_KERNEL ); -if (!edp_info) { + priv =kzalloc (sizeof (struct exynos_dp_priv ),GFP_KERNEL ); +if (!priv) {debug ("failed to allocate edp device object.\n" );return -EFAULT ; } -if (exynos_dp_parse_dt (gd->fdt_blob, edp_info)) +if (exynos_dp_parse_dt (gd->fdt_blob, priv))debug ("unable to parse DP DT node\n" ); node = fdtdec_next_compatible(gd->fdt_blob, 0,
@@ -947,42 +947,42 @@ unsigned int exynos_init_dp(void)if (node <=0 )debug ("exynos_dp: Can't get device node for dp\n" ); - dp_regs = (struct exynos_dp *)fdtdec_get_addr (gd->fdt_blob, node, + regs = (struct exynos_dp *)fdtdec_get_addr (gd->fdt_blob, node,"reg" ); -if (dp_regs ==NULL ) +if (regs ==NULL )debug ("Can't get the DP base address\n" ); -exynos_dp_disp_info (&edp_info->disp_info); +exynos_dp_disp_info (&priv->disp_info);exynos_dp_phy_ctrl (1 ); - ret =exynos_dp_init_dp (dp_regs); + ret =exynos_dp_init_dp (regs);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP exynos_dp_init_dp() failed\n" );return ret; } - ret =exynos_dp_handle_edid (dp_regs, edp_info); + ret =exynos_dp_handle_edid (regs, priv);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("EDP handle_edid fail\n" );return ret; } - ret =exynos_dp_set_link_train (dp_regs, edp_info); + ret =exynos_dp_set_link_train (regs, priv);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("DP link training fail\n" );return ret; } -exynos_dp_enable_scramble (dp_regs,DP_ENABLE ); -exynos_dp_enable_rx_to_enhanced_mode (dp_regs,DP_ENABLE ); -exynos_dp_enable_enhanced_mode (dp_regs,DP_ENABLE ); +exynos_dp_enable_scramble (regs,DP_ENABLE ); +exynos_dp_enable_rx_to_enhanced_mode (regs,DP_ENABLE ); +exynos_dp_enable_enhanced_mode (regs,DP_ENABLE ); -exynos_dp_set_link_bandwidth (dp_regs, edp_info->lane_bw); -exynos_dp_set_lane_count (dp_regs, edp_info->lane_cnt); +exynos_dp_set_link_bandwidth (regs, priv->lane_bw); +exynos_dp_set_lane_count (regs, priv->lane_cnt); -exynos_dp_init_video (dp_regs); - ret =exynos_dp_config_video (dp_regs, edp_info); +exynos_dp_init_video (regs); + ret =exynos_dp_config_video (regs, priv);if (ret !=EXYNOS_DP_SUCCESS ) {printf ("Exynos DP init failed\n" );return ret;
drivers/video/exynos/exynos_dp_lowlevel.c +34 -37
83 lines not on this page · raw message
drivers/video/exynos/exynos_dp_lowlevel.h +1 -1
@@ -74,7 +74,7 @@ void exynos_dp_config_video_slave_mode(struct exynos_dp *dp_regs,void exynos_dp_set_video_color_format (struct exynos_dp *dp_regs,struct edp_video_info *video_info);int exynos_dp_config_video_bist (struct exynos_dp *dp_regs, -struct exynos_dp_priv *edp_info); +struct exynos_dp_priv *priv);unsigned int exynos_dp_is_slave_video_stream_clock_on (struct exynos_dp *dp_regs); void exynos_dp_set_video_cr_mn(struct exynos_dp *dp_regs, unsigned int type,
drivers/video/exynos/exynos_fb.c +117 -117
441 lines not on this page · raw message
include/exynos_lcd.h +1 -1
@@ -75,7 +75,7 @@ typedef struct vidinfo {unsigned int sclk_div;unsigned int dual_lcd_enabled; -struct exynos_fb *fimd_ctrl; +struct exynos_fb *reg;struct exynos_platform_mipi_dsim *dsim_platform_data_dt; } vidinfo_t;
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 23/25 exynos: video: Rename variables for driver model
Quoted 3 lines · On Sun, 21 Feb 2016 21:09:00 -0700 Simon Glass sjg at chromium.org wrote:
Use 'priv' for a private pointer and 'regs' for a register pointer.
Signed-off-by Simon Glass <[email protected]>
PATCH v2 24/25 exynos: video: Convert several boards to driver model for video
In reply to Simon GlassUpdate several boards to use driver model for video. This involves changes to the EDP and FIMD (frame buffer) drivers. Existing PWM, simple-panel and pwm-backlight drivers are used. These work without additional configuration since they use the device tree settings in the same way as Linux.
Boards converted are:
- snow
- spring
- peach-pit
- peach-pi
All have been tested. Not converted:
- MIPI display driver
- s5pc210_universal
- smdk5420
- smdk5250
- trats
- trats2
---
Changes in v2: None
arch/arm/mach-exynos/include/mach/dp_info.h | 1 + board/samsung/common/board.c | 15 - configs/peach-pi_defconfig | 4 + configs/peach-pit_defconfig | 4 + configs/snow_defconfig | 4 + configs/spring_defconfig | 4 + drivers/video/exynos/exynos_dp.c | 146 ++++++++-- drivers/video/exynos/exynos_fb.c | 407 ++++++++++++++++------------ drivers/video/simple_panel.c | 2 + include/configs/exynos5-common.h | 1 - include/configs/exynos5-dt-common.h | 5 +- 11 files changed, 377 insertions(+), 216 deletions(-)
arch/arm/mach-exynos/include/mach/dp_info.h +1 -0
@@ -72,6 +72,7 @@ struct exynos_dp_priv {unsigned char dpcd_rev;/*support enhanced frame cap */ unsigned char dpcd_efc; +struct exynos_dp *regs; };enum analog_power_block {
board/samsung/common/board.c +0 -15
@@ -152,21 +152,6 @@ int board_early_init_f(void)board_i2c_init (gd->fdt_blob);#endif -#if defined(CONFIG_EXYNOS_FB ) -/* -* board_init_f(arch/arm/lib/board.c) calls lcd_setmem() which needs -* panel_info.vl_col, panel_info.vl_row and panel_info.vl_bpix, -* to reserve frame-buffer memory at a very early stage. So, we need -* to fill panel_info.vl_col, panel_info.vl_row and panel_info.vl_bpix -* before lcd_setmem() is called. -*/ - err =exynos_lcd_early_init (gd->fdt_blob); -if (err) { -debug ("LCD early init failed\n" ); -return err; - } -#endif - return exynos_early_init_f(); }#endif
configs/peach-pi_defconfig +4 -0
@@ -27,6 +27,8 @@ CONFIG_DM_PMIC=y CONFIG_PMIC_TPS65090=y CONFIG_DM_REGULATOR=y CONFIG_REGULATOR_TPS65090=y +CONFIG_DM_PWM=y +CONFIG_PWM_EXYNOS=y CONFIG_SOUND=y CONFIG_I2S=y CONFIG_I2S_SAMSUNG=y
@@ -36,6 +38,8 @@ CONFIG_EXYNOS_SPI=y CONFIG_TPM_TIS_INFINEON=y CONFIG_USB=y CONFIG_DM_USB=y +CONFIG_DM_VIDEO=y +CONFIG_DISPLAY=y CONFIG_VIDEO_BRIDGE=y CONFIG_VIDEO_BRIDGE_PARADE_PS862X=y CONFIG_TPM=y
configs/peach-pit_defconfig +4 -0
@@ -27,6 +27,8 @@ CONFIG_DM_PMIC=y CONFIG_PMIC_TPS65090=y CONFIG_DM_REGULATOR=y CONFIG_REGULATOR_TPS65090=y +CONFIG_DM_PWM=y +CONFIG_PWM_EXYNOS=y CONFIG_SOUND=y CONFIG_I2S=y CONFIG_I2S_SAMSUNG=y
@@ -36,6 +38,8 @@ CONFIG_EXYNOS_SPI=y CONFIG_TPM_TIS_INFINEON=y CONFIG_USB=y CONFIG_DM_USB=y +CONFIG_DM_VIDEO=y +CONFIG_DISPLAY=y CONFIG_VIDEO_BRIDGE=y CONFIG_VIDEO_BRIDGE_PARADE_PS862X=y CONFIG_TPM=y
configs/snow_defconfig +4 -0
@@ -32,6 +32,8 @@ CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_MAX77686=y CONFIG_REGULATOR_S5M8767=y CONFIG_REGULATOR_TPS65090=y +CONFIG_DM_PWM=y +CONFIG_PWM_EXYNOS=y CONFIG_DEBUG_UART=y CONFIG_DEBUG_UART_S5P=y CONFIG_DEBUG_UART_BASE=0x12c30000
@@ -45,6 +47,8 @@ CONFIG_EXYNOS_SPI=y CONFIG_TPM_TIS_INFINEON=y CONFIG_USB=y CONFIG_DM_USB=y +CONFIG_DM_VIDEO=y +CONFIG_DISPLAY=y CONFIG_VIDEO_BRIDGE=y CONFIG_VIDEO_BRIDGE_PARADE_PS862X=y CONFIG_VIDEO_BRIDGE_NXP_PTN3460=y
configs/spring_defconfig +4 -0
@@ -32,6 +32,8 @@ CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_MAX77686=y CONFIG_REGULATOR_S5M8767=y CONFIG_REGULATOR_TPS65090=y +CONFIG_DM_PWM=y +CONFIG_PWM_EXYNOS=y CONFIG_DEBUG_UART=y CONFIG_DEBUG_UART_S5P=y CONFIG_DEBUG_UART_BASE=0x12c30000
@@ -45,6 +47,8 @@ CONFIG_EXYNOS_SPI=y CONFIG_TPM_TIS_INFINEON=y CONFIG_USB=y CONFIG_DM_USB=y +CONFIG_DM_VIDEO=y +CONFIG_DISPLAY=y CONFIG_VIDEO_BRIDGE=y CONFIG_VIDEO_BRIDGE_PARADE_PS862X=y CONFIG_TPM=y
drivers/video/exynos/exynos_dp.c +118 -28
187 lines not on this page · raw message
drivers/video/exynos/exynos_fb.c +237 -170
627 lines not on this page · raw message
drivers/video/simple_panel.c +2 -0
@@ -86,6 +86,8 @@ static const struct panel_ops simple_panel_ops = {static const struct udevice_id simple_panel_ids[] = { { .compatible ="simple-panel" }, { .compatible ="auo,b133xtn01" }, + { .compatible ="auo,b116xw03" }, + { .compatible ="auo,b133htn01" }, { } };
include/configs/exynos5-common.h +0 -1
@@ -125,7 +125,6 @@#define CONFIG_SYS_I2C_S3C24X0 #define CONFIG_SYS_I2C_S3C24X0_SPEED 100000/* 100 Kbps */ #define CONFIG_SYS_I2C_S3C24X0_SLAVE 0x0 -#define CONFIG_I2C_EDID /* SPI */ #ifdef CONFIG_SPI_FLASH
include/configs/exynos5-dt-common.h +3 -2
@@ -13,8 +13,8 @@#undef EXYNOS_DEVICE_SETTINGS#define EXYNOS_DEVICE_SETTINGS \ "stdin=serial,cros-ec-keyb\0" \ - "stdout=serial,lcd\0" \ - "stderr=serial,lcd\0" + "stdout=serial,vidconsole\0" \ + "stderr=serial,vidconsole\0"#define CONFIG_EXYNOS5_DT
@@ -32,6 +32,7 @@#define CONFIG_EXYNOS_FB #define CONFIG_EXYNOS_DP #define LCD_BPP LCD_COLOR16 +#define CONFIG_SYS_WHITE_ON_BLACK #endif /* Enable keyboard */
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 24/25 exynos: video: Convert several boards to driver model for video
Quoted 13 lines · On Sun, 21 Feb 2016 21:09:01 -0700 Simon Glass sjg at chromium.org wrote:
Update several boards to use driver model for video. This involves changes to the EDP and FIMD (frame buffer) drivers. Existing PWM, simple-panel and pwm-backlight drivers are used. These work without additional configuration since they use the device tree settings in the same way as Linux.
Boards converted are:
- snow
- spring
- peach-pit
- peach-piAll have been tested. Not converted:
Quoted 8 lines
- MIPI display driver
-s5pc210_universal
- smdk5420
- smdk5250
- trats
- trats2Signed-off-by Simon Glass <[email protected]>
PATCH v2 25/25 exynos: video: Drop old unused code
In reply to Simon GlassNow that we are using driver model, we can drop the weak functions and LCD init in the board file.
---
Changes in v2:
- Rebase to master
board/samsung/common/exynos5-dt.c | 153 -------------------------------------- drivers/video/exynos/exynos_fb.c | 33 -------- drivers/video/exynos/exynos_fb.h | 41 ---------- 3 files changed, 227 deletions(-) delete mode 100644 drivers/video/exynos/exynos_fb.h
board/samsung/common/exynos5-dt.c +0 -153
@@ -147,159 +147,6 @@ int board_get_revision(void)return 0 ; } -#ifdef CONFIG_LCD - -static int board_dp_bridge_init (struct udevice *dev) -{ -const int max_tries =10 ; -int num_tries; -int ret; - -debug ("%s\n" , __func__); - ret =video_bridge_attach (dev); -if (ret) { -debug ("video bridge init failed: %d\n" , ret); -return ret; - } - -/* -* We need to wait for 90ms after bringing up the bridge since there -* is a phantom "high" on the HPD chip during its bootup. The phantom -* high comes within 7ms of de-asserting PD and persists for at least -* 15ms. The real high comes roughly 50ms after PD is de-asserted. The -* phantom high makes it hard for us to know when the NXP chip is up. -*/ -mdelay (90 ); - -for (num_tries =0 ; num_tries < max_tries; num_tries++) { -/* Check HPD. If it's high, or we don't have it, all is well */ - ret =video_bridge_check_attached (dev); -if (!ret || ret == -ENOENT ) -return 0 ; - -debug ("%s: eDP bridge failed to come up; try %d of %d\n" , - __func__, num_tries, max_tries); - } - -/* Immediately go into bridge reset if the hp line is not high */ -return -EIO ; -} - -static int board_dp_bridge_setup (const void *blob) -{ -const int max_tries =2 ; -int num_tries; -struct udevice *dev; -int ret; - -/* Configure I2C registers for Parade bridge */ - ret =uclass_get_device (UCLASS_VIDEO_BRIDGE ,0 , &dev); -if (ret) { -debug ("video bridge init failed: %d\n" , ret); -return ret; - } - -if (strncmp (dev->driver->name,"parade" ,6 )) { -/* Mux HPHPD to the special hotplug detect mode */ -exynos_pinmux_config (PERIPH_ID_DPHPD ,0 ); - } - -for (num_tries =0 ; num_tries < max_tries; num_tries++) { - ret =board_dp_bridge_init (dev); -if (!ret) -return 0 ; -if (num_tries == max_tries -1 ) -break ; - -/* -* If we're here, the bridge chip failed to initialise. -* Power down the bridge in an attempt to reset. -*/ -video_bridge_set_active (dev, false); - -/* -* Arbitrarily wait 300ms here with DP_N low. Don't know for -* sure how long we should wait, but we're being paranoid. -*/ -mdelay (300 ); - } - -return ret; -} - -void exynos_cfg_lcd_gpio (void ) -{ -/* For Backlight */ -gpio_request (EXYNOS5_GPIO_B20 ,"lcd_backlight" ); -gpio_cfg_pin (EXYNOS5_GPIO_B20 ,S5P_GPIO_OUTPUT ); -gpio_set_value (EXYNOS5_GPIO_B20 ,1 ); -} - -static int board_dp_set_backlight (int percent) -{ -struct udevice *dev; -int ret; - - ret =uclass_get_device (UCLASS_VIDEO_BRIDGE ,0 , &dev); -if (!ret) - ret =video_bridge_set_backlight (dev, percent); - -return ret; -} - -void exynos_backlight_on (unsigned int on) -{ -struct udevice *dev; -int ret; - -debug ("%s(%u)\n" , __func__, on); -if (!on) -return ; - - ret =regulator_get_by_platname ("vcd_led" , &dev); -if (!ret) - ret =regulator_set_enable (dev, true); -if (ret) -debug ("Failed to enable backlight: ret=%d\n" , ret); - -/* T5 in the LCD timing spec (defined as > 10ms) */ -mdelay (10 ); - -/* board_dp_backlight_pwm */ -gpio_direction_output (EXYNOS5_GPIO_B20 ,1 ); - -/* T6 in the LCD timing spec (defined as > 10ms) */ -mdelay (10 ); - -/* try to set the backlight in the bridge registers */ - ret =board_dp_set_backlight (80 ); - -/* if we have no bridge or it does not support backlight, use a GPIO */ -if (ret == -ENODEV || ret == -ENOSYS ) { -gpio_request (EXYNOS5_GPIO_X30 ,"board_dp_backlight_en" ); -gpio_direction_output (EXYNOS5_GPIO_X30 ,1 ); - } -} - -void exynos_lcd_power_on (void ) -{ -struct udevice *dev; -int ret; - -debug ("%s\n" , __func__); - ret =regulator_get_by_platname ("lcd_vdd" , &dev); -if (!ret) - ret =regulator_set_enable (dev, true); -if (ret) -debug ("Failed to enable LCD panel: ret=%d\n" , ret); - - ret =board_dp_bridge_setup (gd->fdt_blob); -if (ret && ret != -ENODEV ) -printf ("LCD bridge failed to enable: %d\n" , ret); -} - -#endif -#ifdef CONFIG_USB_DWC3 static struct dwc3_device dwc3_device_data = { .maximum_speed = USB_SPEED_SUPER,
drivers/video/exynos/exynos_fb.c +0 -33
@@ -479,39 +479,6 @@ unsigned long exynos_fimd_calc_fbsize(struct exynos_fb_priv *priv)return priv->vl_col * priv->vl_row * (VNBITS (priv->vl_bpix) /8 ); } -__weak void exynos_cfg_lcd_gpio (void ) -{ -} - -__weak void exynos_backlight_on (unsigned int onoff) -{ -} - -__weak void exynos_reset_lcd (void ) -{ -} - -__weak void exynos_lcd_power_on (void ) -{ -} - -__weak void exynos_cfg_ldo (void ) -{ -} - -__weak void exynos_enable_ldo (unsigned int onoff) -{ -} - -__weak void exynos_backlight_reset (void ) -{ -} - -__weak int exynos_lcd_misc_init (struct vidinfo *vid) -{ -return 0 ; -} -int exynos_fb_ofdata_to_platdata (struct udevice *dev) {struct exynos_fb_priv *priv =dev_get_priv (dev);
drivers/video/exynos/exynos_fb.h deleted +0 -41
41 lines not on this page · raw message
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH v2 25/25 exynos: video: Drop old unused code
Quoted 4 lines · On Sun, 21 Feb 2016 21:09:02 -0700 Simon Glass sjg at chromium.org wrote:
Now that we are using driver model, we can drop the weak functions and LCD init in the board file.
Signed-off-by Simon Glass <[email protected]>
v2 cover exynos: video: Convert exynos LCD driver to use driver model
In reply to Simon GlassHi Minkyu,
Quoted 18 lines · Simon Glass
This series converts the exynos LCD driver to work with driver model. Only the eDP display is converted - the MIPI display is left mostly alone as I do not have a device to test with.
The conversion involves some refactoring to simplify the code, reduce the amount of global/static data and allow boards to be built without LCD support.
The series is tested with snow, spring, pit and pi. It disables LCD on other exynos boards so that they will still build with these changes. Further work will be needed (by someone with a board) to convert the others. I am not sure when this series can be applied.
The series also brings in device tree features from Linux v4.4. It would be useful to do a full sync with the kernel on these files, but this is really a job for the Samsung maintainer :-)
Quoted 6 lines
The series is available at u-boot-dm/rkg-working.
Changes in v2:
- Rebase to master
- Rebase to master
What do you think we should do about applying this series?
Quoted 104 lines
Simon Glass (25):
exynos: video: Move driver files into their own directory
exynos: video: Drop dead code
exynos: video: Remove use ofvidinfo_ttypedef
exynos: video: Drop the staticlcd_base_addrvariable
exynos: video: Drop static variables inexynos_fimd.c
exynos: video: Drop static variables inexynos_fb.c
exynos: video: Drop static variables inexynos_dp_lowlevel.c
exynos: video: Movedsim_config_dtinto a function
exynos: video: Move structexynos_platform_mipi_dsiminto vidinfo
exynos: video: Movemipi_lcd_device_dtinto a function
exynos: video: Combine LCD driver into one file
exynos: pwm: Add a driver for the exynos5 PWM
video: Add an enum for active low/high
exynos: dts: Add pwm device tree node
exynos: Allow tizen to be built without an LCD
exynos: AllowCONFIG_MISC_COMMONto be build without an LCD
exynos: Disable LCD display for boards we can't convert
dts: Add clock and regulator binding files for max77802
exynos: Allow PWM0 pinmux to be set up
exynos: Simplify calling ofexynos_dp_phy_ctrl()
exynos: dts: Add display-related device tree fragments
exynos: video: Renameedp_device_infotoexynos_dp_priv
exynos: video: Rename variables for driver model
exynos: video: Convert several boards to driver model for video
exynos: video: Drop old unused codearch/arm/cpu/armv7/s5p-common/timer.c | 3 + arch/arm/dts/exynos5.dtsi | 3 +- arch/arm/dts/exynos5250-snow.dts | 44 ++ arch/arm/dts/exynos5250-spring.dts | 53 ++ arch/arm/dts/exynos5250.dtsi | 7 + arch/arm/dts/exynos5420-peach-pit.dts | 55 ++ arch/arm/dts/exynos54xx.dtsi | 11 +- arch/arm/dts/exynos5800-peach-pi.dts | 40 ++ arch/arm/mach-exynos/include/mach/cpu.h | 2 - arch/arm/mach-exynos/include/mach/dp_info.h | 5 +- arch/arm/mach-exynos/include/mach/mipi_dsim.h | 10 +- arch/arm/mach-exynos/include/mach/power.h | 2 +- arch/arm/mach-exynos/pinmux.c | 6 + arch/arm/mach-exynos/power.c | 2 +- board/samsung/common/board.c | 15 - board/samsung/common/exynos5-dt.c | 158 ----- board/samsung/common/misc.c | 10 + board/samsung/trats/trats.c | 2 + board/samsung/universal_c210/universal.c | 2 + configs/peach-pi_defconfig | 4 + configs/peach-pit_defconfig | 4 + configs/snow_defconfig | 4 + configs/spring_defconfig | 4 + drivers/pwm/Kconfig | 9 + drivers/pwm/Makefile | 1 + drivers/pwm/exynos_pwm.c | 120 ++++ drivers/video/Makefile | 6 +- drivers/video/exynos/Makefile | 12 + drivers/video/{ => exynos}/exynos_dp.c | 599 ++++++++++------- drivers/video/{ => exynos}/exynos_dp_lowlevel.c | 268 ++++---- drivers/video/exynos/exynos_dp_lowlevel.h | 89 +++ drivers/video/exynos/exynos_fb.c | 720 +++++++++++++++++++++ drivers/video/{ => exynos}/exynos_mipi_dsi.c | 71 +- .../video/{ => exynos}/exynos_mipi_dsi_common.c | 6 +- .../video/{ => exynos}/exynos_mipi_dsi_common.h | 0 .../video/{ => exynos}/exynos_mipi_dsi_lowlevel.c | 0 .../video/{ => exynos}/exynos_mipi_dsi_lowlevel.h | 0 drivers/video/{ => exynos}/exynos_pwm_bl.c | 0 drivers/video/exynos_dp_lowlevel.h | 68 -- drivers/video/exynos_fb.c | 330 ---------- drivers/video/exynos_fb.h | 41 -- drivers/video/exynos_fimd.c | 409 ------------ drivers/video/s6e8ax0.c | 4 +- drivers/video/simple_panel.c | 2 + include/configs/exynos5-common.h | 1 - include/configs/exynos5-dt-common.h | 5 +- include/configs/s5pc210_universal.h | 3 - include/configs/smdk5250.h | 3 + include/configs/smdk5420.h | 4 + include/configs/trats.h | 4 - include/configs/trats2.h | 4 - include/dt-bindings/clock/maxim,max77802.h | 22 + include/dt-bindings/regulator/maxim,max77802.h | 18 + include/exynos_lcd.h | 4 +- include/libtizen.h | 2 + include/video.h | 5 + lib/tizen/tizen.c | 2 + 57 files changed, 1804 insertions(+), 1474 deletions(-) create mode 100644 drivers/pwm/exynos_pwm.c create mode 100644 drivers/video/exynos/Makefile rename drivers/video/{ => exynos}/exynos_dp.c (50%) rename drivers/video/{ => exynos}/exynos_dp_lowlevel.c (77%) create mode 100644 drivers/video/exynos/exynos_dp_lowlevel.h create mode 100644 drivers/video/exynos/exynos_fb.c rename drivers/video/{ => exynos}/exynos_mipi_dsi.c (80%) rename drivers/video/{ => exynos}/exynos_mipi_dsi_common.c (99%) rename drivers/video/{ => exynos}/exynos_mipi_dsi_common.h (100%) rename drivers/video/{ => exynos}/exynos_mipi_dsi_lowlevel.c (100%) rename drivers/video/{ => exynos}/exynos_mipi_dsi_lowlevel.h (100%) rename drivers/video/{ => exynos}/exynos_pwm_bl.c (100%) delete mode 100644 drivers/video/exynos_dp_lowlevel.h delete mode 100644 drivers/video/exynos_fb.c delete mode 100644 drivers/video/exynos_fb.h delete mode 100644 drivers/video/exynos_fimd.c create mode 100644 include/dt-bindings/clock/maxim,max77802.h create mode 100644 include/dt-bindings/regulator/maxim,max77802.h
Quoted 3 lines
--
2.7.0.rc3.207.g0ac5344
Regards,
Simon
v2 cover exynos: video: Convert exynos LCD driver to use driver model
Dear Simon Glass,
Quoted 21 lines · Simon Glass
Hi Minkyu,
Quoted 18 lines · Simon Glass
This series converts the exynos LCD driver to work with driver model. Only the eDP display is converted - the MIPI display is left mostly alone as I do not have a device to test with.
The conversion involves some refactoring to simplify the code, reduce the amount of global/static data and allow boards to be built without LCD support.
The series is tested with snow, spring, pit and pi. It disables LCD on other exynos boards so that they will still build with these changes. Further work will be needed (by someone with a board) to convert the others. I am not sure when this series can be applied.
The series also brings in device tree features from Linux v4.4. It would be useful to do a full sync with the kernel on these files, but this is really a job for the Samsung maintainer :-)
Quoted 9 lines
Quoted 6 lines
The series is available at u-boot-dm/rkg-working.
Changes in v2:
- Rebase to master
- Rebase to masterWhat do you think we should do about applying this series?
Although we have to do remaining work, I think applying is possible without next work.
Board maintainers, what do you think?
Remaining Work:
- MIPI display driver
- s5pc210_universal
- smdk5420
- smdk5250
- trats
- trats2
Thanks,
Minkyu Kang.
v2 cover exynos: video: Convert exynos LCD driver to use driver model
Hi,
Quoted 46 lines · Minkyu Kang
Dear Simon Glass,
Quoted 21 lines · Simon Glass
Hi Minkyu,
Quoted 18 lines · Simon Glass
This series converts the exynos LCD driver to work with driver model. Only the eDP display is converted - the MIPI display is left mostly alone as I do not have a device to test with.
The conversion involves some refactoring to simplify the code, reduce the amount of global/static data and allow boards to be built without LCD support.
The series is tested with snow, spring, pit and pi. It disables LCD on other exynos boards so that they will still build with these changes. Further work will be needed (by someone with a board) to convert the others. I am not sure when this series can be applied.
The series also brings in device tree features from Linux v4.4. It would be useful to do a full sync with the kernel on these files, but this is really a job for the Samsung maintainer :-)
Quoted 9 lines
Quoted 6 lines
The series is available at u-boot-dm/rkg-working.
Changes in v2:
- Rebase to master
- Rebase to masterWhat do you think we should do about applying this series?
Although we have to do remaining work, I think applying is possible without next work.
Board maintainers, what do you think?
Remaining Work:
- MIPI display driver
-s5pc210_universal
- smdk5420
- smdk5250
- trats
- trats2
Quoted 2 lines
Thanks,
Minkyu Kang.
Well, no replies as yet. The main work requires is MIPI, but as I don't have the hardware, I can't help with that. At least I have made sure that everything builds OK.
Regards,
Simon
v2 cover exynos: video: Convert exynos LCD driver to use driver model
Hi,
Quoted 49 lines · Simon Glass
Hi,
Quoted 46 lines · Minkyu Kang
Dear Simon Glass,
Quoted 21 lines · Simon Glass
Hi Minkyu,
Quoted 18 lines · Simon Glass
This series converts the exynos LCD driver to work with driver model. Only the eDP display is converted - the MIPI display is left mostly alone as I do not have a device to test with.
The conversion involves some refactoring to simplify the code, reduce the amount of global/static data and allow boards to be built without LCD support.
The series is tested with snow, spring, pit and pi. It disables LCD on other exynos boards so that they will still build with these changes. Further work will be needed (by someone with a board) to convert the others. I am not sure when this series can be applied.
The series also brings in device tree features from Linux v4.4. It would be useful to do a full sync with the kernel on these files, but this is really a job for the Samsung maintainer :-)
Quoted 9 lines
Quoted 6 lines
The series is available at u-boot-dm/rkg-working.
Changes in v2:
- Rebase to master
- Rebase to masterWhat do you think we should do about applying this series?
Although we have to do remaining work, I think applying is possible without next work.
Board maintainers, what do you think?
Remaining Work:
- MIPI display driver
-s5pc210_universal
- smdk5420
- smdk5250
- trats
- trats2
Quoted 6 lines
Quoted 2 lines
Thanks,
Minkyu Kang.Well, no replies as yet. The main work requires is MIPI, but as I don't have the hardware, I can't help with that. At least I have made sure that everything builds OK.
Sorry for late..I will check these patches on this week..Tomorrow is holiday.. So I can check from Wed.
Best Regards,
Jaehoon Chung
Quoted 5 lines
Regards,
Simon
v2 cover exynos: video: Convert exynos LCD driver to use driver model
Hi,
Quoted 55 lines · Jaehoon Chung
Hi,
Quoted 52 lines · Simon Glass
Hi,
Quoted 48 lines · Minkyu Kang
Dear Simon Glass,
Quoted 21 lines · Simon Glass
Hi Minkyu,
Quoted 18 lines · Simon Glass
This series converts the exynos LCD driver to work with driver model. Only the eDP display is converted - the MIPI display is left mostly alone as I do not have a device to test with.
The conversion involves some refactoring to simplify the code, reduce the amount of global/static data and allow boards to be built without LCD support.
The series is tested with snow, spring, pit and pi. It disables LCD on other exynos boards so that they will still build with these changes. Further work will be needed (by someone with a board) to convert the others. I am not sure when this series can be applied.
The series also brings in device tree features from Linux v4.4. It would be useful to do a full sync with the kernel on these files, but this is really a job for the Samsung maintainer :-)
Quoted 9 lines
Quoted 6 lines
The series is available at u-boot-dm/rkg-working.
Changes in v2:
- Rebase to master
- Rebase to masterWhat do you think we should do about applying this series?
Although we have to do remaining work, I think applying is possible without next work.
Board maintainers, what do you think?
Remaining Work:
- MIPI display driver
-s5pc210_universal
- smdk5420
- smdk5250
- trats
- trats2Thanks,
Minkyu Kang.
Quoted 6 lines
Quoted 3 lines
Well, no replies as yet. The main work requires is MIPI, but as I don't have the hardware, I can't help with that. At least I have made sure that everything builds OK.
Sorry for late..I will check these patches on this week..Tomorrow is holiday.. So I can check from Wed.
Thank you, Jaehoon.
--
Minkyu Kang
v2 cover exynos: video: Convert exynos LCD driver to use driver model
Hi,
Quoted 58 lines · Minkyu Kang
Hi,
Quoted 55 lines · Jaehoon Chung
Hi,
Quoted 52 lines · Simon Glass
Hi,
Quoted 48 lines · Minkyu Kang
Dear Simon Glass,
Quoted 21 lines · Simon Glass
Hi Minkyu,
Quoted 18 lines · Simon Glass
This series converts the exynos LCD driver to work with driver model. Only the eDP display is converted - the MIPI display is left mostly alone as I do not have a device to test with.
The conversion involves some refactoring to simplify the code, reduce the amount of global/static data and allow boards to be built without LCD support.
The series is tested with snow, spring, pit and pi. It disables LCD on other exynos boards so that they will still build with these changes. Further work will be needed (by someone with a board) to convert the others. I am not sure when this series can be applied.
The series also brings in device tree features from Linux v4.4. It would be useful to do a full sync with the kernel on these files, but this is really a job for the Samsung maintainer :-)
Quoted 9 lines
Quoted 6 lines
The series is available at u-boot-dm/rkg-working.
Changes in v2:
- Rebase to master
- Rebase to masterWhat do you think we should do about applying this series?
Although we have to do remaining work, I think applying is possible without next work.
Board maintainers, what do you think?
Remaining Work:
- MIPI display driver
-s5pc210_universal
- smdk5420
- smdk5250
- trats
- trats2Thanks,
Minkyu Kang.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Well, no replies as yet. The main work requires is MIPI, but as I don't have the hardware, I can't help with that. At least I have made sure that everything builds OK.
Sorry for late..I will check these patches on this week..Tomorrow is holiday.. So I can check from Wed.
Thank you, Jaehoon.
It has been a few months now - if you like I can apply these via the -dm tree.
Regards,
Simon
v2 cover exynos: video: Convert exynos LCD driver to use driver model
Hi Jaehoon,
Quoted 65 lines · Simon Glass
Hi,
Quoted 62 lines · Minkyu Kang
Hi,
Quoted 59 lines · Jaehoon Chung
Hi,
Quoted 55 lines · Simon Glass
Hi,
Quoted 46 lines · Minkyu Kang
Dear Simon Glass,
Quoted 21 lines · Simon Glass
Hi Minkyu,
Quoted 18 lines · Simon Glass
This series converts the exynos LCD driver to work with driver model. Only the eDP display is converted - the MIPI display is left mostly alone as I do not have a device to test with.
The conversion involves some refactoring to simplify the code, reduce the amount of global/static data and allow boards to be built without LCD support.
The series is tested with snow, spring, pit and pi. It disables LCD on other exynos boards so that they will still build with these changes. Further work will be needed (by someone with a board) to convert the others. I am not sure when this series can be applied.
The series also brings in device tree features from Linux v4.4. It would be useful to do a full sync with the kernel on these files, but this is really a job for the Samsung maintainer :-)
Quoted 9 lines
Quoted 6 lines
The series is available at u-boot-dm/rkg-working.
Changes in v2:
- Rebase to master
- Rebase to masterWhat do you think we should do about applying this series?
Although we have to do remaining work, I think applying is possible without next work.
Board maintainers, what do you think?
Remaining Work:
- MIPI display driver
-s5pc210_universal
- smdk5420
- smdk5250
- trats
- trats2Quoted 2 lines
Thanks,
Minkyu Kang.Well, no replies as yet. The main work requires is MIPI, but as I don't have the hardware, I can't help with that. At least I have made sure that everything builds OK.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Sorry for late..I will check these patches on this week..Tomorrow is holiday.. So I can check from Wed.
Thank you, Jaehoon.
It has been a few months now - if you like I can apply these via the -dm tree.
any progress?
Thanks,
Minkyu Kang.
v2 cover exynos: video: Convert exynos LCD driver to use driver model
Quoted 71 lines · Minkyu Kang
Hi Jaehoon,
Quoted 68 lines · Simon Glass
Hi,
Quoted 65 lines · Minkyu Kang
Hi,
Quoted 61 lines · Jaehoon Chung
Hi,
Quoted 49 lines · Simon Glass
Hi,
Quoted 46 lines · Minkyu Kang
Dear Simon Glass,
Quoted 21 lines · Simon Glass
Hi Minkyu,
Quoted 18 lines · Simon Glass
This series converts the exynos LCD driver to work with driver model. Only the eDP display is converted - the MIPI display is left mostly alone as I do not have a device to test with.
The conversion involves some refactoring to simplify the code, reduce the amount of global/static data and allow boards to be built without LCD support.
The series is tested with snow, spring, pit and pi. It disables LCD on other exynos boards so that they will still build with these changes. Further work will be needed (by someone with a board) to convert the others. I am not sure when this series can be applied.
The series also brings in device tree features from Linux v4.4. It would be useful to do a full sync with the kernel on these files, but this is really a job for the Samsung maintainer :-)
Quoted 9 lines
Quoted 6 lines
The series is available at u-boot-dm/rkg-working.
Changes in v2:
- Rebase to master
- Rebase to masterWhat do you think we should do about applying this series?
Although we have to do remaining work, I think applying is possible without next work.
Board maintainers, what do you think?
Remaining Work:
- MIPI display driver
-s5pc210_universal
- smdk5420
- smdk5250
- trats
- trats2Quoted 6 lines
Quoted 2 lines
Thanks,
Minkyu Kang.Well, no replies as yet. The main work requires is MIPI, but as I don't have the hardware, I can't help with that. At least I have made sure that everything builds OK.
Sorry for late..I will check these patches on this week..Tomorrow is holiday.. So I can check from Wed.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Thank you, Jaehoon.
It has been a few months now - if you like I can apply these via the -dm tree.
any progress?
Sorry for late..Thanks for reminding.
Quoted 4 lines
Thanks,
Minkyu Kang.
v2 cover exynos: video: Convert exynos LCD driver to use driver model
In reply to Minkyu KangHi Simon,
Quoted 74 lines · Minkyu Kang
Hi Jaehoon,
Quoted 71 lines · Simon Glass
Hi,
Quoted 58 lines · Minkyu Kang
Hi,
Quoted 55 lines · Jaehoon Chung
Hi,
Quoted 52 lines · Simon Glass
Hi,
Quoted 48 lines · Minkyu Kang
Dear Simon Glass,
Quoted 21 lines · Simon Glass
Hi Minkyu,
Quoted 18 lines · Simon Glass
This series converts the exynos LCD driver to work with driver model. Only the eDP display is converted - the MIPI display is left mostly alone as I do not have a device to test with.
The conversion involves some refactoring to simplify the code, reduce the amount of global/static data and allow boards to be built without LCD support.
The series is tested with snow, spring, pit and pi. It disables LCD on other exynos boards so that they will still build with these changes. Further work will be needed (by someone with a board) to convert the others. I am not sure when this series can be applied.
The series also brings in device tree features from Linux v4.4. It would be useful to do a full sync with the kernel on these files, but this is really a job for the Samsung maintainer :-)
Quoted 9 lines
Quoted 6 lines
The series is available at u-boot-dm/rkg-working.
Changes in v2:
- Rebase to master
- Rebase to masterWhat do you think we should do about applying this series?
Although we have to do remaining work, I think applying is possible without next work.
Board maintainers, what do you think?
Remaining Work:
- MIPI display driver
-s5pc210_universal
- smdk5420
- smdk5250
- trats
- trats2Thanks,
Minkyu Kang.Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Well, no replies as yet. The main work requires is MIPI, but as I don't have the hardware, I can't help with that. At least I have made sure that everything builds OK.
Sorry for late..I will check these patches on this week..Tomorrow is holiday.. So I can check from Wed.
Thank you, Jaehoon.
It has been a few months now - if you like I can apply these via the -dm tree.
Yep, I checked these..It needs to remain the future work. But it seems that it's not problem to apply at -dm repository. (I have checked with your patch on other boadrs.)
I needs to check one more things..Could you wait until next Tuesday?
Best Regards,
Jaehoon Chung
Quoted 7 lines
Quoted 1 line
any progress?
Thanks,
Minkyu Kang.
v2 cover exynos: video: Convert exynos LCD driver to use driver model
Hi Jaehoon,
Quoted 76 lines · Jaehoon Chung
Hi Simon,
Quoted 73 lines · Minkyu Kang
Hi Jaehoon,
Quoted 70 lines · Simon Glass
Hi,
Quoted 66 lines · Minkyu Kang
Hi,
Quoted 55 lines · Jaehoon Chung
Hi,
Quoted 52 lines · Simon Glass
Hi,
Quoted 48 lines · Minkyu Kang
Dear Simon Glass,
Quoted 21 lines · Simon Glass
Hi Minkyu,
Quoted 18 lines · Simon Glass
This series converts the exynos LCD driver to work with driver model. Only the eDP display is converted - the MIPI display is left mostly alone as I do not have a device to test with.
The conversion involves some refactoring to simplify the code, reduce the amount of global/static data and allow boards to be built without LCD support.
The series is tested with snow, spring, pit and pi. It disables LCD on other exynos boards so that they will still build with these changes. Further work will be needed (by someone with a board) to convert the others. I am not sure when this series can be applied.
The series also brings in device tree features from Linux v4.4. It would be useful to do a full sync with the kernel on these files, but this is really a job for the Samsung maintainer :-)
Quoted 9 lines
Quoted 6 lines
The series is available at u-boot-dm/rkg-working.
Changes in v2:
- Rebase to master
- Rebase to masterWhat do you think we should do about applying this series?
Although we have to do remaining work, I think applying is possible without next work.
Board maintainers, what do you think?
Remaining Work:
- MIPI display driver
-s5pc210_universal
- smdk5420
- smdk5250
- trats
- trats2Thanks,
Minkyu Kang.Quoted 6 lines
Quoted 3 lines
Well, no replies as yet. The main work requires is MIPI, but as I don't have the hardware, I can't help with that. At least I have made sure that everything builds OK.
Sorry for late..I will check these patches on this week..Tomorrow is holiday.. So I can check from Wed.
Thank you, Jaehoon.
Quoted 8 lines
Quoted 1 line
Quoted 1 line
It has been a few months now - if you like I can apply these via the -dm tree.
Yep, I checked these..It needs to remain the future work. But it seems that it's not problem to apply at -dm repository. (I have checked with your patch on other boadrs.)
I needs to check one more things..Could you wait until next Tuesday?
Sure, it's been 3 months so another week won't matter :-)
Quoted 12 lines
Best Regards,
Jaehoon ChungQuoted 7 lines
Quoted 1 line
any progress?
Thanks,
Minkyu Kang.
Regards,
Simon
v2 cover exynos: video: Convert exynos LCD driver to use driver model
Hi Simon.
Quoted 81 lines · Simon Glass
Hi Jaehoon,
Quoted 78 lines · Jaehoon Chung
Hi Simon,
Quoted 74 lines · Minkyu Kang
Hi Jaehoon,
Quoted 71 lines · Simon Glass
Hi,
Quoted 58 lines · Minkyu Kang
Hi,
Quoted 55 lines · Jaehoon Chung
Hi,
Quoted 52 lines · Simon Glass
Hi,
Quoted 48 lines · Minkyu Kang
Dear Simon Glass,
Quoted 21 lines · Simon Glass
Hi Minkyu,
Quoted 18 lines · Simon Glass
This series converts the exynos LCD driver to work with driver model. Only the eDP display is converted - the MIPI display is left mostly alone as I do not have a device to test with.
The conversion involves some refactoring to simplify the code, reduce the amount of global/static data and allow boards to be built without LCD support.
The series is tested with snow, spring, pit and pi. It disables LCD on other exynos boards so that they will still build with these changes. Further work will be needed (by someone with a board) to convert the others. I am not sure when this series can be applied.
The series also brings in device tree features from Linux v4.4. It would be useful to do a full sync with the kernel on these files, but this is really a job for the Samsung maintainer :-)
Quoted 9 lines
Quoted 6 lines
The series is available at u-boot-dm/rkg-working.
Changes in v2:
- Rebase to master
- Rebase to masterWhat do you think we should do about applying this series?
Although we have to do remaining work, I think applying is possible without next work.
Board maintainers, what do you think?
Remaining Work:
- MIPI display driver
-s5pc210_universal
- smdk5420
- smdk5250
- trats
- trats2Thanks,
Minkyu Kang.Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Well, no replies as yet. The main work requires is MIPI, but as I don't have the hardware, I can't help with that. At least I have made sure that everything builds OK.
Sorry for late..I will check these patches on this week..Tomorrow is holiday.. So I can check from Wed.
Thank you, Jaehoon.
It has been a few months now - if you like I can apply these via the -dm tree.
Quoted 8 lines
Quoted 6 lines
Yep, I checked these..It needs to remain the future work. But it seems that it's not problem to apply at -dm repository. (I have checked with your patch on other boadrs.)
I needs to check one more things..Could you wait until next Tuesday?
Sure, it's been 3 months so another week won't matter :-)
Sorry. I have checked more with these patches..We have to work too many things in future for remaining work. But it seems those task are our role..If you and Minkyu are ok, you can apply these at dm repository.
I will make a plan to work. (Based on your repository.)
Actually, i didn't follow a few month, so i'm looking for u-boot history. Sorry. :( If you want to add my Reviewed-by tag, then you can add.
In future work,
Change to driver model for above targets. (trats2/trats...) MIPI display driver..(I will assign to my colleague for this task.)
Best Regards,
Jaehoon Chung
Quoted 19 lines
Quoted 14 lines
Best Regards,
Jaehoon ChungQuoted 7 lines
Quoted 1 line
any progress?
Thanks,
Minkyu Kang.Regards,
Simon
v2 cover exynos: video: Convert exynos LCD driver to use driver model
Hi,
Quoted 88 lines · Jaehoon Chung
Hi Simon.
Quoted 85 lines · Simon Glass
Hi Jaehoon,
Quoted 82 lines · Jaehoon Chung
Hi Simon,
Quoted 74 lines · Minkyu Kang
Hi Jaehoon,
Quoted 71 lines · Simon Glass
Hi,
Quoted 58 lines · Minkyu Kang
Hi,
Quoted 55 lines · Jaehoon Chung
Hi,
Quoted 52 lines · Simon Glass
Hi,
Quoted 48 lines · Minkyu Kang
Dear Simon Glass,
Quoted 21 lines · Simon Glass
Hi Minkyu,
Quoted 18 lines · Simon Glass
This series converts the exynos LCD driver to work with driver model. Only the eDP display is converted - the MIPI display is left mostly alone as I do not have a device to test with.
The conversion involves some refactoring to simplify the code, reduce the amount of global/static data and allow boards to be built without LCD support.
The series is tested with snow, spring, pit and pi. It disables LCD on other exynos boards so that they will still build with these changes. Further work will be needed (by someone with a board) to convert the others. I am not sure when this series can be applied.
The series also brings in device tree features from Linux v4.4. It would be useful to do a full sync with the kernel on these files, but this is really a job for the Samsung maintainer :-)
Quoted 9 lines
Quoted 6 lines
The series is available at u-boot-dm/rkg-working.
Changes in v2:
- Rebase to master
- Rebase to masterWhat do you think we should do about applying this series?
Although we have to do remaining work, I think applying is possible without next work.
Board maintainers, what do you think?
Remaining Work:
- MIPI display driver
-s5pc210_universal
- smdk5420
- smdk5250
- trats
- trats2Thanks,
Minkyu Kang.Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Well, no replies as yet. The main work requires is MIPI, but as I don't have the hardware, I can't help with that. At least I have made sure that everything builds OK.
Sorry for late..I will check these patches on this week..Tomorrow is holiday.. So I can check from Wed.
Thank you, Jaehoon.
It has been a few months now - if you like I can apply these via the -dm tree.
Yep, I checked these..It needs to remain the future work. But it seems that it's not problem to apply at -dm repository. (I have checked with your patch on other boadrs.)
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
I needs to check one more things..Could you wait until next Tuesday?
Sure, it's been 3 months so another week won't matter :-)
Sorry. I have checked more with these patches..We have to work too many things in future for remaining work. But it seems those task are our role..If you and Minkyu are ok, you can apply these at dm repository.
I'm OK.
If you want, those can be merged to samsung tree.
Quoted 10 lines
I will make a plan to work. (Based on your repository.)
Actually, i didn't follow a few month, so i'm looking for u-boot history. Sorry. :( If you want to add my Reviewed-by tag, then you can add.
In future work,
Change to driver model for above targets. (trats2/trats...) MIPI display driver..(I will assign to my colleague for this task.)
Thank you!
Minkyu Kang.
v2 cover exynos: video: Convert exynos LCD driver to use driver model
Hi Minkyu,
Quoted 94 lines · Minkyu Kang
Hi,
Quoted 91 lines · Jaehoon Chung
Hi Simon.
Quoted 88 lines · Simon Glass
Hi Jaehoon,
Quoted 84 lines · Jaehoon Chung
Hi Simon,
Quoted 74 lines · Minkyu Kang
Hi Jaehoon,
Quoted 71 lines · Simon Glass
Hi,
Quoted 58 lines · Minkyu Kang
Hi,
Quoted 55 lines · Jaehoon Chung
Hi,
Quoted 52 lines · Simon Glass
Hi,
Quoted 48 lines · Minkyu Kang
Dear Simon Glass,
Quoted 21 lines · Simon Glass
Hi Minkyu,
Quoted 18 lines · Simon Glass
This series converts the exynos LCD driver to work with driver model. Only the eDP display is converted - the MIPI display is left mostly alone as I do not have a device to test with.
The conversion involves some refactoring to simplify the code, reduce the amount of global/static data and allow boards to be built without LCD support.
The series is tested with snow, spring, pit and pi. It disables LCD on other exynos boards so that they will still build with these changes. Further work will be needed (by someone with a board) to convert the others. I am not sure when this series can be applied.
The series also brings in device tree features from Linux v4.4. It would be useful to do a full sync with the kernel on these files, but this is really a job for the Samsung maintainer :-)
Quoted 9 lines
Quoted 6 lines
The series is available at u-boot-dm/rkg-working.
Changes in v2:
- Rebase to master
- Rebase to masterWhat do you think we should do about applying this series?
Although we have to do remaining work, I think applying is possible without next work.
Board maintainers, what do you think?
Remaining Work:
- MIPI display driver
-s5pc210_universal
- smdk5420
- smdk5250
- trats
- trats2Thanks,
Minkyu Kang.Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Well, no replies as yet. The main work requires is MIPI, but as I don't have the hardware, I can't help with that. At least I have made sure that everything builds OK.
Sorry for late..I will check these patches on this week..Tomorrow is holiday.. So I can check from Wed.
Thank you, Jaehoon.
It has been a few months now - if you like I can apply these via the -dm tree.
Yep, I checked these..It needs to remain the future work. But it seems that it's not problem to apply at -dm repository. (I have checked with your patch on other boadrs.)
I needs to check one more things..Could you wait until next Tuesday?
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Sure, it's been 3 months so another week won't matter :-)
Sorry. I have checked more with these patches..We have to work too many things in future for remaining work. But it seems those task are our role..If you and Minkyu are ok, you can apply these at dm repository.
I'm OK.
If you want, those can be merged to samsung tree.
Thanks, please go ahead!
Quoted 10 lines
Quoted 10 lines
I will make a plan to work. (Based on your repository.)
Actually, i didn't follow a few month, so i'm looking for u-boot history. Sorry. :( If you want to add my Reviewed-by tag, then you can add.
In future work,
Change to driver model for above targets. (trats2/trats...) MIPI display driver..(I will assign to my colleague for this task.)
Regards,
Simon
v2 cover exynos: video: Convert exynos LCD driver to use driver model
Hi All,
Quoted 99 lines · Simon Glass
Hi Minkyu,
Quoted 96 lines · Minkyu Kang
Hi,
Quoted 93 lines · Jaehoon Chung
Hi Simon.
Quoted 89 lines · Simon Glass
Hi Jaehoon,
Quoted 76 lines · Jaehoon Chung
Hi Simon,
Quoted 73 lines · Minkyu Kang
Hi Jaehoon,
Quoted 70 lines · Simon Glass
Hi,
Quoted 66 lines · Minkyu Kang
Hi,
Quoted 55 lines · Jaehoon Chung
Hi,
Quoted 52 lines · Simon Glass
Hi,
Quoted 48 lines · Minkyu Kang
Dear Simon Glass,
Quoted 21 lines · Simon Glass
Hi Minkyu,
Quoted 18 lines · Simon Glass
This series converts the exynos LCD driver to work with driver model. Only
the eDP display is converted - the MIPI display is left mostly alone as I
do not have a device to test with.The conversion involves some refactoring to simplify the code, reduce the
amount of global/static data and allow boards to be built without LCD
support.The series is tested with snow, spring, pit and pi. It disables LCD on other
exynos boards so that they will still build with these changes. Further work
will be needed (by someone with a board) to convert the others. I am not
sure when this series can be applied.The series also brings in device tree features from Linux v4.4. It would be
useful to do a full sync with the kernel on these files, but this is really
a job for the Samsung maintainer :-)Quoted 9 lines
Quoted 6 lines
The series is available at u-boot-dm/rkg-working.
Changes in v2:
- Rebase to master
- Rebase to masterWhat do you think we should do about applying this series?
Although we have to do remaining work, I think applying is possible without next work.
Board maintainers, what do you think?
Remaining Work:
- MIPI display driver
-s5pc210_universal
- smdk5420
- smdk5250
- trats
- trats2Thanks,
Minkyu Kang.Quoted 6 lines
Quoted 3 lines
Well, no replies as yet. The main work requires is MIPI, but as I don't have the hardware, I can't help with that. At least I have made sure that everything builds OK.
Sorry for late..I will check these patches on this week..Tomorrow is holiday.. So I can check from Wed.
Thank you, Jaehoon.
Quoted 8 lines
Quoted 1 line
Quoted 1 line
It has been a few months now - if you like I can apply these via the -dm tree.
Yep, I checked these..It needs to remain the future work. But it seems that it's not problem to apply at -dm repository. (I have checked with your patch on other boadrs.)
I needs to check one more things..Could you wait until next Tuesday?
Sure, it's been 3 months so another week won't matter :-)
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Sorry. I have checked more with these patches..We have to work too many things in future for remaining work. But it seems those task are our role..If you and Minkyu are ok, you can apply these at dm repository.
I'm OK.
If you want, those can be merged to samsung tree.Thanks, please go ahead!
Then I will work on remaining task with that branch..
Best Regards,
Jaehoon Chung
Quoted 17 lines
Quoted 11 lines
Quoted 11 lines
I will make a plan to work. (Based on your repository.)
Actually, i didn't follow a few month, so i'm looking for u-boot history. Sorry. :( If you want to add my Reviewed-by tag, then you can add.
In future work,
Change to driver model for above targets. (trats2/trats...) MIPI display driver..(I will assign to my colleague for this task.)Regards,
Simon
v2 cover exynos: video: Convert exynos LCD driver to use driver model
Quoted 108 lines · Jaehoon Chung
Hi All,
Quoted 105 lines · Simon Glass
Hi Minkyu,
Quoted 101 lines · Minkyu Kang
Hi,
Quoted 88 lines · Jaehoon Chung
Hi Simon.
Quoted 85 lines · Simon Glass
Hi Jaehoon,
Quoted 82 lines · Jaehoon Chung
Hi Simon,
Quoted 74 lines · Minkyu Kang
Hi Jaehoon,
Quoted 71 lines · Simon Glass
Hi,
Quoted 58 lines · Minkyu Kang
Hi,
Quoted 55 lines · Jaehoon Chung
Hi,
Quoted 52 lines · Simon Glass
Hi,
Quoted 48 lines · Minkyu Kang
Dear Simon Glass,
Quoted 30 lines · Simon Glass
Hi Minkyu,
On 21 February 2016 at 21:08, Simon Glass <[email protected]> wrote:
This series converts the exynos LCD driver to work with driver model. Only
the eDP display is converted - the MIPI display is left mostly alone as I
do not have a device to test with.The conversion involves some refactoring to simplify the code, reduce the
amount of global/static data and allow boards to be built without LCD
support.The series is tested with snow, spring, pit and pi. It disables LCD on other
exynos boards so that they will still build with these changes. Further work
will be needed (by someone with a board) to convert the others. I am not
sure when this series can be applied.The series also brings in device tree features from Linux v4.4. It would be
useful to do a full sync with the kernel on these files, but this is really
a job for the Samsung maintainer :-)The series is available at u-boot-dm/rkg-working.
Changes in v2:
- Rebase to master
- Rebase to masterWhat do you think we should do about applying this series?
Although we have to do remaining work, I think applying is possible without next work.
Board maintainers, what do you think?
Remaining Work:
- MIPI display driver
-s5pc210_universal
- smdk5420
- smdk5250
- trats
- trats2Thanks,
Minkyu Kang.Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Well, no replies as yet. The main work requires is MIPI, but as I don't have the hardware, I can't help with that. At least I have made sure that everything builds OK.
Sorry for late..I will check these patches on this week..Tomorrow is holiday.. So I can check from Wed.
Thank you, Jaehoon.
It has been a few months now - if you like I can apply these via the -dm tree.
Yep, I checked these..It needs to remain the future work. But it seems that it's not problem to apply at -dm repository. (I have checked with your patch on other boadrs.)
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
I needs to check one more things..Could you wait until next Tuesday?
Sure, it's been 3 months so another week won't matter :-)
Sorry. I have checked more with these patches..We have to work too many things in future for remaining work. But it seems those task are our role..If you and Minkyu are ok, you can apply these at dm repository.
I'm OK.
If you want, those can be merged to samsung tree.
Quoted 6 lines
Quoted 1 line
Thanks, please go ahead!
Then I will work on remaining task with that branch..
Best Regards,
Jaehoon Chung
applied to u-boot-samsung.
Thanks,
Minkyu Kang.