diff options
author | Vincent Abriou <vincent.abriou@st.com> | 2016-11-15 15:33:34 +0100 |
---|---|---|
committer | Vincent Abriou <vincent.abriou@st.com> | 2017-01-06 15:12:03 +0100 |
commit | a69e466b0666d611e7bacd4f2c17e10d0b8b9c47 (patch) | |
tree | 68fc7c1b3ac6b0f5f3ed45106bf2db77bc799284 /drivers/gpu/drm/sti/sti_plane.c | |
parent | 97120776f7cd54c4d75f47d770f238674f8c8192 (diff) | |
download | linux-a69e466b0666d611e7bacd4f2c17e10d0b8b9c47.tar.gz linux-a69e466b0666d611e7bacd4f2c17e10d0b8b9c47.tar.bz2 linux-a69e466b0666d611e7bacd4f2c17e10d0b8b9c47.zip |
drm/sti: update fps debugfs entries
This update allows to have a clearer fps log trace by adding information
about plane size and plane pixel format.
Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
Diffstat (limited to 'drivers/gpu/drm/sti/sti_plane.c')
-rw-r--r-- | drivers/gpu/drm/sti/sti_plane.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/gpu/drm/sti/sti_plane.c b/drivers/gpu/drm/sti/sti_plane.c index ca4b3719a64a..699094c559b4 100644 --- a/drivers/gpu/drm/sti/sti_plane.c +++ b/drivers/gpu/drm/sti/sti_plane.c @@ -65,9 +65,18 @@ void sti_plane_update_fps(struct sti_plane *plane, fps->last_timestamp = now; fps->last_frame_counter = fps->curr_frame_counter; - fpks = (num_frames * 1000000) / ms_since_last; - snprintf(plane->fps_info.fps_str, FPS_LENGTH, "%-6s @ %d.%.3d fps", - sti_plane_to_str(plane), fpks / 1000, fpks % 1000); + + if (plane->drm_plane.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->pixel_format, + fpks / 1000, fpks % 1000, + sti_plane_to_str(plane)); + } if (fps->curr_field_counter) { /* Compute number of field updates */ @@ -75,7 +84,7 @@ void sti_plane_update_fps(struct sti_plane *plane, fps->last_field_counter = fps->curr_field_counter; fipks = (num_fields * 1000000) / ms_since_last; snprintf(plane->fps_info.fips_str, - FPS_LENGTH, " - %d.%.3d field/sec", + FPS_LENGTH, " - %3d.%-3.3d field/sec", fipks / 1000, fipks % 1000); } else { plane->fps_info.fips_str[0] = '\0'; |