Commit 75346fe9 authored by Patrik Jakobsson's avatar Patrik Jakobsson

drm/gma500/cdv: Add and hook up chip op for disabling sr

Add a callback hook to the chip ops struct to allow chips to have their
specific self-refresh function. Currently only used by cdv.
Signed-off-by: default avatarPatrik Jakobsson <patrik.r.jakobsson@gmail.com>
parent 28a8194c
......@@ -657,4 +657,5 @@ const struct psb_ops cdv_chip_ops = {
.power_down = cdv_power_down,
.power_up = cdv_power_up,
.update_wm = cdv_update_wm,
.disable_sr = cdv_disable_sr,
};
......@@ -27,3 +27,4 @@ extern void cdv_hdmi_init(struct drm_device *dev, struct psb_intel_mode_device *
extern struct drm_display_mode *cdv_intel_crtc_mode_get(struct drm_device *dev,
struct drm_crtc *crtc);
extern void cdv_update_wm(struct drm_device *dev, struct drm_crtc *crtc);
extern void cdv_disable_sr(struct drm_device *dev);
......@@ -511,7 +511,7 @@ static bool is_pipeb_lvds(struct drm_device *dev, struct drm_crtc *crtc)
return false;
}
void cdv_intel_disable_self_refresh(struct drm_device *dev)
void cdv_disable_sr(struct drm_device *dev)
{
if (REG_READ(FW_BLC_SELF) & FW_BLC_SELF_EN) {
......@@ -534,6 +534,7 @@ void cdv_intel_disable_self_refresh(struct drm_device *dev)
void cdv_update_wm(struct drm_device *dev, struct drm_crtc *crtc)
{
struct drm_psb_private *dev_priv = dev->dev_private;
if (cdv_intel_single_pipe_active(dev)) {
u32 fw;
......@@ -587,8 +588,7 @@ void cdv_update_wm(struct drm_device *dev, struct drm_crtc *crtc)
gma_wait_for_vblank(dev);
cdv_intel_disable_self_refresh(dev);
dev_priv->ops->disable_sr(dev);
}
}
......
......@@ -211,7 +211,7 @@ void gma_crtc_dpms(struct drm_crtc *crtc, int mode)
*/
if (IS_CDV(dev))
cdv_intel_disable_self_refresh(dev);
dev_priv->ops->disable_sr(dev);
switch (mode) {
case DRM_MODE_DPMS_ON:
......
......@@ -100,7 +100,4 @@ extern bool gma_pll_is_valid(struct drm_crtc *crtc,
extern bool gma_find_best_pll(const struct gma_limit_t *limit,
struct drm_crtc *crtc, int target, int refclk,
struct gma_clock_t *best_clock);
/* Cedarview specific functions */
extern void cdv_intel_disable_self_refresh(struct drm_device *dev);
#endif
......@@ -696,6 +696,7 @@ struct psb_ops {
int (*power_up)(struct drm_device *dev);
int (*power_down)(struct drm_device *dev);
void (*update_wm)(struct drm_device *dev, struct drm_crtc *crtc);
void (*disable_sr)(struct drm_device *dev);
void (*lvds_bl_power)(struct drm_device *dev, bool on);
#ifdef CONFIG_BACKLIGHT_CLASS_DEVICE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment