[PATCH] drm/atomic-helper: Add option to update planes only on active crtc
Thierry Reding
treding at nvidia.com
Tue Sep 8 04:10:58 PDT 2015
On Tue, Sep 08, 2015 at 12:02:07PM +0200, Daniel Vetter wrote:
> 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 at linux.intel.com>
> Cc: Thierry Reding <treding at nvidia.com>
> Cc: Laurent Pinchart <laurent.pinchart+renesas at ideasonboard.com>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> ---
> drivers/gpu/drm/drm_atomic_helper.c | 20 ++++++++++++++++++--
> drivers/gpu/drm/exynos/exynos_drm_drv.c | 2 +-
> drivers/gpu/drm/msm/msm_atomic.c | 2 +-
> drivers/gpu/drm/omapdrm/omap_drv.c | 2 +-
> drivers/gpu/drm/rcar-du/rcar_du_kms.c | 2 +-
> drivers/gpu/drm/sti/sti_drv.c | 2 +-
> drivers/gpu/drm/tegra/drm.c | 2 +-
> include/drm/drm_atomic_helper.h | 3 ++-
> 8 files changed, 26 insertions(+), 9 deletions(-)
Reviewed-by: Thierry Reding <treding at nvidia.com>
Tested-by: Thierry Reding <treding at nvidia.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20150908/ecb5f32d/attachment.sig>
More information about the dri-devel
mailing list