diff mbox

[RFC,01/21] Bug: missing i915_seqno_passed() call?

Message ID 1412604925-11290-2-git-send-email-John.C.Harrison@Intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

John Harrison Oct. 6, 2014, 2:15 p.m. UTC
From: John Harrison <John.C.Harrison@Intel.com>

---
 drivers/gpu/drm/i915/i915_gem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel Vetter Oct. 6, 2014, 2:45 p.m. UTC | #1
On Mon, Oct 06, 2014 at 03:15:05PM +0100, John.C.Harrison@Intel.com wrote:
> From: John Harrison <John.C.Harrison@Intel.com>
> 
> ---
>  drivers/gpu/drm/i915/i915_gem.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 2a5351d..8c68219 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -2886,7 +2886,7 @@ i915_gem_object_sync(struct drm_i915_gem_object *obj,
>  	seqno = obj->last_read_seqno;
>  	/* Optimization: Avoid semaphore sync when we are sure we already
>  	 * waited for an object with higher seqno */
> -	if (seqno <= from->semaphore.sync_seqno[idx])
> +	if (seqno <= from->semaphore.sync_seqno[idx]) /* <--- broken?! needs to use i915_seqno_passed()??? */

No, becuase hw semaphores don't wrap around so we actual need to check for
<=, not the wrap-around logic seqno_passed has. If you feel like pls
submit a patch to add a comment here.

btw you're threading looks a bit funny, instead of patches all being
in-reply-to the cover letter they're all in-reply-to the previous patch.
Presuming you don't have a funky .gitconfig recent git should do this in
the preferred form by default.
-Daniel

>  		return 0;
>  
>  	ret = i915_gem_check_olr(obj->ring, seqno);
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
John Harrison Oct. 6, 2014, 2:59 p.m. UTC | #2
On 06/10/2014 15:45, Daniel Vetter wrote:
> On Mon, Oct 06, 2014 at 03:15:05PM +0100, John.C.Harrison@Intel.com wrote:
>> From: John Harrison <John.C.Harrison@Intel.com>
>>
>> ---
>>   drivers/gpu/drm/i915/i915_gem.c |    2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
>> index 2a5351d..8c68219 100644
>> --- a/drivers/gpu/drm/i915/i915_gem.c
>> +++ b/drivers/gpu/drm/i915/i915_gem.c
>> @@ -2886,7 +2886,7 @@ i915_gem_object_sync(struct drm_i915_gem_object *obj,
>>   	seqno = obj->last_read_seqno;
>>   	/* Optimization: Avoid semaphore sync when we are sure we already
>>   	 * waited for an object with higher seqno */
>> -	if (seqno <= from->semaphore.sync_seqno[idx])
>> +	if (seqno <= from->semaphore.sync_seqno[idx]) /* <--- broken?! needs to use i915_seqno_passed()??? */
> No, becuase hw semaphores don't wrap around so we actual need to check for
> <=, not the wrap-around logic seqno_passed has. If you feel like pls
> submit a patch to add a comment here.
I would prefer to remove the test completely and replace it with some 
request structure based operation. Unfortunately, I haven't worked out 
what yet.

> btw you're threading looks a bit funny, instead of patches all being
> in-reply-to the cover letter they're all in-reply-to the previous patch.
> Presuming you don't have a funky .gitconfig recent git should do this in
> the preferred form by default.
Phooey. Git-sendmail kept spewing warning messages about chain-reply-to 
having changed and needs to be sent explicitly in the config file to 
keep it quiet. I guess I set it the wrong way.

> -Daniel
>
>>   		return 0;
>>   
>>   	ret = i915_gem_check_olr(obj->ring, seqno);
>> -- 
>> 1.7.9.5
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 2a5351d..8c68219 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2886,7 +2886,7 @@  i915_gem_object_sync(struct drm_i915_gem_object *obj,
 	seqno = obj->last_read_seqno;
 	/* Optimization: Avoid semaphore sync when we are sure we already
 	 * waited for an object with higher seqno */
-	if (seqno <= from->semaphore.sync_seqno[idx])
+	if (seqno <= from->semaphore.sync_seqno[idx]) /* <--- broken?! needs to use i915_seqno_passed()??? */
 		return 0;
 
 	ret = i915_gem_check_olr(obj->ring, seqno);