From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 01/33] drm/omap: HDMI: change enable/disable to avoid sync-losts
Date: Tue, 23 Feb 2016 13:33:33 +0200 [thread overview]
Message-ID: <56CC438D.7090903@ti.com> (raw)
In-Reply-To: <2115833.N0OHxhSoJc@avalon>
[-- Attachment #1.1: Type: text/plain, Size: 3111 bytes --]
On 23/02/16 12:22, Laurent Pinchart wrote:
> Hi Tomi,
>
> Thank you for the patch.
>
> On Friday 19 February 2016 11:47:36 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.
<snip>
>> + if (omap_crtc->mgr->output->output_type == OMAP_DISPLAY_TYPE_HDMI) {
>> + dispc_mgr_enable(channel, enable);
>> + return;
>> + }
>
> This effectively bypasses the wait until the DISPC outputs the first vsync
> interrupt below. How does HDMI differ from other outputs in such a way to make
> the wait unneeded ?
There's to parts here. Enabling the output and disabling the output.
Enable:
We don't strictly need the wait after enable for any output. The output
works after setting the enable bit.
There are two reasons for the waiting:
1) A sanity check that the configuration is ok. If the config is broken
(which shouldn't happen, of course, as the driver should verify the
config), we won't see vsync. At the moment we only print an error in
that case.
2) OMAP_DSS_CHANNEL_DIGIT is a bit problematic. That channel is used for
analog tv-out (VENC) in older DSS versions, and for HDMI for more recent
ones. With VENC we always get a few sync lost errors when enabling the
output, so with the wait we can ignore those errors (this sync-lost
ignoring is only done for OMAP_DSS_CHANNEL_DIGIT).
We have seen similar sync losts with HDMI too, but apparently it is
possible to support HDMI without any sync losts. That's what this patch
is doing.
With this patch we lose both 1) and 2) above, but 1) is not strictly
needed and 2) shouldn't happen for HDMI after this patch.
We could implement 1) in the HDMI driver too, using the HDMI IP's VSYNC
interrupt, but I don't think it's really necessary.
Disable:
When disabling the output, we do want to wait until the DSS has finished
the work at the end of the frame. This is done in the
omap_crtc_set_enabled() function for all outputs, using FRAMEDONE
interrupt when available, or VSYNC if not.
For HDMI we can do it also in the HDMI driver. The HDMI IP has its own
FRAMEDONE interrupt, which we wait for in hdmi_wp_video_stop().
Tomi
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
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-23 11:33 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-19 9:47 [PATCH 00/33] drm/omap: patches for v4.6 Tomi Valkeinen
2016-02-19 9:47 ` [PATCH 01/33] drm/omap: HDMI: change enable/disable to avoid sync-losts Tomi Valkeinen
2016-02-23 10:22 ` Laurent Pinchart
2016-02-23 11:33 ` Tomi Valkeinen [this message]
2016-02-19 9:47 ` [PATCH 02/33] HACK: drm/omap: always use blocking DMM fill Tomi Valkeinen
2016-02-23 10:27 ` Laurent Pinchart
2016-02-23 13:09 ` Tomi Valkeinen
2016-02-19 9:47 ` [PATCH 03/33] HACK: drm/omap: fix memory barrier bug in DMM driver Tomi Valkeinen
2016-02-23 21:13 ` Laurent Pinchart
2016-02-24 10:34 ` Tomi Valkeinen
2016-02-19 9:47 ` [PATCH 04/33] drm/omap: add dmm_read() and dmm_write() wrappers Tomi Valkeinen
2016-02-23 21:18 ` Laurent Pinchart
2016-02-19 9:47 ` [PATCH 05/33] drm/omap: partial workaround for DRA7 DMM errata i878 Tomi Valkeinen
2016-02-23 21:57 ` Laurent Pinchart
2016-02-24 9:14 ` Tomi Valkeinen
2017-09-29 12:29 ` Peter Ujfalusi
2016-02-19 9:47 ` [PATCH 06/33] drm/omap: drm_atomic_get_plane_state() may return ERR_PTR Tomi Valkeinen
2016-02-23 22:01 ` Laurent Pinchart
2016-02-19 9:47 ` [PATCH 07/33] drm/omap: tpd12s015: remove platform data support Tomi Valkeinen
2016-02-19 9:47 ` [PATCH 08/33] drm/omap: tpd12s015: gpio descriptor API Tomi Valkeinen
2016-02-19 9:47 ` [PATCH 09/33] drm/omap: tpd12s015: CT_CP_HPD as optional gpio Tomi Valkeinen
2016-02-19 9:47 ` [PATCH 10/33] drm/omap: add define for DISPC_IRQ_WBUNCOMPLETEERROR Tomi Valkeinen
2016-02-23 22:04 ` Laurent Pinchart
2016-02-19 9:47 ` [PATCH 11/33] drm/omap: use dma_mapping_error in omap_gem_attach_pages Tomi Valkeinen
2016-02-23 22:10 ` Laurent Pinchart
2016-02-25 15:39 ` Tomi Valkeinen
2016-02-26 8:52 ` Laurent Pinchart
2016-02-26 9:07 ` Tomi Valkeinen
2016-02-19 9:47 ` [PATCH 12/33] drm/omap: use dma_mapping_error in omap_gem_dma_sync Tomi Valkeinen
2016-02-23 22:14 ` Laurent Pinchart
2016-02-25 15:45 ` Tomi Valkeinen
2016-02-26 8:54 ` Laurent Pinchart
2016-02-19 9:47 ` [PATCH 13/33] drm/omap: print an error if display enable fails Tomi Valkeinen
2016-02-23 22:17 ` Laurent Pinchart
2016-02-19 9:47 ` [PATCH 14/33] drm/omap: gem: Clean up GEM objects memory flags Tomi Valkeinen
2016-02-19 9:47 ` [PATCH 15/33] drm/omap: gem: Refactor GEM object allocation Tomi Valkeinen
2016-02-19 9:47 ` [PATCH 16/33] drm/omap: gem: Implement dma_buf import Tomi Valkeinen
2016-02-19 9:47 ` [PATCH 17/33] drm/omap: remove support for ext mem & sync Tomi Valkeinen
2016-02-23 22:42 ` Laurent Pinchart
2016-02-24 9:38 ` Tomi Valkeinen
2016-02-19 9:47 ` [PATCH 18/33] drm/omap: increase vblank wait timeout Tomi Valkeinen
2016-02-23 22:43 ` Laurent Pinchart
2016-02-24 9:41 ` Tomi Valkeinen
2016-02-19 9:47 ` [PATCH 19/33] drm/omap: DISPC: support double-pixel mode Tomi Valkeinen
2016-02-19 9:47 ` [PATCH 20/33] drm/omap: support double-pixel Tomi Valkeinen
2016-02-19 9:47 ` [PATCH 21/33] drm/omap: HDMI: support double-pixel pixel clock Tomi Valkeinen
2016-02-19 9:47 ` [PATCH 22/33] drm/omap: HDMI: Fix HSW value Tomi Valkeinen
2016-02-19 9:47 ` [PATCH 23/33] drm/omap: HDMI: fix WP timings for ilace Tomi Valkeinen
2016-02-19 9:47 ` [PATCH 24/33] drm/omap: DISPC: Fix field order for HDMI Tomi Valkeinen
2016-02-19 9:48 ` [PATCH 25/33] drm/omap: HDMI5: Fix FC HSW value Tomi Valkeinen
2016-02-19 9:48 ` [PATCH 26/33] drm/omap: HDMI5: clean up timings copy Tomi Valkeinen
2016-02-19 9:48 ` [PATCH 27/33] drm/omap: HDMI5: Add interlace support Tomi Valkeinen
2016-02-19 9:48 ` [PATCH 28/33] drm/omap: HDMI5: allow interlace Tomi Valkeinen
2016-02-19 9:48 ` [PATCH 29/33] drm/omap: verify that display x-res is divisible by 8 Tomi Valkeinen
2016-02-19 9:48 ` [PATCH 30/33] drm/omap: verify that fb plane pitches are the same Tomi Valkeinen
2016-02-23 23:02 ` Laurent Pinchart
2016-02-25 15:56 ` Tomi Valkeinen
2016-02-26 8:55 ` Laurent Pinchart
2016-02-26 9:12 ` Tomi Valkeinen
2016-02-26 9:27 ` Laurent Pinchart
2016-02-19 9:48 ` [PATCH 31/33] drm/omap: EBUSY status handling in omap_gem_fault() Tomi Valkeinen
2016-02-19 9:48 ` [PATCH 32/33] drm/omap: fix crtc->plane property delegation Tomi Valkeinen
2016-02-23 23:24 ` Laurent Pinchart
2016-02-19 9:48 ` [PATCH 33/33] drm/omap: check if rotation is supported before commit Tomi Valkeinen
2016-02-23 23:30 ` 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=56CC438D.7090903@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.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.