All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Nayan Deshmukh <nayan26deshmukh@gmail.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/scheduler: fix a corner case in dependency optimization
Date: Fri, 25 May 2018 14:01:46 +0200	[thread overview]
Message-ID: <66b49b31-0804-f432-c55d-9ce2e606509b@amd.com> (raw)
In-Reply-To: <20180525044548.21014-1-nayan26deshmukh@gmail.com>

Am 25.05.2018 um 06:45 schrieb Nayan Deshmukh:
> When checking for a dependency fence for belonging to the same entity
> compare it with scheduled as well finished fence. Earlier we were only
> comparing it with the scheduled fence.
>
> Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com>

Reviewed and pushed this patch into our internal repository.

Now going to take a look at the rest,
Christian.

> ---
>   drivers/gpu/drm/scheduler/gpu_scheduler.c | 9 +++++++--
>   1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c b/drivers/gpu/drm/scheduler/gpu_scheduler.c
> index df1578d6f42e..44d480768dfe 100644
> --- a/drivers/gpu/drm/scheduler/gpu_scheduler.c
> +++ b/drivers/gpu/drm/scheduler/gpu_scheduler.c
> @@ -349,8 +349,13 @@ static bool drm_sched_entity_add_dependency_cb(struct drm_sched_entity *entity)
>   	struct dma_fence * fence = entity->dependency;
>   	struct drm_sched_fence *s_fence;
>   
> -	if (fence->context == entity->fence_context) {
> -		/* We can ignore fences from ourself */
> +	if (fence->context == entity->fence_context ||
> +            fence->context == entity->fence_context + 1) {
> +                /*
> +                 * Fence is a scheduled/finished fence from a job
> +                 * which belongs to the same entity, we can ignore
> +                 * fences from ourself
> +                 */
>   		dma_fence_put(entity->dependency);
>   		return false;
>   	}

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      parent reply	other threads:[~2018-05-25 12:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-25  4:45 [PATCH 1/3] drm/scheduler: fix a corner case in dependency optimization Nayan Deshmukh
2018-05-25  4:45 ` [PATCH 2/3] drm/scheduler: add documentation Nayan Deshmukh
2018-05-25 12:06   ` Christian König
2018-05-25 14:54   ` Alex Deucher
2018-05-28  7:09     ` Nayan Deshmukh
2018-05-28  8:09   ` Daniel Vetter
2018-05-28  8:31     ` Nayan Deshmukh
2018-05-29  5:53       ` [PATCH v2] " Nayan Deshmukh
2018-05-29  6:38         ` Christian König
2018-05-29  8:05       ` [PATCH 2/3] " Daniel Vetter
2018-05-25  4:45 ` [PATCH 3/3] drm/doc: add a chapter for gpu scheduler Nayan Deshmukh
2018-05-25 14:54   ` Alex Deucher
2018-05-25 12:01 ` Christian König [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=66b49b31-0804-f432-c55d-9ce2e606509b@amd.com \
    --to=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=nayan26deshmukh@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.