i915: introduce modeset_on_resume
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 1359028180.2299.4.camel@rzhang1-mobl4
Quoted 2 lines · Zhang Rui
I need some graphics experts' comments before sending it out.
Please send to [email protected] for i915 specific issue.
Quoted 110 lines · Zhang Rui
Quoted 107 lines
i915 driver needs to do modeset when
1. system resumes from sleep
2. lid is openedWhen resuming from
PM_SUSPEND_MEMstate, all the GPEs are cleared, thus it is thei915_resumecode does the modeset rather thanintel_lid_notify().But when in FREEZE state, system is still resposive to the lid events.
1.i915_suspend()clearsmodeset_on_lid.
2. When we close the lid,intel_lid_notify()setsmodeset_on_lid.
3. When we reopen the lid,intel_lid_notify()will do a modeset, before the system is resumed.here is the error log I got,
[92146.548074] WARNING: at drivers/gpu/drm/i915/intel_display.c:1028 intel_wait_for_pipe_off+0x184/0x190 [i915]() [92146.548076] Hardware name: VGN-Z540N [92146.548078] pipe_off wait timed out [92146.548167] Modules linked in: hid_generic usbhid hid snd_hda_codec_realtek snd_hda_intel snd_hda_codec parport_pc snd_hwdep ppdev snd_pcm_oss i915 snd_mixer_oss snd_pcm arc4 iwldvm snd_seq_dummy mac80211 snd_seq_oss snd_seq_midi fbcon tileblit font bitblit softcursor drm_kms_helper snd_rawmidi snd_seq_midi_event coretemp drm snd_seq kvm btusb bluetooth snd_timer iwlwifi pcmcia tpm_infineon i2c_algo_bit joydev snd_seq_device intel_agp cfg80211 snd intel_gtt yenta_socket pcmcia_rsrc sony_laptop agpgart microcode psmouse tpm_tis serio_raw mxm_wmi soundcore snd_page_alloc tpm acpi_cpufreq lpc_ich pcmcia_core tpm_bios mperf processor lp parport firewire_ohci firewire_core crc_itu_t sdhci_pci sdhci thermal e1000e [92146.548173] Pid: 4304, comm: kworker/0:0 Tainted: G W 3.8.0-rc3-s0i3-v3-test+ #9 [92146.548175] Call Trace: [92146.548189] [<c10378e2>] warn_slowpath_common+0x72/0xa0 [92146.548227] [<f86398b4>] ? intel_wait_for_pipe_off+0x184/0x190 [i915] [92146.548263] [<f86398b4>] ? intel_wait_for_pipe_off+0x184/0x190 [i915] [92146.548270] [<c10379b3>] warn_slowpath_fmt+0x33/0x40 [92146.548307] [<f86398b4>] intel_wait_for_pipe_off+0x184/0x190 [i915] [92146.548344] [<f86399c2>] intel_disable_pipe+0x102/0x190 [i915] [92146.548380] [<f8639ea4>] ? intel_disable_plane+0x64/0x80 [i915] [92146.548417] [<f8639f7c>] i9xx_crtc_disable+0xbc/0x150 [i915] [92146.548456] [<f863ebee>] intel_crtc_update_dpms+0x5e/0x90 [i915] [92146.548493] [<f86437cf>] intel_modeset_setup_hw_state+0x42f/0x8f0 [i915] [92146.548535] [<f8645b0b>] intel_lid_notify+0x9b/0xc0 [i915] [92146.548543] [<c15610d3>] notifier_call_chain+0x43/0x60 [92146.548550] [<c105d1e1>] __blocking_notifier_call_chain+0x41/0x80 [92146.548556] [<c105d23f>] blocking_notifier_call_chain+0x1f/0x30 [92146.548563] [<c131a684>] acpi_lid_send_state+0x78/0xa4 [92146.548569] [<c131aa9e>] acpi_button_notify+0x3b/0xf1 [92146.548577] [<c12df56a>] ? acpi_os_execute+0x17/0x19 [92146.548582] [<c12e591a>] ? acpi_ec_sync_query+0xa5/0xbc [92146.548589] [<c12e2b82>] acpi_device_notify+0x16/0x18 [92146.548595] [<c12f4904>] acpi_ev_notify_dispatch+0x38/0x4f [92146.548600] [<c12df0e8>] acpi_os_execute_deferred+0x20/0x2b [92146.548607] [<c1051208>] process_one_work+0x128/0x3f0 [92146.548613] [<c1564f73>] ? common_interrupt+0x33/0x38 [92146.548618] [<c104f8c0>] ? wake_up_worker+0x30/0x30 [92146.548624] [<c12df0c8>] ? acpi_os_wait_events_complete+0x1e/0x1e [92146.548629] [<c10524f9>] worker_thread+0x119/0x3b0 [92146.548634] [<c10523e0>] ? manage_workers+0x240/0x240 [92146.548640] [<c1056e84>] kthread+0x94/0xa0 [92146.548647] [<c1060000>] ? ftrace_raw_output_sched_stat_runtime+0x70/0xf0 [92146.548652] [<c15649b7>] ret_from_kernel_thread+0x1b/0x28 [92146.548658] [<c1056df0>] ? kthread_create_on_node+0xc0/0xc0Introduce a new flag
modeset_on_resumeto ignore the lid events during suspend.Signed-off-by Zhang Rui <[email protected]>--- drivers/gpu/drm/i915/i915_drv.c | 2 ++ drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_lvds.c | 2 ++ 3 files changed, 5 insertions(+)drivers/gpu/drm/i915/i915_drv.c +2
-0@@ -494,6 +494,7 @@ static int i915_drm_freeze(struct drm_device *dev)/* Modeset on resume, not lid events */ dev_priv->modeset_on_lid =0 ; + dev_priv->modeset_on_resume =1 ;console_lock ();intel_fbdev_set_suspend (dev,1 );@@ -570,6 +571,7 @@ static int __i915_drm_thaw(struct drm_device *dev)intel_opregion_init (dev); dev_priv->modeset_on_lid =0 ; + dev_priv->modeset_on_resume =0 ;/* * The console lock can be pretty contented on resume due drivers/gpu/drm/i915/i915_drv.h +1
-0@@ -749,6 +749,7 @@ typedef struct drm_i915_private {/* Register state */ bool modeset_on_lid; +bool modeset_on_resume;struct {/** Bridge to intel-gtt-ko */ drivers/gpu/drm/i915/intel_lvds.c +2
-0@@ -512,6 +512,8 @@ static int intel_lid_notify(struct notifier_block *nb, unsigned long val,if (dev->switch_power_state !=DRM_SWITCH_POWER_ON )return NOTIFY_OK ; +if (dev_priv->modeset_on_resume) +return NOTIFY_OK ;/* * check and update the status of LVDS connector after receiving * the LID nofication event.
Signature · 3 lines
Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines · Zhenyu Wang
Quoted 2 lines · Zhang Rui
I need some graphics experts' comments before sending it out.
Please send to [email protected] for i915 specific issue.
I want to get some internal feedback before sending it out.
thanks,
rui
Quoted 111 lines
Quoted 110 lines · Zhang Rui
Quoted 107 lines
i915 driver needs to do modeset when
1. system resumes from sleep
2. lid is openedWhen resuming from
PM_SUSPEND_MEMstate, all the GPEs are cleared, thus it is thei915_resumecode does the modeset rather thanintel_lid_notify().But when in FREEZE state, system is still resposive to the lid events.
1.i915_suspend()clearsmodeset_on_lid.
2. When we close the lid,intel_lid_notify()setsmodeset_on_lid.
3. When we reopen the lid,intel_lid_notify()will do a modeset, before the system is resumed.here is the error log I got,
[92146.548074] WARNING: at drivers/gpu/drm/i915/intel_display.c:1028 intel_wait_for_pipe_off+0x184/0x190 [i915]() [92146.548076] Hardware name: VGN-Z540N [92146.548078] pipe_off wait timed out [92146.548167] Modules linked in: hid_generic usbhid hid snd_hda_codec_realtek snd_hda_intel snd_hda_codec parport_pc snd_hwdep ppdev snd_pcm_oss i915 snd_mixer_oss snd_pcm arc4 iwldvm snd_seq_dummy mac80211 snd_seq_oss snd_seq_midi fbcon tileblit font bitblit softcursor drm_kms_helper snd_rawmidi snd_seq_midi_event coretemp drm snd_seq kvm btusb bluetooth snd_timer iwlwifi pcmcia tpm_infineon i2c_algo_bit joydev snd_seq_device intel_agp cfg80211 snd intel_gtt yenta_socket pcmcia_rsrc sony_laptop agpgart microcode psmouse tpm_tis serio_raw mxm_wmi soundcore snd_page_alloc tpm acpi_cpufreq lpc_ich pcmcia_core tpm_bios mperf processor lp parport firewire_ohci firewire_core crc_itu_t sdhci_pci sdhci thermal e1000e [92146.548173] Pid: 4304, comm: kworker/0:0 Tainted: G W 3.8.0-rc3-s0i3-v3-test+ #9 [92146.548175] Call Trace: [92146.548189] [<c10378e2>] warn_slowpath_common+0x72/0xa0 [92146.548227] [<f86398b4>] ? intel_wait_for_pipe_off+0x184/0x190 [i915] [92146.548263] [<f86398b4>] ? intel_wait_for_pipe_off+0x184/0x190 [i915] [92146.548270] [<c10379b3>] warn_slowpath_fmt+0x33/0x40 [92146.548307] [<f86398b4>] intel_wait_for_pipe_off+0x184/0x190 [i915] [92146.548344] [<f86399c2>] intel_disable_pipe+0x102/0x190 [i915] [92146.548380] [<f8639ea4>] ? intel_disable_plane+0x64/0x80 [i915] [92146.548417] [<f8639f7c>] i9xx_crtc_disable+0xbc/0x150 [i915] [92146.548456] [<f863ebee>] intel_crtc_update_dpms+0x5e/0x90 [i915] [92146.548493] [<f86437cf>] intel_modeset_setup_hw_state+0x42f/0x8f0 [i915] [92146.548535] [<f8645b0b>] intel_lid_notify+0x9b/0xc0 [i915] [92146.548543] [<c15610d3>] notifier_call_chain+0x43/0x60 [92146.548550] [<c105d1e1>] __blocking_notifier_call_chain+0x41/0x80 [92146.548556] [<c105d23f>] blocking_notifier_call_chain+0x1f/0x30 [92146.548563] [<c131a684>] acpi_lid_send_state+0x78/0xa4 [92146.548569] [<c131aa9e>] acpi_button_notify+0x3b/0xf1 [92146.548577] [<c12df56a>] ? acpi_os_execute+0x17/0x19 [92146.548582] [<c12e591a>] ? acpi_ec_sync_query+0xa5/0xbc [92146.548589] [<c12e2b82>] acpi_device_notify+0x16/0x18 [92146.548595] [<c12f4904>] acpi_ev_notify_dispatch+0x38/0x4f [92146.548600] [<c12df0e8>] acpi_os_execute_deferred+0x20/0x2b [92146.548607] [<c1051208>] process_one_work+0x128/0x3f0 [92146.548613] [<c1564f73>] ? common_interrupt+0x33/0x38 [92146.548618] [<c104f8c0>] ? wake_up_worker+0x30/0x30 [92146.548624] [<c12df0c8>] ? acpi_os_wait_events_complete+0x1e/0x1e [92146.548629] [<c10524f9>] worker_thread+0x119/0x3b0 [92146.548634] [<c10523e0>] ? manage_workers+0x240/0x240 [92146.548640] [<c1056e84>] kthread+0x94/0xa0 [92146.548647] [<c1060000>] ? ftrace_raw_output_sched_stat_runtime+0x70/0xf0 [92146.548652] [<c15649b7>] ret_from_kernel_thread+0x1b/0x28 [92146.548658] [<c1056df0>] ? kthread_create_on_node+0xc0/0xc0Introduce a new flag
modeset_on_resumeto ignore the lid events during suspend.Signed-off-by Zhang Rui <[email protected]>--- drivers/gpu/drm/i915/i915_drv.c | 2 ++ drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_lvds.c | 2 ++ 3 files changed, 5 insertions(+)drivers/gpu/drm/i915/i915_drv.c +2
-0@@ -494,6 +494,7 @@ static int i915_drm_freeze(struct drm_device *dev)/* Modeset on resume, not lid events */ dev_priv->modeset_on_lid =0 ; + dev_priv->modeset_on_resume =1 ;console_lock ();intel_fbdev_set_suspend (dev,1 );@@ -570,6 +571,7 @@ static int __i915_drm_thaw(struct drm_device *dev)intel_opregion_init (dev); dev_priv->modeset_on_lid =0 ; + dev_priv->modeset_on_resume =0 ;/* * The console lock can be pretty contented on resume due drivers/gpu/drm/i915/i915_drv.h +1
-0@@ -749,6 +749,7 @@ typedef struct drm_i915_private {/* Register state */ bool modeset_on_lid; +bool modeset_on_resume;struct {/** Bridge to intel-gtt-ko */ drivers/gpu/drm/i915/intel_lvds.c +2
-0@@ -512,6 +512,8 @@ static int intel_lid_notify(struct notifier_block *nb, unsigned long val,if (dev->switch_power_state !=DRM_SWITCH_POWER_ON )return NOTIFY_OK ; +if (dev_priv->modeset_on_resume) +return NOTIFY_OK ;/* * check and update the status of LVDS connector after receiving * the LID nofication event.
Quoted 8 lines · Zhang Rui
Quoted 6 lines · Zhenyu Wang
Quoted 2 lines · Zhang Rui
I need some graphics experts' comments before sending it out.
Please send to [email protected] for i915 specific issue.
I want to get some internal feedback before sending it out.
You are already on the public intel-gfx ;-)
Cheers, Daniel
Quoted 121 lines
thanks,
ruiQuoted 103 lines
Quoted 103 lines · Zhang Rui
Quoted 102 lines
i915 driver needs to do modeset when
1. system resumes from sleep
2. lid is openedWhen resuming from
PM_SUSPEND_MEMstate, all the GPEs are cleared, thus it is thei915_resumecode does the modeset rather thanintel_lid_notify().But when in FREEZE state, system is still resposive to the lid events.
1.i915_suspend()clearsmodeset_on_lid.
2. When we close the lid,intel_lid_notify()setsmodeset_on_lid.
3. When we reopen the lid,intel_lid_notify()will do a modeset, before the system is resumed.here is the error log I got,
[92146.548074] WARNING: at drivers/gpu/drm/i915/intel_display.c:1028 intel_wait_for_pipe_off+0x184/0x190 [i915]() [92146.548076] Hardware name: VGN-Z540N [92146.548078] pipe_off wait timed out [92146.548167] Modules linked in: hid_generic usbhid hid snd_hda_codec_realtek snd_hda_intel snd_hda_codec parport_pc snd_hwdep ppdev snd_pcm_oss i915 snd_mixer_oss snd_pcm arc4 iwldvm snd_seq_dummy mac80211 snd_seq_oss snd_seq_midi fbcon tileblit font bitblit softcursor drm_kms_helper snd_rawmidi snd_seq_midi_event coretemp drm snd_seq kvm btusb bluetooth snd_timer iwlwifi pcmcia tpm_infineon i2c_algo_bit joydev snd_seq_device intel_agp cfg80211 snd intel_gtt yenta_socket pcmcia_rsrc sony_laptop agpgart microcode psmouse tpm_tis serio_raw mxm_wmi soundcore snd_page_alloc tpm acpi_cpufreq lpc_ich pcmcia_core tpm_bios mperf processor lp parport firewire_ohci firewire_core crc_itu_t sdhci_pci sdhci thermal e1000e [92146.548173] Pid: 4304, comm: kworker/0:0 Tainted: G W 3.8.0-rc3-s0i3-v3-test+ #9 [92146.548175] Call Trace: [92146.548189] [<c10378e2>] warn_slowpath_common+0x72/0xa0 [92146.548227] [<f86398b4>] ? intel_wait_for_pipe_off+0x184/0x190 [i915] [92146.548263] [<f86398b4>] ? intel_wait_for_pipe_off+0x184/0x190 [i915] [92146.548270] [<c10379b3>] warn_slowpath_fmt+0x33/0x40 [92146.548307] [<f86398b4>] intel_wait_for_pipe_off+0x184/0x190 [i915] [92146.548344] [<f86399c2>] intel_disable_pipe+0x102/0x190 [i915] [92146.548380] [<f8639ea4>] ? intel_disable_plane+0x64/0x80 [i915] [92146.548417] [<f8639f7c>] i9xx_crtc_disable+0xbc/0x150 [i915] [92146.548456] [<f863ebee>] intel_crtc_update_dpms+0x5e/0x90 [i915] [92146.548493] [<f86437cf>] intel_modeset_setup_hw_state+0x42f/0x8f0 [i915] [92146.548535] [<f8645b0b>] intel_lid_notify+0x9b/0xc0 [i915] [92146.548543] [<c15610d3>] notifier_call_chain+0x43/0x60 [92146.548550] [<c105d1e1>] __blocking_notifier_call_chain+0x41/0x80 [92146.548556] [<c105d23f>] blocking_notifier_call_chain+0x1f/0x30 [92146.548563] [<c131a684>] acpi_lid_send_state+0x78/0xa4 [92146.548569] [<c131aa9e>] acpi_button_notify+0x3b/0xf1 [92146.548577] [<c12df56a>] ? acpi_os_execute+0x17/0x19 [92146.548582] [<c12e591a>] ? acpi_ec_sync_query+0xa5/0xbc [92146.548589] [<c12e2b82>] acpi_device_notify+0x16/0x18 [92146.548595] [<c12f4904>] acpi_ev_notify_dispatch+0x38/0x4f [92146.548600] [<c12df0e8>] acpi_os_execute_deferred+0x20/0x2b [92146.548607] [<c1051208>] process_one_work+0x128/0x3f0 [92146.548613] [<c1564f73>] ? common_interrupt+0x33/0x38 [92146.548618] [<c104f8c0>] ? wake_up_worker+0x30/0x30 [92146.548624] [<c12df0c8>] ? acpi_os_wait_events_complete+0x1e/0x1e [92146.548629] [<c10524f9>] worker_thread+0x119/0x3b0 [92146.548634] [<c10523e0>] ? manage_workers+0x240/0x240 [92146.548640] [<c1056e84>] kthread+0x94/0xa0 [92146.548647] [<c1060000>] ? ftrace_raw_output_sched_stat_runtime+0x70/0xf0 [92146.548652] [<c15649b7>] ret_from_kernel_thread+0x1b/0x28 [92146.548658] [<c1056df0>] ? kthread_create_on_node+0xc0/0xc0Introduce a new flag
modeset_on_resumeto ignore the lid events during suspend.Signed-off-by Zhang Rui <[email protected]>--- drivers/gpu/drm/i915/i915_drv.c | 2 ++ drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_lvds.c | 2 ++ 3 files changed, 5 insertions(+)drivers/gpu/drm/i915/i915_drv.c +2
-0@@ -494,6 +494,7 @@ static int i915_drm_freeze(struct drm_device *dev)/* Modeset on resume, not lid events */ dev_priv->modeset_on_lid =0 ; + dev_priv->modeset_on_resume =1 ;console_lock ();intel_fbdev_set_suspend (dev,1 );@@ -570,6 +571,7 @@ static int __i915_drm_thaw(struct drm_device *dev)intel_opregion_init (dev); dev_priv->modeset_on_lid =0 ; + dev_priv->modeset_on_resume =0 ;/* * The console lock can be pretty contented on resume due drivers/gpu/drm/i915/i915_drv.h +1
-0@@ -749,6 +749,7 @@ typedef struct drm_i915_private {/* Register state */ bool modeset_on_lid; +bool modeset_on_resume;struct {/** Bridge to intel-gtt-ko */ drivers/gpu/drm/i915/intel_lvds.c +0
-0@@ -512,6 +512,8 @@ static int intel_lid_notify(struct notifier_block *nb, unsigned long val,if (dev->switch_power_state !=DRM_SWITCH_POWER_ON )return NOTIFY_OK ;Quoted 8 lines
Quoted 7 lines
drivers/gpu/drm/i915/intel_lvds.c static int intel_lid_notify(struct notifier_block *nb, unsigned long val, · line 519
Quoted 5 lines
drivers/gpu/drm/i915/intel_lvds.c +2
-0+if (dev_priv->modeset_on_resume) +return NOTIFY_OK ;/* * check and update the status of LVDS connector after receiving * the LID nofication event. _______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch