Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362945
b: refs/heads/master
c: cf2585a
h: refs/heads/master
i:
  362943: 9377ea2
v: v3
  • Loading branch information
Tomi Valkeinen committed Apr 15, 2013
1 parent 85a3eb0 commit 7e2cbf4
Show file tree
Hide file tree
Showing 29 changed files with 519 additions and 291 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8e524c95040aa521283aba126c047381eadaed39
refs/heads/master: cf2585a482e0ac83ab11928699c292d73c128fd6
50 changes: 1 addition & 49 deletions trunk/arch/arm/plat-samsung/include/plat/fb.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,55 +15,7 @@
#ifndef __PLAT_S3C_FB_H
#define __PLAT_S3C_FB_H __FILE__

/* S3C_FB_MAX_WIN
* Set to the maximum number of windows that any of the supported hardware
* can use. Since the platform data uses this for an array size, having it
* set to the maximum of any version of the hardware can do is safe.
*/
#define S3C_FB_MAX_WIN (5)

/**
* struct s3c_fb_pd_win - per window setup data
* @xres : The window X size.
* @yres : The window Y size.
* @virtual_x: The virtual X size.
* @virtual_y: The virtual Y size.
*/
struct s3c_fb_pd_win {
unsigned short default_bpp;
unsigned short max_bpp;
unsigned short xres;
unsigned short yres;
unsigned short virtual_x;
unsigned short virtual_y;
};

/**
* struct s3c_fb_platdata - S3C driver platform specific information
* @setup_gpio: Setup the external GPIO pins to the right state to transfer
* the data from the display system to the connected display
* device.
* @vidcon0: The base vidcon0 values to control the panel data format.
* @vidcon1: The base vidcon1 values to control the panel data output.
* @vtiming: Video timing when connected to a RGB type panel.
* @win: The setup data for each hardware window, or NULL for unused.
* @display_mode: The LCD output display mode.
*
* The platform data supplies the video driver with all the information
* it requires to work with the display(s) attached to the machine. It
* controls the initial mode, the number of display windows (0 is always
* the base framebuffer) that are initialised etc.
*
*/
struct s3c_fb_platdata {
void (*setup_gpio)(void);

struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN];
struct fb_videomode *vtiming;

u32 vidcon0;
u32 vidcon1;
};
#include <linux/platform_data/video_s3c.h>

/**
* s3c_fb_set_platdata() - Setup the FB device with platform data.
Expand Down
20 changes: 10 additions & 10 deletions trunk/drivers/gpu/drm/drm_modes.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ drm_gtf_mode(struct drm_device *dev, int hdisplay, int vdisplay, int vrefresh,
}
EXPORT_SYMBOL(drm_gtf_mode);

#if IS_ENABLED(CONFIG_VIDEOMODE)
#ifdef CONFIG_VIDEOMODE_HELPERS
int drm_display_mode_from_videomode(const struct videomode *vm,
struct drm_display_mode *dmode)
{
Expand All @@ -523,26 +523,25 @@ int drm_display_mode_from_videomode(const struct videomode *vm,
dmode->clock = vm->pixelclock / 1000;

dmode->flags = 0;
if (vm->dmt_flags & VESA_DMT_HSYNC_HIGH)
if (vm->flags & DISPLAY_FLAGS_HSYNC_HIGH)
dmode->flags |= DRM_MODE_FLAG_PHSYNC;
else if (vm->dmt_flags & VESA_DMT_HSYNC_LOW)
else if (vm->flags & DISPLAY_FLAGS_HSYNC_LOW)
dmode->flags |= DRM_MODE_FLAG_NHSYNC;
if (vm->dmt_flags & VESA_DMT_VSYNC_HIGH)
if (vm->flags & DISPLAY_FLAGS_VSYNC_HIGH)
dmode->flags |= DRM_MODE_FLAG_PVSYNC;
else if (vm->dmt_flags & VESA_DMT_VSYNC_LOW)
else if (vm->flags & DISPLAY_FLAGS_VSYNC_LOW)
dmode->flags |= DRM_MODE_FLAG_NVSYNC;
if (vm->data_flags & DISPLAY_FLAGS_INTERLACED)
if (vm->flags & DISPLAY_FLAGS_INTERLACED)
dmode->flags |= DRM_MODE_FLAG_INTERLACE;
if (vm->data_flags & DISPLAY_FLAGS_DOUBLESCAN)
if (vm->flags & DISPLAY_FLAGS_DOUBLESCAN)
dmode->flags |= DRM_MODE_FLAG_DBLSCAN;
drm_mode_set_name(dmode);

return 0;
}
EXPORT_SYMBOL_GPL(drm_display_mode_from_videomode);
#endif

#if IS_ENABLED(CONFIG_OF_VIDEOMODE)
#ifdef CONFIG_OF
/**
* of_get_drm_display_mode - get a drm_display_mode from devicetree
* @np: device_node with the timing specification
Expand Down Expand Up @@ -572,7 +571,8 @@ int of_get_drm_display_mode(struct device_node *np,
return 0;
}
EXPORT_SYMBOL_GPL(of_get_drm_display_mode);
#endif
#endif /* CONFIG_OF */
#endif /* CONFIG_VIDEOMODE_HELPERS */

