OpenCloudOS-Kernel/drivers/gpu/drm/rcar-du
Daniel Vetter aef9dbb8f7 drm/atomic-helper: Add option to update planes only on active crtc
With drivers supporting runtime pm it's generally not a good idea to
touch the hardware when it's off. Add an option to the commit_planes
helper to support this case.

Note that the helpers already add all planes on a crtc when a modeset
happens, hence plane updates will not be lost if drivers set this to
true.

v2: Check for NULL state->crtc before chasing the pointer. Also check
both old and new crtc if there's a switch. Finally just outright
disallow switching crtcs for a plane if the plane is in active use, on
most hardware that doesn't make sense.

v3: Since commit_planes(active_only = true) is for enabling things
only after all the crtc are on we should only look at the new crtc to
decide whether to call the plane hooks - if the current CRTC isn't on
then skip. If the old crtc (when moving a plane) went down then the
plane should have been disabled as part of the pipe shutdown work
already. For which there's currently no helper really unfortunately.
Also move the check for wether a plane gets a new CRTC assigned while
still in active use out of this patch.

v4: Rebase over exynos changes.

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Thierry Reding <treding@nvidia.com>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-09-08 13:49:08 +02:00
..
Kconfig drm: Kconfig: Let all DRM_GEM_CMA_HELPER related macros depend on HAVE_DMA_ATTRS 2015-02-03 11:12:37 +10:00
Makefile drm: rcar-du: Add HDMI encoder and connector support 2014-11-26 20:09:38 +02:00
rcar_du_crtc.c drm/atomic: pass old crtc state to atomic_begin/flush. 2015-07-27 16:23:22 +02:00
rcar_du_crtc.h drm: rcar-du: Document the rcar_du_crtc structure 2015-05-25 15:34:10 +03:00
rcar_du_drv.c drm: rcar-du: Print the error value when DRM/KMS init fails 2015-06-16 14:15:47 +03:00
rcar_du_drv.h drm: rcar-du: Move properties from rcar_du_planes to rcar_du_device 2015-05-25 15:34:11 +03:00
rcar_du_encoder.c drm: rcar-du: Replace encoder mode_fixup with atomic_check 2015-03-03 16:16:21 +02:00
rcar_du_encoder.h drm: rcar-du: Add HDMI encoder and connector support 2014-11-26 20:09:38 +02:00
rcar_du_group.c drm: rcar-du: Keep plane to CRTC associations when disabling a plane 2015-05-25 15:34:12 +03:00
rcar_du_group.h drm: rcar-du: Fix crash with groups that have less than 9 planes 2015-06-16 14:25:43 +03:00
rcar_du_hdmicon.c drm: rcar-du: Switch connector DPMS to atomic helpers 2015-03-03 16:16:20 +02:00
rcar_du_hdmicon.h drm: rcar-du: Add HDMI encoder and connector support 2014-11-26 20:09:38 +02:00
rcar_du_hdmienc.c drm: rcar-du: Replace encoder mode_fixup with atomic_check 2015-03-03 16:16:21 +02:00
rcar_du_hdmienc.h drm: rcar-du: Add HDMI encoder and connector support 2014-11-26 20:09:38 +02:00
rcar_du_kms.c drm/atomic-helper: Add option to update planes only on active crtc 2015-09-08 13:49:08 +02:00
rcar_du_kms.h drm/rcar-du: Update copyright notice 2014-09-15 11:34:06 +03:00
rcar_du_lvdscon.c drm: rcar-du: Switch connector DPMS to atomic helpers 2015-03-03 16:16:20 +02:00
rcar_du_lvdscon.h drm: rcar-du: Remove platform data support 2014-11-26 20:09:36 +02:00
rcar_du_lvdsenc.c drm: rcar-du: Replace LVDS encoder DPMS by enable/disable 2015-03-03 16:16:14 +02:00
rcar_du_lvdsenc.h drm: rcar-du: Replace LVDS encoder DPMS by enable/disable 2015-03-03 16:16:14 +02:00
rcar_du_plane.c drm: rcar-du: Use the drm atomic state duplication helpers for planes 2015-06-16 14:25:55 +03:00
rcar_du_plane.h drm: rcar-du: Rename to_rcar_du_plane_state to to_rcar_plane_state 2015-05-25 15:34:11 +03:00
rcar_du_regs.h drm: rcar-du: Implement support for interlaced modes 2014-12-23 12:01:52 +02:00
rcar_du_vgacon.c drm: rcar-du: Switch connector DPMS to atomic helpers 2015-03-03 16:16:20 +02:00
rcar_du_vgacon.h drm/rcar-du: Update copyright notice 2014-09-15 11:34:06 +03:00
rcar_lvds_regs.h drm/rcar-du: Add internal LVDS encoder support 2013-08-09 23:17:53 +02:00