From: Tomi Valkeinen <tomi.valkeinen@ti.com> To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: archit@ti.com, Tomi Valkeinen <tomi.valkeinen@ti.com>, Mythri P K <mythripk@ti.com> Subject: [PATCHv2 03/15] OMAP: DSS2: HDMI: make set_timing saner Date: Mon, 12 Sep 2011 09:13:26 +0000 [thread overview] Message-ID: <1315818818-18733-4-git-send-email-tomi.valkeinen@ti.com> (raw) In-Reply-To: <1315818818-18733-1-git-send-email-tomi.valkeinen@ti.com> Currently the set_timings code for hdmi is quite strange. The display is disabled in hdmi_omap4_panel.c before setting timings, and enabled in hdmi.c after setting the timings. Furthermore, the timings were not permanent, and disabling and enabling the display would lose them. This patch makes the set_timings handling a bit better. Cc: Mythri P K <mythripk@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> --- drivers/video/omap2/dss/hdmi.c | 13 +++++++++++-- drivers/video/omap2/dss/hdmi_panel.c | 7 +------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 06a78b2..f503aa4 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c @@ -571,11 +571,20 @@ void omapdss_hdmi_display_set_timing(struct omap_dss_device *dssdev) struct hdmi_cm cm; hdmi.custom_set = 1; + cm = hdmi_get_code(&dssdev->panel.timings); hdmi.code = cm.code; hdmi.mode = cm.mode; - omapdss_hdmi_display_enable(dssdev); - hdmi.custom_set = 0; + + if (dssdev->state = OMAP_DSS_DISPLAY_ACTIVE) { + int r; + + hdmi_power_off(dssdev); + + r = hdmi_power_on(dssdev); + if (r) + DSSERR("failed to power on device\n"); + } } int omapdss_hdmi_display_enable(struct omap_dss_device *dssdev) diff --git a/drivers/video/omap2/dss/hdmi_panel.c b/drivers/video/omap2/dss/hdmi_panel.c index e30182f..8c851e6 100644 --- a/drivers/video/omap2/dss/hdmi_panel.c +++ b/drivers/video/omap2/dss/hdmi_panel.c @@ -161,12 +161,7 @@ static void hdmi_set_timings(struct omap_dss_device *dssdev, mutex_lock(&hdmi.hdmi_lock); dssdev->panel.timings = *timings; - - if (dssdev->state = OMAP_DSS_DISPLAY_ACTIVE) { - /* turn the hdmi off and on to get new timings to use */ - omapdss_hdmi_display_disable(dssdev); - omapdss_hdmi_display_set_timing(dssdev); - } + omapdss_hdmi_display_set_timing(dssdev); mutex_unlock(&hdmi.hdmi_lock); } -- 1.7.4.1
WARNING: multiple messages have this Message-ID (diff)
From: Tomi Valkeinen <tomi.valkeinen@ti.com> To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: archit@ti.com, Tomi Valkeinen <tomi.valkeinen@ti.com>, Mythri P K <mythripk@ti.com> Subject: [PATCHv2 03/15] OMAP: DSS2: HDMI: make set_timing saner Date: Mon, 12 Sep 2011 12:13:26 +0300 [thread overview] Message-ID: <1315818818-18733-4-git-send-email-tomi.valkeinen@ti.com> (raw) In-Reply-To: <1315818818-18733-1-git-send-email-tomi.valkeinen@ti.com> Currently the set_timings code for hdmi is quite strange. The display is disabled in hdmi_omap4_panel.c before setting timings, and enabled in hdmi.c after setting the timings. Furthermore, the timings were not permanent, and disabling and enabling the display would lose them. This patch makes the set_timings handling a bit better. Cc: Mythri P K <mythripk@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> --- drivers/video/omap2/dss/hdmi.c | 13 +++++++++++-- drivers/video/omap2/dss/hdmi_panel.c | 7 +------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 06a78b2..f503aa4 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c @@ -571,11 +571,20 @@ void omapdss_hdmi_display_set_timing(struct omap_dss_device *dssdev) struct hdmi_cm cm; hdmi.custom_set = 1; + cm = hdmi_get_code(&dssdev->panel.timings); hdmi.code = cm.code; hdmi.mode = cm.mode; - omapdss_hdmi_display_enable(dssdev); - hdmi.custom_set = 0; + + if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) { + int r; + + hdmi_power_off(dssdev); + + r = hdmi_power_on(dssdev); + if (r) + DSSERR("failed to power on device\n"); + } } int omapdss_hdmi_display_enable(struct omap_dss_device *dssdev) diff --git a/drivers/video/omap2/dss/hdmi_panel.c b/drivers/video/omap2/dss/hdmi_panel.c index e30182f..8c851e6 100644 --- a/drivers/video/omap2/dss/hdmi_panel.c +++ b/drivers/video/omap2/dss/hdmi_panel.c @@ -161,12 +161,7 @@ static void hdmi_set_timings(struct omap_dss_device *dssdev, mutex_lock(&hdmi.hdmi_lock); dssdev->panel.timings = *timings; - - if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) { - /* turn the hdmi off and on to get new timings to use */ - omapdss_hdmi_display_disable(dssdev); - omapdss_hdmi_display_set_timing(dssdev); - } + omapdss_hdmi_display_set_timing(dssdev); mutex_unlock(&hdmi.hdmi_lock); } -- 1.7.4.1
next prev parent reply other threads:[~2011-09-12 9:13 UTC|newest] Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-09-12 9:13 [PATCHv2 00/15] OMAP: DSS2: EDID & detect support Tomi Valkeinen 2011-09-12 9:13 ` Tomi Valkeinen 2011-09-12 9:13 ` [PATCHv2 01/15] OMAP: DSS2: add read_edid() to omap_dss_driver struct Tomi Valkeinen 2011-09-12 9:13 ` Tomi Valkeinen 2011-09-12 9:13 ` [PATCHv2 02/15] OMAP: DSS2: add detect() " Tomi Valkeinen 2011-09-12 9:13 ` Tomi Valkeinen 2011-09-12 9:13 ` Tomi Valkeinen [this message] 2011-09-12 9:13 ` [PATCHv2 03/15] OMAP: DSS2: HDMI: make set_timing saner Tomi Valkeinen 2011-09-12 9:13 ` [PATCHv2 04/15] OMAP: DSS2: HDMI: implement read_edid() Tomi Valkeinen 2011-09-12 9:13 ` Tomi Valkeinen 2011-09-12 9:13 ` [PATCHv2 05/15] OMAP: DSS2: HDMI: remove edid parsing Tomi Valkeinen 2011-09-12 9:13 ` Tomi Valkeinen 2011-09-12 9:13 ` [PATCHv2 06/15] OMAP: DSS2: HDMI: split hdmi_core_ddc_edid Tomi Valkeinen 2011-09-12 9:13 ` Tomi Valkeinen 2011-09-12 9:13 ` [PATCHv2 07/15] OMAP: DSS2: HDMI: clean up edid reading & fix checksum Tomi Valkeinen 2011-09-12 9:13 ` Tomi Valkeinen 2011-09-12 9:13 ` [PATCHv2 08/15] OMAP: DSS2: HDMI: remove error prints in check_timings Tomi Valkeinen 2011-09-12 9:13 ` Tomi Valkeinen 2011-09-12 9:13 ` [PATCHv2 09/15] OMAP: DSS2: HDMI: implement detect() Tomi Valkeinen 2011-09-12 9:13 ` Tomi Valkeinen 2011-09-12 13:24 ` K, Mythri P 2011-09-12 13:36 ` K, Mythri P 2011-09-12 16:18 ` Tomi Valkeinen 2011-09-12 16:18 ` Tomi Valkeinen 2011-09-12 16:46 ` Rob Clark 2011-09-12 16:46 ` Rob Clark 2011-09-14 5:34 ` K, Mythri P 2011-09-14 5:46 ` K, Mythri P 2011-09-14 7:14 ` Tomi Valkeinen 2011-09-14 7:14 ` Tomi Valkeinen 2011-09-14 8:27 ` K, Mythri P 2011-09-14 8:39 ` K, Mythri P 2011-09-14 8:34 ` Tomi Valkeinen 2011-09-14 8:34 ` Tomi Valkeinen 2011-09-14 8:48 ` K, Mythri P 2011-09-14 8:48 ` K, Mythri P 2011-09-14 8:57 ` Tomi Valkeinen 2011-09-14 8:57 ` Tomi Valkeinen 2011-09-14 12:20 ` K, Mythri P 2011-09-14 12:32 ` K, Mythri P 2011-09-14 14:11 ` Tomi Valkeinen 2011-09-14 14:11 ` Tomi Valkeinen 2011-09-15 5:41 ` K, Mythri P 2011-09-15 5:53 ` K, Mythri P 2011-09-15 5:57 ` Tomi Valkeinen 2011-09-15 5:57 ` Tomi Valkeinen 2011-09-15 6:24 ` K, Mythri P 2011-09-15 6:36 ` K, Mythri P 2011-09-15 6:32 ` Tomi Valkeinen 2011-09-15 6:32 ` Tomi Valkeinen 2011-09-16 12:41 ` K, Mythri P 2011-09-16 12:53 ` K, Mythri P 2011-09-19 6:50 ` Tomi Valkeinen 2011-09-19 6:50 ` Tomi Valkeinen 2011-09-12 9:13 ` [PATCHv2 10/15] OMAP: DSS2: add panel-dvi driver Tomi Valkeinen 2011-09-12 9:13 ` Tomi Valkeinen 2011-09-12 9:13 ` [PATCHv2 11/15] OMAP: use dvi panel driver instead of generic-dpi Tomi Valkeinen 2011-09-12 9:13 ` Tomi Valkeinen 2011-09-12 9:13 ` [PATCHv2 12/15] OMAP: stalker: Remove LCD device from board file Tomi Valkeinen 2011-09-12 9:13 ` Tomi Valkeinen 2011-09-12 9:13 ` [PATCHv2 13/15] OMAP: DSS2: panel-generic-dpi: remove "generic" panel Tomi Valkeinen 2011-09-12 9:13 ` Tomi Valkeinen 2011-09-12 9:13 ` [PATCHv2 14/15] OMAP: Panda, Beagle, Overo: DVI: Add i2c_bus_num Tomi Valkeinen 2011-09-12 9:13 ` Tomi Valkeinen 2011-09-12 9:58 ` Enric Balletbò i Serra 2011-09-12 9:58 ` Enric Balletbò i Serra 2011-09-12 10:17 ` [PATCHv2 14/15] OMAP: Panda, Beagle, Overo: DVI: Add Tomi Valkeinen 2011-09-12 10:17 ` [PATCHv2 14/15] OMAP: Panda, Beagle, Overo: DVI: Add i2c_bus_num Tomi Valkeinen 2011-09-12 11:13 ` Enric Balletbò i Serra 2011-09-12 11:13 ` Enric Balletbò i Serra 2011-09-12 9:13 ` [PATCHv2 15/15] OMAPFB: find best mode from edid Tomi Valkeinen 2011-09-12 9:13 ` Tomi Valkeinen
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=1315818818-18733-4-git-send-email-tomi.valkeinen@ti.com \ --to=tomi.valkeinen@ti.com \ --cc=archit@ti.com \ --cc=linux-fbdev@vger.kernel.org \ --cc=linux-omap@vger.kernel.org \ --cc=mythripk@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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.