From: Paul Menzel Subject: Re: [PATCH] drm/exynos: fixed a issue that plane isn't disabled when released Date: Fri, 24 Aug 2012 12:11:23 +0200 Message-ID: <1345803083.14375.10.camel@mattotaupa> References: <1345800435-3088-1-git-send-email-inki.dae@samsung.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0633310824==" Return-path: Received: from mail.gw90.de (mail.gw90.de [188.40.100.199]) by gabe.freedesktop.org (Postfix) with ESMTP id D7750A0E21 for ; Fri, 24 Aug 2012 03:11:38 -0700 (PDT) In-Reply-To: <1345800435-3088-1-git-send-email-inki.dae@samsung.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Inki Dae Cc: kyungmin.park@samsung.com, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0633310824== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-CWDSs75gjWLPYsulSwz6" --=-CWDSs75gjWLPYsulSwz6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Inki, Am Freitag, den 24.08.2012, 18:27 +0900 schrieb Inki Dae: You can shorten the commit summary by leaving out the word issue, which is redundant. Maybe one of the following? I do not understand the process of releasing so it might be wrong. drm/exynos: Disable plane after release drm/exynos: Disable plane when being released drm/exynos: Fix disabling of plane when released > when drm is released, drm framebuffers are released and all crtcs using > same framebuffer and also all gem buffers used but plane isn't disabled > so when crtc and encoder are turned on, overlay can access to invalid mem= ory > because plane still has memory address released already. > this patch makes sure that each plane is disabled when released. Please use sentences to make it easier to understand. Also describe the solution. Maybe something like this. This patch ensures that each plane is disabled when released, by adding a new function and adding that to the helper functions. Is there a report for that issue? Did you experience it in your setup? Is this tested? > Signed-off-by: Inki Dae > Signed-off-by: Kyungmin Park > --- > drivers/gpu/drm/exynos/exynos_drm_encoder.c | 15 +++++++++++++++ > 1 files changed, 15 insertions(+), 0 deletions(-) >=20 > diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/dr= m/exynos/exynos_drm_encoder.c > index 92f9acf..96a10c3 100644 > --- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c > +++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c > @@ -214,12 +214,27 @@ static void exynos_drm_encoder_commit(struct drm_en= coder *encoder) > manager_ops->commit(manager->dev); > } > =20 > +static void exynos_drm_encoder_disable(struct drm_encoder *encoder) > +{ > + struct drm_plane *plane; > + struct drm_device *dev =3D encoder->dev; > + > + exynos_drm_encoder_dpms(encoder, DRM_MODE_DPMS_OFF); > + > + /* all planes connected to this encoder should be also disabled. */ > + list_for_each_entry(plane, &dev->mode_config.plane_list, head) { > + if (plane->crtc =3D=3D encoder->crtc) > + plane->funcs->disable_plane(plane); > + } > +} > + > static struct drm_encoder_helper_funcs exynos_encoder_helper_funcs =3D { > .dpms =3D exynos_drm_encoder_dpms, > .mode_fixup =3D exynos_drm_encoder_mode_fixup, > .mode_set =3D exynos_drm_encoder_mode_set, > .prepare =3D exynos_drm_encoder_prepare, > .commit =3D exynos_drm_encoder_commit, > + .disable =3D exynos_drm_encoder_disable, > }; > =20 > static void exynos_drm_encoder_destroy(struct drm_encoder *encoder) Thanks, Paul --=-CWDSs75gjWLPYsulSwz6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEABECAAYFAlA3U0wACgkQPX1aK2wOHVhGsACgghnZgek3aWVAZZeCIuVpHJHi Y4wAnAkMaAtsSvdDFeI/a9XieY0eCMdV =hTqQ -----END PGP SIGNATURE----- --=-CWDSs75gjWLPYsulSwz6-- --===============0633310824== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0633310824==--