File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -810,6 +810,22 @@ static bool lvds_is_present_in_vbt(struct drm_device *dev)
810
810
return false;
811
811
}
812
812
813
+ static bool intel_lvds_ddc_probe (struct drm_device * dev )
814
+ {
815
+ struct drm_i915_private * dev_priv = dev -> dev_private ;
816
+ u8 buf = 0 ;
817
+ struct i2c_msg msgs [] = {
818
+ {
819
+ .addr = 0xA0 ,
820
+ .flags = 0 ,
821
+ .len = 1 ,
822
+ .buf = & buf ,
823
+ },
824
+ };
825
+ struct i2c_adapter * i2c = & dev_priv -> gmbus [GMBUS_PORT_PANEL ].adapter ;
826
+ return i2c_transfer (i2c , msgs , 1 ) == 1 ;
827
+ }
828
+
813
829
/**
814
830
* intel_lvds_init - setup LVDS connectors on this device
815
831
* @dev: drm device
@@ -849,6 +865,11 @@ void intel_lvds_init(struct drm_device *dev)
849
865
gpio = PCH_GPIOC ;
850
866
}
851
867
868
+ if (!intel_lvds_ddc_probe (dev )) {
869
+ DRM_DEBUG_KMS ("LVDS did not respond to DDC probe\n" );
870
+ return ;
871
+ }
872
+
852
873
intel_lvds = kzalloc (sizeof (struct intel_lvds ), GFP_KERNEL );
853
874
if (!intel_lvds ) {
854
875
return ;
You can’t perform that action at this time.
0 commit comments