diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2013-04-25 15:55:01 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-04-25 16:16:22 -0400 |
commit | 2dd24552cab40ea829ba3fda890eeafd2c4816d8 (patch) | |
tree | fee957bf6e4c7824ffbd82125930f316634884b0 /drivers/gpu/drm/i915/intel_drv.h | |
parent | 198a037f02666eeaab5ba07974fa37467b1f6bd8 (diff) |
drm/i915: factor out GMCH panel fitting code and use for eDP v3
This gets the panel fitter working on eDP on VLV, and should also apply
to eDP panels on G4x chipsets (if we ever detect and mark an all-in-one
panel as eDP anyway).
A few cleanups are still possible on top of this, for example the LVDS
border control could be placed in the LVDS encoder structure and updated
based on the result of the panel fitter calculation.
Multi-pipe fitting isn't handled correctly either if we ever get a config
that wants to try the panel fitter on more than one output at a time.
v2: use pipe_config for storing pfit values (Daniel)
add i9xx_pfit_enable function for use by 9xx and VLV (Daniel)
v3: fixup conflicts and lvds_dither check
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
[danvet: fix up botched conflict resolution from Jesse:
- border = LVDS_BORDER_ENABLE was lost for CENTER scaling
- comment about gen2/3 panel fitter scaling was lost
- dev_priv->lvds_dither reintroduced.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/intel_drv.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index a5fe976364e1..9f3f71bc2f22 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h | |||
@@ -237,6 +237,9 @@ struct intel_crtc_config { | |||
237 | int pixel_target_clock; | 237 | int pixel_target_clock; |
238 | /* Used by SDVO (and if we ever fix it, HDMI). */ | 238 | /* Used by SDVO (and if we ever fix it, HDMI). */ |
239 | unsigned pixel_multiplier; | 239 | unsigned pixel_multiplier; |
240 | |||
241 | /* Panel fitter controls for gen2-gen4 + VLV */ | ||
242 | u32 pfit_control, pfit_pgm_ratios; | ||
240 | }; | 243 | }; |
241 | 244 | ||
242 | struct intel_crtc { | 245 | struct intel_crtc { |
@@ -558,6 +561,9 @@ extern void intel_pch_panel_fitting(struct drm_device *dev, | |||
558 | int fitting_mode, | 561 | int fitting_mode, |
559 | const struct drm_display_mode *mode, | 562 | const struct drm_display_mode *mode, |
560 | struct drm_display_mode *adjusted_mode); | 563 | struct drm_display_mode *adjusted_mode); |
564 | extern void intel_gmch_panel_fitting(struct intel_crtc *crtc, | ||
565 | struct intel_crtc_config *pipe_config, | ||
566 | int fitting_mode); | ||
561 | extern void intel_panel_set_backlight(struct drm_device *dev, | 567 | extern void intel_panel_set_backlight(struct drm_device *dev, |
562 | u32 level, u32 max); | 568 | u32 level, u32 max); |
563 | extern int intel_panel_setup_backlight(struct drm_connector *connector); | 569 | extern int intel_panel_setup_backlight(struct drm_connector *connector); |