From: <mythripk@ti.com>
To: tomi.valkeinen@ti.com, linux-omap@vger.kernel.org
Cc: Mythri P K <mythripk@ti.com>
Subject: [PATCH 4/4] OMAPDSS: HDMI: remove duplicate code and mode parameter
Date: Fri, 11 Nov 2011 18:39:37 +0530 [thread overview]
Message-ID: <1321016977-1808-5-git-send-email-mythripk@ti.com> (raw)
In-Reply-To: <1321016977-1808-4-git-send-email-mythripk@ti.com>
From: Mythri P K <mythripk@ti.com>
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>
---
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 b859350..8d06ce6 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -66,8 +66,6 @@ static struct {
struct omap_display_platform_data *pdata;
struct platform_device *pdev;
struct hdmi_ip_data ip_data;
- int code;
- int mode;
struct clk *sys_clk;
} hdmi;
@@ -161,7 +159,7 @@ static bool hdmi_find_code(const struct hdmi_config *timings_arr,
int i;
for (i = 0; i < len; i++) {
- if (timings_arr[i].cm.code == hdmi.code) {
+ if (timings_arr[i].cm.code == hdmi.ip_data.cfg.cm.code) {
*timing = timings_arr[i];
return true;
}
@@ -174,7 +172,7 @@ static void hdmi_get_timings(struct hdmi_config *timing)
{
int r;
- if (hdmi.mode == 0) {
+ if (hdmi.ip_data.cfg.cm.mode == 0) {
r = hdmi_find_code(vesa_timings,
ARRAY_SIZE(vesa_timings), timing);
} else {
@@ -183,9 +181,9 @@ static void hdmi_get_timings(struct hdmi_config *timing)
}
if (!r) {
/* HDMI code 4 corresponds to 640 * 480 VGA */
- hdmi.code = 4;
+ hdmi.ip_data.cfg.cm.code = 4;
/* DVI mode 1 corresponds to HDMI 0 to DVI */
- hdmi.mode = HDMI_DVI;
+ hdmi.ip_data.cfg.cm.mode = HDMI_DVI;
*timing = vesa_timings[0];
}
}
@@ -335,8 +333,6 @@ static int hdmi_power_on(struct omap_dss_device *dssdev)
goto err;
}
- hdmi.ip_data.cfg.cm.mode = hdmi.mode;
- hdmi.ip_data.cfg.cm.code = hdmi.code;
hdmi.ip_data.ops->video_configure(&hdmi.ip_data);
/* Make selection of HDMI in DSS */
@@ -396,8 +392,8 @@ void omapdss_hdmi_display_set_timing(struct omap_dss_device *dssdev)
struct hdmi_cm cm;
cm = hdmi_get_code(&dssdev->panel.timings);
- hdmi.code = cm.code;
- hdmi.mode = cm.mode;
+ hdmi.ip_data.cfg.cm.code = cm.code;
+ hdmi.ip_data.cfg.cm.mode = cm.mode;
if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) {
int r;
@@ -663,7 +659,7 @@ static int hdmi_audio_hw_params(struct hdmi_ip_data *ip_data,
static int hdmi_audio_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
- if (!hdmi.mode) {
+ if (!hdmi.ip_data.cfg.cm.mode) {
pr_err("Current video settings do not support audio.\n");
return -EIO;
}
--
1.7.5.4
next prev parent reply other threads:[~2011-11-11 13:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-11 13:09 [PATCH 0/4] OMAPDSS: HDMI: Improve the timings logic in HDMI mythripk
2011-11-11 13:09 ` [PATCH 1/4] OMAPDSS: HDMI: remove duplicate video interface code mythripk
2011-11-11 13:09 ` [PATCH 2/4] OMAPDSS: HDMI: update static timing table mythripk
2011-11-11 13:09 ` [PATCH 3/4] OMAPDSS: HDMI: change the timing match logic mythripk
2011-11-11 13:09 ` mythripk [this message]
2011-11-14 7:33 ` Tomi Valkeinen
2011-11-16 5:31 ` K, Mythri P
2011-11-18 7:16 ` Tomi Valkeinen
2011-11-22 13:08 ` K, Mythri P
2011-11-14 7:20 ` [PATCH 2/4] OMAPDSS: HDMI: update static timing table Tomi Valkeinen
2011-11-16 5:13 ` K, Mythri P
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1321016977-1808-5-git-send-email-mythripk@ti.com \
--to=mythripk@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).