linux/drivers/gpu/drm/msm
Sean Paul a796ba2cb3 drm/msm: dpu: Separate crtc assignment from vblank enable
Instead of assigning/clearing the crtc on vblank enable/disable, we can
just assign and clear the crtc on modeset. That allows us to just toggle
the encoder's vblank interrupts on vblank_enable.

So why is this important? Previously the driver was using the legacy
pointers to assign/clear the crtc. Legacy pointers are cleared _after_
disabling the hardware, so the legacy pointer was valid during
vblank_disable, but that's not something we should rely on.

Instead of relying on the core ordering the legacy pointer assignments
just so, we'll assign the crtc in dpu_crtc enable/disable. This is the
only place that mapping can change, so we're covered there.

We're also taking advantage of drm_crtc_vblank_on/off. By using this, we
ensure that vblank_enable/disable can never be called while the crtc is
off (which means the assigned crtc will always be valid). As such, we
don't need to use modeset locks or the crtc_lock in the
vblank_enable/disable routine to be sure state is consistent.

...I think.

Changes in v2:
- Changed crtc check in toggle_vblank to != (Jeykumar)

Cc: Jeykumar Sankaran <jsanka@codeaurora.org>
Reviewed-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
[dpu_crtc.c change needed to be manually applied b/c of the dpu_crtc_reset change]

Signed-off-by: Rob Clark <robdclark@gmail.com>
2018-12-11 13:10:15 -05:00
..
adreno drm/msm: add headless gpu device for imx5 2018-12-11 13:07:11 -05:00
disp drm/msm: dpu: Separate crtc assignment from vblank enable 2018-12-11 13:10:15 -05:00
dsi drm/msm/dsi: fix dsi clock names in DSI 10nm PLL driver 2018-12-11 13:07:07 -05:00
edp drm: msm: Use DRM_DEV_* instead of dev_* 2018-12-11 13:05:22 -05:00
hdmi drm: msm: Use DRM_DEV_* instead of dev_* 2018-12-11 13:05:22 -05:00
Kconfig drm/msm: add headless gpu device for imx5 2018-12-11 13:07:11 -05:00
Makefile drm/msm: dpu: Remove dpu_power_handle 2018-12-11 13:10:10 -05:00
msm_atomic.c drm/msm: dpu: Make legacy cursor updates asynchronous 2018-12-11 13:07:08 -05:00
msm_debugfs.c drm/msm: add headless gpu device for imx5 2018-12-11 13:07:11 -05:00
msm_debugfs.h drm/msm: Remove msm_debugfs_cleanup() 2017-03-08 11:24:45 +01:00
msm_drv.c drm/msm: add headless gpu device for imx5 2018-12-11 13:07:11 -05:00
msm_drv.h drm/msm: implement a2xx mmu 2018-12-11 13:07:10 -05:00
msm_fb.c drm/msm: Add a name field for gem objects 2018-12-11 13:06:59 -05:00
msm_fbdev.c drm/msm: Add msm_gem_get_and_pin_iova() 2018-12-11 13:05:32 -05:00
msm_fence.c drm/msm: Remove unecessary dma_fence_ops 2018-08-17 11:22:25 +02:00
msm_fence.h drm/msm: strip out msm_fence_cb 2018-03-19 06:33:35 -04:00
msm_gem_prime.c drm/msm: Expose our reservation object when exporting a dmabuf. 2017-05-27 13:48:26 -04:00
msm_gem_shrinker.c drm/msm: Separate locking of buffer resources from struct_mutex 2017-06-17 08:03:07 -04:00
msm_gem_submit.c drm/msm/gpu: add submit flag to hint which buffers should be dumped 2018-12-11 13:07:04 -05:00
msm_gem_vma.c drm/msm: implement a2xx mmu 2018-12-11 13:07:10 -05:00
msm_gem.c drm/msm: implement a2xx mmu 2018-12-11 13:07:10 -05:00
msm_gem.h drm/msm: Add a name field for gem objects 2018-12-11 13:06:59 -05:00
msm_gpu_trace.h drm/msm/gpu: Add trace events for tracking GPU submissions 2018-12-11 13:05:28 -05:00
msm_gpu_tracepoints.c drm/msm/gpu: Add trace events for tracking GPU submissions 2018-12-11 13:05:28 -05:00
msm_gpu.c drm/msm: implement a2xx mmu 2018-12-11 13:07:10 -05:00
msm_gpu.h drm/msm: Optimize adreno_show_object() 2018-12-11 13:07:03 -05:00
msm_gpummu.c drm/msm: implement a2xx mmu 2018-12-11 13:07:10 -05:00
msm_iommu.c drm/msm: Remove sgt from the mmu unmap function 2018-12-11 13:05:31 -05:00
msm_kms.h drm/msm: Cut dpu_kms hooks from msm_pm_suspend/resume 2018-12-11 12:51:27 -05:00
msm_mmu.h drm/msm: implement a2xx mmu 2018-12-11 13:07:10 -05:00
msm_perf.c drm/msm: Remove msm_debugfs_cleanup() 2017-03-08 11:24:45 +01:00
msm_rd.c drm/msm/gpu: add submit flag to hint which buffers should be dumped 2018-12-11 13:07:04 -05:00
msm_ringbuffer.c drm/msm/gpu: Map the ringbuffer in the iova at create time 2018-12-11 13:07:03 -05:00
msm_ringbuffer.h drm/msm/gpu: Add per-submission statistics 2018-12-11 13:05:28 -05:00
msm_submitqueue.c drm/msm: Support multiple ringbuffers 2017-10-28 11:01:36 -04:00
NOTES