* [PATCH] drm/mm: Adjust start/end for coloring first
@ 2014-05-19 6:52 Chris Wilson
2014-05-19 8:14 ` Daniel Vetter
2014-05-19 10:24 ` Daniel Vetter
0 siblings, 2 replies; 5+ messages in thread
From: Chris Wilson @ 2014-05-19 6:52 UTC (permalink / raw)
To: dri-devel
The current user of the coloring will adjust the end points of the node
to leave a hole between disjoint memory types. This adjustment must be
performed first or else the derived size will conflict with the
adjustment and trigger the BUG_ON sanity checks that the node is within
bounds.
Fixes regression from
commit 62347f9e0f81d50e9b0923ec8a192f60ab7a1801
Author: Lauri Kasanen <cand@gmx.com>
Date: Wed Apr 2 20:03:57 2014 +0300
drm: Add support for two-ended allocation, v3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
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 04a209e2b66d..911863bed9f3 100644
--- a/drivers/gpu/drm/drm_mm.c
+++ b/drivers/gpu/drm/drm_mm.c
@@ -264,12 +264,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) {
unsigned tmp = adj_start % alignment;
if (tmp) {
--
2.0.0.rc2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/mm: Adjust start/end for coloring first
2014-05-19 6:52 [PATCH] drm/mm: Adjust start/end for coloring first Chris Wilson
@ 2014-05-19 8:14 ` Daniel Vetter
2014-05-19 8:21 ` Chris Wilson
2014-05-19 10:24 ` Daniel Vetter
1 sibling, 1 reply; 5+ messages in thread
From: Daniel Vetter @ 2014-05-19 8:14 UTC (permalink / raw)
To: Chris Wilson; +Cc: dri-devel
On Mon, May 19, 2014 at 07:52:37AM +0100, Chris Wilson wrote:
> The current user of the coloring will adjust the end points of the node
> to leave a hole between disjoint memory types. This adjustment must be
> performed first or else the derived size will conflict with the
> adjustment and trigger the BUG_ON sanity checks that the node is within
> bounds.
>
> Fixes regression from
> commit 62347f9e0f81d50e9b0923ec8a192f60ab7a1801
> Author: Lauri Kasanen <cand@gmx.com>
> Date: Wed Apr 2 20:03:57 2014 +0300
>
> drm: Add support for two-ended allocation, v3
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Do we have a bugzilla for this, or why did igt not scream about this
failure?
-Daniel
> ---
> 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 04a209e2b66d..911863bed9f3 100644
> --- a/drivers/gpu/drm/drm_mm.c
> +++ b/drivers/gpu/drm/drm_mm.c
> @@ -264,12 +264,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) {
> unsigned tmp = adj_start % alignment;
> if (tmp) {
> --
> 2.0.0.rc2
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/mm: Adjust start/end for coloring first
2014-05-19 8:14 ` Daniel Vetter
@ 2014-05-19 8:21 ` Chris Wilson
2014-05-19 10:22 ` Daniel Vetter
0 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2014-05-19 8:21 UTC (permalink / raw)
To: Daniel Vetter; +Cc: dri-devel
On Mon, May 19, 2014 at 10:14:27AM +0200, Daniel Vetter wrote:
> On Mon, May 19, 2014 at 07:52:37AM +0100, Chris Wilson wrote:
> > The current user of the coloring will adjust the end points of the node
> > to leave a hole between disjoint memory types. This adjustment must be
> > performed first or else the derived size will conflict with the
> > adjustment and trigger the BUG_ON sanity checks that the node is within
> > bounds.
> >
> > Fixes regression from
> > commit 62347f9e0f81d50e9b0923ec8a192f60ab7a1801
> > Author: Lauri Kasanen <cand@gmx.com>
> > Date: Wed Apr 2 20:03:57 2014 +0300
> >
> > drm: Add support for two-ended allocation, v3
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> Do we have a bugzilla for this, or why did igt not scream about this
> failure?
How would igt scream? Look at the patch and think of how many possible
ways the current kernel would explode. Then think about how they are
exposed to userspace.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/mm: Adjust start/end for coloring first
2014-05-19 8:21 ` Chris Wilson
@ 2014-05-19 10:22 ` Daniel Vetter
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2014-05-19 10:22 UTC (permalink / raw)
To: Chris Wilson, Daniel Vetter, dri-devel
On Mon, May 19, 2014 at 09:21:23AM +0100, Chris Wilson wrote:
> On Mon, May 19, 2014 at 10:14:27AM +0200, Daniel Vetter wrote:
> > On Mon, May 19, 2014 at 07:52:37AM +0100, Chris Wilson wrote:
> > > The current user of the coloring will adjust the end points of the node
> > > to leave a hole between disjoint memory types. This adjustment must be
> > > performed first or else the derived size will conflict with the
> > > adjustment and trigger the BUG_ON sanity checks that the node is within
> > > bounds.
> > >
> > > Fixes regression from
> > > commit 62347f9e0f81d50e9b0923ec8a192f60ab7a1801
> > > Author: Lauri Kasanen <cand@gmx.com>
> > > Date: Wed Apr 2 20:03:57 2014 +0300
> > >
> > > drm: Add support for two-ended allocation, v3
> > >
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> >
> > Do we have a bugzilla for this, or why did igt not scream about this
> > failure?
>
> How would igt scream? Look at the patch and think of how many possible
> ways the current kernel would explode. Then think about how they are
> exposed to userspace.
Yeah, reading the patch helps ;-) So this only collides with the top-down
vs. bottum-up separation patch for cache levels you've posted somewhere.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/mm: Adjust start/end for coloring first
2014-05-19 6:52 [PATCH] drm/mm: Adjust start/end for coloring first Chris Wilson
2014-05-19 8:14 ` Daniel Vetter
@ 2014-05-19 10:24 ` Daniel Vetter
1 sibling, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2014-05-19 10:24 UTC (permalink / raw)
To: Chris Wilson; +Cc: dri-devel
On Mon, May 19, 2014 at 07:52:37AM +0100, Chris Wilson wrote:
> The current user of the coloring will adjust the end points of the node
> to leave a hole between disjoint memory types. This adjustment must be
> performed first or else the derived size will conflict with the
> adjustment and trigger the BUG_ON sanity checks that the node is within
> bounds.
>
> Fixes regression from
> commit 62347f9e0f81d50e9b0923ec8a192f60ab7a1801
> Author: Lauri Kasanen <cand@gmx.com>
> Date: Wed Apr 2 20:03:57 2014 +0300
>
> drm: Add support for two-ended allocation, v3
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> 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 04a209e2b66d..911863bed9f3 100644
> --- a/drivers/gpu/drm/drm_mm.c
> +++ b/drivers/gpu/drm/drm_mm.c
> @@ -264,12 +264,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;
With this we still don't handle interactions with alignment correctly. I
guess while we're at this we might as well fix that, too.
-Daniel
> +
> if (alignment) {
> unsigned tmp = adj_start % alignment;
> if (tmp) {
> --
> 2.0.0.rc2
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-05-19 10:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-19 6:52 [PATCH] drm/mm: Adjust start/end for coloring first Chris Wilson
2014-05-19 8:14 ` Daniel Vetter
2014-05-19 8:21 ` Chris Wilson
2014-05-19 10:22 ` Daniel Vetter
2014-05-19 10:24 ` Daniel Vetter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.