Commit 731b5a15 authored by James Simmons's avatar James Simmons Committed by Dave Airlie

drm/kms: properly handle fbdev blanking

I examined several fbdev drivers and foudn the blanking code in
drm_fb_helper to be wrong. This patch fixes the fbdev blanking to behave
like other fbdev drivers.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent d91d8a3f
...@@ -373,11 +373,9 @@ static void drm_fb_helper_off(struct fb_info *info, int dpms_mode) ...@@ -373,11 +373,9 @@ static void drm_fb_helper_off(struct fb_info *info, int dpms_mode)
mutex_unlock(&dev->mode_config.mutex); mutex_unlock(&dev->mode_config.mutex);
} }
} }
if (dpms_mode == DRM_MODE_DPMS_OFF) { mutex_lock(&dev->mode_config.mutex);
mutex_lock(&dev->mode_config.mutex); crtc_funcs->dpms(crtc, DRM_MODE_DPMS_OFF);
crtc_funcs->dpms(crtc, dpms_mode); mutex_unlock(&dev->mode_config.mutex);
mutex_unlock(&dev->mode_config.mutex);
}
} }
} }
} }
...@@ -385,18 +383,23 @@ static void drm_fb_helper_off(struct fb_info *info, int dpms_mode) ...@@ -385,18 +383,23 @@ static void drm_fb_helper_off(struct fb_info *info, int dpms_mode)
int drm_fb_helper_blank(int blank, struct fb_info *info) int drm_fb_helper_blank(int blank, struct fb_info *info)
{ {
switch (blank) { switch (blank) {
/* Display: On; HSync: On, VSync: On */
case FB_BLANK_UNBLANK: case FB_BLANK_UNBLANK:
drm_fb_helper_on(info); drm_fb_helper_on(info);
break; break;
/* Display: Off; HSync: On, VSync: On */
case FB_BLANK_NORMAL: case FB_BLANK_NORMAL:
drm_fb_helper_off(info, DRM_MODE_DPMS_STANDBY); drm_fb_helper_off(info, DRM_MODE_DPMS_ON);
break; break;
/* Display: Off; HSync: Off, VSync: On */
case FB_BLANK_HSYNC_SUSPEND: case FB_BLANK_HSYNC_SUSPEND:
drm_fb_helper_off(info, DRM_MODE_DPMS_STANDBY); drm_fb_helper_off(info, DRM_MODE_DPMS_STANDBY);
break; break;
/* Display: Off; HSync: On, VSync: Off */
case FB_BLANK_VSYNC_SUSPEND: case FB_BLANK_VSYNC_SUSPEND:
drm_fb_helper_off(info, DRM_MODE_DPMS_SUSPEND); drm_fb_helper_off(info, DRM_MODE_DPMS_SUSPEND);
break; break;
/* Display: Off; HSync: Off, VSync: Off */
case FB_BLANK_POWERDOWN: case FB_BLANK_POWERDOWN:
drm_fb_helper_off(info, DRM_MODE_DPMS_OFF); drm_fb_helper_off(info, DRM_MODE_DPMS_OFF);
break; break;
......
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