From: Paulo Zanoni <paulo.r.zanoni@intel.com>
To: Mahesh Kumar <mahesh1.kumar@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v4 4/8] drm/i915/gen9: WM memory bandwidth related workaround
Date: Wed, 16 Nov 2016 10:36:01 -0200 [thread overview]
Message-ID: <1479299761.2382.5.camel@intel.com> (raw)
In-Reply-To: <d6c63681-66fc-b8c8-30e2-9d12cc3daa83@intel.com>
Em Qui, 2016-11-10 às 11:24 +0530, Mahesh Kumar escreveu:
> Hi,
>
>
>
(removed a bunch of stuff here)
> >
> > >
> >
> >
> > >
> > > + bool y_tile_enabled = false;
> > > +
> > if (!platforms_that_require_the_wa) {
> > wa = WATERMARK_WA_NONE;
> > return;
> > }
> this function is not called by any GEN other than GEN9, will it be ok
> to
> add "if (!GEN9)" check?
Well, there's Gemnilake support floating around the mailing list now...
> >
> > >
> > > + if (!memdev_info->valid)
> > > + goto exit;
> > Our default behavior should be to apply the WA then in doubt, not
> > to avoid it, so the return value here and in the other error cases
> > should be WATERAMARK_WA_Y_TILED.
> >
> > Also, you can avoid the gotos by just setting mem_wa at the
> > beginning
> > of the function, then you can just "return" later instead of goto.
> >
> >
> > >
> > > +
> > > + system_bw = memdev_info->mem_speed_khz * memdev_info-
> > > >
> > > > num_channels *
> > > + memdev_info-
> > > >channel_width_bytes;
> > > +
> > > + if (!system_bw)
> > > + goto exit;
> > This shouldn't be possible. Otherwise, the previous patch needs to
> > be
> > fixed in a way to not allow system_bw to end up as zero. Please
> > either
> > remove the check or change to "if (WARN_ON(!system_bw))".
> yes, ideally this should not be possible, but what if because of any
> reason BIOS is not writing the register OR we don't have BIOS
> altogether?
Then the previous patch should be able to deal with it, and leave us
with memdev_info->valid=false.
>
> If we add WARN_ON here, it'll flood the logs, we can add
> WARN_ON_ONCE,
> but we are anyway printing the warning in previous patch, if
> frequency
> or any other variable calculated is ZERO, IMO will add more prints
> in
> previous patch instead of adding here.
Usually we add WARNs when we expect them to never ever be triggered. So
instead of making it WARN_ON_ONCE, we should make sure the condition is
never met: if the memory info is bad, set memdev_info->valid to false.
Thanks,
Paulo
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-11-16 12:36 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-13 10:58 [PATCH v4 0/8] New DDB Algo and WM fixes Kumar, Mahesh
2016-10-13 10:58 ` [PATCH v4 1/8] drm/i915/skl+: use linetime latency instead of ddb size Kumar, Mahesh
2016-10-31 18:03 ` Paulo Zanoni
2016-11-09 14:58 ` Mahesh Kumar
2016-11-09 17:02 ` Paulo Zanoni
2016-10-13 10:58 ` [PATCH v4 2/8] drm/i915/skl: New ddb allocation algorithm Kumar, Mahesh
2016-11-04 19:25 ` Paulo Zanoni
2016-10-13 10:58 ` [PATCH v4 3/8] drm/i915: Decode system memory bandwidth Kumar, Mahesh
2016-11-03 19:06 ` Paulo Zanoni
2016-11-16 11:48 ` Mahesh Kumar
2016-10-13 10:58 ` [PATCH v4 4/8] drm/i915/gen9: WM memory bandwidth related workaround Kumar, Mahesh
2016-11-04 17:09 ` Paulo Zanoni
2016-11-04 17:22 ` Ville Syrjälä
2016-11-10 5:54 ` Mahesh Kumar
2016-11-16 12:36 ` Paulo Zanoni [this message]
2016-10-13 10:58 ` [PATCH v4 5/8] drm/i915/skl+: reset y_plane ddb structure also during calculation Kumar, Mahesh
2016-11-04 17:39 ` Paulo Zanoni
2016-10-13 10:58 ` [PATCH v4 6/8] drm/i915/skl: Add variables to check x_tile and y_tile Kumar, Mahesh
2016-11-04 17:45 ` Paulo Zanoni
2016-10-13 10:58 ` [PATCH v4 7/8] drm/i915/skl+: change WM calc to fixed point 16.16 Kumar, Mahesh
2016-11-04 19:03 ` Paulo Zanoni
2016-10-13 10:58 ` [PATCH v4 8/8] drm/i915/bxt: Enable IPC support Kumar, Mahesh
2016-10-13 11:19 ` Maarten Lankhorst
2016-10-13 13:01 ` Mahesh Kumar
2016-10-13 15:36 ` Daniel Vetter
2016-11-04 19:20 ` Paulo Zanoni
2016-10-13 13:50 ` ✗ Fi.CI.BAT: warning for New DDB Algo and WM fixes (rev4) Patchwork
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=1479299761.2382.5.camel@intel.com \
--to=paulo.r.zanoni@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mahesh1.kumar@intel.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.