[PATCH] drm/nouveau: force alignment to 0x1000 for gpu objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There are a lot of places that allocate multiples of 1000,
but do not set alignment correctly and still require this
alignment implicitly or explicitly.
---
 drivers/gpu/drm/nouveau/core/core/gpuobj.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/nouveau/core/core/gpuobj.c b/drivers/gpu/drm/nouveau/core/core/gpuobj.c
index 7595506..7bcae1d 100644
--- a/drivers/gpu/drm/nouveau/core/core/gpuobj.c
+++ b/drivers/gpu/drm/nouveau/core/core/gpuobj.c
@@ -65,6 +65,14 @@ nouveau_gpuobj_create_(struct nouveau_object *parent,
 	int ret, i;
 	u64 addr;
 
+	/*
+	 * There are a lot of places that allocate multiples of 1000,
+	 * but do not set alignment correctly and still require this
+	 * alignment implicitly or explicitly.
+	 */
+	if (size >= 0x1000 && align < 0x1000)
+		align = 0x1000;
+
 	*pobject = NULL;
 
 	if (pargpu) {
-- 
1.8.3.4

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux