Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180322152313.6561-12-ville.syrjala@linux.intel.com
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

+5 -4
+5 -4
drivers/gpu/drm/sti/sti_plane.c
··· 40 40 bool new_frame, 41 41 bool new_field) 42 42 { 43 + struct drm_plane_state *state = plane->drm_plane.state; 43 44 ktime_t now; 44 45 struct sti_fps_info *fps; 45 46 int fpks, fipks, ms_since_last, num_frames, num_fields; ··· 67 66 fps->last_timestamp = now; 68 67 fps->last_frame_counter = fps->curr_frame_counter; 69 68 70 - if (plane->drm_plane.fb) { 69 + if (state->fb) { 71 70 fpks = (num_frames * 1000000) / ms_since_last; 72 71 snprintf(plane->fps_info.fps_str, FPS_LENGTH, 73 72 "%-8s %4dx%-4d %.4s @ %3d.%-3.3d fps (%s)", 74 73 plane->drm_plane.name, 75 - plane->drm_plane.fb->width, 76 - plane->drm_plane.fb->height, 77 - (char *)&plane->drm_plane.fb->format->format, 74 + state->fb->width, 75 + state->fb->height, 76 + (char *)&state->fb->format->format, 78 77 fpks / 1000, fpks % 1000, 79 78 sti_plane_to_str(plane)); 80 79 }