diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c index 6030805..c79ad6c 100644 --- a/arch/x86/kernel/nmi.c +++ b/arch/x86/kernel/nmi.c @@ -173,6 +173,7 @@ pci_serr_error(unsigned char reason, struct pt_regs *regs) pr_emerg("NMI: PCI system error (SERR) for reason %02x on CPU %d.\n", reason, smp_processor_id()); +dump_stack(); /* * On some machines, PCI SERR line is used to report memory diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index d0e15ef..9f7378a 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -916,6 +916,8 @@ void drm_helper_connector_dpms(struct drm_connector *connector, int mode) struct drm_crtc *crtc = encoder ? encoder->crtc : NULL; int old_dpms, encoder_dpms = DRM_MODE_DPMS_OFF; +pr_info("%s(mode:%d) connector:'%s' connector->dpms:%d\n", __func__, mode, drm_get_connector_name(connector), connector->dpms); + if (mode == connector->dpms) return; @@ -930,22 +932,30 @@ void drm_helper_connector_dpms(struct drm_connector *connector, int mode) if (crtc) { struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; if (crtc_funcs->dpms) +{pr_info("%s: crtc_funcs->dpms()\n", __func__); (*crtc_funcs->dpms) (crtc, drm_helper_choose_crtc_dpms(crtc)); +} } if (encoder) +{pr_info("%s: drm_helper_encoder_dpms(encoder_dpms:%d)\n", __func__, encoder_dpms); drm_helper_encoder_dpms(encoder, encoder_dpms); +} } /* from on to off, do encoder then crtc */ if (mode > old_dpms) { if (encoder) +{pr_info("%s: drm_helper_encoder_dpms(encoder_dpms:%d)\n", __func__, encoder_dpms); drm_helper_encoder_dpms(encoder, encoder_dpms); +} if (crtc) { struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; if (crtc_funcs->dpms) +{pr_info("%s: crtc_funcs->dpms()\n", __func__); (*crtc_funcs->dpms) (crtc, drm_helper_choose_crtc_dpms(crtc)); +} } } diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 3d13ca6e2..262fca5 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -407,6 +407,7 @@ static void drm_fb_helper_dpms(struct fb_info *info, int dpms_mode) struct drm_connector *connector; int i, j; +pr_info("%s(dpms_mode:%d)\n", __func__, dpms_mode); /* * fbdev->blank can be called from irq context in case of a panic. * Since we already have our own special panic handler which will @@ -420,6 +421,7 @@ static void drm_fb_helper_dpms(struct fb_info *info, int dpms_mode) */ drm_modeset_lock_all(dev); if (!drm_fb_helper_is_bound(fb_helper)) { +pr_info("%s: !drm_fb_helper_is_bound(), bailing out\n", __func__); drm_modeset_unlock_all(dev); return; } @@ -433,6 +435,7 @@ static void drm_fb_helper_dpms(struct fb_info *info, int dpms_mode) /* Walk the connectors & encoders on this fb turning them on/off */ for (j = 0; j < fb_helper->connector_count; j++) { connector = fb_helper->connector_info[j]->connector; +pr_info("%s: connector->funcs->dpms()...\n", __func__); connector->funcs->dpms(connector, dpms_mode); drm_object_property_set_value(&connector->base, dev->mode_config.dpms_property, dpms_mode); @@ -448,9 +451,11 @@ static void drm_fb_helper_dpms(struct fb_info *info, int dpms_mode) */ int drm_fb_helper_blank(int blank, struct fb_info *info) { +pr_info("%s(blank:%d)\n", __func__, blank); switch (blank) { /* Display: On; HSync: On, VSync: On */ case FB_BLANK_UNBLANK: +pr_info("%s: FB_BLANK_UNBLANK\n", __func__); drm_fb_helper_dpms(info, DRM_MODE_DPMS_ON); break; /* Display: Off; HSync: On, VSync: On */ diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c index 15da7ef..4c851fb 100644 --- a/drivers/gpu/drm/radeon/atom.c +++ b/drivers/gpu/drm/radeon/atom.c @@ -1164,6 +1164,8 @@ static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32 atom_exec_context ectx; int ret = 0; +//pr_info("%s(index:%d)\n", __func__, index); + if (!base) return -EINVAL; @@ -1200,8 +1202,10 @@ static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32 } if (op < ATOM_OP_CNT && op > 0) +{//pr_info("%s: op:%d\n", __func__, op); opcode_table[op].func(&ectx, &ptr, opcode_table[op].arg); +} else break; @@ -1214,6 +1218,7 @@ static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32 free: if (ws) kfree(ectx.ws); +pr_info("%s(index:%d,*params:%08x) returns %d\n", __func__, index, params ? *params : -1u, ret); return ret; } diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c index 5e891b2..681fa2c 100644 --- a/drivers/gpu/drm/radeon/atombios_encoders.c +++ b/drivers/gpu/drm/radeon/atombios_encoders.c @@ -39,10 +39,15 @@ radeon_atom_get_backlight_level_from_reg(struct radeon_device *rdev) u32 bios_2_scratch; if (rdev->family >= CHIP_R600) +{pr_info("%s: R600_BIOS_2_SCRATCH\n", __func__); bios_2_scratch = RREG32(R600_BIOS_2_SCRATCH); +} else +{pr_info("%s: RADEON_BIOS_2_SCRATCH\n", __func__); bios_2_scratch = RREG32(RADEON_BIOS_2_SCRATCH); +} +pr_info("%s: bios_2_scratch:%08x\n", __func__, bios_2_scratch); backlight_level = ((bios_2_scratch & ATOM_S2_CURRENT_BL_LEVEL_MASK) >> ATOM_S2_CURRENT_BL_LEVEL_SHIFT); @@ -92,6 +97,7 @@ atombios_set_backlight_level(struct radeon_encoder *radeon_encoder, u8 level) DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION args; int index; +pr_info("%s(level:%d)\n", __func__, level); if (!(rdev->mode_info.firmware_flags & ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU)) return; @@ -106,6 +112,7 @@ atombios_set_backlight_level(struct radeon_encoder *radeon_encoder, u8 level) case ENCODER_OBJECT_ID_INTERNAL_LVTM1: index = GetIndexIntoMasterTable(COMMAND, LCD1OutputControl); if (dig->backlight_level == 0) { +pr_info("%s: atom_execute_table(ATOM_LCD_BLOFF)\n", __func__); args.ucAction = ATOM_LCD_BLOFF; atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); } else { @@ -140,11 +147,17 @@ static u8 radeon_atom_bl_level(struct backlight_device *bd) /* Convert brightness to hardware level */ if (bd->props.brightness < 0) +{pr_info("%s: bd->props.brightness < 0, lovel=0\n", __func__); level = 0; +} else if (bd->props.brightness > RADEON_MAX_BL_LEVEL) +{pr_info("%s: bd->props.brightness > RADEON_MAX_BL_LEVEL\n", __func__); level = RADEON_MAX_BL_LEVEL; +} else +{pr_info("%s: level = bd->props.brightness:%d\n", __func__, bd->props.brightness); level = bd->props.brightness; +} return level; } @@ -154,6 +167,7 @@ static int radeon_atom_backlight_update_status(struct backlight_device *bd) struct radeon_backlight_privdata *pdata = bl_get_data(bd); struct radeon_encoder *radeon_encoder = pdata->encoder; +pr_info("%s: atombios_set_backlight_level()\n", __func__); atombios_set_backlight_level(radeon_encoder, radeon_atom_bl_level(bd)); return 0; @@ -228,6 +242,7 @@ void radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder, dig->bl_dev = bd; bd->props.brightness = radeon_atom_backlight_get_brightness(bd); +pr_info("%s: bd->props.brightness=%d\n", __func__, bd->props.brightness); bd->props.power = FB_BLANK_UNBLANK; backlight_update_status(bd); @@ -1549,8 +1564,11 @@ radeon_atom_encoder_dpms_avivo(struct drm_encoder *encoder, int mode) DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION args; int index = 0; +pr_info("%s(mode:%d)\n", __func__, mode); + memset(&args, 0, sizeof(args)); +pr_info("%s: radeon_encoder->encoder_id:%d\n", __func__, radeon_encoder->encoder_id); switch (radeon_encoder->encoder_id) { case ENCODER_OBJECT_ID_INTERNAL_TMDS1: case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: @@ -1566,18 +1584,30 @@ radeon_atom_encoder_dpms_avivo(struct drm_encoder *encoder, int mode) break; case ENCODER_OBJECT_ID_INTERNAL_LVTM1: if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) +{pr_info("%s: ENCODER_OBJECT_ID_INTERNAL_LVTM1 and ATOM_DEVICE_LCD_SUPPORT\n", __func__); index = GetIndexIntoMasterTable(COMMAND, LCD1OutputControl); +} else +{pr_info("%s: ENCODER_OBJECT_ID_INTERNAL_LVTM1 and !ATOM_DEVICE_LCD_SUPPORT\n", __func__); index = GetIndexIntoMasterTable(COMMAND, LVTMAOutputControl); +} break; case ENCODER_OBJECT_ID_INTERNAL_DAC1: +pr_info("%s: ENCODER_OBJECT_ID_INTERNAL_DAC1\n", __func__); case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1: +pr_info("%s: ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1\n", __func__); if (radeon_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT)) +{pr_info("%s: index:TV1OutputControl\n", __func__); index = GetIndexIntoMasterTable(COMMAND, TV1OutputControl); +} else if (radeon_encoder->active_device & (ATOM_DEVICE_CV_SUPPORT)) +{pr_info("%s: index:CV1OutputControl\n", __func__); index = GetIndexIntoMasterTable(COMMAND, CV1OutputControl); +} else +{pr_info("%s: index:DAC1OutputControl\n", __func__); index = GetIndexIntoMasterTable(COMMAND, DAC1OutputControl); +} break; case ENCODER_OBJECT_ID_INTERNAL_DAC2: case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2: @@ -1591,19 +1621,23 @@ radeon_atom_encoder_dpms_avivo(struct drm_encoder *encoder, int mode) default: return; } +pr_info("%s: index:%d\n", __func__, index); switch (mode) { case DRM_MODE_DPMS_ON: args.ucAction = ATOM_ENABLE; /* workaround for DVOOutputControl on some RS690 systems */ +pr_info("%s: atom_execute_table(ATOM_ENABLE)...\n", __func__); if (radeon_encoder->encoder_id == ENCODER_OBJECT_ID_INTERNAL_DDI) { u32 reg = RREG32(RADEON_BIOS_3_SCRATCH); +pr_info("%s: radeon_encoder->encoder_id == ENCODER_OBJECT_ID_INTERNAL_DDI\n", __func__); WREG32(RADEON_BIOS_3_SCRATCH, reg & ~ATOM_S3_DFP2I_ACTIVE); atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); WREG32(RADEON_BIOS_3_SCRATCH, reg); } else atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) { +pr_info("%s: atom_execute_table(ATOM_LCD_BLON)...\n", __func__); args.ucAction = ATOM_LCD_BLON; atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); } @@ -1611,9 +1645,11 @@ radeon_atom_encoder_dpms_avivo(struct drm_encoder *encoder, int mode) case DRM_MODE_DPMS_STANDBY: case DRM_MODE_DPMS_SUSPEND: case DRM_MODE_DPMS_OFF: +pr_info("%s: atom_execute_table(ATOM_DISABLE)...\n", __func__); args.ucAction = ATOM_DISABLE; atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) { +pr_info("%s: atom_execute_table(ATOM_LCD_BLOFF)...\n", __func__); args.ucAction = ATOM_LCD_BLOFF; atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); } @@ -1633,6 +1669,8 @@ radeon_atom_encoder_dpms_dig(struct drm_encoder *encoder, int mode) struct radeon_connector *radeon_connector = NULL; struct radeon_connector_atom_dig *radeon_dig_connector = NULL; +pr_info("%s(mode:%d)\n", __func__, mode); + if (connector) { radeon_connector = to_radeon_connector(connector); radeon_dig_connector = radeon_connector->con_priv; @@ -1728,6 +1766,8 @@ radeon_atom_encoder_dpms_ext(struct drm_encoder *encoder, struct drm_device *dev = encoder->dev; struct radeon_device *rdev = dev->dev_private; +pr_info("%s(mode:%d)\n", __func__, mode); + switch (mode) { case DRM_MODE_DPMS_ON: default: @@ -1761,6 +1801,8 @@ radeon_atom_encoder_dpms(struct drm_encoder *encoder, int mode) struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); struct drm_encoder *ext_encoder = radeon_get_external_encoder(encoder); +pr_info("%s(mode:%d)\n", __func__, mode); + DRM_DEBUG_KMS("encoder dpms %d to mode %d, devices %08x, active_devices %08x\n", radeon_encoder->encoder_id, mode, radeon_encoder->devices, radeon_encoder->active_device); @@ -2513,6 +2555,7 @@ static void radeon_atom_ext_dpms(struct drm_encoder *encoder, int mode) { +pr_info("%s(mode:%d)\n", __func__, mode); } static bool radeon_atom_ext_mode_fixup(struct drm_encoder *encoder, diff --git a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c index 0b158f9..6f87c75 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c @@ -298,6 +298,8 @@ static void radeon_crtc_dpms(struct drm_crtc *crtc, int mode) uint32_t crtc_ext_cntl = 0; uint32_t mask; +pr_info("%s(mode:%d)\n", __func__, mode); + if (radeon_crtc->crtc_id) mask = (RADEON_CRTC2_DISP_DIS | RADEON_CRTC2_VSYNC_DIS | diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c index 62cd512..0bc0a2e 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c @@ -138,6 +138,8 @@ static void radeon_legacy_lvds_dpms(struct drm_encoder *encoder, int mode) struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); DRM_DEBUG("\n"); +pr_info("%s(mode:%d)\n", __func__, mode); + if (radeon_encoder->enc_priv) { if (rdev->is_atom_bios) { struct radeon_encoder_atom_dig *lvds = radeon_encoder->enc_priv; @@ -437,6 +439,7 @@ void radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder, } bd->props.brightness = radeon_legacy_backlight_get_brightness(bd); +pr_info("%s: bd->props.brightness=%d\n", __func__, bd->props.brightness); bd->props.power = FB_BLANK_UNBLANK; backlight_update_status(bd); @@ -517,6 +520,7 @@ static void radeon_legacy_primary_dac_dpms(struct drm_encoder *encoder, int mode uint32_t dac_macro_cntl = RREG32(RADEON_DAC_MACRO_CNTL); DRM_DEBUG_KMS("\n"); +pr_info("%s(mode:%d)\n", __func__, mode); switch (mode) { case DRM_MODE_DPMS_ON: @@ -727,6 +731,8 @@ static void radeon_legacy_tmds_int_dpms(struct drm_encoder *encoder, int mode) uint32_t fp_gen_cntl = RREG32(RADEON_FP_GEN_CNTL); DRM_DEBUG_KMS("\n"); +pr_info("%s(mode:%d)\n", __func__, mode); + switch (mode) { case DRM_MODE_DPMS_ON: fp_gen_cntl |= (RADEON_FP_FPON | RADEON_FP_TMDS_EN); @@ -891,6 +897,8 @@ static void radeon_legacy_tmds_ext_dpms(struct drm_encoder *encoder, int mode) uint32_t fp2_gen_cntl = RREG32(RADEON_FP2_GEN_CNTL); DRM_DEBUG_KMS("\n"); +pr_info("%s(mode:%d)\n", __func__, mode); + switch (mode) { case DRM_MODE_DPMS_ON: fp2_gen_cntl &= ~RADEON_FP2_BLANK_EN; @@ -1037,6 +1045,8 @@ static void radeon_legacy_tv_dac_dpms(struct drm_encoder *encoder, int mode) bool is_tv; DRM_DEBUG_KMS("\n"); +pr_info("%s(mode:%d)\n", __func__, mode); + is_tv = radeon_encoder->active_device & ATOM_DEVICE_TV_SUPPORT ? true : false; if (rdev->family == CHIP_R200) diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index 740202d..1da31ce 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -3783,6 +3783,7 @@ void do_blank_screen(int entering_gfx) save_screen(vc); vc->vc_sw->con_blank(vc, -1, 1); console_blanked = fg_console + 1; +pr_info("%s: entering_gfx: console_blanked=%d\n", __func__, console_blanked); blank_state = blank_off; set_origin(vc); return; @@ -3795,6 +3796,7 @@ void do_blank_screen(int entering_gfx) /* don't blank graphics */ if (vc->vc_mode != KD_TEXT) { console_blanked = fg_console + 1; +pr_info("%s: vc->vc_mode != KD_TEXT: console_blanked=%d\n", __func__, console_blanked); return; } @@ -3806,6 +3808,7 @@ void do_blank_screen(int entering_gfx) /* In case we need to reset origin, blanking hook returns 1 */ i = vc->vc_sw->con_blank(vc, vesa_off_interval ? 1 : (vesa_blank_mode + 1), 0); console_blanked = fg_console + 1; +pr_info("%s: console_blanked=%d\n", __func__, console_blanked); if (i) set_origin(vc); @@ -3826,6 +3829,9 @@ EXPORT_SYMBOL(do_blank_screen); void do_unblank_screen(int leaving_gfx) { struct vc_data *vc; +int cpu = smp_processor_id(); + +pr_info("%s: entered on cpu %d\n", __func__, cpu); /* This should now always be called from a "sane" (read: can schedule) * context for the sake of the low level drivers, except in the special @@ -3838,7 +3844,9 @@ void do_unblank_screen(int leaving_gfx) ignore_poke = 0; if (!console_blanked) +{pr_info("%s: !console_blanked on cpu %d\n", __func__, cpu); return; +} if (!vc_cons_allocated(fg_console)) { /* impossible */ pr_warning("unblank_screen: tty %d not allocated ??\n", @@ -3848,7 +3856,9 @@ void do_unblank_screen(int leaving_gfx) vc = vc_cons[fg_console].d; /* Try to unblank in oops case too */ if (vc->vc_mode != KD_TEXT && !vt_force_oops_output(vc)) +{pr_info("%s: !KD_TEXT on cpu %d\n", __func__, cpu); return; /* but leave console_blanked != 0 */ +} if (blankinterval) { mod_timer(&console_timer, jiffies + (blankinterval * HZ)); @@ -3856,13 +3866,17 @@ void do_unblank_screen(int leaving_gfx) } console_blanked = 0; +pr_info("%s: unblanking on cpu %d\n", __func__, cpu); if (vc->vc_sw->con_blank(vc, 0, leaving_gfx) || vt_force_oops_output(vc)) /* Low-level driver cannot restore -> do it ourselves */ +{pr_info("%s: update_screen() on cpu %d\n", __func__, cpu); update_screen(vc); +} if (console_blank_hook) console_blank_hook(0); set_palette(vc); set_cursor(vc); +pr_info("%s: done on cpu %d\n", __func__, cpu); vt_event_post(VT_EVENT_UNBLANK, vc->vc_num, vc->vc_num); } EXPORT_SYMBOL(do_unblank_screen); diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index e3c2790..a0893ba 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c @@ -53,6 +53,7 @@ static int fb_notifier_callback(struct notifier_block *self, bd->props.state &= ~BL_CORE_FBBLANK; else bd->props.state |= BL_CORE_FBBLANK; +pr_info("%s:%s: backlight_update_status()\n", __FILE__, __func__); backlight_update_status(bd); } mutex_unlock(&bd->ops_lock); diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c index 3649fd9..01910ff 100644 --- a/drivers/video/backlight/lcd.c +++ b/drivers/video/backlight/lcd.c @@ -49,7 +49,9 @@ static int fb_notifier_callback(struct notifier_block *self, if (!ld->ops->check_fb || ld->ops->check_fb(ld, evdata->info)) { if (event == FB_EVENT_BLANK) { if (ld->ops->set_power) +{pr_info("%s:%s: ld->ops->set_power(%d)\n", __FILE__, __func__, *(int *)evdata->data); ld->ops->set_power(ld, *(int *)evdata->data); +} } else if (event == FB_EARLY_EVENT_BLANK) { if (ld->ops->early_set_power) ld->ops->early_set_power(ld, diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index a92783e..7e06bc4 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -2354,6 +2354,7 @@ static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch) struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; struct fbcon_ops *ops = info->fbcon_par; +pr_info("%s(blank:%d,mode_switch:%d)\n", __func__, blank, mode_switch); if (mode_switch) { struct fb_var_screeninfo var = info->var; @@ -2367,19 +2368,27 @@ static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch) } } +pr_info("%s: fbcon_is_inactive():%d\n", __func__, fbcon_is_inactive(vc, info)); if (!fbcon_is_inactive(vc, info)) { +pr_info("%s: ops->blank_state:%d blank:%d\n", __func__, ops->blank_state, blank); if (ops->blank_state != blank) { ops->blank_state = blank; fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW); ops->cursor_flash = (!blank); if (!(info->flags & FBINFO_MISC_USEREVENT)) +{pr_info("%s: fb_blank()...\n", __func__); if (fb_blank(info, blank)) +{pr_info("%s: fbcon_generic_blank()...\n", __func__); fbcon_generic_blank(vc, info, blank); +} +} } if (!blank) +{pr_info("%s: update_screen()...\n", __func__); update_screen(vc); +} } if (mode_switch || fbcon_is_inactive(vc, info) || @@ -3188,9 +3197,13 @@ static void fbcon_fb_blanked(struct fb_info *info, int blank) if (CON_IS_VISIBLE(vc)) { if (blank) +{pr_info("%s: do_blank_screen(0)\n", __func__); do_blank_screen(0); +} else +{pr_info("%s: do_unblank_screen(0)\n", __func__); do_unblank_screen(0); +} } ops->blank_state = blank; } @@ -3308,6 +3321,7 @@ static int fbcon_event_notify(struct notifier_block *self, con2fb->framebuffer = con2fb_map[con2fb->console - 1]; break; case FB_EVENT_BLANK: +pr_info("%s: case FB_EVENT_BLANK: fbcon_fb_blanked(blank:%d)\n", __func__, *(int *)event->data); fbcon_fb_blanked(info, *(int *)event->data); break; case FB_EVENT_NEW_MODELIST: diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 5855d17..3caab35 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -148,7 +148,7 @@ __setup("no-scroll", no_scroll); * possibility that some pre-dinosaur hardware won't like the back to back * I/O. Since the Xservers get away with it, we should be able to as well. */ -static inline void write_vga(unsigned char reg, unsigned int val) +static void write_vga(unsigned char reg, unsigned int val) { unsigned int v1, v2; unsigned long flags; @@ -1003,14 +1003,17 @@ static void vga_pal_blank(struct vgastate *state) static int vgacon_blank(struct vc_data *c, int blank, int mode_switch) { +pr_info("%s(blank:%d,mode_switch:%d)\n", __func__, blank, mode_switch); switch (blank) { case 0: /* Unblank */ if (vga_vesa_blanked) { vga_vesa_unblank(&state); +pr_info("%s: vga_vesa_unblank()\n", __func__); vga_vesa_blanked = 0; } if (vga_palette_blanked) { vga_set_palette(c, color_table); +pr_info("%s: vga_set_palette()\n", __func__); vga_palette_blanked = 0; return 0; } diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 0399ad8..9e3e7d1 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -1045,7 +1045,7 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var) int fb_blank(struct fb_info *info, int blank) -{ +{ struct fb_event event; int ret = -EINVAL, early_ret; @@ -1055,13 +1055,18 @@ fb_blank(struct fb_info *info, int blank) event.info = info; event.data = ␣ +pr_info("%s: fb_notifier_call_chain(FB_EARLY_EVENT_BLANK)...\n", __func__); early_ret = fb_notifier_call_chain(FB_EARLY_EVENT_BLANK, &event); if (info->fbops->fb_blank) +{pr_info("%s: info->fbops->fb_blank()...\n", __func__); ret = info->fbops->fb_blank(blank, info); +} if (!ret) +{pr_info("%s: fb_notifier_call_chain(FB_EVENT_BLANK)...\n", __func__); fb_notifier_call_chain(FB_EVENT_BLANK, &event); +} else { /* * if fb_blank is failed then revert effects of @@ -1071,6 +1076,7 @@ fb_blank(struct fb_info *info, int blank) fb_notifier_call_chain(FB_R_EARLY_EVENT_BLANK, &event); } +pr_info("%s returns %d\n", __func__, ret); return ret; } diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c index e328a61..93d45ec 100644 --- a/drivers/video/uvesafb.c +++ b/drivers/video/uvesafb.c @@ -1124,10 +1124,12 @@ static int uvesafb_blank(int blank, struct fb_info *info) #ifdef CONFIG_X86 struct uvesafb_par *par = info->par; +pr_info("%s(blank:%d)\n", __func__, blank); if (par->vbe_ib.capabilities & VBE_CAP_VGACOMPAT) { int loop = 10000; u8 seq = 0, crtc17 = 0; +pr_info("%s: VBE_CAP_VGACOMPAT\n", __func__); if (blank == FB_BLANK_POWERDOWN) { seq = 0x20; crtc17 = 0x00; @@ -1149,6 +1151,7 @@ static int uvesafb_blank(int blank, struct fb_info *info) } else #endif /* CONFIG_X86 */ { +pr_info("%s: !VBE_CAP_VGACOMPAT\n", __func__); task = uvesafb_prep(); if (!task) return -ENOMEM; @@ -1168,7 +1171,10 @@ static int uvesafb_blank(int blank, struct fb_info *info) goto out; } +pr_info("%s: task->t.regs.ebx:%lx\n", __func__, (long)task->t.regs.ebx); err = uvesafb_exec(task); +pr_info("%s: uvesafb_exec():%d\n", __func__, err); +pr_info("%s: task->t.regs.eax:%lx\n", __func__, (long)task->t.regs.eax); if (err || (task->t.regs.eax & 0xffff) != 0x004f) err = 1; out: uvesafb_free(task);