/**
* drm_mode_set_name - set the name on a mode
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/gpu/drm/tilcdc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ config DRM_TILCDC
select DRM_KMS_HELPER
select DRM_KMS_CMA_HELPER
select DRM_GEM_CMA_HELPER
select OF_VIDEOMODE
select OF_DISPLAY_TIMING
select VIDEOMODE_HELPERS
select BACKLIGHT_CLASS_DEVICE
help
Choose this option if you have an TI SoC with LCDC display
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/tilcdc/tilcdc_panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static int panel_connector_get_modes(struct drm_connector *connector)
struct drm_display_mode *mode = drm_mode_create(dev);
struct videomode vm;

if (videomode_from_timing(timings, &vm, i))
if (videomode_from_timings(timings, &vm, i))
break;

drm_display_mode_from_videomode(&vm, mode);
Expand Down
22 changes: 2 additions & 20 deletions trunk/drivers/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,8 @@ config VIDEO_OUTPUT_CONTROL
This framework adds support for low-level control of the video
output switch.

config DISPLAY_TIMING
bool

config VIDEOMODE
bool

config OF_DISPLAY_TIMING
bool "Enable device tree display timing support"
depends on OF
select DISPLAY_TIMING
help
helper to parse display timings from the devicetree

config OF_VIDEOMODE
bool "Enable device tree videomode support"
depends on OF
select VIDEOMODE
select OF_DISPLAY_TIMING
help
helper to get videomodes from the devicetree
config VIDEOMODE_HELPERS
bool

config HDMI
bool
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/video/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ obj-$(CONFIG_FB_VIRTUAL) += vfb.o

#video output switch sysfs driver
obj-$(CONFIG_VIDEO_OUTPUT_CONTROL) += output.o
obj-$(CONFIG_DISPLAY_TIMING) += display_timing.o
obj-$(CONFIG_OF_DISPLAY_TIMING) += of_display_timing.o
obj-$(CONFIG_VIDEOMODE) += videomode.o
obj-$(CONFIG_OF_VIDEOMODE) += of_videomode.o
obj-$(CONFIG_VIDEOMODE_HELPERS) += display_timing.o videomode.o
ifeq ($(CONFIG_OF),y)
obj-$(CONFIG_VIDEOMODE_HELPERS) += of_display_timing.o of_videomode.o
endif
14 changes: 1 addition & 13 deletions trunk/drivers/video/amifb.c
Original file line number Diff line number Diff line change
Expand Up @@ -3788,19 +3788,7 @@ static struct platform_driver amifb_driver = {
},
};

static int __init amifb_init(void)
{
return platform_driver_probe(&amifb_driver, amifb_probe);
}

module_init(amifb_init);

static void __exit amifb_exit(void)
{
platform_driver_unregister(&amifb_driver);
}

module_exit(amifb_exit);
module_platform_driver_probe(amifb_driver, amifb_probe);

MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:amiga-video");
13 changes: 1 addition & 12 deletions trunk/drivers/video/atmel_lcdfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1158,18 +1158,7 @@ static struct platform_driver atmel_lcdfb_driver = {
},
};

static int __init atmel_lcdfb_init(void)
{
return platform_driver_probe(&atmel_lcdfb_driver, atmel_lcdfb_probe);
}

static void __exit atmel_lcdfb_exit(void)
{
platform_driver_unregister(&atmel_lcdfb_driver);
}

module_init(atmel_lcdfb_init);
module_exit(atmel_lcdfb_exit);
module_platform_driver_probe(atmel_lcdfb_driver, atmel_lcdfb_probe);

MODULE_DESCRIPTION("AT91/AT32 LCD Controller framebuffer driver");
MODULE_AUTHOR("Nicolas Ferre <nicolas.ferre@atmel.com>");
Expand Down
11 changes: 9 additions & 2 deletions trunk/drivers/video/auo_k1900fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@

static void auok1900_init(struct auok190xfb_par *par)
{
struct device *dev = par->info->device;
struct auok190x_board *board = par->board;
u16 init_param = 0;

pm_runtime_get_sync(dev);

init_param |= AUOK1900_INIT_TEMP_AVERAGE;
init_param |= AUOK1900_INIT_ROTATE(par->rotation);
init_param |= AUOK190X_INIT_INVERSE_WHITE;
Expand All @@ -74,6 +77,9 @@ static void auok1900_init(struct auok190xfb_par *par)

/* let the controller finish */
board->wait_for_rdy(par);

