diff mbox

[11/23] drm/sti: Stop consulting plane->fb

Message ID 20180322152313.6561-12-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjälä March 22, 2018, 3:23 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

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>
---
 drivers/gpu/drm/sti/sti_plane.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Benjamin Gaignard March 22, 2018, 4:25 p.m. UTC | #1
2018-03-22 16:23 GMT+01:00 Ville Syrjala <ville.syrjala@linux.intel.com>:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> 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>

Ack-ed by: Benjamin Gaignard <benjamin.gaignard@linaro.org>

> ---
>  drivers/gpu/drm/sti/sti_plane.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/sti/sti_plane.c b/drivers/gpu/drm/sti/sti_plane.c
> index b074609c960a..b48cd86e0250 100644
> --- a/drivers/gpu/drm/sti/sti_plane.c
> +++ b/drivers/gpu/drm/sti/sti_plane.c
> @@ -40,6 +40,7 @@ void sti_plane_update_fps(struct sti_plane *plane,
>                           bool new_frame,
>                           bool new_field)
>  {
> +       struct drm_plane_state *state = plane->drm_plane.state;
>         ktime_t now;
>         struct sti_fps_info *fps;
>         int fpks, fipks, ms_since_last, num_frames, num_fields;
> @@ -66,14 +67,14 @@ void sti_plane_update_fps(struct sti_plane *plane,
>         fps->last_timestamp = now;
>         fps->last_frame_counter = fps->curr_frame_counter;
>
> -       if (plane->drm_plane.fb) {
> +       if (state->fb) {
>                 fpks = (num_frames * 1000000) / ms_since_last;
>                 snprintf(plane->fps_info.fps_str, FPS_LENGTH,
>                          "%-8s %4dx%-4d %.4s @ %3d.%-3.3d fps (%s)",
>                          plane->drm_plane.name,
> -                        plane->drm_plane.fb->width,
> -                        plane->drm_plane.fb->height,
> -                        (char *)&plane->drm_plane.fb->format->format,
> +                        state->fb->width,
> +                        state->fb->height,
> +                        (char *)&state->fb->format->format,
>                          fpks / 1000, fpks % 1000,
>                          sti_plane_to_str(plane));
>         }
> --
> 2.16.1
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/sti/sti_plane.c b/drivers/gpu/drm/sti/sti_plane.c
index b074609c960a..b48cd86e0250 100644
--- a/drivers/gpu/drm/sti/sti_plane.c
+++ b/drivers/gpu/drm/sti/sti_plane.c
@@ -40,6 +40,7 @@  void sti_plane_update_fps(struct sti_plane *plane,
 			  bool new_frame,
 			  bool new_field)
 {
+	struct drm_plane_state *state = plane->drm_plane.state;
 	ktime_t now;
 	struct sti_fps_info *fps;
 	int fpks, fipks, ms_since_last, num_frames, num_fields;
@@ -66,14 +67,14 @@  void sti_plane_update_fps(struct sti_plane *plane,
 	fps->last_timestamp = now;
 	fps->last_frame_counter = fps->curr_frame_counter;
 
-	if (plane->drm_plane.fb) {
+	if (state->fb) {
 		fpks = (num_frames * 1000000) / ms_since_last;
 		snprintf(plane->fps_info.fps_str, FPS_LENGTH,
 			 "%-8s %4dx%-4d %.4s @ %3d.%-3.3d fps (%s)",
 			 plane->drm_plane.name,
-			 plane->drm_plane.fb->width,
-			 plane->drm_plane.fb->height,
-			 (char *)&plane->drm_plane.fb->format->format,
+			 state->fb->width,
+			 state->fb->height,
+			 (char *)&state->fb->format->format,
 			 fpks / 1000, fpks % 1000,
 			 sti_plane_to_str(plane));
 	}