mirror-linux/drivers/gpu/drm
Douglas Anderson acb06210b0 drm/bridge: ti-sn65dsi86: Fix power off sequence
When testing with a panel that's apparently a little more persnickety
about the correct power sequence (specifically Samsung ATNA33XC20), we
found that the ti-sn65dsi86 was doing things just slightly wrong.

Looking closely at the ti-sn65dsi86's datasheet, the power off
sequence is supposed to be:
1. Clear VSTREAM_ENABLE bit
2. Stop DSI stream from GPU. DSI lanes must be placed in LP11 state.
3. Program the ML_TX_MODE to 0x0 (OFF)
4. Program the DP_NUM_LANES register to 0x0
5. Clear the DP_PLL_EN bit.
6. Deassert the EN pin.
7. Remove power from supply pins

Since we were doing the whole sequence in the "disable", I believe
that step #2 (stopping the DSI stream from the GPU) wasn't
happening. We also weren't setting DP_NUM_LANES to 0.

Let's fix this.

NOTE: things are a little asymmetric now. For instance, we turn the
PLL on in "enable" but now we're not turning it off until
"post_disable". It would seem to make sense to move the PLL turning on
to "pre_enable" to match. Unfortunately, I don't believe that's
allowed. It looks as if (in the non-refclk mode which probably nobody
is using) we have to wait until the MIPI clock is there before we can
enable the PLL. In any case, the way it is here won't really
hurt--it'll just leave the PLL on a little longer.

