]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Intel panel detection cleanup
authorMika Kahola <mika.kahola@intel.com>
Tue, 13 Dec 2016 08:02:47 +0000 (10:02 +0200)
committerJani Nikula <jani.nikula@intel.com>
Tue, 13 Dec 2016 15:25:26 +0000 (17:25 +0200)
Let's switch to use private dev_priv instead of dev when detecting
intel panels.

Signed-off-by: Mika Kahola <mika.kahola@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1481616169-16210-2-git-send-email-mika.kahola@intel.com
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_lvds.c
drivers/gpu/drm/i915/intel_panel.c

index 4efe699c91ecf1f95455ceda725ee164a8ca88fc..eb743991a376037cd23705d6b6f60eaa904c8b11 100644 (file)
@@ -4183,9 +4183,10 @@ static enum drm_connector_status
 edp_detect(struct intel_dp *intel_dp)
 {
        struct drm_device *dev = intel_dp_to_dev(intel_dp);
+       struct drm_i915_private *dev_priv = to_i915(dev);
        enum drm_connector_status status;
 
-       status = intel_panel_detect(dev);
+       status = intel_panel_detect(dev_priv);
        if (status == connector_status_unknown)
                status = connector_status_connected;
 
index 06c664728b0ddfdd1d266e0ac4b6bd4ffa1d0ce5..1a95f9d67775e7b5bf38316e3c7c17e5f18287f8 100644 (file)
@@ -1608,7 +1608,7 @@ int intel_panel_setup_backlight(struct drm_connector *connector,
 void intel_panel_enable_backlight(struct intel_connector *connector);
 void intel_panel_disable_backlight(struct intel_connector *connector);
 void intel_panel_destroy_backlight(struct drm_connector *connector);
-enum drm_connector_status intel_panel_detect(struct drm_device *dev);
+enum drm_connector_status intel_panel_detect(struct drm_i915_private *dev_priv);
 extern struct drm_display_mode *intel_find_panel_downclock(
                                struct drm_device *dev,
                                struct drm_display_mode *fixed_mode,
index ea1ce17d8e4af4a6c137ad3cb8453dce8b5885be..9ca4dc4d237861c963635bee9202ba14f2188240 100644 (file)
@@ -460,13 +460,13 @@ static bool intel_lvds_compute_config(struct intel_encoder *intel_encoder,
 static enum drm_connector_status
 intel_lvds_detect(struct drm_connector *connector, bool force)
 {
-       struct drm_device *dev = connector->dev;
+       struct drm_i915_private *dev_priv = to_i915(connector->dev);
        enum drm_connector_status status;
 
        DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
                      connector->base.id, connector->name);
 
-       status = intel_panel_detect(dev);
+       status = intel_panel_detect(dev_priv);
        if (status != connector_status_unknown)
                return status;
 
index b01edceac6507385c06194777599e42b064504b1..095456ba60583c6f8c97386409fad3f4c8cc09e1 100644 (file)
@@ -375,10 +375,8 @@ out:
 }
 
 enum drm_connector_status
-intel_panel_detect(struct drm_device *dev)
+intel_panel_detect(struct drm_i915_private *dev_priv)
 {
-       struct drm_i915_private *dev_priv = to_i915(dev);
-
        /* Assume that the BIOS does not lie through the OpRegion... */
        if (!i915.panel_ignore_lid && dev_priv->opregion.lid_state) {
                return *dev_priv->opregion.lid_state & 0x1 ?