aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_fb_cma_helper.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2016-11-18 21:53:02 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2016-12-15 14:55:32 +0200
commitca984a998ad3a3b6bf8bf0d89861a6537551aaf2 (patch)
tree3af012977847af6ce26086babfbc205e74538d4d /drivers/gpu/drm/drm_fb_cma_helper.c
parentdrm: Replace drm_format_plane_cpp() with fb->format->cpp[] (diff)
downloadlinux-dev-ca984a998ad3a3b6bf8bf0d89861a6537551aaf2.tar.xz
linux-dev-ca984a998ad3a3b6bf8bf0d89861a6537551aaf2.zip
drm/fb_cma_helper: Replace drm_format_info() with fb->format
Get the format information via the neat fb->format pointer rather than doing a linear search over all the format info structures. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-27-git-send-email-ville.syrjala@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/drm_fb_cma_helper.c')
-rw-r--r--drivers/gpu/drm/drm_fb_cma_helper.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c
index 570f5c6063f3..0dc3f5bcbf48 100644
--- a/drivers/gpu/drm/drm_fb_cma_helper.c
+++ b/drivers/gpu/drm/drm_fb_cma_helper.c
@@ -304,15 +304,12 @@ EXPORT_SYMBOL_GPL(drm_fb_cma_prepare_fb);
static void drm_fb_cma_describe(struct drm_framebuffer *fb, struct seq_file *m)
{
struct drm_fb_cma *fb_cma = to_fb_cma(fb);
- const struct drm_format_info *info;
int i;
seq_printf(m, "fb: %dx%d@%4.4s\n", fb->width, fb->height,
(char *)&fb->pixel_format);
- info = drm_format_info(fb->pixel_format);
-
- for (i = 0; i < info->num_planes; i++) {
+ for (i = 0; i < fb->fomat->num_planes; i++) {
seq_printf(m, " %d: offset=%d pitch=%d, obj: ",
i, fb->offsets[i], fb->pitches[i]);
drm_gem_cma_describe(fb_cma->obj[i], m);