From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCHv2 01/31] drm/omap: HDMI: change enable/disable to avoid sync-losts
Date: Mon, 29 Feb 2016 23:48:38 +0200 [thread overview]
Message-ID: <3182927.3fyBP17F5l@avalon> (raw)
In-Reply-To: <1456479379-6086-2-git-send-email-tomi.valkeinen@ti.com>
Hi Tomi,
Thank you for the patch.
On Friday 26 February 2016 11:35:49 Tomi Valkeinen wrote:
> We occasionally see DISPC sync-lost errors when enabling and disabling
> HDMI. Sometimes we get only a few, which get handled (ignored) by the
> driver, but sometimes there's a flood of the errors which doesn't seem
> to stop.
>
> The HW team has root caused this to the order in which HDMI and DISPC
> are enabled/disabled. Currently we enable HDMI first, and then DISPC,
> and vice versa when disabling. HW team's suggestion is to do it the
> other way around.
>
> This patch changes the order, but this has two side effects as the pixel
> clock is produced by HDMI, and the clock is not running when we
> enable/disable DISPC:
>
> * When enabling DISPC first, we don't get vertical sync events
> * When disabling DISPC last, we don't get FRAMEDONE event
>
> At the moment we use both of those to verify that DISPC has been
> enabled/disabled properly. Thus this patch also needs to change the
> omapdrm and omapdss which handle the DISPC side.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/gpu/drm/omapdrm/dss/hdmi4.c | 16 ++++++++--------
> drivers/gpu/drm/omapdrm/dss/hdmi5.c | 16 ++++++++--------
> drivers/gpu/drm/omapdrm/omap_crtc.c | 5 +++++
> 3 files changed, 21 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c
> b/drivers/gpu/drm/omapdrm/dss/hdmi4.c index 7103c659a534..b09ce9ee82fa
> 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c
> @@ -214,22 +214,22 @@ static int hdmi_power_on_full(struct omap_dss_device
> *dssdev) /* tv size */
> dss_mgr_set_timings(mgr, p);
>
> - r = hdmi_wp_video_start(&hdmi.wp);
> - if (r)
> - goto err_vid_enable;
> -
> r = dss_mgr_enable(mgr);
> if (r)
> goto err_mgr_enable;
>
> + r = hdmi_wp_video_start(&hdmi.wp);
> + if (r)
> + goto err_vid_enable;
> +
> hdmi_wp_set_irqenable(wp,
> HDMI_IRQ_LINK_CONNECT | HDMI_IRQ_LINK_DISCONNECT);
>
> return 0;
>
> -err_mgr_enable:
> - hdmi_wp_video_stop(&hdmi.wp);
> err_vid_enable:
> + dss_mgr_disable(mgr);
> +err_mgr_enable:
> hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF);
> err_phy_pwr:
> err_phy_cfg:
> @@ -246,10 +246,10 @@ static void hdmi_power_off_full(struct omap_dss_device
> *dssdev)
>
> hdmi_wp_clear_irqenable(&hdmi.wp, 0xffffffff);
>
> - dss_mgr_disable(mgr);
> -
> hdmi_wp_video_stop(&hdmi.wp);
>
> + dss_mgr_disable(mgr);
> +
> hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF);
>
> dss_pll_disable(&hdmi.pll.pll);
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c
> b/drivers/gpu/drm/omapdrm/dss/hdmi5.c index a955a2c4c061..4485a1c37bd8
> 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi5.c
> @@ -231,22 +231,22 @@ static int hdmi_power_on_full(struct omap_dss_device
> *dssdev) /* tv size */
> dss_mgr_set_timings(mgr, p);
>
> - r = hdmi_wp_video_start(&hdmi.wp);
> - if (r)
> - goto err_vid_enable;
> -
> r = dss_mgr_enable(mgr);
> if (r)
> goto err_mgr_enable;
>
> + r = hdmi_wp_video_start(&hdmi.wp);
> + if (r)
> + goto err_vid_enable;
> +
> hdmi_wp_set_irqenable(&hdmi.wp,
> HDMI_IRQ_LINK_CONNECT | HDMI_IRQ_LINK_DISCONNECT);
>
> return 0;
>
> -err_mgr_enable:
> - hdmi_wp_video_stop(&hdmi.wp);
> err_vid_enable:
> + dss_mgr_disable(mgr);
> +err_mgr_enable:
> hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF);
> err_phy_pwr:
> err_phy_cfg:
> @@ -263,10 +263,10 @@ static void hdmi_power_off_full(struct omap_dss_device
> *dssdev)
>
> hdmi_wp_clear_irqenable(&hdmi.wp, 0xffffffff);
>
> - dss_mgr_disable(mgr);
> -
> hdmi_wp_video_stop(&hdmi.wp);
>
> + dss_mgr_disable(mgr);
> +
> hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF);
>
> dss_pll_disable(&hdmi.pll.pll);
> diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c
> b/drivers/gpu/drm/omapdrm/omap_crtc.c index 2ed0754ed19e..7dd3d44a93e5
> 100644
> --- a/drivers/gpu/drm/omapdrm/omap_crtc.c
> +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
> @@ -138,6 +138,11 @@ static void omap_crtc_set_enabled(struct drm_crtc
> *crtc, bool enable) u32 framedone_irq, vsync_irq;
> int ret;
>
> + if (omap_crtc->mgr->output->output_type == OMAP_DISPLAY_TYPE_HDMI) {
> + dispc_mgr_enable(channel, enable);
> + return;
> + }
> +
> if (dispc_mgr_is_enabled(channel) == enable)
> return;
--
Regards,
Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-02-29 21:48 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 9:35 [PATCHv2 00/31] drm/omap: patches for v4.6 part 1 Tomi Valkeinen
2016-02-26 9:35 ` [PATCHv2 01/31] drm/omap: HDMI: change enable/disable to avoid sync-losts Tomi Valkeinen
2016-02-29 21:48 ` Laurent Pinchart [this message]
2016-02-26 9:35 ` [PATCHv2 02/31] HACK: drm/omap: always use blocking DMM fill Tomi Valkeinen
2016-02-29 21:47 ` Laurent Pinchart
2016-02-26 9:35 ` [PATCHv2 03/31] drm/omap: add dmm_read() and dmm_write() wrappers Tomi Valkeinen
2016-02-26 9:35 ` [PATCHv2 04/31] drm/omap: drm_atomic_get_plane_state() may return ERR_PTR Tomi Valkeinen
2016-02-26 9:35 ` [PATCHv2 05/31] drm/omap: tpd12s015: remove platform data support Tomi Valkeinen
2016-02-26 9:35 ` [PATCHv2 06/31] drm/omap: tpd12s015: gpio descriptor API Tomi Valkeinen
2016-02-26 9:35 ` [PATCHv2 07/31] drm/omap: tpd12s015: CT_CP_HPD as optional gpio Tomi Valkeinen
2016-02-26 9:35 ` [PATCHv2 08/31] drm/omap: add define for DISPC_IRQ_WBUNCOMPLETEERROR Tomi Valkeinen
2016-02-26 9:35 ` [PATCHv2 09/31] drm/omap: use dma_mapping_error in omap_gem_attach_pages Tomi Valkeinen
2016-02-29 21:48 ` Laurent Pinchart
2016-02-26 9:35 ` [PATCHv2 10/31] drm/omap: use dma_mapping_error in omap_gem_dma_sync Tomi Valkeinen
2016-02-29 21:51 ` Laurent Pinchart
2016-02-26 9:35 ` [PATCHv2 11/31] drm/omap: print an error if display enable fails Tomi Valkeinen
2016-02-29 21:52 ` Laurent Pinchart
2016-02-26 9:36 ` [PATCHv2 12/31] drm/omap: gem: Clean up GEM objects memory flags Tomi Valkeinen
2016-02-26 9:36 ` [PATCHv2 13/31] drm/omap: gem: Refactor GEM object allocation Tomi Valkeinen
2016-02-26 9:36 ` [PATCHv2 14/31] drm/omap: gem: Implement dma_buf import Tomi Valkeinen
2016-02-26 9:36 ` [PATCHv2 15/31] drm/omap: remove support for ext mem & sync Tomi Valkeinen
2016-02-26 9:36 ` [PATCHv2 16/31] drm/omap: increase vblank wait timeout Tomi Valkeinen
2016-02-26 9:36 ` [PATCHv2 17/31] drm/omap: DISPC: support double-pixel mode Tomi Valkeinen
2016-02-26 9:36 ` [PATCHv2 18/31] drm/omap: support double-pixel Tomi Valkeinen
2016-02-26 9:36 ` [PATCHv2 19/31] drm/omap: HDMI: support double-pixel pixel clock Tomi Valkeinen
2016-02-26 9:36 ` [PATCHv2 20/31] drm/omap: HDMI: Fix HSW value Tomi Valkeinen
2016-02-29 21:55 ` Laurent Pinchart
2016-03-01 8:32 ` Tomi Valkeinen
2016-02-26 9:36 ` [PATCHv2 21/31] drm/omap: HDMI: fix WP timings for ilace Tomi Valkeinen
2016-02-26 9:36 ` [PATCHv2 22/31] drm/omap: DISPC: Fix field order for HDMI Tomi Valkeinen
2016-02-26 9:36 ` [PATCHv2 23/31] drm/omap: HDMI5: Fix FC HSW value Tomi Valkeinen
2016-02-26 9:36 ` [PATCHv2 24/31] drm/omap: HDMI5: clean up timings copy Tomi Valkeinen
2016-02-26 9:36 ` [PATCHv2 25/31] drm/omap: HDMI5: Add interlace support Tomi Valkeinen
2016-02-26 9:36 ` [PATCHv2 26/31] drm/omap: HDMI5: allow interlace Tomi Valkeinen
2016-02-26 9:36 ` [PATCHv2 27/31] drm/omap: verify that display x-res is divisible by 8 Tomi Valkeinen
2016-02-26 9:36 ` [PATCHv2 28/31] drm/omap: verify that fb plane pitches are the same Tomi Valkeinen
2016-02-26 9:36 ` [PATCHv2 29/31] drm/omap: EBUSY status handling in omap_gem_fault() Tomi Valkeinen
2016-02-26 9:36 ` [PATCHv2 30/31] drm/omap: fix crtc->plane property delegation Tomi Valkeinen
2016-02-26 9:36 ` [PATCHv2 31/31] drm/omap: check if rotation is supported before commit Tomi Valkeinen
2016-02-29 21:56 ` [PATCHv2 00/31] drm/omap: patches for v4.6 part 1 Laurent Pinchart
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=3182927.3fyBP17F5l@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=dri-devel@lists.freedesktop.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 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.