diff options
author | Fabien Dessenne <fabien.dessenne@st.com> | 2016-08-24 06:12:37 -0400 |
---|---|---|
committer | Vincent Abriou <vincent.abriou@st.com> | 2016-09-20 05:32:05 -0400 |
commit | 9dd5942b3195fc94c538d6cf1d26cde8813da80c (patch) | |
tree | 732caabd00d95de79d4bc9846a6cb9b6bdf8ec4c /drivers/gpu/drm | |
parent | 29ffa77668235bd4b39cd0bac209621a25355af2 (diff) |
drm/sti: run hqvdp init sequence only once
Do not rely on plane->status to define whether this is the first update
but rather check for hqvdp->xp70_initialized bit status.
This avoids multiple and unwanted calls to sti_vtg_register_client()
which breaks the kernel scheduler.
Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Acked-by: Vincent Abriou <vincent.abriou@st.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/sti/sti_hqvdp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c index 04546ebb75d7..c6b25f4fad6a 100644 --- a/drivers/gpu/drm/sti/sti_hqvdp.c +++ b/drivers/gpu/drm/sti/sti_hqvdp.c | |||
@@ -771,6 +771,7 @@ static void sti_hqvdp_disable(struct sti_hqvdp *hqvdp) | |||
771 | DRM_ERROR("XP70 could not revert to idle\n"); | 771 | DRM_ERROR("XP70 could not revert to idle\n"); |
772 | 772 | ||
773 | hqvdp->plane.status = STI_PLANE_DISABLED; | 773 | hqvdp->plane.status = STI_PLANE_DISABLED; |
774 | hqvdp->xp70_initialized = false; | ||
774 | } | 775 | } |
775 | 776 | ||
776 | /** | 777 | /** |
@@ -1013,7 +1014,6 @@ static int sti_hqvdp_atomic_check(struct drm_plane *drm_plane, | |||
1013 | struct sti_hqvdp *hqvdp = to_sti_hqvdp(plane); | 1014 | struct sti_hqvdp *hqvdp = to_sti_hqvdp(plane); |
1014 | struct drm_crtc *crtc = state->crtc; | 1015 | struct drm_crtc *crtc = state->crtc; |
1015 | struct drm_framebuffer *fb = state->fb; | 1016 | struct drm_framebuffer *fb = state->fb; |
1016 | bool first_prepare = plane->status == STI_PLANE_DISABLED ? true : false; | ||
1017 | struct drm_crtc_state *crtc_state; | 1017 | struct drm_crtc_state *crtc_state; |
1018 | struct drm_display_mode *mode; | 1018 | struct drm_display_mode *mode; |
1019 | int dst_x, dst_y, dst_w, dst_h; | 1019 | int dst_x, dst_y, dst_w, dst_h; |
@@ -1064,7 +1064,7 @@ static int sti_hqvdp_atomic_check(struct drm_plane *drm_plane, | |||
1064 | return -EINVAL; | 1064 | return -EINVAL; |
1065 | } | 1065 | } |
1066 | 1066 | ||
1067 | if (first_prepare) { | 1067 | if (!hqvdp->xp70_initialized) { |
1068 | /* Start HQVDP XP70 coprocessor */ | 1068 | /* Start HQVDP XP70 coprocessor */ |
1069 | sti_hqvdp_start_xp70(hqvdp); | 1069 | sti_hqvdp_start_xp70(hqvdp); |
1070 | 1070 | ||