diff options
author | Dave Airlie <airlied@redhat.com> | 2015-01-09 17:46:24 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-01-09 17:46:24 -0500 |
commit | adc31849b27fefeca6c225d3895143a2ec6970fa (patch) | |
tree | 96644dea69278efbdd0f0fac52202203a67030fa /drivers/gpu/drm/drm_crtc.c | |
parent | c93546a5e32bd788c22aefa072385f3784551c13 (diff) | |
parent | 0e2cfc005b376ed7b5c9a9fc466b5842fcc18cc7 (diff) |
Merge tag 'drm-intel-next-2014-12-19' of git://anongit.freedesktop.org/drm-intel into drm-next
- plane handling refactoring from Matt Roper and Gustavo Padovan in prep for
atomic updates
- fixes and more patches for the seqno to request transformation from John
- docbook for fbc from Rodrigo
- prep work for dual-link dsi from Gaurav Signh
- crc fixes from Ville
- special ggtt views infrastructure from Tvrtko Ursulin
- shadow patch copying for the cmd parser from Brad Volkin
- execlist and full ppgtt by default on gen8, for testing for now
* tag 'drm-intel-next-2014-12-19' of git://anongit.freedesktop.org/drm-intel: (131 commits)
drm/i915: Update DRIVER_DATE to 20141219
drm/i915: Hold runtime PM during plane commit
drm/i915: Organize bind_vma funcs
drm/i915: Organize INSTDONE report for future.
drm/i915: Organize PDP regs report for future.
drm/i915: Organize PPGTT init
drm/i915: Organize Fence registers for future enablement.
drm/i915: tame the chattermouth (v2)
drm/i915: Warn about missing context state workarounds only once
drm/i915: Use true PPGTT in Gen8+ when execlists are enabled
drm/i915: Skip gunit save/restore for cherryview
drm/i915/chv: Use timeout mode for RC6 on chv
drm/i915: Add GPGPU_THREADS_DISPATCHED to the register whitelist
drm/i915: Tidy up execbuffer command parsing code
drm/i915: Mark shadow batch buffers as purgeable
drm/i915: Use batch length instead of object size in command parser
drm/i915: Use batch pools with the command parser
drm/i915: Implement a framework for batch buffer pools
drm/i915: fix use after free during eDP encoder destroying
drm/i915/skl: Skylake also supports DP MST
...
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 7e4acad3f6f9..7c1786df6213 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c | |||
@@ -2659,6 +2659,27 @@ int drm_mode_set_config_internal(struct drm_mode_set *set) | |||
2659 | EXPORT_SYMBOL(drm_mode_set_config_internal); | 2659 | EXPORT_SYMBOL(drm_mode_set_config_internal); |
2660 | 2660 | ||
2661 | /** | 2661 | /** |
2662 | * drm_crtc_get_hv_timing - Fetches hdisplay/vdisplay for given mode | ||
2663 | * @mode: mode to query | ||
2664 | * @hdisplay: hdisplay value to fill in | ||
2665 | * @vdisplay: vdisplay value to fill in | ||
2666 | * | ||
2667 | * The vdisplay value will be doubled if the specified mode is a stereo mode of | ||
2668 | * the appropriate layout. | ||
2669 | */ | ||
2670 | void drm_crtc_get_hv_timing(const struct drm_display_mode *mode, | ||
2671 | int *hdisplay, int *vdisplay) | ||
2672 | { | ||
2673 | struct drm_display_mode adjusted; | ||
2674 | |||
2675 | drm_mode_copy(&adjusted, mode); | ||
2676 | drm_mode_set_crtcinfo(&adjusted, CRTC_STEREO_DOUBLE_ONLY); | ||
2677 | *hdisplay = adjusted.crtc_hdisplay; | ||
2678 | *vdisplay = adjusted.crtc_vdisplay; | ||
2679 | } | ||
2680 | EXPORT_SYMBOL(drm_crtc_get_hv_timing); | ||
2681 | |||
2682 | /** | ||
2662 | * drm_crtc_check_viewport - Checks that a framebuffer is big enough for the | 2683 | * drm_crtc_check_viewport - Checks that a framebuffer is big enough for the |
2663 | * CRTC viewport | 2684 | * CRTC viewport |
2664 | * @crtc: CRTC that framebuffer will be displayed on | 2685 | * @crtc: CRTC that framebuffer will be displayed on |
@@ -2675,16 +2696,7 @@ int drm_crtc_check_viewport(const struct drm_crtc *crtc, | |||
2675 | { | 2696 | { |
2676 | int hdisplay, vdisplay; | 2697 | int hdisplay, vdisplay; |
2677 | 2698 | ||
2678 | hdisplay = mode->hdisplay; | 2699 | drm_crtc_get_hv_timing(mode, &hdisplay, &vdisplay); |
2679 | vdisplay = mode->vdisplay; | ||
2680 | |||
2681 | if (drm_mode_is_stereo(mode)) { | ||
2682 | struct drm_display_mode adjusted = *mode; | ||
2683 | |||
2684 | drm_mode_set_crtcinfo(&adjusted, CRTC_STEREO_DOUBLE); | ||
2685 | hdisplay = adjusted.crtc_hdisplay; | ||
2686 | vdisplay = adjusted.crtc_vdisplay; | ||
2687 | } | ||
2688 | 2700 | ||
2689 | if (crtc->invert_dimensions) | 2701 | if (crtc->invert_dimensions) |
2690 | swap(hdisplay, vdisplay); | 2702 | swap(hdisplay, vdisplay); |