Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3bfc7d22 authored by Matt Turner's avatar Matt Turner Committed by Ben Skeggs
Browse files

drm/nouveau: use ALIGN instead of open coding it



CC: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: default avatarMatt Turner <mattst88@gmail.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent b30083bd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
		return;
	}

	width = (image->width + 31) & ~31;
	width = ALIGN(image->width, 32);
	dsize = (width * image->height) >> 5;

	if (info->fix.visual == FB_VISUAL_TRUECOLOR ||
+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ nv50_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
		return;
	}

	width = (image->width + 31) & ~31;
	width = ALIGN(image->width, 32);
	dwords = (width * image->height) >> 5;

	BEGIN_RING(chan, NvSub2D, 0x0814, 2);
+1 −1
Original line number Diff line number Diff line
@@ -390,7 +390,7 @@ nv50_instmem_populate(struct drm_device *dev, struct nouveau_gpuobj *gpuobj,
	if (gpuobj->im_backing)
		return -EINVAL;

	*sz = (*sz + (NV50_INSTMEM_PAGE_SIZE-1)) & ~(NV50_INSTMEM_PAGE_SIZE-1);
	*sz = ALIGN(*sz, NV50_INSTMEM_PAGE_SIZE);
	if (*sz == 0)
		return -EINVAL;