summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_framebuffer.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2016-10-18 00:41:12 +0200
committerArchit Taneja <architt@codeaurora.org>2016-10-18 11:51:38 +0200
commit333d2da5b7cf8046aee88c0412170be5f6f1ed55 (patch)
treeec5ec3d69990b9d7f0318f5b8c3ab49966093ce5 /drivers/gpu/drm/drm_framebuffer.c
parentdrm: Use drm_format_info() in DRM core code (diff)
downloadlinux-333d2da5b7cf8046aee88c0412170be5f6f1ed55.tar.xz
linux-333d2da5b7cf8046aee88c0412170be5f6f1ed55.zip
drm: WARN when calling drm_format_info() for an unsupported format
The format helpers have historically treated unsupported formats as part of the default case, returning values that are likely wrong. We can't change this behaviour now without risking breaking drivers in difficult to detect ways, but we can WARN on unsupported formats to catch faulty callers. The only exception is the framebuffer_check() function that calls drm_format_info() to validate the format passed from userspace. This is a valid use case that shouldn't generate a warning. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Archit Taneja <architt@codeaurora.org> Link: http://patchwork.freedesktop.org/patch/msgid/1476744081-24485-5-git-send-email-laurent.pinchart@ideasonboard.com
Diffstat (limited to 'drivers/gpu/drm/drm_framebuffer.c')
-rw-r--r--drivers/gpu/drm/drm_framebuffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c
index 386977df72ce..49fd7db758e0 100644
--- a/drivers/gpu/drm/drm_framebuffer.c
+++ b/drivers/gpu/drm/drm_framebuffer.c
@@ -131,7 +131,7 @@ static int framebuffer_check(const struct drm_mode_fb_cmd2 *r)
const struct drm_format_info *info;
int i;
- info = drm_format_info(r->pixel_format & ~DRM_FORMAT_BIG_ENDIAN);
+ info = __drm_format_info(r->pixel_format & ~DRM_FORMAT_BIG_ENDIAN);
if (!info) {
char *format_name = drm_get_format_name(r->pixel_format);
DRM_DEBUG_KMS("bad framebuffer format %s\n", format_name);