Commit bf4a7a22 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/sti: Stop consulting plane->fb

We want to get rid of plane->fb on atomic drivers. Stop looking at it.

Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180322152313.6561-12-ville.syrjala@linux.intel.comAcked-by: default avatarBenjamin Gaignard <benjamin.gaignard@linaro.org>
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
parent 8bc20f65
...@@ -40,6 +40,7 @@ void sti_plane_update_fps(struct sti_plane *plane, ...@@ -40,6 +40,7 @@ void sti_plane_update_fps(struct sti_plane *plane,
bool new_frame, bool new_frame,
bool new_field) bool new_field)
{ {
struct drm_plane_state *state = plane->drm_plane.state;
ktime_t now; ktime_t now;
struct sti_fps_info *fps; struct sti_fps_info *fps;
int fpks, fipks, ms_since_last, num_frames, num_fields; int fpks, fipks, ms_since_last, num_frames, num_fields;
...@@ -66,14 +67,14 @@ void sti_plane_update_fps(struct sti_plane *plane, ...@@ -66,14 +67,14 @@ void sti_plane_update_fps(struct sti_plane *plane,
fps->last_timestamp = now; fps->last_timestamp = now;
fps->last_frame_counter = fps->curr_frame_counter; fps->last_frame_counter = fps->curr_frame_counter;
if (plane->drm_plane.fb) { if (state->fb) {
fpks = (num_frames * 1000000) / ms_since_last; fpks = (num_frames * 1000000) / ms_since_last;
snprintf(plane->fps_info.fps_str, FPS_LENGTH, snprintf(plane->fps_info.fps_str, FPS_LENGTH,
"%-8s %4dx%-4d %.4s @ %3d.%-3.3d fps (%s)", "%-8s %4dx%-4d %.4s @ %3d.%-3.3d fps (%s)",
plane->drm_plane.name, plane->drm_plane.name,
plane->drm_plane.fb->width, state->fb->width,
plane->drm_plane.fb->height, state->fb->height,
(char *)&plane->drm_plane.fb->format->format, (char *)&state->fb->format->format,
fpks / 1000, fpks % 1000, fpks / 1000, fpks % 1000,
sti_plane_to_str(plane)); sti_plane_to_str(plane));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment