drm/tegra: Fixes for v3.18-rc5 This is a single patch that fixes the VBLANK machinery after: 7ffd7a68511c drm: Always reject drm_vblank_get() after drm_vblank_off() * tag 'drm/tegra/for-3.18-rc5' of git://people.freedesktop.org/~tagr/linux: drm/tegra: dc: Add missing call to drm_vblank_on()
Unified · Split
| @@ -736,7 +736,6 @@ static const struct drm_crtc_funcs tegra_crtc_funcs = { · 735 unmodified lines | ||
| 736 | 736 | |
| 737 | 737 | static void tegra_crtc_disable(struct drm_crtc *crtc) |
| 738 | 738 | { |
| 739 | − struct tegra_dc *dc = to_tegra_dc(crtc); | |
| 740 | 739 | struct drm_device *drm = crtc->dev; |
| 741 | 740 | struct drm_plane *plane; |
| 742 | 741 | |
| @@ -752,7 +751,7 @@ static void tegra_crtc_disable(struct drm_crtc *crtc) · 9 unmodified lines | ||
| 752 | 751 | } |
| 753 | 752 | } |
| 754 | 753 | |
| 755 | − drm_vblank_off(drm, dc->pipe); | |
| 754 | + drm_crtc_vblank_off(crtc); | |
| 756 | 755 | } |
| 757 | 756 | |
| 758 | 757 | static bool tegra_crtc_mode_fixup(struct drm_crtc *crtc, |
| @@ -841,8 +840,6 @@ static int tegra_crtc_mode_set(struct drm_crtc *crtc, · 82 unmodified lines | ||
| 841 | 840 | u32 value; |
| 842 | 841 | int err; |
| 843 | 842 | |
| 844 | − drm_vblank_pre_modeset(crtc->dev, dc->pipe); | |
| 845 | − | |
| 846 | 843 | err = tegra_crtc_setup_clk(crtc, mode); |
| 847 | 844 | if (err) { |
| 848 | 845 | dev_err(dc->dev, "failed to setup clock for CRTC: %d\n", err); |
| @@ -896,6 +893,8 @@ static void tegra_crtc_prepare(struct drm_crtc *crtc) · 47 unmodified lines | ||
| 896 | 893 | unsigned int syncpt; |
| 897 | 894 | unsigned long value; |
| 898 | 895 | |
| 896 | + drm_crtc_vblank_off(crtc); | |
| 897 | + | |
| 899 | 898 | /* hardware initialization */ |
| 900 | 899 | reset_control_deassert(dc->rst); |
| 901 | 900 | usleep_range(10000, 20000); |
| @@ -943,7 +942,7 @@ static void tegra_crtc_commit(struct drm_crtc *crtc) · 41 unmodified lines | ||
| 943 | 942 | value = GENERAL_ACT_REQ | WIN_A_ACT_REQ; |
| 944 | 943 | tegra_dc_writel(dc, value, DC_CMD_STATE_CONTROL); |
| 945 | 944 | |
| 946 | − drm_vblank_post_modeset(crtc->dev, dc->pipe); | |
| 945 | + drm_crtc_vblank_on(crtc); | |
| 947 | 946 | } |
| 948 | 947 | |
| 949 | 948 | static void tegra_crtc_load_lut(struct drm_crtc *crtc) |