From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH] drm/atomic-helper: Add option to update planes only on active crtc Date: Tue, 8 Sep 2015 13:10:58 +0200 Message-ID: <20150908111056.GA31658@ulmo.nvidia.com> References: <1440597773-24655-1-git-send-email-daniel.vetter@ffwll.ch> <1441706527-22048-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0219105755==" Return-path: In-Reply-To: <1441706527-22048-1-git-send-email-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Daniel Vetter Cc: Daniel Vetter , Intel Graphics Development , Laurent Pinchart , DRI Development List-Id: dri-devel@lists.freedesktop.org --===============0219105755== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lrZ03NoBR/3+SXJZ" Content-Disposition: inline --lrZ03NoBR/3+SXJZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > 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. >=20 > v3: Since commit_planes(active_only =3D 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. >=20 > v4: Rebase over exynos changes. >=20 > Cc: Maarten Lankhorst > Cc: Thierry Reding > Cc: Laurent Pinchart > Signed-off-by: Daniel Vetter > --- > 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 Tested-by: Thierry Reding --lrZ03NoBR/3+SXJZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJV7sI9AAoJEN0jrNd/PrOhr2IP/01e57qcNclNIB56ApZ0Ra27 akYLBL5hr2zSME+n0C1qpku1baT6yyzrSGR8GDLOZmZP7zjY+TdRK/pD5/IDNN7s ftzR5pdCofV38II5/s9TzwJBQGLeJ6z02mcOtStysIGxdBhIN5DgAzkpn3IMIck3 KgywhFbiF0Ey9GYiApAn8t/sXLwl7kwyn39urFF2PoLywPIOJtLGJHBIROBwN5eF tD59zlGp28mnSwCzD9zW5PkNKeRuX8HD6Yxa/J9Nz4eZfW02DlKZJOueqryx70gx JMdqlLBCxXkGLHmWHq0rmPMPPha9OpiygYYoD1oKHPZ9NEpDWk+T6XmJ/juCNsYk IqWvGfM1LGRbY/1SVqCzCZ7+tbMmIFEelbntqGtEq2L7Zey4IXqp/IdcDvLqMF1q n49OEUn2liRK+gDiOma0UgjyiwBrkKub9UJMyeuHcDsHaMdf4DJq20FZtD8zllxb PlJkbu5B8elQuB3CyvvfQ8aexbU2sizs055B+HBIRKNZBb5esRMjSgVxRtHcjB7h DoIwplaepPqc/ocqlOBri32Rb8Tl1NgaV4ktiohi5cbfP8tgreR4pSVQABtzf9qh QQ08+En8MM/0zJazFWukYhUOIdBa4T2pYDfQrJ70d/vwuUzehyGkgD+ll2SNcdD4 Oovx6di0goqu+wtmC6Wz =JCYY -----END PGP SIGNATURE----- --lrZ03NoBR/3+SXJZ-- --===============0219105755== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0219105755==--