Rev 4280 | Rev 5060 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4280 | Rev 4560 | ||
---|---|---|---|
Line 104... | Line 104... | ||
104 | } |
104 | } |
Line 105... | Line 105... | ||
105 | 105 | ||
106 | static void intel_crt_get_config(struct intel_encoder *encoder, |
106 | static void intel_crt_get_config(struct intel_encoder *encoder, |
107 | struct intel_crtc_config *pipe_config) |
107 | struct intel_crtc_config *pipe_config) |
- | 108 | { |
|
- | 109 | struct drm_device *dev = encoder->base.dev; |
|
- | 110 | int dotclock; |
|
108 | { |
111 | |
- | 112 | pipe_config->adjusted_mode.flags |= intel_crt_get_flags(encoder); |
|
- | 113 | ||
- | 114 | dotclock = pipe_config->port_clock; |
|
- | 115 | ||
- | 116 | if (HAS_PCH_SPLIT(dev)) |
|
- | 117 | ironlake_check_encoder_dotclock(pipe_config, dotclock); |
|
- | 118 | ||
109 | pipe_config->adjusted_mode.flags |= intel_crt_get_flags(encoder); |
119 | pipe_config->adjusted_mode.crtc_clock = dotclock; |
Line 110... | Line 120... | ||
110 | } |
120 | } |
111 | 121 | ||
112 | static void hsw_crt_get_config(struct intel_encoder *encoder, |
122 | static void hsw_crt_get_config(struct intel_encoder *encoder, |
Line 209... | Line 219... | ||
209 | } |
219 | } |
Line 210... | Line 220... | ||
210 | 220 | ||
211 | intel_modeset_check_state(connector->dev); |
221 | intel_modeset_check_state(connector->dev); |
Line -... | Line 222... | ||
- | 222 | } |
|
212 | } |
223 | |
213 | 224 | static enum drm_mode_status |
|
214 | static int intel_crt_mode_valid(struct drm_connector *connector, |
225 | intel_crt_mode_valid(struct drm_connector *connector, |
215 | struct drm_display_mode *mode) |
226 | struct drm_display_mode *mode) |
Line 216... | Line 227... | ||
216 | { |
227 | { |
Line 261... | Line 272... | ||
261 | struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc); |
272 | struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc); |
262 | struct drm_i915_private *dev_priv = dev->dev_private; |
273 | struct drm_i915_private *dev_priv = dev->dev_private; |
263 | struct drm_display_mode *adjusted_mode = &crtc->config.adjusted_mode; |
274 | struct drm_display_mode *adjusted_mode = &crtc->config.adjusted_mode; |
264 | u32 adpa; |
275 | u32 adpa; |
Line 265... | Line 276... | ||
265 | 276 | ||
266 | if (HAS_PCH_SPLIT(dev)) |
277 | if (INTEL_INFO(dev)->gen >= 5) |
267 | adpa = ADPA_HOTPLUG_BITS; |
278 | adpa = ADPA_HOTPLUG_BITS; |
268 | else |
279 | else |
Line 269... | Line 280... | ||
269 | adpa = 0; |
280 | adpa = 0; |
Line 363... | Line 374... | ||
363 | else |
374 | else |
364 | ret = false; |
375 | ret = false; |
Line 365... | Line 376... | ||
365 | 376 | ||
Line 366... | Line -... | ||
366 | DRM_DEBUG_KMS("valleyview hotplug adpa=0x%x, result %d\n", adpa, ret); |
- | |
367 | - | ||
368 | /* FIXME: debug force function and remove */ |
- | |
369 | ret = true; |
377 | DRM_DEBUG_KMS("valleyview hotplug adpa=0x%x, result %d\n", adpa, ret); |
370 | 378 | ||
Line 371... | Line 379... | ||
371 | return ret; |
379 | return ret; |
372 | } |
380 | } |
Line 667... | Line 675... | ||
667 | return status; |
675 | return status; |
668 | } |
676 | } |
Line 669... | Line 677... | ||
669 | 677 | ||
670 | static void intel_crt_destroy(struct drm_connector *connector) |
678 | static void intel_crt_destroy(struct drm_connector *connector) |
671 | { |
- | |
672 | drm_sysfs_connector_remove(connector); |
679 | { |
673 | drm_connector_cleanup(connector); |
680 | drm_connector_cleanup(connector); |
674 | kfree(connector); |
681 | kfree(connector); |
Line 675... | Line 682... | ||
675 | } |
682 | } |
Line 751... | Line 758... | ||
751 | 758 | ||
752 | crt = kzalloc(sizeof(struct intel_crt), GFP_KERNEL); |
759 | crt = kzalloc(sizeof(struct intel_crt), GFP_KERNEL); |
753 | if (!crt) |
760 | if (!crt) |
Line 754... | Line 761... | ||
754 | return; |
761 | return; |
755 | 762 | ||
756 | intel_connector = kzalloc(sizeof(struct intel_connector), GFP_KERNEL); |
763 | intel_connector = kzalloc(sizeof(*intel_connector), GFP_KERNEL); |
757 | if (!intel_connector) { |
764 | if (!intel_connector) { |
758 | kfree(crt); |
765 | kfree(crt); |
Line 791... | Line 798... | ||
791 | 798 | ||
792 | crt->base.compute_config = intel_crt_compute_config; |
799 | crt->base.compute_config = intel_crt_compute_config; |
793 | crt->base.mode_set = intel_crt_mode_set; |
800 | crt->base.mode_set = intel_crt_mode_set; |
794 | crt->base.disable = intel_disable_crt; |
801 | crt->base.disable = intel_disable_crt; |
795 | crt->base.enable = intel_enable_crt; |
- | |
796 | if (IS_HASWELL(dev)) |
- | |
797 | crt->base.get_config = hsw_crt_get_config; |
- | |
798 | else |
- | |
799 | crt->base.get_config = intel_crt_get_config; |
802 | crt->base.enable = intel_enable_crt; |
800 | if (I915_HAS_HOTPLUG(dev)) |
803 | if (I915_HAS_HOTPLUG(dev)) |
801 | crt->base.hpd_pin = HPD_CRT; |
804 | crt->base.hpd_pin = HPD_CRT; |
- | 805 | if (HAS_DDI(dev)) { |
|
802 | if (HAS_DDI(dev)) |
806 | crt->base.get_config = hsw_crt_get_config; |
803 | crt->base.get_hw_state = intel_ddi_get_hw_state; |
807 | crt->base.get_hw_state = intel_ddi_get_hw_state; |
- | 808 | } else { |
|
804 | else |
809 | crt->base.get_config = intel_crt_get_config; |
- | 810 | crt->base.get_hw_state = intel_crt_get_hw_state; |
|
805 | crt->base.get_hw_state = intel_crt_get_hw_state; |
811 | } |
Line 806... | Line 812... | ||
806 | intel_connector->get_hw_state = intel_connector_get_hw_state; |
812 | intel_connector->get_hw_state = intel_connector_get_hw_state; |
Line 807... | Line 813... | ||
807 | 813 |