From 0a45f150669eaa2737d7485c9b68ea4c483f3048 Mon Sep 17 00:00:00 2001 From: Maarten Maathuis Date: Mon, 23 Jun 2008 20:33:32 +0200 Subject: NV50: Improve set_config and fix some minor bugs. --- linux-core/nv50_fb.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'linux-core/nv50_fb.c') diff --git a/linux-core/nv50_fb.c b/linux-core/nv50_fb.c index f57a9fad..153899da 100644 --- a/linux-core/nv50_fb.c +++ b/linux-core/nv50_fb.c @@ -40,8 +40,9 @@ static int nv50_fb_bind(struct nv50_crtc *crtc, struct nv50_fb_info *info) return -EINVAL; } - if (!info->block || !info->width || !info->height || !info->depth || !info->bpp) { - DRM_ERROR("block %p width %d height %d depth %d bpp %d\n", info->block, info->width, info->height, info->depth, info->bpp); + if (!info->block || !info->width || !info->height || !info->depth || !info->bpp || !info->pitch) { + DRM_ERROR("block %p width %d height %d depth %d bpp %d pitch %d\n", info->block, info->width, + info->height, info->depth, info->bpp, info->pitch); return -EINVAL; } @@ -55,6 +56,8 @@ static int nv50_fb_bind(struct nv50_crtc *crtc, struct nv50_fb_info *info) crtc->fb->depth = info->depth; crtc->fb->bpp = info->bpp; + crtc->fb->pitch = info->pitch; + /* update lut if needed */ if (crtc->fb->depth != crtc->lut->depth) { int r_size = 0, g_size = 0, b_size = 0; -- cgit v1.2.3