diff options
author | Jani Nikula <jani.nikula@intel.com> | 2015-01-16 07:27:18 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-01-27 03:51:12 -0500 |
commit | 3b1808bf56ef613f693ac5a592411ef1717c0065 (patch) | |
tree | d0359f836782ae8e3c7acf3f7d841d08c09d6c06 /drivers/gpu/drm/i915/intel_dsi.c | |
parent | 4934b65682061f3ac926fb666f93b0e5dd29114e (diff) |
drm/i915/dsi: move wait_for_dsi_fifo_empty to intel_dsi.c
wait_for_dsi_fifo_empty can be static in intel_dsi.c. No functional
changes.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-By: Shobhit Kumar <shobhit.kumar@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dsi.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dsi.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c index dac41046a0cc..94865eb22c93 100644 --- a/drivers/gpu/drm/i915/intel_dsi.c +++ b/drivers/gpu/drm/i915/intel_dsi.c | |||
@@ -42,6 +42,22 @@ static const struct intel_dsi_device intel_dsi_devices[] = { | |||
42 | }, | 42 | }, |
43 | }; | 43 | }; |
44 | 44 | ||
45 | static void wait_for_dsi_fifo_empty(struct intel_dsi *intel_dsi) | ||
46 | { | ||
47 | struct drm_encoder *encoder = &intel_dsi->base.base; | ||
48 | struct drm_device *dev = encoder->dev; | ||
49 | struct drm_i915_private *dev_priv = dev->dev_private; | ||
50 | struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc); | ||
51 | enum port port = intel_dsi_pipe_to_port(intel_crtc->pipe); | ||
52 | u32 mask; | ||
53 | |||
54 | mask = LP_CTRL_FIFO_EMPTY | HS_CTRL_FIFO_EMPTY | | ||
55 | LP_DATA_FIFO_EMPTY | HS_DATA_FIFO_EMPTY; | ||
56 | |||
57 | if (wait_for((I915_READ(MIPI_GEN_FIFO_STAT(port)) & mask) == mask, 100)) | ||
58 | DRM_ERROR("DPI FIFOs are not empty\n"); | ||
59 | } | ||
60 | |||
45 | static void band_gap_reset(struct drm_i915_private *dev_priv) | 61 | static void band_gap_reset(struct drm_i915_private *dev_priv) |
46 | { | 62 | { |
47 | mutex_lock(&dev_priv->dpio_lock); | 63 | mutex_lock(&dev_priv->dpio_lock); |