* [PATCH] drm/mm: Do DRM_MM_CREATE_TOP adj_start calculation after color_adjust
@ 2015-08-16 3:02 Michel Thierry
2015-08-16 7:52 ` Chris Wilson
2015-08-16 20:42 ` shuang.he
0 siblings, 2 replies; 4+ messages in thread
From: Michel Thierry @ 2015-08-16 3:02 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx
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>
---
drivers/gpu/drm/drm_mm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
index 3427b11..04de6fd 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;
--
2.5.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/mm: Do DRM_MM_CREATE_TOP adj_start calculation after color_adjust
2015-08-16 3:02 [PATCH] drm/mm: Do DRM_MM_CREATE_TOP adj_start calculation after color_adjust Michel Thierry
@ 2015-08-16 7:52 ` Chris Wilson
2015-08-25 8:24 ` Daniel Vetter
2015-08-16 20:42 ` shuang.he
1 sibling, 1 reply; 4+ messages in thread
From: Chris Wilson @ 2015-08-16 7:52 UTC (permalink / raw)
To: Michel Thierry; +Cc: intel-gfx, dri-devel
On Sun, Aug 16, 2015 at 04:02:28AM +0100, Michel Thierry wrote:
> 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>
I sent this patch a few years ago, when I was using a top-down
allocator before llc and I have a similar patch in my tree which I kept
meaning to polish up and warn you about before PIN_HIGH.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/mm: Do DRM_MM_CREATE_TOP adj_start calculation after color_adjust
2015-08-16 3:02 [PATCH] drm/mm: Do DRM_MM_CREATE_TOP adj_start calculation after color_adjust Michel Thierry
2015-08-16 7:52 ` Chris Wilson
@ 2015-08-16 20:42 ` shuang.he
1 sibling, 0 replies; 4+ messages in thread
From: shuang.he @ 2015-08-16 20:42 UTC (permalink / raw)
To: shuang.he, julianx.dumez, christophe.sureau, lei.a.liu, intel-gfx,
michel.thierry
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 7208
-------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
ILK -1 302/302 301/302
SNB 315/315 315/315
IVB 336/336 336/336
BYT -1 283/283 282/283
HSW 378/378 378/378
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*ILK igt@kms_flip@rcs-wf_vblank-vs-dpms-interruptible PASS(1) DMESG_WARN(1)
*BYT igt@gem_partial_pwrite_pread@reads-uncached PASS(1) FAIL(1)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/mm: Do DRM_MM_CREATE_TOP adj_start calculation after color_adjust
2015-08-16 7:52 ` Chris Wilson
@ 2015-08-25 8:24 ` Daniel Vetter
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2015-08-25 8:24 UTC (permalink / raw)
To: Chris Wilson, Michel Thierry, dri-devel, intel-gfx
On Sun, Aug 16, 2015 at 08:52:54AM +0100, Chris Wilson wrote:
> On Sun, Aug 16, 2015 at 04:02:28AM +0100, Michel Thierry wrote:
> > 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>
>
> I sent this patch a few years ago, when I was using a top-down
> allocator before llc and I have a similar patch in my tree which I kept
> meaning to polish up and warn you about before PIN_HIGH.
>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Applied to drm-misc, thanks.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-08-25 8:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-16 3:02 [PATCH] drm/mm: Do DRM_MM_CREATE_TOP adj_start calculation after color_adjust Michel Thierry
2015-08-16 7:52 ` Chris Wilson
2015-08-25 8:24 ` Daniel Vetter
2015-08-16 20:42 ` shuang.he
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox