File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,32 @@ static struct intel_lvds *intel_attached_lvds(struct drm_connector *connector)
65
65
struct intel_lvds , base );
66
66
}
67
67
68
+ static bool intel_lvds_get_hw_state (struct intel_encoder * encoder ,
69
+ enum pipe * pipe )
70
+ {
71
+ struct drm_device * dev = encoder -> base .dev ;
72
+ struct drm_i915_private * dev_priv = dev -> dev_private ;
73
+ u32 lvds_reg , tmp ;
74
+
75
+ if (HAS_PCH_SPLIT (dev )) {
76
+ lvds_reg = PCH_LVDS ;
77
+ } else {
78
+ lvds_reg = LVDS ;
79
+ }
80
+
81
+ tmp = I915_READ (lvds_reg );
82
+
83
+ if (!(tmp & LVDS_PORT_EN ))
84
+ return false;
85
+
86
+ if (HAS_PCH_CPT (dev ))
87
+ * pipe = PORT_TO_PIPE_CPT (tmp );
88
+ else
89
+ * pipe = PORT_TO_PIPE (tmp );
90
+
91
+ return true;
92
+ }
93
+
68
94
/**
69
95
* Sets the power state for the panel.
70
96
*/
@@ -937,6 +963,8 @@ bool intel_lvds_init(struct drm_device *dev)
937
963
938
964
intel_encoder -> enable = intel_enable_lvds ;
939
965
intel_encoder -> disable = intel_disable_lvds ;
966
+ intel_encoder -> get_hw_state = intel_lvds_get_hw_state ;
967
+ intel_connector -> get_hw_state = intel_connector_get_hw_state ;
940
968
941
969
intel_connector_attach_encoder (intel_connector , intel_encoder );
942
970
intel_encoder -> type = INTEL_OUTPUT_LVDS ;
You can’t perform that action at this time.
0 commit comments