@@ -485,6 +485,8 @@ static inline unsigned long hdmi_get_pixel_clock(void)
#endif
int omapdss_hdmi_display_enable(struct omap_dss_device *dssdev);
void omapdss_hdmi_display_disable(struct omap_dss_device *dssdev);
+void omapdss_hdmi_display_get_timing(struct omap_dss_device *dssdev,
+ struct omap_video_timings *timings);
void omapdss_hdmi_display_set_timing(struct omap_dss_device *dssdev,
struct omap_video_timings *timings);
int omapdss_hdmi_display_check_timing(struct omap_dss_device *dssdev,
@@ -544,6 +544,12 @@ static void hdmi_power_off(struct omap_dss_device *dssdev)
hdmi_runtime_put();
}
+void omapdss_hdmi_display_get_timing(struct omap_dss_device *dssdev,
+ struct omap_video_timings *timings)
+{
+ *timings = hdmi.ip_data.cfg.timings;
+}
+
int omapdss_hdmi_display_check_timing(struct omap_dss_device *dssdev,
struct omap_video_timings *timings)
{
@@ -41,13 +41,13 @@ static struct {
static int hdmi_panel_probe(struct omap_dss_device *dssdev)
{
+ struct omap_video_timings timings;
+
DSSDBG("ENTER hdmi_panel_probe\n");
- dssdev->panel.timings = (struct omap_video_timings)
- { 640, 480, 25175, 96, 16, 48, 2, 11, 31,
- OMAPDSS_SIG_ACTIVE_LOW, OMAPDSS_SIG_ACTIVE_LOW,
- false,
- };
+ omapdss_hdmi_display_get_timing(dssdev, &timings);
+
+ dssdev->panel.timings = timings;
DSSDBG("hdmi_panel_probe x_res= %d y_res = %d\n",
dssdev->panel.timings.x_res,
Add function omapdss_hdmi_display_get_timing() which returns the timings maintained by the HDMI interface driver in it's hdmi_config field. This prevents the need for the panel driver to configure default timings in it's probe. This function is just intended to be used once during the panel driver's probe. It makes sense for those interfaces which can be configured to a default timing. Signed-off-by: Archit Taneja <archit@ti.com> --- drivers/video/omap2/dss/dss.h | 2 ++ drivers/video/omap2/dss/hdmi.c | 6 ++++++ drivers/video/omap2/dss/hdmi_panel.c | 10 +++++----- 3 files changed, 13 insertions(+), 5 deletions(-)