[PATCH] drm/exynos: fixed a issue that plane isn't disabled when released
Paul Menzel
paulepanter at users.sourceforge.net
Fri Aug 24 03:11:23 PDT 2012
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 memory
> 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 <inki.dae at samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
> ---
> drivers/gpu/drm/exynos/exynos_drm_encoder.c | 15 +++++++++++++++
> 1 files changed, 15 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/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_encoder *encoder)
> manager_ops->commit(manager->dev);
> }
>
> +static void exynos_drm_encoder_disable(struct drm_encoder *encoder)
> +{
> + struct drm_plane *plane;
> + struct drm_device *dev = 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 == encoder->crtc)
> + plane->funcs->disable_plane(plane);
> + }
> +}
> +
> static struct drm_encoder_helper_funcs exynos_encoder_helper_funcs = {
> .dpms = exynos_drm_encoder_dpms,
> .mode_fixup = exynos_drm_encoder_mode_fixup,
> .mode_set = exynos_drm_encoder_mode_set,
> .prepare = exynos_drm_encoder_prepare,
> .commit = exynos_drm_encoder_commit,
> + .disable = exynos_drm_encoder_disable,
> };
>
> static void exynos_drm_encoder_destroy(struct drm_encoder *encoder)
Thanks,
Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20120824/050eff0d/attachment.pgp>
More information about the dri-devel
mailing list