diff options
-rw-r--r-- | drivers/gpu/drm/nouveau/nv04_fbcon.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_fbcon.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_instmem.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nv04_fbcon.c b/drivers/gpu/drm/nouveau/nv04_fbcon.c index fd01caabd5c3..3da90c2c4e63 100644 --- a/drivers/gpu/drm/nouveau/nv04_fbcon.c +++ b/drivers/gpu/drm/nouveau/nv04_fbcon.c | |||
@@ -118,7 +118,7 @@ nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image) | |||
118 | return; | 118 | return; |
119 | } | 119 | } |
120 | 120 | ||
121 | width = (image->width + 31) & ~31; | 121 | width = ALIGN(image->width, 32); |
122 | dsize = (width * image->height) >> 5; | 122 | dsize = (width * image->height) >> 5; |
123 | 123 | ||
124 | if (info->fix.visual == FB_VISUAL_TRUECOLOR || | 124 | if (info->fix.visual == FB_VISUAL_TRUECOLOR || |
diff --git a/drivers/gpu/drm/nouveau/nv50_fbcon.c b/drivers/gpu/drm/nouveau/nv50_fbcon.c index 0f57cdf7ccb2..993c7126fbde 100644 --- a/drivers/gpu/drm/nouveau/nv50_fbcon.c +++ b/drivers/gpu/drm/nouveau/nv50_fbcon.c | |||
@@ -109,7 +109,7 @@ nv50_fbcon_imageblit(struct fb_info *info, const struct fb_image *image) | |||
109 | return; | 109 | return; |
110 | } | 110 | } |
111 | 111 | ||
112 | width = (image->width + 31) & ~31; | 112 | width = ALIGN(image->width, 32); |
113 | dwords = (width * image->height) >> 5; | 113 | dwords = (width * image->height) >> 5; |
114 | 114 | ||
115 | BEGIN_RING(chan, NvSub2D, 0x0814, 2); | 115 | BEGIN_RING(chan, NvSub2D, 0x0814, 2); |
diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c b/drivers/gpu/drm/nouveau/nv50_instmem.c index f0dc4e36ef05..de1f5b0062c5 100644 --- a/drivers/gpu/drm/nouveau/nv50_instmem.c +++ b/drivers/gpu/drm/nouveau/nv50_instmem.c | |||
@@ -390,7 +390,7 @@ nv50_instmem_populate(struct drm_device *dev, struct nouveau_gpuobj *gpuobj, | |||
390 | if (gpuobj->im_backing) | 390 | if (gpuobj->im_backing) |
391 | return -EINVAL; | 391 | return -EINVAL; |
392 | 392 | ||
393 | *sz = (*sz + (NV50_INSTMEM_PAGE_SIZE-1)) & ~(NV50_INSTMEM_PAGE_SIZE-1); | 393 | *sz = ALIGN(*sz, NV50_INSTMEM_PAGE_SIZE); |
394 | if (*sz == 0) | 394 | if (*sz == 0) |
395 | return -EINVAL; | 395 | return -EINVAL; |
396 | 396 | ||