aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_dp.c
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2012-10-19 07:51:49 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-10-22 12:31:20 -0400
commit1d508706ea848e32ff20bb311f4325896c6eb7b9 (patch)
treecfd2760c7a693fceaa28e06001e31ca0f00c51fe /drivers/gpu/drm/i915/intel_dp.c
parentf8779fda5776dfb9369ec09fc21745c9d8057e81 (diff)
drm/i915: Create generic intel_panel for LVDS and eDP
Create a generic struct intel_panel for sharing a data structure and code between eDP and LVDS panels. Add the new struct to intel_connector so that later on we can have generic EDID and mode reading functions with EDID caching that transparently fallback to fixed mode when EDID is not available. Add intel_panel as a dummy first, and move data (such as the mentioned fixed mode) to it in later patches. Based on earlier work by Chris Wilson <chris@chris-wilson.co.uk> CC: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> [danvet: Fixup tiny conflict in intel_dp_destroy.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp.c')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index be47efff90f0..83a0bc0b7e93 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2497,9 +2497,12 @@ intel_dp_destroy(struct drm_connector *connector)
2497{ 2497{
2498 struct drm_device *dev = connector->dev; 2498 struct drm_device *dev = connector->dev;
2499 struct intel_dp *intel_dp = intel_attached_dp(connector); 2499 struct intel_dp *intel_dp = intel_attached_dp(connector);
2500 struct intel_connector *intel_connector = to_intel_connector(connector);
2500 2501
2501 if (is_edp(intel_dp)) 2502 if (is_edp(intel_dp)) {
2502 intel_panel_destroy_backlight(dev); 2503 intel_panel_destroy_backlight(dev);
2504 intel_panel_fini(&intel_connector->panel);
2505 }
2503 2506
2504 drm_sysfs_connector_remove(connector); 2507 drm_sysfs_connector_remove(connector);
2505 drm_connector_cleanup(connector); 2508 drm_connector_cleanup(connector);
@@ -2828,8 +2831,10 @@ intel_dp_init(struct drm_device *dev, int output_reg, enum port port)
2828 2831
2829 intel_encoder->hot_plug = intel_dp_hot_plug; 2832 intel_encoder->hot_plug = intel_dp_hot_plug;
2830 2833
2831 if (is_edp(intel_dp)) 2834 if (is_edp(intel_dp)) {
2835 intel_panel_init(&intel_connector->panel);
2832 intel_panel_setup_backlight(connector); 2836 intel_panel_setup_backlight(connector);
2837 }
2833 2838
2834 intel_dp_add_properties(intel_dp, connector); 2839 intel_dp_add_properties(intel_dp, connector);
2835 2840