@@ -681,21 +681,6 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp,
681
681
return false;
682
682
}
683
683
684
- /*
685
- * Some platforms lack PSR2 HW tracking and instead require manual
686
- * tracking by software. In this case, the driver is required to track
687
- * the areas that need updates and program hardware to send selective
688
- * updates.
689
- *
690
- * So until the software tracking is implemented, PSR2 needs to be
691
- * disabled for platforms without PSR2 HW tracking.
692
- */
693
- if (!HAS_PSR_HW_TRACKING (dev_priv )) {
694
- drm_dbg_kms (& dev_priv -> drm ,
695
- "No PSR2 HW tracking in the platform\n" );
696
- return false;
697
- }
698
-
699
684
/*
700
685
* DSC and PSR2 cannot be enabled simultaneously. If a requested
701
686
* resolution requires DSC to be enabled, priority is given to DSC
@@ -707,6 +692,12 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp,
707
692
return false;
708
693
}
709
694
695
+ if (crtc_state -> crc_enabled ) {
696
+ drm_dbg_kms (& dev_priv -> drm ,
697
+ "PSR2 not enabled because it would inhibit pipe CRC calculation\n" );
698
+ return false;
699
+ }
700
+
710
701
if (INTEL_GEN (dev_priv ) >= 12 ) {
711
702
psr_max_h = 5120 ;
712
703
psr_max_v = 3200 ;
@@ -721,14 +712,6 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp,
721
712
max_bpp = 24 ;
722
713
}
723
714
724
- if (crtc_hdisplay > psr_max_h || crtc_vdisplay > psr_max_v ) {
725
- drm_dbg_kms (& dev_priv -> drm ,
726
- "PSR2 not enabled, resolution %dx%d > max supported %dx%d\n" ,
727
- crtc_hdisplay , crtc_vdisplay ,
728
- psr_max_h , psr_max_v );
729
- return false;
730
- }
731
-
732
715
if (crtc_state -> pipe_bpp > max_bpp ) {
733
716
drm_dbg_kms (& dev_priv -> drm ,
734
717
"PSR2 not enabled, pipe bpp %d > max supported %d\n" ,
@@ -749,9 +732,26 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp,
749
732
return false;
750
733
}
751
734
752
- if (crtc_state -> crc_enabled ) {
735
+ /*
736
+ * Some platforms lack PSR2 HW tracking and instead require manual
737
+ * tracking by software. In this case, the driver is required to track
738
+ * the areas that need updates and program hardware to send selective
739
+ * updates.
740
+ *
741
+ * So until the software tracking is implemented, PSR2 needs to be
742
+ * disabled for platforms without PSR2 HW tracking.
743
+ */
744
+ if (!HAS_PSR_HW_TRACKING (dev_priv )) {
753
745
drm_dbg_kms (& dev_priv -> drm ,
754
- "PSR2 not enabled because it would inhibit pipe CRC calculation\n" );
746
+ "No PSR2 HW tracking in the platform\n" );
747
+ return false;
748
+ }
749
+
750
+ if (crtc_hdisplay > psr_max_h || crtc_vdisplay > psr_max_v ) {
751
+ drm_dbg_kms (& dev_priv -> drm ,
752
+ "PSR2 not enabled, resolution %dx%d > max supported %dx%d\n" ,
753
+ crtc_hdisplay , crtc_vdisplay ,
754
+ psr_max_h , psr_max_v );
755
755
return false;
756
756
}
757
757
0 commit comments