diff options
author | Mythri P K <mythripk@ti.com> | 2012-01-06 07:22:10 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-01-25 06:48:34 -0500 |
commit | 9e4ed603e6ec71da9e0a7484a694f98dff869068 (patch) | |
tree | 6fd741d63a72b1f521c4c4d34bf19de6e3c3b103 /drivers/video/omap2 | |
parent | 46095b2d96bac92c2cc5ca557ec7de73e13311ab (diff) |
OMAPDSS: HDMI: remove duplicate code and mode parameter
code and mode parameters are already a part of the ip_data structure
so no need to keep the same parameters again in hdmi global structure.
Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r-- | drivers/video/omap2/dss/hdmi.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 6f027d30d5dd..92a66798f670 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c | |||
@@ -66,8 +66,6 @@ static struct { | |||
66 | struct omap_display_platform_data *pdata; | 66 | struct omap_display_platform_data *pdata; |
67 | struct platform_device *pdev; | 67 | struct platform_device *pdev; |
68 | struct hdmi_ip_data ip_data; | 68 | struct hdmi_ip_data ip_data; |
69 | int code; | ||
70 | int mode; | ||
71 | 69 | ||
72 | struct clk *sys_clk; | 70 | struct clk *sys_clk; |
73 | } hdmi; | 71 | } hdmi; |
@@ -162,7 +160,7 @@ static const struct hdmi_config *hdmi_find_timing( | |||
162 | int i; | 160 | int i; |
163 | 161 | ||
164 | for (i = 0; i < len; i++) { | 162 | for (i = 0; i < len; i++) { |
165 | if (timings_arr[i].cm.code == hdmi.code) | 163 | if (timings_arr[i].cm.code == hdmi.ip_data.cfg.cm.code) |
166 | return &timings_arr[i]; | 164 | return &timings_arr[i]; |
167 | } | 165 | } |
168 | return NULL; | 166 | return NULL; |
@@ -173,7 +171,7 @@ static const struct hdmi_config *hdmi_get_timings(void) | |||
173 | const struct hdmi_config *arr; | 171 | const struct hdmi_config *arr; |
174 | int len; | 172 | int len; |
175 | 173 | ||
176 | if (hdmi.mode == HDMI_DVI) { | 174 | if (hdmi.ip_data.cfg.cm.mode == HDMI_DVI) { |
177 | arr = vesa_timings; | 175 | arr = vesa_timings; |
178 | len = ARRAY_SIZE(vesa_timings); | 176 | len = ARRAY_SIZE(vesa_timings); |
179 | } else { | 177 | } else { |
@@ -313,9 +311,9 @@ static int hdmi_power_on(struct omap_dss_device *dssdev) | |||
313 | timing = hdmi_get_timings(); | 311 | timing = hdmi_get_timings(); |
314 | if (timing == NULL) { | 312 | if (timing == NULL) { |
315 | /* HDMI code 4 corresponds to 640 * 480 VGA */ | 313 | /* HDMI code 4 corresponds to 640 * 480 VGA */ |
316 | hdmi.code = 4; | 314 | hdmi.ip_data.cfg.cm.code = 4; |
317 | /* DVI mode 1 corresponds to HDMI 0 to DVI */ | 315 | /* DVI mode 1 corresponds to HDMI 0 to DVI */ |
318 | hdmi.mode = HDMI_DVI; | 316 | hdmi.ip_data.cfg.cm.mode = HDMI_DVI; |
319 | hdmi.ip_data.cfg = vesa_timings[0]; | 317 | hdmi.ip_data.cfg = vesa_timings[0]; |
320 | } else { | 318 | } else { |
321 | hdmi.ip_data.cfg = *timing; | 319 | hdmi.ip_data.cfg = *timing; |
@@ -339,8 +337,6 @@ static int hdmi_power_on(struct omap_dss_device *dssdev) | |||
339 | goto err; | 337 | goto err; |
340 | } | 338 | } |
341 | 339 | ||
342 | hdmi.ip_data.cfg.cm.mode = hdmi.mode; | ||
343 | hdmi.ip_data.cfg.cm.code = hdmi.code; | ||
344 | hdmi.ip_data.ops->video_configure(&hdmi.ip_data); | 340 | hdmi.ip_data.ops->video_configure(&hdmi.ip_data); |
345 | 341 | ||
346 | /* Make selection of HDMI in DSS */ | 342 | /* Make selection of HDMI in DSS */ |
@@ -407,8 +403,8 @@ void omapdss_hdmi_display_set_timing(struct omap_dss_device *dssdev) | |||
407 | struct hdmi_cm cm; | 403 | struct hdmi_cm cm; |
408 | 404 | ||
409 | cm = hdmi_get_code(&dssdev->panel.timings); | 405 | cm = hdmi_get_code(&dssdev->panel.timings); |
410 | hdmi.code = cm.code; | 406 | hdmi.ip_data.cfg.cm.code = cm.code; |
411 | hdmi.mode = cm.mode; | 407 | hdmi.ip_data.cfg.cm.mode = cm.mode; |
412 | 408 | ||
413 | if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) { | 409 | if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) { |
414 | int r; | 410 | int r; |
@@ -707,7 +703,7 @@ static int hdmi_audio_hw_params(struct snd_pcm_substream *substream, | |||
707 | static int hdmi_audio_startup(struct snd_pcm_substream *substream, | 703 | static int hdmi_audio_startup(struct snd_pcm_substream *substream, |
708 | struct snd_soc_dai *dai) | 704 | struct snd_soc_dai *dai) |
709 | { | 705 | { |
710 | if (!hdmi.mode) { | 706 | if (!hdmi.ip_data.cfg.cm.mode) { |
711 | pr_err("Current video settings do not support audio.\n"); | 707 | pr_err("Current video settings do not support audio.\n"); |
712 | return -EIO; | 708 | return -EIO; |
713 | } | 709 | } |