Fixes: a095f15c00 ("drm/bridge: add support for sn65dsi86 bridge driver")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Acked-by: Robert Foss <robert.foss@linaro.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210730084534.v2.2.If8a8ec3bf1855cf0dbb62c005a71d6698c99c125@changeid
2021-07-31 20:03:17 +02:00
..
amd Merge tag 'amd-drm-next-5.15-2021-07-29' of https://gitlab.freedesktop.org/agd5f/linux into drm-next 2021-07-30 16:48:35 +10:00
arm drm/arm/komeda: Don't include drm_irq.h 2021-07-08 14:10:47 +02:00
armada drm/aperture: Pass DRM driver structure instead of driver name 2021-07-01 11:11:55 +02:00
aspeed drm/tiny: drm_gem_simple_display_pipe_prepare_fb is the default 2021-06-24 15:40:11 +02:00
ast drm/ast: Disable fast reset after DRAM initial 2021-07-20 11:19:57 +02:00
atmel-hlcdc drm/atmel-hlcdc: Allow async page flips 2021-06-19 23:06:56 +02:00
bridge drm/bridge: ti-sn65dsi86: Fix power off sequence 2021-07-31 20:03:17 +02:00
etnaviv drm/sched: Allow using a dedicated workqueue for the timeout/fault tdr 2021-07-01 08:53:25 +02:00
exynos drm-misc-next for v5.15: 2021-07-30 14:52:00 +10:00
fsl-dcu
gma500 drm/gma500: Add the missed drm_gem_object_put() in psb_user_framebuffer_create() 2021-07-09 21:32:04 +02:00
gud drm/gud: Use framebuffer dma-buf helpers 2021-07-23 20:18:04 +02:00
hisilicon drm-misc-next for v5.15: 2021-07-30 14:52:00 +10:00
hyperv drm-misc-next for v5.15: 2021-07-21 11:58:28 +10:00
i2c
i810
i915 Linux 5.14-rc3 2021-07-26 09:27:59 +10:00
imx drm/bridge: Centralize error message when bridge attach fails 2021-07-28 16:33:12 +03:00
ingenic drm/bridge: Centralize error message when bridge attach fails 2021-07-28 16:33:12 +03:00
kmb drm/bridge: Centralize error message when bridge attach fails 2021-07-28 16:33:12 +03:00
lib
lima drm-misc-next for v5.15: 2021-07-21 11:58:28 +10:00
mcde drm-misc-next for v5.15: 2021-07-30 14:52:00 +10:00
mediatek drm-misc-next for v5.15: 2021-07-30 14:52:00 +10:00
meson drm-misc-next for v5.15: 2021-07-21 11:58:28 +10:00
mga
mgag200 drm/mgag200: Constify LUT for programming bpp 2021-07-05 08:55:47 +02:00
msm Merge tag 'drm-msm-next-2021-07-28' of https://gitlab.freedesktop.org/drm/msm into drm-next 2021-07-30 16:24:01 +10:00
mxsfb drm: mxsfb: Clear FIFO_CLEAR bit 2021-07-27 21:15:24 +02:00
nouveau drm-misc-next for v5.15-rc1: 2021-07-23 11:32:43 +10:00
omapdrm drm/bridge: Centralize error message when bridge attach fails 2021-07-28 16:33:12 +03:00
panel drm/panel-sony-acx424akp: Modernize backlight handling 2021-07-28 23:46:18 +02:00
panfrost drm/panfrost: devfreq: Don't display error for EPROBE_DEFER 2021-07-23 12:06:29 +01:00
pl111 drm/tiny: drm_gem_simple_display_pipe_prepare_fb is the default 2021-06-24 15:40:11 +02:00
qxl drm-misc-next for v5.15: 2021-07-21 11:58:28 +10:00
r128
radeon drm-misc-next for v5.15-rc1: 2021-07-23 11:32:43 +10:00
rcar-du drm: rcar-du: lvds: Use dev_err_probe() 2021-07-28 16:33:32 +03:00
rockchip drm-misc-next for v5.15: 2021-07-30 14:52:00 +10:00
savage
scheduler drm/sched: Allow using a dedicated workqueue for the timeout/fault tdr 2021-07-01 08:53:25 +02:00
selftests drm: allow drm_atomic_print_state() to accept any drm_printer 2021-06-23 07:32:13 -07:00
shmobile drm/shmobile: Convert to Linux IRQ interfaces 2021-07-25 11:01:12 +02:00
sis
sti drm/bridge: Centralize error message when bridge attach fails 2021-07-28 16:33:12 +03:00
stm drm/stm: dsi: compute the transition time from LP to HS and back 2021-07-19 15:35:55 +02:00
sun4i drm/bridge: Centralize error message when bridge attach fails 2021-07-28 16:33:12 +03:00
tdfx
tegra drm/bridge: Centralize error message when bridge attach fails 2021-07-28 16:33:12 +03:00
tidss drm/bridge: Centralize error message when bridge attach fails 2021-07-28 16:33:12 +03:00
tilcdc drm/bridge: Centralize error message when bridge attach fails 2021-07-28 16:33:12 +03:00
tiny drm/st7586: Use framebuffer dma-buf helpers 2021-07-23 20:18:14 +02:00
ttm Linux 5.14-rc3 2021-07-26 09:27:59 +10:00
tve200 drm/tiny: drm_gem_simple_display_pipe_prepare_fb is the default 2021-06-24 15:40:11 +02:00
udl drm/udl: Use framebuffer dma-buf helpers 2021-07-23 20:17:42 +02:00
v3d drm/v3d: Expose performance counters to userspace 2021-07-21 00:19:59 +01:00
vboxvideo drm/vbox: Convert to Linux IRQ interfaces 2021-07-15 11:16:06 +02:00
vc4 drm-misc-next for v5.15: 2021-07-30 14:52:00 +10:00
vgem Revert "drm/vgem: Implement mmap as GEM object function" 2021-07-13 13:15:52 +02:00
via
virtio drm/aperture: Pass DRM driver structure instead of driver name 2021-07-01 11:11:55 +02:00
vkms drm/vkms: Use dma-buf mapping from shadow-plane state for composing 2021-07-13 13:36:21 +02:00
vmwgfx drm/vmwgfx: Use 2.19 version number to recognize mks-stats ioctls 2021-07-28 14:53:26 -04:00
xen drm/tiny: drm_gem_simple_display_pipe_prepare_fb is the default 2021-06-24 15:40:11 +02:00
xlnx drm/xlnx: Don't set struct drm_device.irq_enabled 2021-06-29 15:40:53 +02:00
zte drm/zte: Don't set struct drm_device.irq_enabled 2021-06-29 15:40:53 +02:00
Kconfig drm/bochs: Move to tiny/ 2021-07-05 08:54:44 +02:00
Makefile drm/bochs: Move to tiny/ 2021-07-05 08:54:44 +02:00
drm_agpsupport.c
drm_aperture.c drm/aperture: Pass DRM driver structure instead of driver name 2021-07-01 11:11:55 +02:00
drm_atomic.c Backmerge remote-tracking branch 'drm/drm-next' into drm-misc-next 2021-07-27 12:48:17 +02:00
drm_atomic_helper.c drm/atomic-helper: make drm_gem_plane_helper_prepare_fb the default 2021-06-24 15:35:13 +02:00
drm_atomic_state_helper.c
drm_atomic_uapi.c Merge tag 'drm-msm-next-2021-06-23b' of https://gitlab.freedesktop.org/drm/msm into drm-next 2021-06-24 07:21:16 +10:00
drm_auth.c drm: use the lookup lock in drm_is_current_master 2021-07-28 23:19:58 +02:00
drm_blend.c
drm_bridge.c drm/bridge: Centralize error message when bridge attach fails 2021-07-28 16:33:12 +03:00
drm_bridge_connector.c
drm_bufs.c
drm_cache.c drm: Add a prefetching memcpy_from_wc 2021-06-07 16:07:08 +02:00
drm_client.c
drm_client_modeset.c
drm_color_mgmt.c
drm_connector.c drm: avoid circular locks in drm_mode_getconnector 2021-07-20 20:13:56 +02:00
drm_context.c
drm_crtc.c
drm_crtc_helper.c
drm_crtc_helper_internal.h
drm_crtc_internal.h Backmerge remote-tracking branch 'drm/drm-next' into drm-misc-next 2021-07-27 12:48:17 +02:00
drm_damage_helper.c drm/plane: Move drm_plane_enable_fb_damage_clips into core 2021-07-27 12:21:22 +02:00
drm_debugfs.c drm: avoid blocking in drm_clients_info's rcu section 2021-07-20 20:14:42 +02:00
drm_debugfs_crc.c drm/doc: document how userspace should find out CRTC index 2021-06-10 19:14:47 +02:00
drm_displayid.c
drm_dma.c
drm_dp_aux_bus.c drm: Introduce the DP AUX bus 2021-06-11 12:30:39 -07:00
drm_dp_aux_dev.c
drm_dp_cec.c
drm_dp_dual_mode_helper.c
drm_dp_helper.c drm/dp: Don't zero PWMGEN_BIT_COUNT when driver_pwm_freq_hz not specified 2021-07-31 20:02:59 +02:00
drm_dp_mst_topology.c drm/dp_mst: Fix return code on sideband message failure 2021-07-27 18:58:28 -04:00
drm_dp_mst_topology_internal.h
drm_drv.c drm: Add a prefetching memcpy_from_wc 2021-06-07 16:07:08 +02:00
drm_dsc.c
drm_dumb_buffers.c
drm_edid.c
drm_edid_load.c
drm_encoder.c
drm_encoder_slave.c
drm_fb_cma_helper.c
drm_fb_helper.c
drm_file.c drm: serialize drm_file.master with a new spinlock 2021-07-20 20:17:58 +02:00
drm_flip_work.c
drm_format_helper.c
drm_fourcc.c Merge tag 'amd-drm-next-5.14-2021-06-02' of https://gitlab.freedesktop.org/agd5f/linux into drm-next 2021-06-04 06:13:57 +10:00
drm_framebuffer.c drm: add logging for RMFB ioctl 2021-07-27 14:16:40 +02:00
drm_gem.c Merge tag 'drm-msm-next-2021-07-28' of https://gitlab.freedesktop.org/drm/msm into drm-next 2021-07-30 16:24:01 +10:00
drm_gem_atomic_helper.c drm/gem: Export implementation of shadow-plane helpers 2021-07-13 13:30:58 +02:00
drm_gem_cma_helper.c drm: Fix misleading documentation of drm_gem_cma_create() 2021-06-01 17:27:20 +01:00
drm_gem_framebuffer_helper.c drm/gem: Provide drm_gem_fb_{begin,end}_cpu_access() helpers 2021-07-23 20:17:13 +02:00
drm_gem_shmem_helper.c drm/shmem-helper: Align to page size in dumb_create 2021-07-13 15:44:15 +02:00
drm_gem_ttm_helper.c drm/ttm: rename bo->mem and make it a pointer 2021-06-02 11:07:25 +02:00
drm_gem_vram_helper.c drm/vram-helper: Unexport drm_vram_helper_{alloc,release}_mm() 2021-07-05 08:55:11 +02:00
drm_hashtab.c
drm_hdcp.c
drm_internal.h
drm_ioc32.c
drm_ioctl.c drm: Return -ENOTTY for non-drm ioctls 2021-07-20 15:57:43 +02:00
drm_irq.c vgaarb: provide a vga_client_unregister wrapper 2021-07-21 10:29:00 +02:00
drm_kms_helper_common.c
drm_lease.c drm: clean up unused kerneldoc in drm_lease.c 2021-07-30 11:55:41 +02:00
drm_legacy.h
drm_legacy_misc.c
drm_lock.c
drm_managed.c
drm_memory.c
drm_mipi_dbi.c drm/mipi-dbi: Use framebuffer dma-buf helpers 2021-07-23 20:17:59 +02:00
drm_mipi_dsi.c
drm_mm.c
drm_mode_config.c
drm_mode_object.c
drm_modes.c
drm_modeset_helper.c
drm_modeset_lock.c
drm_of.c drm/of: free the iterator object on failure 2021-07-15 10:54:04 +01:00
drm_panel.c drm/dp: Move panel DP AUX backlight support to drm_dp_helper 2021-07-13 06:38:37 -07:00
drm_panel_orientation_quirks.c
drm_pci.c
drm_plane.c drm/plane: Move drm_plane_enable_fb_damage_clips into core 2021-07-27 12:21:22 +02:00
drm_plane_helper.c
drm_prime.c drm/prime: fix comment on PRIME Helpers 2021-07-27 12:21:22 +02:00
drm_print.c
drm_probe_helper.c
drm_property.c
drm_rect.c
drm_scatter.c
drm_scdc_helper.c
drm_self_refresh_helper.c
drm_simple_kms_helper.c drm/simple-helper: drm_gem_simple_display_pipe_prepare_fb as default 2021-06-24 15:39:46 +02:00
drm_syncobj.c dma-buf: add dma_fence_chain_alloc/free v3 2021-06-14 19:38:34 +02:00
drm_sysfs.c
drm_trace.h
drm_trace_points.c
drm_vblank.c drm: Don't test for IRQ support in VBLANK ioctls 2021-06-29 11:03:39 +02:00
drm_vblank_work.c
drm_vm.c
drm_vma_manager.c
drm_writeback.c