@@ -760,6 +760,25 @@ static void panel_edp_parse_panel_timing_node(struct device *dev,
760
760
761
761
static const struct edp_panel_entry * find_edp_panel (u32 panel_id , const struct drm_edid * edid );
762
762
763
+ static void panel_edp_set_conservative_timings (struct panel_edp * panel , struct panel_desc * desc )
764
+ {
765
+ /*
766
+ * It's highly likely that the panel will work if we use very
767
+ * conservative timings, so let's do that.
768
+ *
769
+ * Nearly all panels have a "unprepare" delay of 500 ms though
770
+ * there are a few with 1000. Let's stick 2000 in just to be
771
+ * super conservative.
772
+ *
773
+ * An "enable" delay of 80 ms seems the most common, but we'll
774
+ * throw in 200 ms to be safe.
775
+ */
776
+ desc -> delay .unprepare = 2000 ;
777
+ desc -> delay .enable = 200 ;
778
+
779
+ panel -> detected_panel = ERR_PTR (- EINVAL );
780
+ }
781
+
763
782
static int generic_edp_panel_probe (struct device * dev , struct panel_edp * panel )
764
783
{
765
784
struct panel_desc * desc ;
@@ -816,26 +835,7 @@ static int generic_edp_panel_probe(struct device *dev, struct panel_edp *panel)
816
835
dev_warn (dev ,
817
836
"Unknown panel %s %#06x, using conservative timings\n" ,
818
837
vend , product_id );
819
-
820
- /*
821
- * It's highly likely that the panel will work if we use very
822
- * conservative timings, so let's do that. We already know that
823
- * the HPD-related delays must have worked since we got this
824
- * far, so we really just need the "unprepare" / "enable"
825
- * delays. We don't need "prepare_to_enable" since that
826
- * overlaps the "enable" delay anyway.
827
- *
828
- * Nearly all panels have a "unprepare" delay of 500 ms though
829
- * there are a few with 1000. Let's stick 2000 in just to be
830
- * super conservative.
831
- *
832
- * An "enable" delay of 80 ms seems the most common, but we'll
833
- * throw in 200 ms to be safe.
834
- */
835
- desc -> delay .unprepare = 2000 ;
836
- desc -> delay .enable = 200 ;
837
-
838
- panel -> detected_panel = ERR_PTR (- EINVAL );
838
+ panel_edp_set_conservative_timings (panel , desc );
839
839
} else {
840
840
dev_info (dev , "Detected %s %s (%#06x)\n" ,
841
841
vend , panel -> detected_panel -> ident .name , product_id );
0 commit comments