Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: "Siluvery, Arun" <arun.siluvery@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/gen9: fix error path in intel_init_workaround_bb
Date: Tue, 23 Jun 2015 18:18:21 +0300	[thread overview]
Message-ID: <1435072701.30781.61.camel@intel.com> (raw)
In-Reply-To: <5589778A.4030502@linux.intel.com>

On ti, 2015-06-23 at 16:13 +0100, Siluvery, Arun wrote:
> On 23/06/2015 15:36, Imre Deak wrote:
> > On ti, 2015-06-23 at 15:31 +0100, Chris Wilson wrote:
> >> On Tue, Jun 23, 2015 at 05:26:13PM +0300, Imre Deak wrote:
> >>> On the GEN!=8 error path we call kmap_atomic() which returns in atomic
> >>> context and then lrc_destroy_wa_ctx_obj() which can be called only in
> >>> process context. Fix this by preserving the correct cleanup order on
> >>> this error path.
> >>>
> >>> Also convert the WARN to DRM_ERROR the stack trace isn't really useful.
> >>>
> >>> Signed-off-by: Imre Deak <imre.deak@intel.com>
> >>> ---
> >>>   drivers/gpu/drm/i915/intel_lrc.c | 10 +++++++---
> >>>   1 file changed, 7 insertions(+), 3 deletions(-)
> >>>
> >>> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> >>> index 1b50dd7..8bff1a2 100644
> >>> --- a/drivers/gpu/drm/i915/intel_lrc.c
> >>> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> >>> @@ -1289,10 +1289,14 @@ static int intel_init_workaround_bb(struct intel_engine_cs *ring)
> >>>   		if (ret)
> >>>   			goto out;
> >>>   	} else {
> >>> -		WARN(INTEL_INFO(ring->dev)->gen >= 8,
> >>> -		     "WA batch buffer is not initialized for Gen%d\n",
> >>> -		     INTEL_INFO(ring->dev)->gen);
> >>> +		if (INTEL_INFO(ring->dev)->gen >= 8)
> >>> +			DRM_ERROR("WA batch buffer is not initialized for Gen%d\n",
> >>> +				  INTEL_INFO(ring->dev)->gen);
> >>> +
> >>
> >> Do this test upfront, then we don't have multiple error paths.
> >> http://paste.debian.net/255769
> >
> > I didn't bother moving it, I suppose GEN9 support will be added soon
> > anyway and we get a bit more test coverage on GEN9 meanwhile. But if you
> > insist I can move it.
> 
> Hi Imre,
> 
> I sent the following patch with the changes suggested by Chris.
> https://patchwork.kernel.org/patch/6661891/
> Since you sent it first, my patch can be ignored if your patch is updated.

I'm fine applying your patch, but I would ask to convert the WARN to
DRM_ERROR. The stack trace doesn't add much to the error message and the
WARN is needlessly verbose now on BXT,SKL..

--Imre

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-06-23 15:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-23 14:26 [PATCH] drm/i915/gen9: fix error path in intel_init_workaround_bb Imre Deak
2015-06-23 14:31 ` Chris Wilson
2015-06-23 14:36   ` Imre Deak
2015-06-23 15:13     ` Siluvery, Arun
2015-06-23 15:18       ` Imre Deak [this message]
2015-06-23 15:44         ` Chris Wilson
2015-06-23 15:58           ` Imre Deak
2015-06-23 16:01             ` Chris Wilson
2015-06-23 16:21               ` Siluvery, Arun
2015-06-23 21:13                 ` Daniel Vetter

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=1435072701.30781.61.camel@intel.com \
    --to=imre.deak@intel.com \
    --cc=arun.siluvery@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.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