@@ -309,18 +309,7 @@ static void xe_display_flush_cleanup_work(struct xe_device *xe)
309
309
}
310
310
311
311
/* TODO: System and runtime suspend/resume sequences will be sanitized as a follow-up. */
312
- void xe_display_pm_runtime_suspend (struct xe_device * xe )
313
- {
314
- if (!xe -> info .probe_display )
315
- return ;
316
-
317
- if (xe -> d3cold .allowed )
318
- xe_display_pm_suspend (xe , true);
319
-
320
- intel_hpd_poll_enable (xe );
321
- }
322
-
323
- void xe_display_pm_suspend (struct xe_device * xe , bool runtime )
312
+ static void __xe_display_pm_suspend (struct xe_device * xe , bool runtime )
324
313
{
325
314
struct intel_display * display = & xe -> display ;
326
315
bool s2idle = suspend_to_idle ();
@@ -353,28 +342,38 @@ void xe_display_pm_suspend(struct xe_device *xe, bool runtime)
353
342
intel_opregion_suspend (display , s2idle ? PCI_D1 : PCI_D3cold );
354
343
355
344
intel_dmc_suspend (xe );
345
+
346
+ if (runtime && has_display (xe ))
347
+ intel_hpd_poll_enable (xe );
356
348
}
357
349
358
- void xe_display_pm_suspend_late (struct xe_device * xe )
350
+ void xe_display_pm_suspend (struct xe_device * xe )
351
+ {
352
+ __xe_display_pm_suspend (xe , false);
353
+ }
354
+
355
+ void xe_display_pm_runtime_suspend (struct xe_device * xe )
359
356
{
360
- bool s2idle = suspend_to_idle ();
361
357
if (!xe -> info .probe_display )
362
358
return ;
363
359
364
- intel_power_domains_suspend (xe , s2idle );
360
+ if (xe -> d3cold .allowed ) {
361
+ __xe_display_pm_suspend (xe , true);
362
+ return ;
363
+ }
365
364
366
- intel_display_power_suspend_late (xe );
365
+ intel_hpd_poll_enable (xe );
367
366
}
368
367
369
- void xe_display_pm_runtime_resume (struct xe_device * xe )
368
+ void xe_display_pm_suspend_late (struct xe_device * xe )
370
369
{
370
+ bool s2idle = suspend_to_idle ();
371
371
if (!xe -> info .probe_display )
372
372
return ;
373
373
374
- intel_hpd_poll_disable (xe );
374
+ intel_power_domains_suspend (xe , s2idle );
375
375
376
- if (xe -> d3cold .allowed )
377
- xe_display_pm_resume (xe , true);
376
+ intel_display_power_suspend_late (xe );
378
377
}
379
378
380
379
void xe_display_pm_resume_early (struct xe_device * xe )
@@ -387,7 +386,7 @@ void xe_display_pm_resume_early(struct xe_device *xe)
387
386
intel_power_domains_resume (xe );
388
387
}
389
388
390
- void xe_display_pm_resume (struct xe_device * xe , bool runtime )
389
+ static void __xe_display_pm_resume (struct xe_device * xe , bool runtime )
391
390
{
392
391
struct intel_display * display = & xe -> display ;
393
392
@@ -411,16 +410,38 @@ void xe_display_pm_resume(struct xe_device *xe, bool runtime)
411
410
intel_display_driver_resume (xe );
412
411
drm_kms_helper_poll_enable (& xe -> drm );
413
412
intel_display_driver_enable_user_access (xe );
414
- intel_hpd_poll_disable (xe );
415
413
}
416
414
415
+ if (has_display (xe ))
416
+ intel_hpd_poll_disable (xe );
417
+
417
418
intel_opregion_resume (display );
418
419
419
420
intel_fbdev_set_suspend (& xe -> drm , FBINFO_STATE_RUNNING , false);
420
421
421
422
intel_power_domains_enable (xe );
422
423
}
423
424
425
+ void xe_display_pm_resume (struct xe_device * xe )
426
+ {
427
+ __xe_display_pm_resume (xe , false);
428
+ }
429
+
430
+ void xe_display_pm_runtime_resume (struct xe_device * xe )
431
+ {
432
+ if (!xe -> info .probe_display )
433
+ return ;
434
+
435
+ if (xe -> d3cold .allowed ) {
436
+ __xe_display_pm_resume (xe , true);
437
+ return ;
438
+ }
439
+
440
+ intel_hpd_init (xe );
441
+ intel_hpd_poll_disable (xe );
442
+ }
443
+
444
+
424
445
static void display_device_remove (struct drm_device * dev , void * arg )
425
446
{
426
447
struct xe_device * xe = arg ;
0 commit comments