Rev 4539 | Rev 4560 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4539 | Rev 4557 | ||
---|---|---|---|
Line 3350... | Line 3350... | ||
3350 | 3350 | ||
3351 | intel_enable_pipe(dev_priv, pipe, |
3351 | intel_enable_pipe(dev_priv, pipe, |
3352 | intel_crtc->config.has_pch_encoder); |
3352 | intel_crtc->config.has_pch_encoder); |
3353 | intel_enable_plane(dev_priv, plane, pipe); |
3353 | intel_enable_plane(dev_priv, plane, pipe); |
3354 | intel_enable_planes(crtc); |
3354 | intel_enable_planes(crtc); |
Line 3355... | Line 3355... | ||
3355 | // intel_crtc_update_cursor(crtc, true); |
3355 | intel_crtc_update_cursor(crtc, true); |
3356 | 3356 | ||
Line 3357... | Line 3357... | ||
3357 | if (intel_crtc->config.has_pch_encoder) |
3357 | if (intel_crtc->config.has_pch_encoder) |
Line 3458... | Line 3458... | ||
3458 | 3458 | ||
3459 | intel_enable_pipe(dev_priv, pipe, |
3459 | intel_enable_pipe(dev_priv, pipe, |
3460 | intel_crtc->config.has_pch_encoder); |
3460 | intel_crtc->config.has_pch_encoder); |
3461 | intel_enable_plane(dev_priv, plane, pipe); |
3461 | intel_enable_plane(dev_priv, plane, pipe); |
3462 | intel_enable_planes(crtc); |
3462 | intel_enable_planes(crtc); |
Line 3463... | Line 3463... | ||
3463 | // intel_crtc_update_cursor(crtc, true); |
3463 | intel_crtc_update_cursor(crtc, true); |
Line 3464... | Line 3464... | ||
3464 | 3464 | ||
3465 | hsw_enable_ips(intel_crtc); |
3465 | hsw_enable_ips(intel_crtc); |
Line 3521... | Line 3521... | ||
3521 | // drm_vblank_off(dev, pipe); |
3521 | // drm_vblank_off(dev, pipe); |
Line 3522... | Line 3522... | ||
3522 | 3522 | ||
3523 | if (dev_priv->fbc.plane == plane) |
3523 | if (dev_priv->fbc.plane == plane) |
Line 3524... | Line 3524... | ||
3524 | intel_disable_fbc(dev); |
3524 | intel_disable_fbc(dev); |
3525 | 3525 | ||
3526 | // intel_crtc_update_cursor(crtc, false); |
3526 | intel_crtc_update_cursor(crtc, false); |
Line 3527... | Line 3527... | ||
3527 | intel_disable_planes(crtc); |
3527 | intel_disable_planes(crtc); |
3528 | intel_disable_plane(dev_priv, plane, pipe); |
3528 | intel_disable_plane(dev_priv, plane, pipe); |
Line 3594... | Line 3594... | ||
3594 | if (dev_priv->fbc.plane == plane) |
3594 | if (dev_priv->fbc.plane == plane) |
3595 | intel_disable_fbc(dev); |
3595 | intel_disable_fbc(dev); |
Line 3596... | Line 3596... | ||
3596 | 3596 | ||
Line 3597... | Line 3597... | ||
3597 | hsw_disable_ips(intel_crtc); |
3597 | hsw_disable_ips(intel_crtc); |
3598 | 3598 | ||
3599 | // intel_crtc_update_cursor(crtc, false); |
3599 | intel_crtc_update_cursor(crtc, false); |
Line 3600... | Line 3600... | ||
3600 | intel_disable_planes(crtc); |
3600 | intel_disable_planes(crtc); |
3601 | intel_disable_plane(dev_priv, plane, pipe); |
3601 | intel_disable_plane(dev_priv, plane, pipe); |
Line 3737... | Line 3737... | ||
3737 | intel_crtc_load_lut(crtc); |
3737 | intel_crtc_load_lut(crtc); |
Line 3738... | Line 3738... | ||
3738 | 3738 | ||
3739 | intel_enable_pipe(dev_priv, pipe, false); |
3739 | intel_enable_pipe(dev_priv, pipe, false); |
3740 | intel_enable_plane(dev_priv, plane, pipe); |
3740 | intel_enable_plane(dev_priv, plane, pipe); |
3741 | intel_enable_planes(crtc); |
3741 | intel_enable_planes(crtc); |
Line 3742... | Line 3742... | ||
3742 | // intel_crtc_update_cursor(crtc, true); |
3742 | intel_crtc_update_cursor(crtc, true); |
Line 3743... | Line 3743... | ||
3743 | 3743 | ||
3744 | intel_update_fbc(dev); |
3744 | intel_update_fbc(dev); |
Line 3778... | Line 3778... | ||
3778 | intel_enable_plane(dev_priv, plane, pipe); |
3778 | intel_enable_plane(dev_priv, plane, pipe); |
3779 | intel_enable_planes(crtc); |
3779 | intel_enable_planes(crtc); |
3780 | /* The fixup needs to happen before cursor is enabled */ |
3780 | /* The fixup needs to happen before cursor is enabled */ |
3781 | if (IS_G4X(dev)) |
3781 | if (IS_G4X(dev)) |
3782 | g4x_fixup_plane(dev_priv, pipe); |
3782 | g4x_fixup_plane(dev_priv, pipe); |
3783 | // intel_crtc_update_cursor(crtc, true); |
3783 | intel_crtc_update_cursor(crtc, true); |
Line 3784... | Line 3784... | ||
3784 | 3784 | ||
3785 | /* Give the overlay scaler a chance to enable if it's on this pipe */ |
3785 | /* Give the overlay scaler a chance to enable if it's on this pipe */ |
Line 3786... | Line 3786... | ||
3786 | intel_crtc_dpms_overlay(intel_crtc, true); |
3786 | intel_crtc_dpms_overlay(intel_crtc, true); |
Line 3827... | Line 3827... | ||
3827 | 3827 | ||
3828 | if (dev_priv->fbc.plane == plane) |
3828 | if (dev_priv->fbc.plane == plane) |
Line 3829... | Line 3829... | ||
3829 | intel_disable_fbc(dev); |
3829 | intel_disable_fbc(dev); |
3830 | 3830 | ||
3831 | intel_crtc_dpms_overlay(intel_crtc, false); |
3831 | intel_crtc_dpms_overlay(intel_crtc, false); |
3832 | // intel_crtc_update_cursor(crtc, false); |
3832 | intel_crtc_update_cursor(crtc, false); |
Line 3833... | Line 3833... | ||
3833 | intel_disable_planes(crtc); |
3833 | intel_disable_planes(crtc); |
Line 3839... | Line 3839... | ||
3839 | 3839 | ||
3840 | for_each_encoder_on_crtc(dev, crtc, encoder) |
3840 | for_each_encoder_on_crtc(dev, crtc, encoder) |
3841 | if (encoder->post_disable) |
3841 | if (encoder->post_disable) |
Line -... | Line 3842... | ||
- | 3842 | encoder->post_disable(encoder); |
|
- | 3843 | ||
- | 3844 | if (IS_VALLEYVIEW(dev)) |
|
3842 | encoder->post_disable(encoder); |
3845 | vlv_disable_pll(dev_priv, pipe); |
Line 3843... | Line 3846... | ||
3843 | 3846 | else |
|
3844 | i9xx_disable_pll(dev_priv, pipe); |
3847 | i9xx_disable_pll(dev_priv, pipe); |
3845 | 3848 | ||
Line 6792... | Line 6795... | ||
6792 | cntl &= ~(CURSOR_ENABLE | CURSOR_GAMMA_ENABLE); |
6795 | cntl &= ~(CURSOR_ENABLE | CURSOR_GAMMA_ENABLE); |
6793 | I915_WRITE(_CURACNTR, cntl); |
6796 | I915_WRITE(_CURACNTR, cntl); |
Line 6794... | Line 6797... | ||
6794 | 6797 | ||
6795 | intel_crtc->cursor_visible = visible; |
6798 | intel_crtc->cursor_visible = visible; |
- | 6799 | } |
|
Line 6796... | Line 6800... | ||
6796 | } |
6800 | #endif |
6797 | 6801 | ||
6798 | static void i9xx_update_cursor(struct drm_crtc *crtc, u32 base) |
6802 | static void i9xx_update_cursor(struct drm_crtc *crtc, u32 base) |
6799 | { |
6803 | { |
Line 6904... | Line 6908... | ||
6904 | if (IS_IVYBRIDGE(dev) || IS_HASWELL(dev)) { |
6908 | if (IS_IVYBRIDGE(dev) || IS_HASWELL(dev)) { |
6905 | I915_WRITE(CURPOS_IVB(pipe), pos); |
6909 | I915_WRITE(CURPOS_IVB(pipe), pos); |
6906 | ivb_update_cursor(crtc, base); |
6910 | ivb_update_cursor(crtc, base); |
6907 | } else { |
6911 | } else { |
6908 | I915_WRITE(CURPOS(pipe), pos); |
6912 | I915_WRITE(CURPOS(pipe), pos); |
6909 | if (IS_845G(dev) || IS_I865G(dev)) |
- | |
6910 | i845_update_cursor(crtc, base); |
- | |
6911 | else |
- | |
6912 | i9xx_update_cursor(crtc, base); |
6913 | i9xx_update_cursor(crtc, base); |
6913 | } |
6914 | } |
6914 | } |
6915 | } |
Line -... | Line 6916... | ||
- | 6916 | ||
6915 | 6917 | #if 0 |
|
6916 | static int intel_crtc_cursor_set(struct drm_crtc *crtc, |
6918 | static int intel_crtc_cursor_set(struct drm_crtc *crtc, |
6917 | struct drm_file *file, |
6919 | struct drm_file *file, |
6918 | uint32_t handle, |
6920 | uint32_t handle, |
6919 | uint32_t width, uint32_t height) |
6921 | uint32_t width, uint32_t height) |
Line 7025... | Line 7027... | ||
7025 | mutex_unlock(&dev->struct_mutex); |
7027 | mutex_unlock(&dev->struct_mutex); |
7026 | fail: |
7028 | fail: |
7027 | drm_gem_object_unreference_unlocked(&obj->base); |
7029 | drm_gem_object_unreference_unlocked(&obj->base); |
7028 | return ret; |
7030 | return ret; |
7029 | } |
7031 | } |
- | 7032 | #endif |
|
Line 7030... | Line 7033... | ||
7030 | 7033 | ||
7031 | static int intel_crtc_cursor_move(struct drm_crtc *crtc, int x, int y) |
7034 | static int intel_crtc_cursor_move(struct drm_crtc *crtc, int x, int y) |
7032 | { |
7035 | { |
Line 7038... | Line 7041... | ||
7038 | if (intel_crtc->active) |
7041 | if (intel_crtc->active) |
7039 | intel_crtc_update_cursor(crtc, intel_crtc->cursor_bo != NULL); |
7042 | intel_crtc_update_cursor(crtc, intel_crtc->cursor_bo != NULL); |
Line 7040... | Line 7043... | ||
7040 | 7043 | ||
7041 | return 0; |
7044 | return 0; |
7042 | } |
- | |
Line 7043... | Line 7045... | ||
7043 | #endif |
7045 | } |
7044 | 7046 | ||
7045 | /** Sets the color ramps on behalf of RandR */ |
7047 | /** Sets the color ramps on behalf of RandR */ |
7046 | void intel_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green, |
7048 | void intel_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green, |
Line 9346... | Line 9348... | ||
9346 | return ret; |
9348 | return ret; |
9347 | } |
9349 | } |
Line 9348... | Line 9350... | ||
9348 | 9350 | ||
9349 | static const struct drm_crtc_funcs intel_crtc_funcs = { |
9351 | static const struct drm_crtc_funcs intel_crtc_funcs = { |
9350 | // .cursor_set = intel_crtc_cursor_set, |
9352 | // .cursor_set = intel_crtc_cursor_set, |
9351 | // .cursor_move = intel_crtc_cursor_move, |
9353 | .cursor_move = intel_crtc_cursor_move, |
9352 | .gamma_set = intel_crtc_gamma_set, |
9354 | .gamma_set = intel_crtc_gamma_set, |
9353 | .set_config = intel_crtc_set_config, |
9355 | .set_config = intel_crtc_set_config, |
9354 | .destroy = intel_crtc_destroy, |
9356 | .destroy = intel_crtc_destroy, |
9355 | // .page_flip = intel_crtc_page_flip, |
9357 | // .page_flip = intel_crtc_page_flip, |