diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-12-07 19:28:08 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-12-22 21:30:45 +0200 |
commit | 949d8cf8017c03ac20a153070730ea9e35f4f1d5 (patch) | |
tree | bbea30c76db5eaad747f49ec4a4bb8c7bfc9b3b0 /drivers/gpu/drm/i915/intel_overlay.c | |
parent | 73699147e08d3bf55a9440be412fe195a747313c (diff) | |
download | talos-op-linux-949d8cf8017c03ac20a153070730ea9e35f4f1d5.tar.gz talos-op-linux-949d8cf8017c03ac20a153070730ea9e35f4f1d5.zip |
drm/i915: Kill intel_panel_fitter_pipe()
Check pipe config gmch_pfit.control instead of using intel_panel_fitter_pipe()
to figure out if the pipe for the overlay is using the panel fitter.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1481131693-27993-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_overlay.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_overlay.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c index 615ac3c73bf1..935e6bc2ccad 100644 --- a/drivers/gpu/drm/i915/intel_overlay.c +++ b/drivers/gpu/drm/i915/intel_overlay.c @@ -1076,33 +1076,6 @@ static int check_overlay_src(struct drm_i915_private *dev_priv, return 0; } -/** - * Return the pipe currently connected to the panel fitter, - * or -1 if the panel fitter is not present or not in use - */ -static int intel_panel_fitter_pipe(struct drm_i915_private *dev_priv) -{ - u32 pfit_control; - - /* i830 doesn't have a panel fitter */ - if (INTEL_GEN(dev_priv) <= 3 && - (IS_I830(dev_priv) || !IS_MOBILE(dev_priv))) - return -1; - - pfit_control = I915_READ(PFIT_CONTROL); - - /* See if the panel fitter is in use */ - if ((pfit_control & PFIT_ENABLE) == 0) - return -1; - - /* 965 can place panel fitter on either pipe */ - if (IS_GEN4(dev_priv)) - return (pfit_control >> 29) & 0x3; - - /* older chips can only use pipe 1 */ - return 1; -} - int intel_overlay_put_image_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) { @@ -1177,7 +1150,7 @@ int intel_overlay_put_image_ioctl(struct drm_device *dev, void *data, /* line too wide, i.e. one-line-mode */ if (crtc->config->pipe_src_w > 1024 && - intel_panel_fitter_pipe(dev_priv) == crtc->pipe) { + crtc->config->gmch_pfit.control & PFIT_ENABLE) { overlay->pfit_active = true; update_pfit_vscale_ratio(overlay); } else |