pm_runtime_mark_last_busy(dev);
pm_runtime_put_autosuspend(dev);
}

static void auok1900_update_region(struct auok190xfb_par *par, int mode,
Expand All @@ -82,6 +88,7 @@ static void auok1900_update_region(struct auok190xfb_par *par, int mode,
struct device *dev = par->info->device;
unsigned char *buf = (unsigned char *)par->info->screen_base;
int xres = par->info->var.xres;
int line_length = par->info->fix.line_length;
u16 args[4];

pm_runtime_get_sync(dev);
Expand All @@ -100,9 +107,9 @@ static void auok1900_update_region(struct auok190xfb_par *par, int mode,
args[1] = y1 + 1;
args[2] = xres;
args[3] = y2 - y1;
buf += y1 * xres;
buf += y1 * line_length;
auok190x_send_cmdargs_pixels(par, AUOK1900_CMD_PARTIALDISP, 4, args,
((y2 - y1) * xres)/2, (u16 *) buf);
((y2 - y1) * line_length)/2, (u16 *) buf);
auok190x_send_command(par, AUOK190X_CMD_DATA_STOP);

par->update_cnt++;
Expand Down
11 changes: 9 additions & 2 deletions trunk/drivers/video/auo_k1901fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,12 @@

static void auok1901_init(struct auok190xfb_par *par)
{
struct device *dev = par->info->device;
struct auok190x_board *board = par->board;
u16 init_param = 0;

pm_runtime_get_sync(dev);

init_param |= AUOK190X_INIT_INVERSE_WHITE;
init_param |= AUOK190X_INIT_FORMAT0;
init_param |= AUOK1901_INIT_RESOLUTION(par->resolution);
Expand All @@ -113,6 +116,9 @@ static void auok1901_init(struct auok190xfb_par *par)

/* let the controller finish */
board->wait_for_rdy(par);

pm_runtime_mark_last_busy(dev);
pm_runtime_put_autosuspend(dev);
}

static void auok1901_update_region(struct auok190xfb_par *par, int mode,
Expand All @@ -121,6 +127,7 @@ static void auok1901_update_region(struct auok190xfb_par *par, int mode,
struct device *dev = par->info->device;
unsigned char *buf = (unsigned char *)par->info->screen_base;
int xres = par->info->var.xres;
int line_length = par->info->fix.line_length;
u16 args[5];

pm_runtime_get_sync(dev);
Expand All @@ -139,9 +146,9 @@ static void auok1901_update_region(struct auok190xfb_par *par, int mode,
args[1] = y1 + 1;
args[2] = xres;
args[3] = y2 - y1;
buf += y1 * xres;
buf += y1 * line_length;
auok190x_send_cmdargs_pixels_nowait(par, AUOK1901_CMD_DMA_START, 4,
args, ((y2 - y1) * xres)/2,
args, ((y2 - y1) * line_length)/2,
(u16 *) buf);
auok190x_send_command_nowait(par, AUOK190X_CMD_DATA_STOP);

Expand Down
Loading

0 comments on commit 7e2cbf4

Please sign in to comment.