Skip to content

Commit

Permalink
drm/i915: move gmbus setup down to intel_modeset_init()
Browse files Browse the repository at this point in the history
Pair the gmbus setup and teardown in the same layer. This also fixes the
double gmbus teardown on the i915_driver_modeset_probe() error path.

Move the gmbus setup a bit later in the sequence to make the follow-up
refactoring easier, and to pinpoint any unexpected consequences of this
change right here, instead of the later refactoring.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191004122019.12009-3-jani.nikula@intel.com
  • Loading branch information
Jani Nikula committed Oct 6, 2019
1 parent 63bf830 commit 9bfcf19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/display/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -16216,6 +16216,8 @@ int intel_modeset_init(struct drm_i915_private *i915)

intel_panel_sanitize_ssc(i915);

intel_gmbus_setup(i915);

DRM_DEBUG_KMS("%d display pipe%s available.\n",
INTEL_NUM_PIPES(i915),
INTEL_NUM_PIPES(i915) > 1 ? "s" : "");
Expand Down
4 changes: 0 additions & 4 deletions drivers/gpu/drm/i915/i915_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
#include "display/intel_display_types.h"
#include "display/intel_dp.h"
#include "display/intel_fbdev.h"
#include "display/intel_gmbus.h"
#include "display/intel_hotplug.h"
#include "display/intel_overlay.h"
#include "display/intel_pipe_crc.h"
Expand Down Expand Up @@ -307,8 +306,6 @@ static int i915_driver_modeset_probe(struct drm_i915_private *i915)
if (ret)
goto cleanup_csr;

intel_gmbus_setup(i915);

/* Important: The output setup functions called by modeset_init need
* working irqs for e.g. gmbus and dp aux transfers. */
ret = intel_modeset_init(i915);
Expand Down Expand Up @@ -343,7 +340,6 @@ static int i915_driver_modeset_probe(struct drm_i915_private *i915)
intel_modeset_driver_remove(i915);
cleanup_irq:
intel_irq_uninstall(i915);
intel_gmbus_teardown(i915);
cleanup_csr:
intel_csr_ucode_fini(i915);
intel_power_domains_driver_remove(i915);
Expand Down

0 comments on commit 9bfcf19

Please sign in to comment.