* [PATCH] drm/radeon: fix possible lack of synchronization btw ttm and other ring
@ 2012-05-03 17:44 j.glisse
2012-05-03 18:25 ` Alex Deucher
2012-05-04 7:58 ` Christian König
0 siblings, 2 replies; 5+ messages in thread
From: j.glisse @ 2012-05-03 17:44 UTC (permalink / raw)
To: dri-devel; +Cc: Jerome Glisse
From: Jerome Glisse <jglisse@redhat.com>
We need to sync with the GFX ring as ttm might have schedule bo move
on it and new command scheduled for other ring need to wait for bo
data to be in place.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
---
drivers/gpu/drm/radeon/radeon_cs.c | 12 ++++++------
include/drm/radeon_drm.h | 1 -
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index 82f2e7b0..e5f8e17 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
@@ -122,15 +122,15 @@ static int radeon_cs_sync_rings(struct radeon_cs_parser *p)
int i, r;
for (i = 0; i < p->nrelocs; i++) {
+ struct radeon_fence *fence;
+
if (!p->relocs[i].robj || !p->relocs[i].robj->tbo.sync_obj)
continue;
- if (!(p->relocs[i].flags & RADEON_RELOC_DONT_SYNC)) {
- struct radeon_fence *fence = p->relocs[i].robj->tbo.sync_obj;
- if (fence->ring != p->ring && !radeon_fence_signaled(fence)) {
- sync_to_ring[fence->ring] = true;
- need_sync = true;
- }
+ fence = p->relocs[i].robj->tbo.sync_obj;
+ if (fence->ring != p->ring && !radeon_fence_signaled(fence)) {
+ sync_to_ring[fence->ring] = true;
+ need_sync = true;
}
}
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h
index 7c491b4..5805686 100644
--- a/include/drm/radeon_drm.h
+++ b/include/drm/radeon_drm.h
@@ -926,7 +926,6 @@ struct drm_radeon_cs_chunk {
};
/* drm_radeon_cs_reloc.flags */
-#define RADEON_RELOC_DONT_SYNC 0x01
struct drm_radeon_cs_reloc {
uint32_t handle;
--
1.7.7.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/radeon: fix possible lack of synchronization btw ttm and other ring
2012-05-03 17:44 [PATCH] drm/radeon: fix possible lack of synchronization btw ttm and other ring j.glisse
@ 2012-05-03 18:25 ` Alex Deucher
2012-05-04 7:58 ` Christian König
1 sibling, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2012-05-03 18:25 UTC (permalink / raw)
To: j.glisse; +Cc: Jerome Glisse, dri-devel
On Thu, May 3, 2012 at 1:44 PM, <j.glisse@gmail.com> wrote:
> From: Jerome Glisse <jglisse@redhat.com>
>
> We need to sync with the GFX ring as ttm might have schedule bo move
> on it and new command scheduled for other ring need to wait for bo
> data to be in place.
>
> Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/radeon/radeon_cs.c | 12 ++++++------
> include/drm/radeon_drm.h | 1 -
> 2 files changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
> index 82f2e7b0..e5f8e17 100644
> --- a/drivers/gpu/drm/radeon/radeon_cs.c
> +++ b/drivers/gpu/drm/radeon/radeon_cs.c
> @@ -122,15 +122,15 @@ static int radeon_cs_sync_rings(struct radeon_cs_parser *p)
> int i, r;
>
> for (i = 0; i < p->nrelocs; i++) {
> + struct radeon_fence *fence;
> +
> if (!p->relocs[i].robj || !p->relocs[i].robj->tbo.sync_obj)
> continue;
>
> - if (!(p->relocs[i].flags & RADEON_RELOC_DONT_SYNC)) {
> - struct radeon_fence *fence = p->relocs[i].robj->tbo.sync_obj;
> - if (fence->ring != p->ring && !radeon_fence_signaled(fence)) {
> - sync_to_ring[fence->ring] = true;
> - need_sync = true;
> - }
> + fence = p->relocs[i].robj->tbo.sync_obj;
> + if (fence->ring != p->ring && !radeon_fence_signaled(fence)) {
> + sync_to_ring[fence->ring] = true;
> + need_sync = true;
> }
> }
>
> diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h
> index 7c491b4..5805686 100644
> --- a/include/drm/radeon_drm.h
> +++ b/include/drm/radeon_drm.h
> @@ -926,7 +926,6 @@ struct drm_radeon_cs_chunk {
> };
>
> /* drm_radeon_cs_reloc.flags */
> -#define RADEON_RELOC_DONT_SYNC 0x01
>
> struct drm_radeon_cs_reloc {
> uint32_t handle;
> --
> 1.7.7.6
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/radeon: fix possible lack of synchronization btw ttm and other ring
2012-05-03 17:44 [PATCH] drm/radeon: fix possible lack of synchronization btw ttm and other ring j.glisse
2012-05-03 18:25 ` Alex Deucher
@ 2012-05-04 7:58 ` Christian König
2012-05-04 8:42 ` Dave Airlie
1 sibling, 1 reply; 5+ messages in thread
From: Christian König @ 2012-05-04 7:58 UTC (permalink / raw)
To: j.glisse; +Cc: Jerome Glisse, dri-devel
On 03.05.2012 19:44, j.glisse@gmail.com wrote:
> From: Jerome Glisse<jglisse@redhat.com>
>
> We need to sync with the GFX ring as ttm might have schedule bo move
> on it and new command scheduled for other ring need to wait for bo
> data to be in place.
>
> Signed-off-by: Jerome Glisse<jglisse@redhat.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/radeon/radeon_cs.c | 12 ++++++------
> include/drm/radeon_drm.h | 1 -
> 2 files changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
> index 82f2e7b0..e5f8e17 100644
> --- a/drivers/gpu/drm/radeon/radeon_cs.c
> +++ b/drivers/gpu/drm/radeon/radeon_cs.c
> @@ -122,15 +122,15 @@ static int radeon_cs_sync_rings(struct radeon_cs_parser *p)
> int i, r;
>
> for (i = 0; i< p->nrelocs; i++) {
> + struct radeon_fence *fence;
> +
> if (!p->relocs[i].robj || !p->relocs[i].robj->tbo.sync_obj)
> continue;
>
> - if (!(p->relocs[i].flags& RADEON_RELOC_DONT_SYNC)) {
> - struct radeon_fence *fence = p->relocs[i].robj->tbo.sync_obj;
> - if (fence->ring != p->ring&& !radeon_fence_signaled(fence)) {
> - sync_to_ring[fence->ring] = true;
> - need_sync = true;
> - }
> + fence = p->relocs[i].robj->tbo.sync_obj;
> + if (fence->ring != p->ring&& !radeon_fence_signaled(fence)) {
> + sync_to_ring[fence->ring] = true;
> + need_sync = true;
> }
> }
>
> diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h
> index 7c491b4..5805686 100644
> --- a/include/drm/radeon_drm.h
> +++ b/include/drm/radeon_drm.h
> @@ -926,7 +926,6 @@ struct drm_radeon_cs_chunk {
> };
>
> /* drm_radeon_cs_reloc.flags */
> -#define RADEON_RELOC_DONT_SYNC 0x01
>
> struct drm_radeon_cs_reloc {
> uint32_t handle;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/radeon: fix possible lack of synchronization btw ttm and other ring
2012-05-04 7:58 ` Christian König
@ 2012-05-04 8:42 ` Dave Airlie
2012-05-04 8:48 ` Christian König
0 siblings, 1 reply; 5+ messages in thread
From: Dave Airlie @ 2012-05-04 8:42 UTC (permalink / raw)
To: Christian König; +Cc: Jerome Glisse, dri-devel
>>
>> From: Jerome Glisse<jglisse@redhat.com>
>>
>> We need to sync with the GFX ring as ttm might have schedule bo move
>> on it and new command scheduled for other ring need to wait for bo
>> data to be in place.
>>
Is this required for -fixes? if so it doesn't apply clean.
Dave.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/radeon: fix possible lack of synchronization btw ttm and other ring
2012-05-04 8:42 ` Dave Airlie
@ 2012-05-04 8:48 ` Christian König
0 siblings, 0 replies; 5+ messages in thread
From: Christian König @ 2012-05-04 8:48 UTC (permalink / raw)
To: Dave Airlie; +Cc: Jerome Glisse, dri-devel
On 04.05.2012 10:42, Dave Airlie wrote:
>>> From: Jerome Glisse<jglisse@redhat.com>
>>>
>>> We need to sync with the GFX ring as ttm might have schedule bo move
>>> on it and new command scheduled for other ring need to wait for bo
>>> data to be in place.
>>>
> Is this required for -fixes? if so it doesn't apply clean.
Nope, only drm-next, since there isn't any public available client that
makes use of it.
Christian.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-05-04 8:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-03 17:44 [PATCH] drm/radeon: fix possible lack of synchronization btw ttm and other ring j.glisse
2012-05-03 18:25 ` Alex Deucher
2012-05-04 7:58 ` Christian König
2012-05-04 8:42 ` Dave Airlie
2012-05-04 8:48 ` Christian König
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.