diff options
author | Thomas White <taw@bitwiz.org.uk> | 2010-03-08 23:51:09 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2010-03-08 23:51:09 +0100 |
commit | 98b7291ecb2848194351c9e7b84173aa3e5d95a8 (patch) | |
tree | e16c6859d164ad18ad410f94934a5a52fb04a7cb /drivers/mfd/glamo/glamo-display.c | |
parent | 0c53f82530b4f720809766dac99f8a0861a30882 (diff) |
Clean up JBT hooks, and allow resolution switching
Signed-off-by: Thomas White <taw@bitwiz.org.uk>
Diffstat (limited to 'drivers/mfd/glamo/glamo-display.c')
-rw-r--r-- | drivers/mfd/glamo/glamo-display.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/mfd/glamo/glamo-display.c b/drivers/mfd/glamo/glamo-display.c index 5f0469723b5..e56cdb437c7 100644 --- a/drivers/mfd/glamo/glamo-display.c +++ b/drivers/mfd/glamo/glamo-display.c @@ -52,19 +52,18 @@ * */ -#define DEBUG 1 - #include <drm/drmP.h> #include <drm/glamo_drm.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_crtc.h> +#include <linux/glamofb.h> +#include <linux/jbt6k74.h> #include "glamo-core.h" #include "glamo-drm-private.h" #include "glamo-regs.h" #include "glamo-kms-fb.h" #include "glamo-display.h" -#include <linux/glamofb.h> #define GLAMO_LCD_WIDTH_MASK 0x03FF @@ -356,6 +355,12 @@ static int glamo_crtc_mode_set(struct drm_crtc *crtc, glamo_lcd_cmd_mode(gdrm, 0); + if ( mode->hdisplay == 240 ) { + jbt6k74_setresolution(JBT_RESOLUTION_QVGA); + } else { + jbt6k74_setresolution(JBT_RESOLUTION_VGA); + } + glamo_crtc_mode_set_base(crtc, 0, 0, old_fb); gcrtc->current_mode = *mode; @@ -366,8 +371,6 @@ static int glamo_crtc_mode_set(struct drm_crtc *crtc, } -extern void jbt6k74_action(int val); - /* This is not the right place to switch power on/off, because the helper * stuff ends up calling this before/after setting the mode. We can't * set modes with the display off (although backlight off would be OK) */ @@ -385,14 +388,14 @@ void glamo_lcd_power(struct glamodrm_handle *gdrm, int mode) if ( mode ) { glamo_engine_enable(gdrm->glamo_core, GLAMO_ENGINE_LCD); gcrtc->pixel_clock_on = 1; - jbt6k74_action(1); + jbt6k74_setpower(JBT_POWER_MODE_NORMAL); if ( gcrtc->current_mode_set ) { glamo_crtc_mode_set(crtc, &gcrtc->current_mode, &gcrtc->current_mode, 0, 0, gcrtc->current_fb); } } else { - jbt6k74_action(0); + jbt6k74_setpower(JBT_POWER_MODE_OFF); glamo_engine_suspend(gdrm->glamo_core, GLAMO_ENGINE_LCD); gcrtc->pixel_clock_on = 0; } |