2020#include "intel_audio.h"
2121#include "intel_bw.h"
2222#include "intel_display.h"
23- #include "intel_display_core .h"
23+ #include "intel_display_device .h"
2424#include "intel_display_driver.h"
2525#include "intel_display_irq.h"
2626#include "intel_display_types.h"
3737
3838/* Xe device functions */
3939
40- static bool has_display (struct xe_device * xe )
41- {
42- struct intel_display * display = xe -> display ;
43-
44- return HAS_DISPLAY (display );
45- }
46-
4740/**
4841 * xe_display_driver_probe_defer - Detect if we need to wait for other drivers
4942 * early on
@@ -290,7 +283,7 @@ static void xe_display_enable_d3cold(struct xe_device *xe)
290283
291284 intel_dmc_suspend (display );
292285
293- if (has_display ( xe ))
286+ if (intel_display_device_present ( display ))
294287 intel_hpd_poll_enable (display );
295288}
296289
@@ -303,14 +296,14 @@ static void xe_display_disable_d3cold(struct xe_device *xe)
303296
304297 intel_dmc_resume (display );
305298
306- if (has_display ( xe ))
299+ if (intel_display_device_present ( display ))
307300 drm_mode_config_reset (& xe -> drm );
308301
309302 intel_display_driver_init_hw (display );
310303
311304 intel_hpd_init (display );
312305
313- if (has_display ( xe ))
306+ if (intel_display_device_present ( display ))
314307 intel_hpd_poll_disable (display );
315308
316309 intel_opregion_resume (display );
@@ -333,7 +326,7 @@ void xe_display_pm_suspend(struct xe_device *xe)
333326 intel_power_domains_disable (display );
334327 drm_client_dev_suspend (& xe -> drm , false);
335328
336- if (has_display ( xe )) {
329+ if (intel_display_device_present ( display )) {
337330 drm_kms_helper_poll_disable (& xe -> drm );
338331 intel_display_driver_disable_user_access (display );
339332 intel_display_driver_suspend (display );
@@ -345,7 +338,7 @@ void xe_display_pm_suspend(struct xe_device *xe)
345338
346339 intel_hpd_cancel_work (display );
347340
348- if (has_display ( xe )) {
341+ if (intel_display_device_present ( display )) {
349342 intel_display_driver_suspend_access (display );
350343 intel_encoder_suspend_all (display );
351344 }
@@ -365,7 +358,7 @@ void xe_display_pm_shutdown(struct xe_device *xe)
365358 intel_power_domains_disable (display );
366359 drm_client_dev_suspend (& xe -> drm , false);
367360
368- if (has_display ( xe )) {
361+ if (intel_display_device_present ( display )) {
369362 drm_kms_helper_poll_disable (& xe -> drm );
370363 intel_display_driver_disable_user_access (display );
371364 intel_display_driver_suspend (display );
@@ -376,7 +369,7 @@ void xe_display_pm_shutdown(struct xe_device *xe)
376369 intel_encoder_block_all_hpds (display );
377370 intel_hpd_cancel_work (display );
378371
379- if (has_display ( xe ))
372+ if (intel_display_device_present ( display ))
380373 intel_display_driver_suspend_access (display );
381374
382375 intel_encoder_suspend_all (display );
@@ -465,25 +458,25 @@ void xe_display_pm_resume(struct xe_device *xe)
465458
466459 intel_dmc_resume (display );
467460
468- if (has_display ( xe ))
461+ if (intel_display_device_present ( display ))
469462 drm_mode_config_reset (& xe -> drm );
470463
471464 intel_display_driver_init_hw (display );
472465
473- if (has_display ( xe ))
466+ if (intel_display_device_present ( display ))
474467 intel_display_driver_resume_access (display );
475468
476469 intel_hpd_init (display );
477470
478471 intel_encoder_unblock_all_hpds (display );
479472
480- if (has_display ( xe )) {
473+ if (intel_display_device_present ( display )) {
481474 intel_display_driver_resume (display );
482475 drm_kms_helper_poll_enable (& xe -> drm );
483476 intel_display_driver_enable_user_access (display );
484477 }
485478
486- if (has_display ( xe ))
479+ if (intel_display_device_present ( display ))
487480 intel_hpd_poll_disable (display );
488481
489482 intel_opregion_resume (display );
@@ -548,7 +541,7 @@ int xe_display_probe(struct xe_device *xe)
548541
549542 xe -> display = display ;
550543
551- if (has_display ( xe ))
544+ if (intel_display_device_present ( display ))
552545 return 0 ;
553546
554547no_display :
0 commit comments