From a0b38cc4d35e095f14ab0f486135f8a619ebfc14 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 11 May 2011 14:05:07 +0300 Subject: OMAP: DSS2: Move display.h to include/video/ arch/arm/plat-omap/include/plat/display.h is an include for the OMAP DSS driver. A more logical place for it is in include/video. Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 589 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 589 insertions(+) create mode 100644 include/video/omapdss.h (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h new file mode 100644 index 000000000000..39738688c7ce --- /dev/null +++ b/include/video/omapdss.h @@ -0,0 +1,589 @@ +/* + * Copyright (C) 2008 Nokia Corporation + * Author: Tomi Valkeinen + * + * 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. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#ifndef __OMAP_OMAPDSS_H +#define __OMAP_OMAPDSS_H + +#include +#include +#include +#include +#include + +#define DISPC_IRQ_FRAMEDONE (1 << 0) +#define DISPC_IRQ_VSYNC (1 << 1) +#define DISPC_IRQ_EVSYNC_EVEN (1 << 2) +#define DISPC_IRQ_EVSYNC_ODD (1 << 3) +#define DISPC_IRQ_ACBIAS_COUNT_STAT (1 << 4) +#define DISPC_IRQ_PROG_LINE_NUM (1 << 5) +#define DISPC_IRQ_GFX_FIFO_UNDERFLOW (1 << 6) +#define DISPC_IRQ_GFX_END_WIN (1 << 7) +#define DISPC_IRQ_PAL_GAMMA_MASK (1 << 8) +#define DISPC_IRQ_OCP_ERR (1 << 9) +#define DISPC_IRQ_VID1_FIFO_UNDERFLOW (1 << 10) +#define DISPC_IRQ_VID1_END_WIN (1 << 11) +#define DISPC_IRQ_VID2_FIFO_UNDERFLOW (1 << 12) +#define DISPC_IRQ_VID2_END_WIN (1 << 13) +#define DISPC_IRQ_SYNC_LOST (1 << 14) +#define DISPC_IRQ_SYNC_LOST_DIGIT (1 << 15) +#define DISPC_IRQ_WAKEUP (1 << 16) +#define DISPC_IRQ_SYNC_LOST2 (1 << 17) +#define DISPC_IRQ_VSYNC2 (1 << 18) +#define DISPC_IRQ_ACBIAS_COUNT_STAT2 (1 << 21) +#define DISPC_IRQ_FRAMEDONE2 (1 << 22) + +struct omap_dss_device; +struct omap_overlay_manager; + +enum omap_display_type { + OMAP_DISPLAY_TYPE_NONE = 0, + OMAP_DISPLAY_TYPE_DPI = 1 << 0, + OMAP_DISPLAY_TYPE_DBI = 1 << 1, + OMAP_DISPLAY_TYPE_SDI = 1 << 2, + OMAP_DISPLAY_TYPE_DSI = 1 << 3, + OMAP_DISPLAY_TYPE_VENC = 1 << 4, + OMAP_DISPLAY_TYPE_HDMI = 1 << 5, +}; + +enum omap_plane { + OMAP_DSS_GFX = 0, + OMAP_DSS_VIDEO1 = 1, + OMAP_DSS_VIDEO2 = 2 +}; + +enum omap_channel { + OMAP_DSS_CHANNEL_LCD = 0, + OMAP_DSS_CHANNEL_DIGIT = 1, + OMAP_DSS_CHANNEL_LCD2 = 2, +}; + +enum omap_color_mode { + OMAP_DSS_COLOR_CLUT1 = 1 << 0, /* BITMAP 1 */ + OMAP_DSS_COLOR_CLUT2 = 1 << 1, /* BITMAP 2 */ + OMAP_DSS_COLOR_CLUT4 = 1 << 2, /* BITMAP 4 */ + OMAP_DSS_COLOR_CLUT8 = 1 << 3, /* BITMAP 8 */ + OMAP_DSS_COLOR_RGB12U = 1 << 4, /* RGB12, 16-bit container */ + OMAP_DSS_COLOR_ARGB16 = 1 << 5, /* ARGB16 */ + OMAP_DSS_COLOR_RGB16 = 1 << 6, /* RGB16 */ + OMAP_DSS_COLOR_RGB24U = 1 << 7, /* RGB24, 32-bit container */ + OMAP_DSS_COLOR_RGB24P = 1 << 8, /* RGB24, 24-bit container */ + OMAP_DSS_COLOR_YUV2 = 1 << 9, /* YUV2 4:2:2 co-sited */ + OMAP_DSS_COLOR_UYVY = 1 << 10, /* UYVY 4:2:2 co-sited */ + OMAP_DSS_COLOR_ARGB32 = 1 << 11, /* ARGB32 */ + OMAP_DSS_COLOR_RGBA32 = 1 << 12, /* RGBA32 */ + OMAP_DSS_COLOR_RGBX32 = 1 << 13, /* RGBx32 */ +}; + +enum omap_lcd_display_type { + OMAP_DSS_LCD_DISPLAY_STN, + OMAP_DSS_LCD_DISPLAY_TFT, +}; + +enum omap_dss_load_mode { + OMAP_DSS_LOAD_CLUT_AND_FRAME = 0, + OMAP_DSS_LOAD_CLUT_ONLY = 1, + OMAP_DSS_LOAD_FRAME_ONLY = 2, + OMAP_DSS_LOAD_CLUT_ONCE_FRAME = 3, +}; + +enum omap_dss_trans_key_type { + OMAP_DSS_COLOR_KEY_GFX_DST = 0, + OMAP_DSS_COLOR_KEY_VID_SRC = 1, +}; + +enum omap_rfbi_te_mode { + OMAP_DSS_RFBI_TE_MODE_1 = 1, + OMAP_DSS_RFBI_TE_MODE_2 = 2, +}; + +enum omap_panel_config { + OMAP_DSS_LCD_IVS = 1<<0, + OMAP_DSS_LCD_IHS = 1<<1, + OMAP_DSS_LCD_IPC = 1<<2, + OMAP_DSS_LCD_IEO = 1<<3, + OMAP_DSS_LCD_RF = 1<<4, + OMAP_DSS_LCD_ONOFF = 1<<5, + + OMAP_DSS_LCD_TFT = 1<<20, +}; + +enum omap_dss_venc_type { + OMAP_DSS_VENC_TYPE_COMPOSITE, + OMAP_DSS_VENC_TYPE_SVIDEO, +}; + +enum omap_display_caps { + OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE = 1 << 0, + OMAP_DSS_DISPLAY_CAP_TEAR_ELIM = 1 << 1, +}; + +enum omap_dss_update_mode { + OMAP_DSS_UPDATE_DISABLED = 0, + OMAP_DSS_UPDATE_AUTO, + OMAP_DSS_UPDATE_MANUAL, +}; + +enum omap_dss_display_state { + OMAP_DSS_DISPLAY_DISABLED = 0, + OMAP_DSS_DISPLAY_ACTIVE, + OMAP_DSS_DISPLAY_SUSPENDED, +}; + +/* XXX perhaps this should be removed */ +enum omap_dss_overlay_managers { + OMAP_DSS_OVL_MGR_LCD, + OMAP_DSS_OVL_MGR_TV, + OMAP_DSS_OVL_MGR_LCD2, +}; + +enum omap_dss_rotation_type { + OMAP_DSS_ROT_DMA = 0, + OMAP_DSS_ROT_VRFB = 1, +}; + +/* clockwise rotation angle */ +enum omap_dss_rotation_angle { + OMAP_DSS_ROT_0 = 0, + OMAP_DSS_ROT_90 = 1, + OMAP_DSS_ROT_180 = 2, + OMAP_DSS_ROT_270 = 3, +}; + +enum omap_overlay_caps { + OMAP_DSS_OVL_CAP_SCALE = 1 << 0, + OMAP_DSS_OVL_CAP_DISPC = 1 << 1, +}; + +enum omap_overlay_manager_caps { + OMAP_DSS_OVL_MGR_CAP_DISPC = 1 << 0, +}; + +/* RFBI */ + +struct rfbi_timings { + int cs_on_time; + int cs_off_time; + int we_on_time; + int we_off_time; + int re_on_time; + int re_off_time; + int we_cycle_time; + int re_cycle_time; + int cs_pulse_width; + int access_time; + + int clk_div; + + u32 tim[5]; /* set by rfbi_convert_timings() */ + + int converted; +}; + +void omap_rfbi_write_command(const void *buf, u32 len); +void omap_rfbi_read_data(void *buf, u32 len); +void omap_rfbi_write_data(const void *buf, u32 len); +void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width, + u16 x, u16 y, + u16 w, u16 h); +int omap_rfbi_enable_te(bool enable, unsigned line); +int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode, + unsigned hs_pulse_time, unsigned vs_pulse_time, + int hs_pol_inv, int vs_pol_inv, int extif_div); + +/* DSI */ +void dsi_bus_lock(void); +void dsi_bus_unlock(void); +int dsi_vc_dcs_write(int channel, u8 *data, int len); +int dsi_vc_dcs_write_0(int channel, u8 dcs_cmd); +int dsi_vc_dcs_write_1(int channel, u8 dcs_cmd, u8 param); +int dsi_vc_dcs_write_nosync(int channel, u8 *data, int len); +int dsi_vc_dcs_read(int channel, u8 dcs_cmd, u8 *buf, int buflen); +int dsi_vc_dcs_read_1(int channel, u8 dcs_cmd, u8 *data); +int dsi_vc_dcs_read_2(int channel, u8 dcs_cmd, u8 *data1, u8 *data2); +int dsi_vc_set_max_rx_packet_size(int channel, u16 len); +int dsi_vc_send_null(int channel); +int dsi_vc_send_bta_sync(int channel); + +/* Board specific data */ +struct omap_dss_board_info { + int (*get_last_off_on_transaction_id)(struct device *dev); + int num_devices; + struct omap_dss_device **devices; + struct omap_dss_device *default_device; +}; + +#if defined(CONFIG_OMAP2_DSS_MODULE) || defined(CONFIG_OMAP2_DSS) +/* Init with the board info */ +extern int omap_display_init(struct omap_dss_board_info *board_data); +#else +static inline int omap_display_init(struct omap_dss_board_info *board_data) +{ + return 0; +} +#endif + +struct omap_display_platform_data { + struct omap_dss_board_info *board_data; + /* TODO: Additional members to be added when PM is considered */ + + bool (*opt_clock_available)(const char *clk_role); +}; + +struct omap_video_timings { + /* Unit: pixels */ + u16 x_res; + /* Unit: pixels */ + u16 y_res; + /* Unit: KHz */ + u32 pixel_clock; + /* Unit: pixel clocks */ + u16 hsw; /* Horizontal synchronization pulse width */ + /* Unit: pixel clocks */ + u16 hfp; /* Horizontal front porch */ + /* Unit: pixel clocks */ + u16 hbp; /* Horizontal back porch */ + /* Unit: line clocks */ + u16 vsw; /* Vertical synchronization pulse width */ + /* Unit: line clocks */ + u16 vfp; /* Vertical front porch */ + /* Unit: line clocks */ + u16 vbp; /* Vertical back porch */ +}; + +#ifdef CONFIG_OMAP2_DSS_VENC +/* Hardcoded timings for tv modes. Venc only uses these to + * identify the mode, and does not actually use the configs + * itself. However, the configs should be something that + * a normal monitor can also show */ +extern const struct omap_video_timings omap_dss_pal_timings; +extern const struct omap_video_timings omap_dss_ntsc_timings; +#endif + +struct omap_overlay_info { + bool enabled; + + u32 paddr; + void __iomem *vaddr; + u16 screen_width; + u16 width; + u16 height; + enum omap_color_mode color_mode; + u8 rotation; + enum omap_dss_rotation_type rotation_type; + bool mirror; + + u16 pos_x; + u16 pos_y; + u16 out_width; /* if 0, out_width == width */ + u16 out_height; /* if 0, out_height == height */ + u8 global_alpha; + u8 pre_mult_alpha; +}; + +struct omap_overlay { + struct kobject kobj; + struct list_head list; + + /* static fields */ + const char *name; + int id; + enum omap_color_mode supported_modes; + enum omap_overlay_caps caps; + + /* dynamic fields */ + struct omap_overlay_manager *manager; + struct omap_overlay_info info; + + /* if true, info has been changed, but not applied() yet */ + bool info_dirty; + + int (*set_manager)(struct omap_overlay *ovl, + struct omap_overlay_manager *mgr); + int (*unset_manager)(struct omap_overlay *ovl); + + int (*set_overlay_info)(struct omap_overlay *ovl, + struct omap_overlay_info *info); + void (*get_overlay_info)(struct omap_overlay *ovl, + struct omap_overlay_info *info); + + int (*wait_for_go)(struct omap_overlay *ovl); +}; + +struct omap_overlay_manager_info { + u32 default_color; + + enum omap_dss_trans_key_type trans_key_type; + u32 trans_key; + bool trans_enabled; + + bool alpha_enabled; +}; + +struct omap_overlay_manager { + struct kobject kobj; + struct list_head list; + + /* static fields */ + const char *name; + int id; + enum omap_overlay_manager_caps caps; + int num_overlays; + struct omap_overlay **overlays; + enum omap_display_type supported_displays; + + /* dynamic fields */ + struct omap_dss_device *device; + struct omap_overlay_manager_info info; + + bool device_changed; + /* if true, info has been changed but not applied() yet */ + bool info_dirty; + + int (*set_device)(struct omap_overlay_manager *mgr, + struct omap_dss_device *dssdev); + int (*unset_device)(struct omap_overlay_manager *mgr); + + int (*set_manager_info)(struct omap_overlay_manager *mgr, + struct omap_overlay_manager_info *info); + void (*get_manager_info)(struct omap_overlay_manager *mgr, + struct omap_overlay_manager_info *info); + + int (*apply)(struct omap_overlay_manager *mgr); + int (*wait_for_go)(struct omap_overlay_manager *mgr); + int (*wait_for_vsync)(struct omap_overlay_manager *mgr); + + int (*enable)(struct omap_overlay_manager *mgr); + int (*disable)(struct omap_overlay_manager *mgr); +}; + +struct omap_dss_device { + struct device dev; + + enum omap_display_type type; + + enum omap_channel channel; + + union { + struct { + u8 data_lines; + } dpi; + + struct { + u8 channel; + u8 data_lines; + } rfbi; + + struct { + u8 datapairs; + } sdi; + + struct { + u8 clk_lane; + u8 clk_pol; + u8 data1_lane; + u8 data1_pol; + u8 data2_lane; + u8 data2_pol; + + struct { + u16 regn; + u16 regm; + u16 regm_dispc; + u16 regm_dsi; + + u16 lp_clk_div; + + u16 lck_div; + u16 pck_div; + } div; + + bool ext_te; + u8 ext_te_gpio; + } dsi; + + struct { + enum omap_dss_venc_type type; + bool invert_polarity; + } venc; + } phy; + + struct { + struct omap_video_timings timings; + + int acbi; /* ac-bias pin transitions per interrupt */ + /* Unit: line clocks */ + int acb; /* ac-bias pin frequency */ + + enum omap_panel_config config; + } panel; + + struct { + u8 pixel_size; + struct rfbi_timings rfbi_timings; + } ctrl; + + int reset_gpio; + + int max_backlight_level; + + const char *name; + + /* used to match device to driver */ + const char *driver_name; + + void *data; + + struct omap_dss_driver *driver; + + /* helper variable for driver suspend/resume */ + bool activate_after_resume; + + enum omap_display_caps caps; + + struct omap_overlay_manager *manager; + + enum omap_dss_display_state state; + + /* platform specific */ + int (*platform_enable)(struct omap_dss_device *dssdev); + void (*platform_disable)(struct omap_dss_device *dssdev); + int (*set_backlight)(struct omap_dss_device *dssdev, int level); + int (*get_backlight)(struct omap_dss_device *dssdev); +}; + +struct omap_dss_driver { + struct device_driver driver; + + int (*probe)(struct omap_dss_device *); + void (*remove)(struct omap_dss_device *); + + int (*enable)(struct omap_dss_device *display); + void (*disable)(struct omap_dss_device *display); + int (*suspend)(struct omap_dss_device *display); + int (*resume)(struct omap_dss_device *display); + int (*run_test)(struct omap_dss_device *display, int test); + + int (*set_update_mode)(struct omap_dss_device *dssdev, + enum omap_dss_update_mode); + enum omap_dss_update_mode (*get_update_mode)( + struct omap_dss_device *dssdev); + + int (*update)(struct omap_dss_device *dssdev, + u16 x, u16 y, u16 w, u16 h); + int (*sync)(struct omap_dss_device *dssdev); + + int (*enable_te)(struct omap_dss_device *dssdev, bool enable); + int (*get_te)(struct omap_dss_device *dssdev); + + u8 (*get_rotate)(struct omap_dss_device *dssdev); + int (*set_rotate)(struct omap_dss_device *dssdev, u8 rotate); + + bool (*get_mirror)(struct omap_dss_device *dssdev); + int (*set_mirror)(struct omap_dss_device *dssdev, bool enable); + + int (*memory_read)(struct omap_dss_device *dssdev, + void *buf, size_t size, + u16 x, u16 y, u16 w, u16 h); + + void (*get_resolution)(struct omap_dss_device *dssdev, + u16 *xres, u16 *yres); + int (*get_recommended_bpp)(struct omap_dss_device *dssdev); + + int (*check_timings)(struct omap_dss_device *dssdev, + struct omap_video_timings *timings); + void (*set_timings)(struct omap_dss_device *dssdev, + struct omap_video_timings *timings); + void (*get_timings)(struct omap_dss_device *dssdev, + struct omap_video_timings *timings); + + int (*set_wss)(struct omap_dss_device *dssdev, u32 wss); + u32 (*get_wss)(struct omap_dss_device *dssdev); +}; + +int omap_dss_register_driver(struct omap_dss_driver *); +void omap_dss_unregister_driver(struct omap_dss_driver *); + +int omap_dss_register_device(struct omap_dss_device *); +void omap_dss_unregister_device(struct omap_dss_device *); + +void omap_dss_get_device(struct omap_dss_device *dssdev); +void omap_dss_put_device(struct omap_dss_device *dssdev); +#define for_each_dss_dev(d) while ((d = omap_dss_get_next_device(d)) != NULL) +struct omap_dss_device *omap_dss_get_next_device(struct omap_dss_device *from); +struct omap_dss_device *omap_dss_find_device(void *data, + int (*match)(struct omap_dss_device *dssdev, void *data)); + +int omap_dss_start_device(struct omap_dss_device *dssdev); +void omap_dss_stop_device(struct omap_dss_device *dssdev); + +int omap_dss_get_num_overlay_managers(void); +struct omap_overlay_manager *omap_dss_get_overlay_manager(int num); + +int omap_dss_get_num_overlays(void); +struct omap_overlay *omap_dss_get_overlay(int num); + +void omapdss_default_get_resolution(struct omap_dss_device *dssdev, + u16 *xres, u16 *yres); +int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev); + +typedef void (*omap_dispc_isr_t) (void *arg, u32 mask); +int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask); +int omap_dispc_unregister_isr(omap_dispc_isr_t isr, void *arg, u32 mask); + +int omap_dispc_wait_for_irq_timeout(u32 irqmask, unsigned long timeout); +int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask, + unsigned long timeout); + +#define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver) +#define to_dss_device(x) container_of((x), struct omap_dss_device, dev) + +void omapdss_dsi_vc_enable_hs(int channel, bool enable); +int omapdss_dsi_enable_te(struct omap_dss_device *dssdev, bool enable); + +int omap_dsi_prepare_update(struct omap_dss_device *dssdev, + u16 *x, u16 *y, u16 *w, u16 *h, + bool enlarge_update_area); +int omap_dsi_update(struct omap_dss_device *dssdev, + int channel, + u16 x, u16 y, u16 w, u16 h, + void (*callback)(int, void *), void *data); +int omap_dsi_request_vc(struct omap_dss_device *dssdev, int *channel); +int omap_dsi_set_vc_id(struct omap_dss_device *dssdev, int channel, int vc_id); +void omap_dsi_release_vc(struct omap_dss_device *dssdev, int channel); + +int omapdss_dsi_display_enable(struct omap_dss_device *dssdev); +void omapdss_dsi_display_disable(struct omap_dss_device *dssdev); + +int omapdss_dpi_display_enable(struct omap_dss_device *dssdev); +void omapdss_dpi_display_disable(struct omap_dss_device *dssdev); +void dpi_set_timings(struct omap_dss_device *dssdev, + struct omap_video_timings *timings); +int dpi_check_timings(struct omap_dss_device *dssdev, + struct omap_video_timings *timings); + +int omapdss_sdi_display_enable(struct omap_dss_device *dssdev); +void omapdss_sdi_display_disable(struct omap_dss_device *dssdev); + +int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev); +void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev); +int omap_rfbi_prepare_update(struct omap_dss_device *dssdev, + u16 *x, u16 *y, u16 *w, u16 *h); +int omap_rfbi_update(struct omap_dss_device *dssdev, + u16 x, u16 y, u16 w, u16 h, + void (*callback)(void *), void *data); + +#endif -- cgit v1.2.1 From f8ae2f08d2c4574ca5c3923d2463ef106b116c2a Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Tue, 10 May 2011 19:48:10 +0300 Subject: OMAP: DSS2: Move panel-generic-dpi.h to include/video/ arch/arm/plat-omap/include/plat/panel-generic-dpi.h is an include for the OMAP DSS panel driver for generic DPI displays. A more logical place for it is in include/video. Signed-off-by: Tomi Valkeinen --- include/video/omap-panel-generic-dpi.h | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 include/video/omap-panel-generic-dpi.h (limited to 'include/video') diff --git a/include/video/omap-panel-generic-dpi.h b/include/video/omap-panel-generic-dpi.h new file mode 100644 index 000000000000..127e3f20328e --- /dev/null +++ b/include/video/omap-panel-generic-dpi.h @@ -0,0 +1,37 @@ +/* + * Header for generic DPI panel driver + * + * Copyright (C) 2010 Canonical Ltd. + * Author: Bryan Wu + * + * 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. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#ifndef __OMAP_PANEL_GENERIC_DPI_H +#define __OMAP_PANEL_GENERIC_DPI_H + +struct omap_dss_device; + +/** + * struct panel_generic_dpi_data - panel driver configuration data + * @name: panel name + * @platform_enable: platform specific panel enable function + * @platform_disable: platform specific panel disable function + */ +struct panel_generic_dpi_data { + const char *name; + int (*platform_enable)(struct omap_dss_device *dssdev); + void (*platform_disable)(struct omap_dss_device *dssdev); +}; + +#endif /* __OMAP_PANEL_GENERIC_DPI_H */ -- cgit v1.2.1 From 4e9f99d75cc6979b92d03ff9ae129c652c00a8d3 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 11 May 2011 14:10:07 +0300 Subject: OMAP: DSS2: Move nokia-dsi-panel.h to include/video/ arch/arm/plat-omap/include/plat/nokia-dsi-panel.h is an include for the OMAP DSS panel driver for Nokia's DSI displays. A more logical place for it is in include/video. Signed-off-by: Tomi Valkeinen --- include/video/omap-panel-nokia-dsi.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 include/video/omap-panel-nokia-dsi.h (limited to 'include/video') diff --git a/include/video/omap-panel-nokia-dsi.h b/include/video/omap-panel-nokia-dsi.h new file mode 100644 index 000000000000..e109b21e975a --- /dev/null +++ b/include/video/omap-panel-nokia-dsi.h @@ -0,0 +1,31 @@ +#ifndef __OMAP_NOKIA_DSI_PANEL_H +#define __OMAP_NOKIA_DSI_PANEL_H + +struct omap_dss_device; + +/** + * struct nokia_dsi_panel_data - Nokia DSI panel driver configuration + * @name: panel name + * @use_ext_te: use external TE + * @ext_te_gpio: external TE GPIO + * @use_esd_check: perform ESD checks + * @max_backlight_level: maximum backlight level + * @set_backlight: pointer to backlight set function + * @get_backlight: pointer to backlight get function + */ +struct nokia_dsi_panel_data { + const char *name; + + int reset_gpio; + + bool use_ext_te; + int ext_te_gpio; + + bool use_esd_check; + + int max_backlight_level; + int (*set_backlight)(struct omap_dss_device *dssdev, int level); + int (*get_backlight)(struct omap_dss_device *dssdev); +}; + +#endif /* __OMAP_NOKIA_DSI_PANEL_H */ -- cgit v1.2.1 From c6940a3dc59d9628c8d407b98b6f57df69e3ef52 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Tue, 22 Feb 2011 13:36:10 +0200 Subject: OMAP: DSS2: move dss device clock configuration Clock configuration was defined inside dssdev.phy.dsi struct. The clock config doesn't really belong there, and so it's moved to dssdev.clock struct. Now the explicit clock configuration could also be used for other interfaces than DSI, although there's no support for it currently. Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 39738688c7ce..53ca97c9793c 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -399,18 +399,6 @@ struct omap_dss_device { u8 data2_lane; u8 data2_pol; - struct { - u16 regn; - u16 regm; - u16 regm_dispc; - u16 regm_dsi; - - u16 lp_clk_div; - - u16 lck_div; - u16 pck_div; - } div; - bool ext_te; u8 ext_te_gpio; } dsi; @@ -421,6 +409,22 @@ struct omap_dss_device { } venc; } phy; + struct { + struct { + u16 lck_div; + u16 pck_div; + } dispc; + + struct { + u16 regn; + u16 regm; + u16 regm_dispc; + u16 regm_dsi; + + u16 lp_clk_div; + } dsi; + } clocks; + struct { struct omap_video_timings timings; -- cgit v1.2.1 From 7a0987bf2cf2683901d0cd7f1504023da2584c5f Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Wed, 16 Jun 2010 15:26:36 +0300 Subject: OMAP: DSS2: Add method for querying display dimensions from DSS drivers Add get_dimensions() to struct omap_dss_driver. Use the call, if supported by the driver, in OMAPFB. Signed-off-by: Jani Nikula Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 53ca97c9793c..f0789292c7c2 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -505,6 +505,8 @@ struct omap_dss_driver { void (*get_resolution)(struct omap_dss_device *dssdev, u16 *xres, u16 *yres); + void (*get_dimensions)(struct omap_dss_device *dssdev, + u32 *width, u32 *height); int (*get_recommended_bpp)(struct omap_dss_device *dssdev); int (*check_timings)(struct omap_dss_device *dssdev, -- cgit v1.2.1 From 06b2b0d597ab6e3011e8215d02b2aa5f831efbc7 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 31 Mar 2011 12:34:06 +0300 Subject: OMAP: DSS2: make omap_dss_(un)register_device static omap_dss_register_device and omap_dss_unregister_device can only be called from core.c, so we can make it static. Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index f0789292c7c2..4beaee19f5f9 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -523,9 +523,6 @@ struct omap_dss_driver { int omap_dss_register_driver(struct omap_dss_driver *); void omap_dss_unregister_driver(struct omap_dss_driver *); -int omap_dss_register_device(struct omap_dss_device *); -void omap_dss_unregister_device(struct omap_dss_device *); - void omap_dss_get_device(struct omap_dss_device *dssdev); void omap_dss_put_device(struct omap_dss_device *dssdev); #define for_each_dss_dev(d) while ((d = omap_dss_get_next_device(d)) != NULL) -- cgit v1.2.1 From 89a35e5170fc579e4fc3a1f3444c5dc1aa36904d Mon Sep 17 00:00:00 2001 From: Archit Taneja Date: Tue, 12 Apr 2011 13:52:23 +0530 Subject: OMAP2PLUS: DSS2: Change enum "dss_clk_source" to "omap_dss_clk_source" Change enum dss_clk_source to omap_dss_clock_source and move it to 'plat/display.h'. Change the enum members to attach "OMAP_" in the beginning. These changes are done in order to specify the clock sources for DSS in the board file. Signed-off-by: Archit Taneja Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 4beaee19f5f9..c17dd59d9853 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -172,6 +172,15 @@ enum omap_overlay_manager_caps { OMAP_DSS_OVL_MGR_CAP_DISPC = 1 << 0, }; +enum omap_dss_clk_source { + OMAP_DSS_CLK_SRC_FCK = 0, /* OMAP2/3: DSS1_ALWON_FCLK + * OMAP4: DSS_FCLK */ + OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC, /* OMAP3: DSI1_PLL_FCLK + * OMAP4: PLL1_CLK1 */ + OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI, /* OMAP3: DSI2_PLL_FCLK + * OMAP4: PLL1_CLK2 */ +}; + /* RFBI */ struct rfbi_timings { -- cgit v1.2.1 From e888166247c0b23d3ccc8e54cf92de7325d71145 Mon Sep 17 00:00:00 2001 From: Archit Taneja Date: Tue, 12 Apr 2011 13:52:24 +0530 Subject: OMAP2PLUS: DSS2: Add clock sources to dss device clock configuration Add enum dss_clock_source in dssdev.clocks struct so that the clock sources can be specified in the board file. Replace hard coded clock sources in dsi.c, dpi.c and replace them with the new clock source members in dssdev.clocks. Modify the sdp4430_lcd_device struct in board-4430sdp.c to specify clock sources for DISPC_FCLK, LCD1_CLK and DSI1_FCLK. Signed-off-by: Archit Taneja Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index c17dd59d9853..c57a046db538 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -420,8 +420,13 @@ struct omap_dss_device { struct { struct { - u16 lck_div; - u16 pck_div; + struct { + u16 lck_div; + u16 pck_div; + enum omap_dss_clk_source lcd_clk_src; + } channel; + + enum omap_dss_clk_source dispc_fclk_src; } dispc; struct { @@ -431,6 +436,7 @@ struct omap_dss_device { u16 regm_dsi; u16 lp_clk_div; + enum omap_dss_clk_source dsi_fclk_src; } dsi; } clocks; -- cgit v1.2.1 From 6cb07b256af233965663d6dfc329d7df3dcae786 Mon Sep 17 00:00:00 2001 From: Archit Taneja Date: Tue, 12 Apr 2011 13:52:25 +0530 Subject: OMAP: DSS2: HDMI: Use dss_device clock configuration for HDMI PLL parameters Move some of the configurable HDMI PLL parameters to dssdev.clock struct. Cleanup the function hdmi_compute_pll() by using the parameters defined in the board file and do some cosmetic modifications. Signed-off-by: Archit Taneja Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index c57a046db538..8138613c3112 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -438,6 +438,11 @@ struct omap_dss_device { u16 lp_clk_div; enum omap_dss_clk_source dsi_fclk_src; } dsi; + + struct { + u16 regn; + u16 regm2; + } hdmi; } clocks; struct { -- cgit v1.2.1 From 2a89dc15331983621b772240ebef9dea2cbe5322 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 30 Jul 2010 12:39:34 +0300 Subject: OMAP: DSS2: DSI: add option to leave DSI lanes powered on The DSI pins are powered by VDDS_DSI. If VDDS_DSI is off, the DSI pins are floating even if they are pinmuxed to, say, safe mode and there's a pull down/up. This patch gives the panel drivers an option to leave the VDDS_DSI power enabled while the DSS itself is turned off. This can be used to keep the DSI lanes in a valid state while DSS is off, if the DSI pins are muxed for pull down (not done in this patch). There will be a slight power consumption increase (~100 uA?) when the VDDS_DSI is left on, but because this option is used when the panel is left on, the regulator consumption is negligible compared to panel power consumption. When the panel is fully turned off the VDDS_DSI is also turned off. As an added bonus this will give us faster start up time when starting up the DSS and the regulator is already enabled. Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 8138613c3112..0a10a234a989 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -589,7 +589,8 @@ int omap_dsi_set_vc_id(struct omap_dss_device *dssdev, int channel, int vc_id); void omap_dsi_release_vc(struct omap_dss_device *dssdev, int channel); int omapdss_dsi_display_enable(struct omap_dss_device *dssdev); -void omapdss_dsi_display_disable(struct omap_dss_device *dssdev); +void omapdss_dsi_display_disable(struct omap_dss_device *dssdev, + bool disconnect_lanes); int omapdss_dpi_display_enable(struct omap_dss_device *dssdev); void omapdss_dpi_display_disable(struct omap_dss_device *dssdev); -- cgit v1.2.1 From 22d6d676261a5e204a7078df21459747750c92fb Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Mon, 11 Oct 2010 11:33:30 +0300 Subject: OMAP: DSS2: DSI: add parameter to enter ulps on disable Add parameter to omapdss_dsi_display_disable() which the panel driver can use to tell if the DSI lanes should be put to ULPS before disabling the interface. This can be used to skip ULPS entry in cases where the panel doesn't care about ULPS state, for example when the panel will be reset, or when the display interface will be enabled again right after the disable. This will speed up the operation considerably in cases where entering ULPS would fail with timeout, and the panel driver isn't even interested in entering ULPS. Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 0a10a234a989..44a864648c15 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -590,7 +590,7 @@ void omap_dsi_release_vc(struct omap_dss_device *dssdev, int channel); int omapdss_dsi_display_enable(struct omap_dss_device *dssdev); void omapdss_dsi_display_disable(struct omap_dss_device *dssdev, - bool disconnect_lanes); + bool disconnect_lanes, bool enter_ulps); int omapdss_dpi_display_enable(struct omap_dss_device *dssdev); void omapdss_dpi_display_disable(struct omap_dss_device *dssdev); -- cgit v1.2.1 From d1f5857e4bc9b2620fb3e84b1dbaa0ac11b831b4 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 30 Jul 2010 11:57:57 +0300 Subject: OMAP: DSS2: DSI: Add DSI pad muxing support Add dsi_mux_pads function pointer to omap_dss_board_info, and use the function pointer in DSI code to configure the DSI pads either to normal DSI operation, or to pull down when in ULPS. Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 44a864648c15..ab7d6564e29b 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -233,6 +233,7 @@ struct omap_dss_board_info { int num_devices; struct omap_dss_device **devices; struct omap_dss_device *default_device; + void (*dsi_mux_pads)(bool enable); }; #if defined(CONFIG_OMAP2_DSS_MODULE) || defined(CONFIG_OMAP2_DSS) -- cgit v1.2.1 From 33a410be6f4b760f0abe3ec05ac808f1c391bd41 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 24 Mar 2011 13:58:01 +0200 Subject: OMAP: DSS2: Taal: Implement configurable ESD interval ESD check in Taal driver is currently on/off feature with hardcoded interval. This patch changes it to a configurable interval, which can be set from the board file. Signed-off-by: Tomi Valkeinen --- include/video/omap-panel-nokia-dsi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/video') diff --git a/include/video/omap-panel-nokia-dsi.h b/include/video/omap-panel-nokia-dsi.h index e109b21e975a..3bd8d231add7 100644 --- a/include/video/omap-panel-nokia-dsi.h +++ b/include/video/omap-panel-nokia-dsi.h @@ -8,7 +8,7 @@ struct omap_dss_device; * @name: panel name * @use_ext_te: use external TE * @ext_te_gpio: external TE GPIO - * @use_esd_check: perform ESD checks + * @esd_interval: interval of ESD checks, 0 = disabled (ms) * @max_backlight_level: maximum backlight level * @set_backlight: pointer to backlight set function * @get_backlight: pointer to backlight get function @@ -21,7 +21,7 @@ struct nokia_dsi_panel_data { bool use_ext_te; int ext_te_gpio; - bool use_esd_check; + unsigned esd_interval; int max_backlight_level; int (*set_backlight)(struct omap_dss_device *dssdev, int level); -- cgit v1.2.1 From 1abf78145412ef185d553dccfab661e7c88c0b20 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 24 Mar 2011 14:53:27 +0200 Subject: OMAP: DSS2: Taal: Implement ULPS functionality ULPS is a low power state where the DSI lanes are kept at ground. This patch implements ULPS by having a DSI bus inactivity timer which triggers the entry to ULPS. ULPS exit will happen automatically when the driver needs to do something on the DSI lanes. The ulps_timeout is configurable from board file or via sysfs. Additionally another sysfs file, "ulps", can be used to check the current ULPS state, or to manually enter or exit ULPS. Signed-off-by: Tomi Valkeinen --- include/video/omap-panel-nokia-dsi.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/video') diff --git a/include/video/omap-panel-nokia-dsi.h b/include/video/omap-panel-nokia-dsi.h index 3bd8d231add7..921ae9327228 100644 --- a/include/video/omap-panel-nokia-dsi.h +++ b/include/video/omap-panel-nokia-dsi.h @@ -9,6 +9,7 @@ struct omap_dss_device; * @use_ext_te: use external TE * @ext_te_gpio: external TE GPIO * @esd_interval: interval of ESD checks, 0 = disabled (ms) + * @ulps_timeout: time to wait before entering ULPS, 0 = disabled (ms) * @max_backlight_level: maximum backlight level * @set_backlight: pointer to backlight set function * @get_backlight: pointer to backlight get function @@ -22,6 +23,7 @@ struct nokia_dsi_panel_data { int ext_te_gpio; unsigned esd_interval; + unsigned ulps_timeout; int max_backlight_level; int (*set_backlight)(struct omap_dss_device *dssdev, int level); -- cgit v1.2.1 From 1ffefe755c2681752a10ae50b2b17e70147bb194 Mon Sep 17 00:00:00 2001 From: Archit Taneja Date: Thu, 12 May 2011 17:26:24 +0530 Subject: OMAP: DSS2: DSI: Add extra omap_dss_device argument in functions exported by dsi Add pointer to omap_dss_device struct as an argument in the functions which are exported to dsi panel drivers. This argument will tell the DSI driver which DSI interface's data it has to choose. Signed-off-by: Archit Taneja Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index ab7d6564e29b..e8e27caac190 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -214,18 +214,26 @@ int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode, int hs_pol_inv, int vs_pol_inv, int extif_div); /* DSI */ -void dsi_bus_lock(void); -void dsi_bus_unlock(void); -int dsi_vc_dcs_write(int channel, u8 *data, int len); -int dsi_vc_dcs_write_0(int channel, u8 dcs_cmd); -int dsi_vc_dcs_write_1(int channel, u8 dcs_cmd, u8 param); -int dsi_vc_dcs_write_nosync(int channel, u8 *data, int len); -int dsi_vc_dcs_read(int channel, u8 dcs_cmd, u8 *buf, int buflen); -int dsi_vc_dcs_read_1(int channel, u8 dcs_cmd, u8 *data); -int dsi_vc_dcs_read_2(int channel, u8 dcs_cmd, u8 *data1, u8 *data2); -int dsi_vc_set_max_rx_packet_size(int channel, u16 len); -int dsi_vc_send_null(int channel); -int dsi_vc_send_bta_sync(int channel); +void dsi_bus_lock(struct omap_dss_device *dssdev); +void dsi_bus_unlock(struct omap_dss_device *dssdev); +int dsi_vc_dcs_write(struct omap_dss_device *dssdev, int channel, u8 *data, + int len); +int dsi_vc_dcs_write_0(struct omap_dss_device *dssdev, int channel, + u8 dcs_cmd); +int dsi_vc_dcs_write_1(struct omap_dss_device *dssdev, int channel, u8 dcs_cmd, + u8 param); +int dsi_vc_dcs_write_nosync(struct omap_dss_device *dssdev, int channel, + u8 *data, int len); +int dsi_vc_dcs_read(struct omap_dss_device *dssdev, int channel, u8 dcs_cmd, + u8 *buf, int buflen); +int dsi_vc_dcs_read_1(struct omap_dss_device *dssdev, int channel, u8 dcs_cmd, + u8 *data); +int dsi_vc_dcs_read_2(struct omap_dss_device *dssdev, int channel, u8 dcs_cmd, + u8 *data1, u8 *data2); +int dsi_vc_set_max_rx_packet_size(struct omap_dss_device *dssdev, int channel, + u16 len); +int dsi_vc_send_null(struct omap_dss_device *dssdev, int channel); +int dsi_vc_send_bta_sync(struct omap_dss_device *dssdev, int channel); /* Board specific data */ struct omap_dss_board_info { @@ -575,7 +583,8 @@ int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask, #define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver) #define to_dss_device(x) container_of((x), struct omap_dss_device, dev) -void omapdss_dsi_vc_enable_hs(int channel, bool enable); +void omapdss_dsi_vc_enable_hs(struct omap_dss_device *dssdev, int channel, + bool enable); int omapdss_dsi_enable_te(struct omap_dss_device *dssdev, bool enable); int omap_dsi_prepare_update(struct omap_dss_device *dssdev, -- cgit v1.2.1 From a72b64b99918ee801a3a6abf5391e356752bcad0 Mon Sep 17 00:00:00 2001 From: Archit Taneja Date: Thu, 12 May 2011 17:26:26 +0530 Subject: OMAP: DSS2: Pass platform_device as an argument in dsi functions The DSI interface is represented as a platform device, using the DSI platform driver(dsi.c). The current DSI driver design is capable of running only one instance of a DSI device. On OMAP4, there are 2 very similar DSI modules which can be represented as instances of "omapdss_dsi" platform device. Add member "module" in "dssdev.phy.dsi" that tells us which DSI module's lanes the panel is connected to. Modify dsi.c functions to take the device's platform_device struct pointer, provide functions dsi_get_dsidev_from_dssdev() and dsi_get_dsidev_from_id() take the panel's omap_dss_device and module number respectively, and return the platform_device pointer. Currently, the dsi struct is declared globally and is accessed when dsi data is needed. The new pdev argument will be used later to provide the platform device's dsi related data. Signed-off-by: Archit Taneja Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index e8e27caac190..91290656c315 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -417,6 +417,8 @@ struct omap_dss_device { u8 data2_lane; u8 data2_pol; + int module; + bool ext_te; u8 ext_te_gpio; } dsi; -- cgit v1.2.1 From 5a8b572d832772722c3b3b7578e7fb968560fcf3 Mon Sep 17 00:00:00 2001 From: Archit Taneja Date: Thu, 12 May 2011 17:26:29 +0530 Subject: OMAP4: DSS2: DSI: Changes for DSI2 on OMAP4 Introduce DSI2 PLL clock sources needed by LCD2 channel and DSI2 Protocol engine and DISPC Functional clock. Do the following: - Modify dss_get_dsi_clk_source() and dss_select_dsi_clk_source() to take the dsi module number as an argument. - Create debugfs files for dsi2, split the corresponding debugfs functions. - Allow DPI to use these new clock sources. Signed-off-by: Archit Taneja Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 91290656c315..e3c9e0813f54 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -179,6 +179,8 @@ enum omap_dss_clk_source { * OMAP4: PLL1_CLK1 */ OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI, /* OMAP3: DSI2_PLL_FCLK * OMAP4: PLL1_CLK2 */ + OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC, /* OMAP4: PLL2_CLK1 */ + OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DSI, /* OMAP4: PLL2_CLK2 */ }; /* RFBI */ -- cgit v1.2.1 From 773139f1759f9dc5efe2c314df9aad88b7364015 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 21 Apr 2011 19:50:31 +0300 Subject: OMAP: DSS2: RFBI: add rfbi_bus_lock Add similar bus lock to RFBI as is in DSI. The panel driver can use the bus lock to mark that the RFBI bus is currently in use. Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index e3c9e0813f54..943c0e85f2fc 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -214,6 +214,8 @@ int omap_rfbi_enable_te(bool enable, unsigned line); int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode, unsigned hs_pulse_time, unsigned vs_pulse_time, int hs_pol_inv, int vs_pol_inv, int extif_div); +void rfbi_bus_lock(void); +void rfbi_bus_unlock(void); /* DSI */ void dsi_bus_lock(struct omap_dss_device *dssdev); -- cgit v1.2.1 From 1d5952a868c3059dd0d431ffde357f1506823f5e Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 29 Apr 2011 15:57:01 +0300 Subject: OMAP: DSS2: RFBI: add omap_rfbi_configure Add omap_rfbi_configure() which the panel driver can use to reconfigure the data element size and the number of data lines in the RFBI bus. Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 943c0e85f2fc..b1b5ba55976e 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -625,5 +625,7 @@ int omap_rfbi_prepare_update(struct omap_dss_device *dssdev, int omap_rfbi_update(struct omap_dss_device *dssdev, u16 x, u16 y, u16 w, u16 h, void (*callback)(void *), void *data); +int omap_rfbi_configure(struct omap_dss_device *dssdev, int pixel_size, + int data_lines); #endif -- cgit v1.2.1 From 75d7247c07d27d046323504e2dbca5b3e94fbece Mon Sep 17 00:00:00 2001 From: Archit Taneja Date: Mon, 16 May 2011 15:17:08 +0530 Subject: OMAP: DSS2: DSI: Get number of DSI data lanes using DSI_GNQ register On OMAP3, the DSI module has 2 data lanes. On OMAP4, DSI1 has 4 data lanes and DSI2 has 2 data lanes. Introduce function dsi_get_num_data_lanes() which returns the number of data lanes on the dsi interface, introduce function dsi_get_num_data_lanes_dssdev() which returns the number of data lanes used by the omap_dss_device connected to the lanes. Use the DSI_GNQ register on OMAP4 to get the number of data lanes, modify dsi.c to use the number of lanes and the extra data lanes on DSI1. Signed-off-by: Archit Taneja Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index b1b5ba55976e..e62674599b3d 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -420,6 +420,10 @@ struct omap_dss_device { u8 data1_pol; u8 data2_lane; u8 data2_pol; + u8 data3_lane; + u8 data3_pol; + u8 data4_lane; + u8 data4_pol; int module; -- cgit v1.2.1 From f20e42205ab172cfd449c10e5183e2e371a629d6 Mon Sep 17 00:00:00 2001 From: Amber Jain Date: Thu, 19 May 2011 19:47:50 +0530 Subject: OMAP: DSS2: Add new color formats for OMAP4 Add new color formats supported by OMAP4: NV12, RGBA16, RGBX16, ARGB16_1555, XRGB16_1555. NV12 color format is defined here, its support in DSS will be added separately. Signed-off-by: Amber Jain Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index e62674599b3d..5658b4b83db8 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -86,6 +86,11 @@ enum omap_color_mode { OMAP_DSS_COLOR_ARGB32 = 1 << 11, /* ARGB32 */ OMAP_DSS_COLOR_RGBA32 = 1 << 12, /* RGBA32 */ OMAP_DSS_COLOR_RGBX32 = 1 << 13, /* RGBx32 */ + OMAP_DSS_COLOR_NV12 = 1 << 14, /* NV12 format: YUV 4:2:0 */ + OMAP_DSS_COLOR_RGBA16 = 1 << 15, /* RGBA16 - 4444 */ + OMAP_DSS_COLOR_RGBX16 = 1 << 16, /* RGBx16 - 4444 */ + OMAP_DSS_COLOR_ARGB16_1555 = 1 << 17, /* ARGB16 - 1555 */ + OMAP_DSS_COLOR_XRGB16_1555 = 1 << 18, /* xRGB16 - 1555 */ }; enum omap_lcd_display_type { -- cgit v1.2.1 From 0d66cbb53eca4ab3db85d9189d5a85c9fac49b84 Mon Sep 17 00:00:00 2001 From: Amber Jain Date: Thu, 19 May 2011 19:47:54 +0530 Subject: OMAP: DSS2: Add support for NV12 format Add the support for NV12 color format. Configure base address for UV component of NV12 color format. Change the way chroma scaling is handled for YUV formats on OMAP4 by enabling chroma-resampling for video pipeline and hence using FIR2 register set for scaling UV. Changes to _dispc_set_scaling(), because of the reason above, are: - call _dispc_set_scaling_common() to handle scaling for all color formats except for OMAP4 where it only handles scaling for RGB or Y-component - call _dispc_set_scaling_uv() for special handling required for UV component on OMAP4. - dispc_set_scaling_uv() also resets chroma-resampling bit for RGB color modes. Contains chroma scaling (_dispc_set_scaling_uv) design and implemented by Lajos Molnar Signed-off-by: Amber Jain Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 5658b4b83db8..892b97f8e157 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -305,6 +305,7 @@ struct omap_overlay_info { u32 paddr; void __iomem *vaddr; + u32 p_uv_addr; /* for NV12 format */ u16 screen_width; u16 width; u16 height; -- cgit v1.2.1