public inbox for linux-arm-msm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Koenig, Christian" <Christian.Koenig-5C7GfCeVMHo@public.gmane.org>
To: Sharat Masetty <smasetty-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	"freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Cc: "linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"jcrouse-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org"
	<jcrouse-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	"dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"Grodzovsky,
	Andrey" <Andrey.Grodzovsky-5C7GfCeVMHo@public.gmane.org>
Subject: Re: [PATCH 2/2] drm/scheduler: Add a start_timeout_notify() backend function
Date: Mon, 5 Nov 2018 12:06:58 +0000	[thread overview]
Message-ID: <3f76bb70-9dd5-760f-a352-5e3c28a056a8@amd.com> (raw)
In-Reply-To: <bbfa8eae-23f5-5484-5abb-bf55dee64e34-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>

[SNIP]

Am 05.11.18 um 08:55 schrieb Sharat Masetty:
> Hi Christian,
>
> Yes something like a suspend timeout would be simpler for the drivers, 
> but I could not find anything which does this for the delayed work or 
> even for the general timers. All I could find was cancel/delete.
>
> In lieu of this, I chose this approach. If you like it this 
> way(proposed patch), then I will address the review comments and 
> re-spin... please let me know.
>
> Sharat

I think I would prefer investigating into the suspend/resume approach 
for a moment.

What we can do rather easily is to use mod_delayed_work() with a larger 
timeout, e.g. like the following:

void drm_sched_suspend_timeout()
{
     mod_delayed_work(&sched->work_tdr, sched->timeout * 10);
}

void drm_sched_resume_timeout()
{
     mod_delayed_work(&sched->work_tdr, sched->timeout);
}

By looking at work_tdr.timer.expires before modifying it 
drm_sched_suspend_timeout() could also return the remaining jiffies to wait.

This way we wouldn't need to restart the timeout completely on every resume.

Regards,
Christian.
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

      parent reply	other threads:[~2018-11-05 12:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-02 10:31 [PATCH 1/2] drm/scheduler: Set sched->thread to NULL on failure Sharat Masetty
     [not found] ` <1541154693-29623-1-git-send-email-smasetty-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-11-02 10:31   ` [PATCH 2/2] drm/scheduler: Add a start_timeout_notify() backend function Sharat Masetty
     [not found]     ` <1541154693-29623-2-git-send-email-smasetty-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-11-02 10:39       ` Koenig, Christian
     [not found]         ` <57ffb214-3635-6445-e0e1-fc5010e05ba7-5C7GfCeVMHo@public.gmane.org>
2018-11-02 13:25           ` Sharat Masetty
     [not found]             ` <f30f0949-1a4e-1b96-982a-661ee3e3c9d3-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-11-02 13:37               ` Koenig, Christian
2018-11-05  7:55                 ` [Freedreno] " Sharat Masetty
     [not found]                   ` <bbfa8eae-23f5-5484-5abb-bf55dee64e34-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-11-05 12:06                     ` Koenig, Christian [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=3f76bb70-9dd5-760f-a352-5e3c28a056a8@amd.com \
    --to=christian.koenig-5c7gfcevmho@public.gmane.org \
    --cc=Andrey.Grodzovsky-5C7GfCeVMHo@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=jcrouse-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=smasetty-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox