drm/gma500: Add generic set_config() function

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
This commit is contained in:
Patrik Jakobsson 2013-07-12 15:38:52 +02:00
parent f0ff07b73b
commit 924cb5ffd8
2 changed files with 19 additions and 0 deletions

View File

@ -519,6 +519,22 @@ void gma_crtc_destroy(struct drm_crtc *crtc)
kfree(psb_intel_crtc); kfree(psb_intel_crtc);
} }
int gma_crtc_set_config(struct drm_mode_set *set)
{
struct drm_device *dev = set->crtc->dev;
struct drm_psb_private *dev_priv = dev->dev_private;
int ret;
if (!dev_priv->rpm_enabled)
return drm_crtc_helper_set_config(set);
pm_runtime_forbid(&dev->pdev->dev);
ret = drm_crtc_helper_set_config(set);
pm_runtime_allow(&dev->pdev->dev);
return ret;
}
/** /**
* Save HW states of given crtc * Save HW states of given crtc
*/ */

View File

@ -22,6 +22,8 @@
#ifndef _GMA_DISPLAY_H_ #ifndef _GMA_DISPLAY_H_
#define _GMA_DISPLAY_H_ #define _GMA_DISPLAY_H_
#include <linux/pm_runtime.h>
struct gma_clock_t { struct gma_clock_t {
/* given values */ /* given values */
int n; int n;
@ -80,6 +82,7 @@ extern void gma_crtc_prepare(struct drm_crtc *crtc);
extern void gma_crtc_commit(struct drm_crtc *crtc); extern void gma_crtc_commit(struct drm_crtc *crtc);
extern void gma_crtc_disable(struct drm_crtc *crtc); extern void gma_crtc_disable(struct drm_crtc *crtc);
extern void gma_crtc_destroy(struct drm_crtc *crtc); extern void gma_crtc_destroy(struct drm_crtc *crtc);
extern int gma_crtc_set_config(struct drm_mode_set *set);
extern void gma_crtc_save(struct drm_crtc *crtc); extern void gma_crtc_save(struct drm_crtc *crtc);
extern void gma_crtc_restore(struct drm_crtc *crtc); extern void gma_crtc_restore(struct drm_crtc *crtc);