All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH resend 00/15] drm/i915/dsi: Fix / cleanup dsi enable / disable sequences
@ 2017-02-20 14:08 Hans de Goede
  2017-02-20 14:08 ` [PATCH resend 01/15] drm/i915/dsi: Move calling of wait_for_dsi_fifo_empty to mipi_exec_send_packet Hans de Goede
                   ` (14 more replies)
  0 siblings, 15 replies; 49+ messages in thread
From: Hans de Goede @ 2017-02-20 14:08 UTC (permalink / raw)
  To: Daniel Vetter, Jani Nikula, Ville Syrjälä
  Cc: Hans de Goede, intel-gfx

Hi All,

Here is a resend of my "cleanup dsi enable / disable sequences" patch
series as requested by Jani.

Here is the original cover letter, there have been no changes other then
dropping 3 patches which have already been merged:

So while trying to fix my cherrytrail tablet's screen sometimes not
initializing properly (*) I started working on this series to cleanup /
(minor) refactor the dsi enable / disable code, with as goal to then
change it to match the enable / disable sequences which Ville Syrjälä
recently dug up from within the spec.

The 1st patch is a (small) functional change, which makes the
patches following it move less code around.

Patches 2 - 4 move some stuff around with as goal to have
intel_dsi_pre_enable() and intel_dsi_pre_disable() +
intel_dsi_post_disable() have the entire (de)init sequence in a
clearly readable one function call per step (more or less)
style, so that the ordering is obvious and we can easily match
the code to the spec

Patches 7 - 15 actually modify the code to match the spec, there are
9 patches here as I've chosen to do one tiny change per patch so that
regressions can be bisected to a commit more specific then a
"change the world" commit.

After this patch-set the dsi enable / disable code is much easier to
read (IMHO), almost fully matches the spec (with the single exception
documented) and still works (for me).

There are still some possible improvements to consider:

1) intel_dsi_pre_enable starts with enabling the pll, but
   intel_dsi_post_disable disables it half-way through the
   sequence, since then it is no longer necessary. From a
   power-management pov this is good, but it is assymetrical

2) intel_dsi_pre_enable calls intel_dsi_prepare before calling
   intel_dsi_device_ready, so intel_dsi_post_disable should
   call intel_dsi_unprepare *after* intel_dsi_clear_device_ready,
   but it calls it *before*. Because of this intel_dsi_unprepare
   itself temporarily clears device-ready and resets it in the end.
   It would be good to move intel_dsi_unprepare to *after*
   intel_dsi_clear_device_ready and drop its toggling of the
   device-ready bit, but I'm not sure if that is safe. Perhaps
   there is a specific reason why this is done this way?

3) While working on this I found the following patch which maybe
   should be merged to the mainline i915 code ?  :
   https://github.com/01org/ProductionKernelQuilts/blob/master/uefi/cht-m1stable/patches/0002-FOR_UPSTREAM-VPG-drm-i915-Move-port-enable-to-after-.patch

   The date on this patch is from long after the decision to
   move the intel_dsi_enable_port call to intel_dsi_pre_enable,
   so it seems to superseed that decision. Maybe we should move the
   intel_dsi_port_enable call from intel_dsi_pre_enable back
   to intel_dsi_enable[_nop] ?

Regards,

Hans


