[PATCH 3/4] [RFC] drm/Exynos: Added 'disable' function to Exynos drm crtc module.
Inki Dae
inki.dae at samsung.com
Sun Apr 15 19:42:50 PDT 2012
> -----Original Message-----
> From: Prathyush [mailto:prathyush.k at samsung.com]
> Sent: Saturday, April 14, 2012 8:52 PM
> To: dri-devel at lists.freedesktop.org; linaro-mm-sig at lists.linaro.org
> Cc: inki.dae at samsung.com; subash.rp at samsung.com; prashanth.g at samsung.com;
> sunilm at samsung.com; prathyush.k at samsung.com
> Subject: [PATCH 3/4] [RFC] drm/Exynos: Added 'disable' function to Exynos
> drm crtc module.
>
> While freeing an fb, if the fb is being used by a crtc, the drm
> driver tries to disable the CRTC. Currently there is no disable
> function provided by exynos drm crtc module so the driver tries
> to suspend the crtc (by calling dpms) which only works if
> RUNTIME PM is enabled.
>
> Signed-off-by: Prathyush K <prathyush.k at samsung.com>
> ---
> drivers/gpu/drm/exynos/exynos_drm_crtc.c | 11 +++++++++++
> 1 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> index e3861ac..eb1e553 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> @@ -192,6 +192,16 @@ static void exynos_drm_crtc_dpms(struct drm_crtc
> *crtc, int mode)
> mutex_unlock(&dev->struct_mutex);
> }
>
> +static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
> +{
> + struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
> + struct exynos_drm_overlay *overlay = &exynos_crtc->overlay;
> + int win = overlay->zpos;
> +
> + exynos_drm_fn_encoder(crtc, &win,
> + exynos_drm_encoder_crtc_disable);
> +}
> +
> static void exynos_drm_crtc_prepare(struct drm_crtc *crtc)
> {
> DRM_DEBUG_KMS("%s\n", __FILE__);
> @@ -278,6 +288,7 @@ static void exynos_drm_crtc_load_lut(struct drm_crtc
> *crtc)
>
> static struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = {
> .dpms = exynos_drm_crtc_dpms,
> + .disable = exynos_drm_crtc_disable,
> .prepare = exynos_drm_crtc_prepare,
> .commit = exynos_drm_crtc_commit,
> .mode_fixup = exynos_drm_crtc_mode_fixup,
> --
dpms callback DO WORK same thing please see drm_crtc.c file, dpms callback
would be called if disable is NULL. your patch set makes our dpms callback
not to be used. and exynos_drm_encoder_crtc_disable is called by
exynos_drm_plane module for each overlay.
Thanks.
> 1.7.0.4
More information about the dri-devel
mailing list