summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_mm.c
diff options
context:
space:
mode:
authorMichel Thierry <michel.thierry@intel.com>2015-08-16 04:02:28 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-09-08 13:45:47 +0200
commitfafecc01bcce4a21c0644c79de833e659882d33a (patch)
tree36fdc6ec2ff73e01d23724a872201050692109d8 /drivers/gpu/drm/drm_mm.c
parentbcfe0c0954f3336c44993e5ce444e09ad6087637 (diff)
downloadlinux-stable-fafecc01bcce4a21c0644c79de833e659882d33a.tar.gz
linux-stable-fafecc01bcce4a21c0644c79de833e659882d33a.tar.bz2
linux-stable-fafecc01bcce4a21c0644c79de833e659882d33a.zip
drm/mm: Do DRM_MM_CREATE_TOP adj_start calculation after color_adjust
The adj_start calculation for DRM_MM_CREATE_TOP should happen after mm->color_adjust. There was an inconsistency between drm_mm_insert_helper_range and drm_mm_insert_helper, as the later was already updating after color_adjust. Didn't spot it before, as color_adjust is only done in systems without LLC. But I'm not aware of anybody using this test case yet. Signed-off-by: Michel Thierry <michel.thierry@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_mm.c')
-rw-r--r--drivers/gpu/drm/drm_mm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
index 3427b115e2bb..04de6fd88f8c 100644
--- a/drivers/gpu/drm/drm_mm.c
+++ b/drivers/gpu/drm/drm_mm.c
@@ -267,12 +267,12 @@ static void drm_mm_insert_helper_range(struct drm_mm_node *hole_node,
if (adj_end > end)
adj_end = end;
- if (flags & DRM_MM_CREATE_TOP)
- adj_start = adj_end - size;
-
if (mm->color_adjust)
mm->color_adjust(hole_node, color, &adj_start, &adj_end);
+ if (flags & DRM_MM_CREATE_TOP)
+ adj_start = adj_end - size;
+
if (alignment) {
u64 tmp = adj_start;
unsigned rem;