*) The root cause of which turns out to be something different, but since
I had done most of this work when I found that out, I decided to not throw
away my work and instead finish this series and post it upstream
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2017-02-28  9:38 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-20 14:08 [PATCH resend 00/15] drm/i915/dsi: Fix / cleanup dsi enable / disable sequences Hans de Goede
2017-02-20 14:08 ` [PATCH resend 01/15] drm/i915/dsi: Move calling of wait_for_dsi_fifo_empty to mipi_exec_send_packet Hans de Goede
2017-02-24 16:59   ` Bob Paauwe
2017-02-20 14:08 ` [PATCH resend 02/15] drm/i915/dsi: Merge intel_dsi_disable/enable into their respective callers Hans de Goede
2017-02-24 16:59   ` Bob Paauwe
2017-02-20 14:08 ` [PATCH resend 03/15] drm/i915/dsi: Add intel_dsi_unprepare() helper Hans de Goede
2017-02-24 16:59   ` Bob Paauwe
2017-02-20 14:08 ` [PATCH resend 04/15] drm/i915/dsi: Move intel_dsi_clear_device_ready() Hans de Goede
2017-02-24 17:00   ` Bob Paauwe
2017-02-20 14:08 ` [PATCH resend 05/15] drm/i915/dsi: Document the panel enable / disable sequences from the spec Hans de Goede
2017-02-24 17:00   ` Bob Paauwe
2017-02-25 10:31     ` Hans de Goede
2017-02-28  9:38       ` Hans de Goede
2017-02-20 14:08 ` [PATCH resend 06/15] drm/i915/dsi: Make intel_dsi_enable/disable directly exec VBT sequences Hans de Goede
2017-02-24 17:00   ` Bob Paauwe
2017-02-20 14:08 ` [PATCH resend 07/15] drm/i915/dsi: Drop bogus MIPI_SEQ_ASSERT_RESET before POWER_ON Hans de Goede
2017-02-24 17:00   ` Bob Paauwe
2017-02-25 10:35     ` Hans de Goede
2017-02-27 16:56       ` Bob Paauwe
2017-02-20 14:08 ` [PATCH resend 08/15] drm/i915/dsi: Move MIPI_SEQ_POWER_ON/OFF calls together with pmic gpio calls Hans de Goede
2017-02-24 17:00   ` Bob Paauwe
2017-02-20 14:08 ` [PATCH resend 09/15] drm/i915/dsi: Group DPOunit clock gate workaround with PLL enable Hans de Goede
2017-02-24 17:00   ` Bob Paauwe
2017-02-20 14:08 ` [PATCH resend 10/15] drm/i915/dsi: Execute MIPI_SEQ_DEASSERT_RESET before calling device_ready() Hans de Goede
2017-02-24 17:00   ` Bob Paauwe
2017-02-20 14:08 ` [PATCH resend 11/15] drm/i915/dsi: Group MIPI_SEQ_BACKLIGHT_ON/OFF with panel_[en|dis]able_backlight Hans de Goede
2017-02-24 17:00   ` Bob Paauwe
2017-02-25 10:37     ` Hans de Goede
2017-02-27 17:06       ` Bob Paauwe
2017-02-27 17:40         ` Jani Nikula
2017-02-27 22:04         ` Hans de Goede
2017-02-20 14:08 ` [PATCH resend 12/15] drm/i915/dsi: Document always using v3 SHUTDOWN / MIPI_SEQ_DISPLAY_OFF order Hans de Goede
2017-02-24 17:02   ` Bob Paauwe
2017-02-25 10:42     ` Hans de Goede
2017-02-27 17:16       ` Bob Paauwe
2017-02-27 17:44         ` Jani Nikula
2017-02-28  9:00         ` Hans de Goede
2017-02-20 14:08 ` [PATCH resend 13/15] drm/i915/dsi: Execute MIPI_SEQ_TEAR_OFF from intel_dsi_post_disable Hans de Goede
2017-02-24 17:02   ` Bob Paauwe
2017-02-25 10:45     ` Hans de Goede
2017-02-27 17:47       ` Jani Nikula
2017-02-20 14:08 ` [PATCH resend 14/15] drm/i915/dsi: Call MIPI_SEQ_TEAR_ON and DISPLAY_ON for cmd-mode (untested) Hans de Goede
2017-02-24 17:02   ` Bob Paauwe
2017-02-25 10:47     ` Hans de Goede
2017-02-27 17:21       ` Bob Paauwe
2017-02-20 14:08 ` [PATCH resend 15/15] drm/i915/dsi: Skip delays for v3 VBTs in vid-mode Hans de Goede
2017-02-24 17:02   ` Bob Paauwe
2017-02-25 10:49     ` Hans de Goede
2017-02-27 17:23       ` Bob Paauwe

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.