Message ID | 1334404333-24592-4-git-send-email-prathyush.k@samsung.com |
---|---|
State | New |
Headers | show |
> -----Original Message----- > From: Prathyush [mailto:prathyush.k@samsung.com] > Sent: Saturday, April 14, 2012 8:52 PM > To: dri-devel@lists.freedesktop.org; linaro-mm-sig@lists.linaro.org > Cc: inki.dae@samsung.com; subash.rp@samsung.com; prashanth.g@samsung.com; > sunilm@samsung.com; prathyush.k@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@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
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,
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@samsung.com> --- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)