aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/intel_pm.c
diff options
context:
space:
mode:
authorGravatar Ville Syrjälä <ville.syrjala@linux.intel.com> 2016-10-31 22:37:05 +0200
committerGravatar Ville Syrjälä <ville.syrjala@linux.intel.com> 2016-11-01 16:40:38 +0200
commite2af48c66b41fecbec5bc1b07640c2419a724c34 (patch)
tree4ab43bf2538d6f1f5621705dce2e4596f841912f /drivers/gpu/drm/i915/intel_pm.c
parentdrm/i915: Use struct intel_crtc in legacy platform wm code (diff)
downloadlinux-e2af48c66b41fecbec5bc1b07640c2419a724c34.tar.gz
linux-e2af48c66b41fecbec5bc1b07640c2419a724c34.tar.bz2
linux-e2af48c66b41fecbec5bc1b07640c2419a724c34.zip
drm/i915: Store struct intel_crtc * in {pipe,plane}_to_crtc_mapping[]
A lot of users of the {pipe,plane}_to_crtc_mapping[] will end up casting the result to intel_crtc, so let's just store the intel_crtc pointer in the first place. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1477946245-14134-7-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_pm.c')
-rw-r--r--drivers/gpu/drm/i915/intel_pm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index f3bd2200d7c5..8d1040c7ed8d 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -728,7 +728,7 @@ static bool g4x_compute_wm0(struct drm_device *dev,
int line_time_us, line_count;
int entries, tlb_miss;
- crtc = to_intel_crtc(intel_get_crtc_for_plane(dev, plane));
+ crtc = intel_get_crtc_for_plane(dev, plane);
if (!intel_crtc_active(crtc)) {
*cursor_wm = cursor->guard_size;
*plane_wm = display->guard_size;
@@ -823,7 +823,7 @@ static bool g4x_compute_srwm(struct drm_device *dev,
return false;
}
- crtc = to_intel_crtc(intel_get_crtc_for_plane(dev, plane));
+ crtc = intel_get_crtc_for_plane(dev, plane);
adjusted_mode = &crtc->config->base.adjusted_mode;
fb = crtc->base.primary->state->fb;
clock = adjusted_mode->crtc_clock;
@@ -1546,7 +1546,7 @@ static void i9xx_update_wm(struct intel_crtc *unused_crtc)
wm_info = &i830_a_wm_info;
fifo_size = dev_priv->display.get_fifo_size(dev, 0);
- crtc = to_intel_crtc(intel_get_crtc_for_plane(dev, 0));
+ crtc = intel_get_crtc_for_plane(dev, 0);
if (intel_crtc_active(crtc)) {
const struct drm_display_mode *adjusted_mode =
&crtc->config->base.adjusted_mode;
@@ -1573,7 +1573,7 @@ static void i9xx_update_wm(struct intel_crtc *unused_crtc)
wm_info = &i830_bc_wm_info;
fifo_size = dev_priv->display.get_fifo_size(dev, 1);
- crtc = to_intel_crtc(intel_get_crtc_for_plane(dev, 1));
+ crtc = intel_get_crtc_for_plane(dev, 1);
if (intel_crtc_active(crtc)) {
const struct drm_display_mode *adjusted_mode =
&crtc->config->base.adjusted_mode;
@@ -3066,7 +3066,7 @@ bool intel_can_enable_sagv(struct drm_atomic_state *state)
/* Since we're now guaranteed to only have one active CRTC... */
pipe = ffs(intel_state->active_crtcs) - 1;
- crtc = to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]);
+ crtc = dev_priv->pipe_to_crtc_mapping[pipe];
cstate = to_intel_crtc_state(crtc->base.state);
if (crtc->base.state->adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE)