From 5476e74a03f4be972708162050c8ac7fe150449f Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 3 Nov 2011 16:34:20 +0200 Subject: OMAPDSS: remove partial update from DSI Partial update for manual update displays has never worked quite well: * The HW has limitations on the update area, and the x and width need to be even. * Showing a part of a scaled overlay causes artifacts. * Makes the management of dispc very complex Considering the above points and the fact that partial update is not used anywhere, this and the following patches remove the partial update support. This will greatly simplify the following re-write of the apply mechanism to get proper locking and additional features like fifo-merge. This patch removes the partial update from the dsi.c. Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 378c7ed6760b..60bf4260253b 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -662,12 +662,7 @@ 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, - 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, +int omap_dsi_update(struct omap_dss_device *dssdev, int channel, 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); -- cgit v1.2.3 From 7797c6da64852b06b585b7eca8d3f657bfc9fa47 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 4 Nov 2011 10:22:46 +0200 Subject: OMAPDSS: hide manager's enable/disable() omap_overlay_manager struct contains enable() and disable() functions. However, these are only meant to be used from inside omapdss, and thus it's bad to expose the functions. This patch adds dss_mgr_enable() and dss_mgr_disable() functions to apply.c, which handle enabling and disabling the output. 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 60bf4260253b..04741cd4c32a 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -448,9 +448,6 @@ struct omap_overlay_manager { 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 { -- cgit v1.2.3 From be729178f0e0f31ab14b42b3fe5d6b4463fbeb3a Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 4 Nov 2011 10:30:47 +0200 Subject: OMAPDSS: APPLY: track whether a manager is enabled Add "enabled" field to struct omap_overlay_manager, which tells if the output is enabled or not. This will be used in apply.c in the following patches. 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 04741cd4c32a..d61efc3105a7 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -432,6 +432,8 @@ struct omap_overlay_manager { struct omap_dss_device *device; struct omap_overlay_manager_info info; + bool enabled; + bool device_changed; /* if true, info has been changed but not applied() yet */ bool info_dirty; -- cgit v1.2.3 From 5617ad097959cb39b96d08af0a9b3d51215deaba Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Sat, 5 Nov 2011 10:44:48 +0200 Subject: OMAPDSS: store managers in an array Overlay managers are stored in a linked list. There's no need for this list, as an array would do just as fine. This patch changes the code to use an array for overlay managers. Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index d61efc3105a7..fd5a96c5ecc5 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -418,7 +418,6 @@ struct omap_overlay_manager_info { struct omap_overlay_manager { struct kobject kobj; - struct list_head list; /* static fields */ const char *name; -- cgit v1.2.3 From 07e327c9c18b382656bf455051759be8182627ae Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Sat, 5 Nov 2011 10:59:59 +0200 Subject: OMAPDSS: store overlays in a list for each manager Current way of handling overlay-manager links is a bit strange: each manager has a static array, containing pointers to all the overlays (even those used by other managers). The overlays contain a pointer to the manager being used. This patch makes the system a bit saner: each manager has a linked list of overlays, and only the overlays linked to that manager are in the list. Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index fd5a96c5ecc5..eaeca89de152 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -423,8 +423,7 @@ struct omap_overlay_manager { const char *name; enum omap_channel id; enum omap_overlay_manager_caps caps; - int num_overlays; - struct omap_overlay **overlays; + struct list_head overlays; enum omap_display_type supported_displays; /* dynamic fields */ -- cgit v1.2.3 From 9a147a65de1ac89e506ef90413f41ebd96e03fd3 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 9 Nov 2011 15:30:11 +0200 Subject: OMAPDSS: DSI: call mgr_enable/disable for cmd mode displays The current code uses dsi_video_mode_enable/disable functions to enable/disable DISPC output for video mode displays. For command mode displays we have no notion in the DISPC side of whether the panel is enabled, except when a dss_mgr_start_update() call is made. However, to properly maintain the DISPC state in apply.c, we need to know if a manager used for a manual update display is currently in use. This patch achieves that by changing dsi_video_mode_enable/disable to dsi_enable/disable_video_output, which is called by both video and command mode displays. For video mode displays it starts the actual pixel stream, as it did before. For command mode displays it doesn't do anything else than mark that the manager is currently in use. Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index eaeca89de152..25ef771b0a31 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -294,8 +294,8 @@ 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); -int dsi_video_mode_enable(struct omap_dss_device *dssdev, int channel); -void dsi_video_mode_disable(struct omap_dss_device *dssdev, int channel); +int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel); +void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel); /* Board specific data */ struct omap_dss_board_info { -- cgit v1.2.3 From bf213523fe9708572a0b0a9149f7196a4f058564 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Tue, 15 Nov 2011 14:43:53 +0200 Subject: OMAPDSS: APPLY: move mgr->enabled to mgr_priv_data struct omap_overlay_manager contains "enabled"-field, used to track if the manager is enabled or not. This field should be internal to apply.c. This patch moves the field to mgr_priv_data, and applies the necessary locking when accessing the field. Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 25ef771b0a31..6e3e7a716838 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -430,8 +430,6 @@ struct omap_overlay_manager { struct omap_dss_device *device; struct omap_overlay_manager_info info; - bool enabled; - bool device_changed; /* if true, info has been changed but not applied() yet */ bool info_dirty; -- cgit v1.2.3 From aaa874a985158383c4b394c687c716ef26288741 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Tue, 15 Nov 2011 16:37:53 +0200 Subject: OMAPDSS: APPLY: rewrite overlay enable/disable Overlays are currently enabled and disabled with a boolean in the struct omap_overlay_info. The overlay info is set with ovl->set_overlay_info(), and made into use with mgr->apply(). This doesn't work properly, as the enable/disable status may affect also other overlays, for example when using fifo-merge. Thus the enabling and disabling of the overlay needs to be done outside the normal overlay configuration. This patch achieves that by doing the following things: 1) Add function pointers to struct omap_overlay: enable(), disable() and is_enabled(). These are used to do the obvious. The functions may block. 2) Move the "enabled" field from struct omap_overlay to ovl_priv_data. 3) Add a new route for settings to be applied to the HW, called "extra_info". The status of the normal info and extra_info are tracked separately. The point here is to allow the normal info to be changed and applied in non-blocking matter, whereas the extra_info can only be changed when holding the mutex. This makes it possible to, for example, set the overlay enable flag, apply it, and wait until the HW has taken the flag into use. This is not possible if the enable flag would be in the normal info, as a new value for the flag could be set at any time from the users of omapdss. Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 6e3e7a716838..9d01ff66659f 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -352,8 +352,6 @@ struct omap_dss_cpr_coefs { }; struct omap_overlay_info { - bool enabled; - u32 paddr; u32 p_uv_addr; /* for NV12 format */ u16 screen_width; @@ -391,6 +389,10 @@ struct omap_overlay { /* if true, info has been changed, but not applied() yet */ bool info_dirty; + int (*enable)(struct omap_overlay *ovl); + int (*disable)(struct omap_overlay *ovl); + bool (*is_enabled)(struct omap_overlay *ovl); + int (*set_manager)(struct omap_overlay *ovl, struct omap_overlay_manager *mgr); int (*unset_manager)(struct omap_overlay *ovl); -- cgit v1.2.3 From 388c4c6cbb335e69fe23c8d18bd4b0e8dd66901b Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 16 Nov 2011 13:58:07 +0200 Subject: OMAPDSS: APPLY: move mgr->info to apply.c struct omap_overlay_manager contains info and info_dirty fields, both of which should be internal to apply.c. This patch moves those fields into mgr_priv data, and names them user_info and user_info_dirty. 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 9d01ff66659f..0d5333f6e4a1 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -430,11 +430,8 @@ struct omap_overlay_manager { /* 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); -- cgit v1.2.3 From c1a9febfafa2a9a9ac09b2de4c80aa96b41a03d1 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 16 Nov 2011 14:11:56 +0200 Subject: OMAPDSS: APPLY: move ovl->info to apply.c struct omap_overlayr contains info and info_dirty fields, both of which should be internal to apply.c. This patch moves those fields into ovl_priv data, and names them user_info and user_info_dirty. 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 0d5333f6e4a1..2e2c53f5e7ca 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -383,11 +383,8 @@ struct omap_overlay { /* dynamic fields */ struct omap_overlay_manager *manager; - struct omap_overlay_info info; bool manager_changed; - /* if true, info has been changed, but not applied() yet */ - bool info_dirty; int (*enable)(struct omap_overlay *ovl); int (*disable)(struct omap_overlay *ovl); -- cgit v1.2.3 From 5d5a97a6fbf98f82ae50c837eba3ebcfea0902f8 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 16 Nov 2011 14:17:54 +0200 Subject: OMAPDSS: APPLY: move channel-field to extra_info set Setting overlay's output channel is currently handled at the same time as other overlay attributes. This is not right, as the normal attributes should only affect one overlay and manager, but changing the channel affects two managers. This patch moves the channel field into the "extra_info" set, handled together with enabled-status. Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 2e2c53f5e7ca..e629b0de3262 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -384,8 +384,6 @@ struct omap_overlay { /* dynamic fields */ struct omap_overlay_manager *manager; - bool manager_changed; - int (*enable)(struct omap_overlay *ovl); int (*disable)(struct omap_overlay *ovl); bool (*is_enabled)(struct omap_overlay *ovl); -- cgit v1.2.3 From ff4733dcf56480bebcd3801adde27213b893635d Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 16 Nov 2011 14:54:42 +0200 Subject: OMAPDSS: APPLY: remove device_changed field omap_overlay_manager contains device_changed field, which no longer has any use. So remove the field and the few places where it is touched. Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index e629b0de3262..98fc0267dd9e 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -426,8 +426,6 @@ struct omap_overlay_manager { /* dynamic fields */ struct omap_dss_device *device; - bool device_changed; - int (*set_device)(struct omap_overlay_manager *mgr, struct omap_dss_device *dssdev); int (*unset_device)(struct omap_overlay_manager *mgr); -- cgit v1.2.3 From 9d11c321a84266db2dba82cfb0d9d3bc17c326a8 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 18 Nov 2011 12:38:38 +0200 Subject: OMAPDSS: Add comments about blocking of ovl/mgr functions Add comments specifying what ovl/mgr functions may block. Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 98fc0267dd9e..39862b8c9805 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -384,6 +384,17 @@ struct omap_overlay { /* dynamic fields */ struct omap_overlay_manager *manager; + /* + * The following functions do not block: + * + * is_enabled + * set_overlay_info + * get_overlay_info + * + * The rest of the functions may block and cannot be called from + * interrupt context + */ + int (*enable)(struct omap_overlay *ovl); int (*disable)(struct omap_overlay *ovl); bool (*is_enabled)(struct omap_overlay *ovl); @@ -426,6 +437,17 @@ struct omap_overlay_manager { /* dynamic fields */ struct omap_dss_device *device; + /* + * The following functions do not block: + * + * set_manager_info + * get_manager_info + * apply + * + * The rest of the functions may block and cannot be called from + * interrupt context + */ + int (*set_device)(struct omap_overlay_manager *mgr, struct omap_dss_device *dssdev); int (*unset_device)(struct omap_overlay_manager *mgr); -- cgit v1.2.3 From ee9dfd82ff1317ac5c0147fe21508ad6d7df4cff Mon Sep 17 00:00:00 2001 From: Mythri P K Date: Mon, 2 Jan 2012 14:02:37 +0530 Subject: OMAPDSS: HDMI: Move duplicate code from boardfile Move duplicate HDMI mux_init code from omap4 and panda board file to display file. Signed-off-by: Mythri P K 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 39862b8c9805..c1e3cb0d2c5e 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -309,6 +309,8 @@ struct omap_dss_board_info { /* Init with the board info */ extern int omap_display_init(struct omap_dss_board_info *board_data); +/* HDMI mux init*/ +extern int omap_hdmi_init(void); struct omap_display_platform_data { struct omap_dss_board_info *board_data; -- cgit v1.2.3 From 9a9016832d2601a290db4dce6dd55552bdae5b1a Mon Sep 17 00:00:00 2001 From: Mythri P K Date: Mon, 2 Jan 2012 14:02:38 +0530 Subject: OMAPDSS: HDMI: Disable DDC internal pull up Disables the internal pull resistor for SDA and SCL which are enabled by default, as there are external pull up's in 4460 and 4430 ES2.3 SDP, Blaze and Panda Boards, It is done to avoid the EDID read failure. Signed-off-by: Ricardo Salveti de Araujo Signed-off-by: Mythri P K Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index c1e3cb0d2c5e..062b3b24ff10 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -200,6 +200,10 @@ enum omap_dss_clk_source { OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DSI, /* OMAP4: PLL2_CLK2 */ }; +enum omap_hdmi_flags { + OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP = 1 << 0, +}; + /* RFBI */ struct rfbi_timings { @@ -310,7 +314,7 @@ struct omap_dss_board_info { /* Init with the board info */ extern int omap_display_init(struct omap_dss_board_info *board_data); /* HDMI mux init*/ -extern int omap_hdmi_init(void); +extern int omap_hdmi_init(enum omap_hdmi_flags flags); struct omap_display_platform_data { struct omap_dss_board_info *board_data; -- cgit v1.2.3