All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Paul <seanpaul@chromium.org>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 02/17] drm/tegra: Do not enable output on .mode_set()
Date: Tue, 4 Nov 2014 10:11:22 -0500	[thread overview]
Message-ID: <CAOw6vb+aF-uQotTpTkyxQL4qbzOknDOkwEcftLSZUH-P1aJ-bg@mail.gmail.com> (raw)
In-Reply-To: <20141104145012.GE31200@ulmo>

On Tue, Nov 4, 2014 at 9:50 AM, Thierry Reding <thierry.reding@gmail.com> wrote:
> On Mon, Nov 03, 2014 at 12:18:30PM -0500, Sean Paul wrote:
>> On Mon, Nov 3, 2014 at 4:27 AM, Thierry Reding <thierry.reding@gmail.com> wrote:
>> > From: Thierry Reding <treding@nvidia.com>
>> >
>> > The output is already enabled in .dpms(), doing it in .mode_set() too
>> > can cause noticeable flicker.
>> >
>>
>> I think this should be coupled with "drm/tegra: DPMS off/on in encoder
>> prepare/commit" that I sent earlier this week. Without it, the driver
>> can get into a state where connector status is on, but the output is
>> disabled.
>
> I'm not sure I exactly understand which problem that patch fixes, but
> I'll give it some testing to see if it doesn't break anything.
>

I'll try to explain it more clearly.

The problem occurs when userspace does set_property(dpms_on), then modeset.

When the set_property ioctl to set dpms = on is called, the tegra
driver goes through drm_helper_connector_dpms(). At this point,
because the connector has not participated in a modeset,
connector->encoder == NULL. In drm_helper_connector_dpms(), we set
connector->dpms = DRM_MODE_DPMS_ON, and skip everything else because
!encoder && !crtc.

When modeset is called, we go through drm_crtc_helper_set_config().
This function will populate connector->encoder with the appropriate
encoder and call drm_crtc_helper_set_mode(), which goes through the
prepare/mode_set/commit calls. Finally, drm_crtc_helper_set_config()
iterates through the connectors involved in the modeset and calls
their dpms() func. In our case, as above, we go through
drm_helper_connector_dpms(), but it just exits early because mode ==
connector->dpms.

So we end up in a state where connector->dpms == DRM_MODE_DPMS_ON, and
the output, as well as any connected panel, has never been enabled.
The reason is that they're only enabled in encoder_funcs->dpms(),
which is never called in the above scenario.

I hope that makes more sense :-)

Sean


> Thierry
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2014-11-04 15:11 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-03  9:27 [PATCH 01/17] drm/tegra: dc: Add powergate support Thierry Reding
2014-11-03  9:27 ` [PATCH 02/17] drm/tegra: Do not enable output on .mode_set() Thierry Reding
2014-11-03 17:18   ` Sean Paul
2014-11-04 14:50     ` Thierry Reding
2014-11-04 15:11       ` Sean Paul [this message]
2014-11-04 15:26         ` Thierry Reding
2014-11-04 16:38           ` Daniel Vetter
2014-11-03  9:27 ` [PATCH 03/17] drm/tegra: dsi: Make FIFO depths host parameters Thierry Reding
2014-11-03 17:20   ` Sean Paul
2014-11-04 15:45     ` Thierry Reding
2014-11-03  9:27 ` [PATCH v2 04/17] drm/tegra: dsi: Add ganged mode support Thierry Reding
2014-11-03 18:30   ` Sean Paul
2014-11-04 15:49     ` Thierry Reding
2014-11-03  9:27 ` [PATCH 05/17] drm/tegra: dsi: Set up PHY_TIMING & BTA_TIMING registers earlier Thierry Reding
2014-11-03  9:27 ` [PATCH 06/17] drm/tegra: dc: Add missing call to drm_vblank_on() Thierry Reding
2014-11-03 18:45   ` Sean Paul
2014-11-03 18:50     ` Daniel Vetter
2014-11-04 14:08     ` Thierry Reding
2014-11-04  4:21   ` Alexandre Courbot
2014-11-03  9:27 ` [PATCH 07/17] drm/tegra: gem: Extract tegra_bo_alloc_object() Thierry Reding
2014-11-03  9:27 ` [PATCH 08/17] drm/tegra: gem: Cleanup tegra_bo_create_with_handle() Thierry Reding
2014-11-03  9:27 ` [PATCH 09/17] drm/tegra: gem: Remove redundant drm_gem_free_mmap_offset() Thierry Reding
2014-11-03  9:27 ` [PATCH 10/17] drm/tegra: gem: Use dma_mmap_writecombine() Thierry Reding
2014-11-03  9:27 ` [PATCH v5 11/17] drm/tegra: Add IOMMU support Thierry Reding
2014-11-03  9:27 ` [PATCH 12/17] drm/tegra: dc: Factor out DC, window and cursor commit Thierry Reding
2014-11-03  9:27 ` [PATCH 13/17] drm/tegra: dc: Registers are 32 bits wide Thierry Reding
2014-11-03  9:27 ` [PATCH 14/17] drm/tegra: dc: Universal plane support Thierry Reding
2014-11-03  9:27 ` [PATCH 15/17] drm/tegra: Fix potential bug on driver unload Thierry Reding
2014-11-04 10:59   ` Andrzej Hajda
2014-11-04 12:30     ` Thierry Reding
2014-11-03  9:27 ` [PATCH 16/17] drm/tegra: gem: dumb: pitch and size are outputs Thierry Reding
2014-11-03  9:51   ` Daniel Vetter
2014-11-03 10:12     ` Thierry Reding
2014-11-03  9:27 ` [PATCH 17/17] drm/tegra: fb: Do not destroy framebuffer Thierry Reding
2014-11-03  9:53   ` Daniel Vetter
2014-11-04 16:08     ` Thierry Reding
2014-11-03 17:15 ` [PATCH 01/17] drm/tegra: dc: Add powergate support Sean Paul
2014-11-04 12:34   ` Thierry Reding

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=CAOw6vb+aF-uQotTpTkyxQL4qbzOknDOkwEcftLSZUH-P1aJ-bg@mail.gmail.com \
    --to=seanpaul@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=thierry.reding@gmail.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.