From: "Piorkowski, Piotr" <piotr.piorkowski@intel.com>
To: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"Wajdeczko, Michal" <Michal.Wajdeczko@intel.com>
Subject: Re: [PATCH 7/7] drm/i915/guc: Add support for define guc_log_size in megabytes.
Date: Mon, 4 Jun 2018 12:53:17 +0000 [thread overview]
Message-ID: <1528116795.27702.13.camel@intel.com> (raw)
In-Reply-To: <op.zjt565wfxaggs7@mwajdecz-mobl1.ger.corp.intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 3359 bytes --]
On Wed, 2018-05-30 at 18:46 +0200, Michal Wajdeczko wrote:
> On Wed, 30 May 2018 15:53:34 +0200, Piotr Piorkowski
> <piotr.piorkowski@intel.com> wrote:
>
> > At this moment we can define GuC logs sizes only using pages.
> > But GuC also allows use for this values expressed in megabytes.
> > Lets add support for define guc_log_size in megabytes when we
> > debug of GuC.
> >
> > Signed-off-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
> > Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> > Cc: Michał Winiarski <michal.winiarski@intel.com>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> > drivers/gpu/drm/i915/intel_guc.c | 12 ++++++++++--
> > drivers/gpu/drm/i915/intel_guc_log.h | 6 ++++++
> > 2 files changed, 16 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_guc.c
> > b/drivers/gpu/drm/i915/intel_guc.c
> > index e15047fedb45..5a42db47521b 100644
> > --- a/drivers/gpu/drm/i915/intel_guc.c
> > +++ b/drivers/gpu/drm/i915/intel_guc.c
> > @@ -263,7 +263,13 @@ static u32 guc_ctl_log_params_flags(struct
> > intel_guc *guc)
> > u32 offset = intel_guc_ggtt_offset(guc, guc->log.vma) >>
> > PAGE_SHIFT;
> > u32 flags;
> > + #if (((CRASH_BUFFER_SIZE) % (1 << 20)) == 0)
> > + #define UNIT (1 << 20)
> > + #define FLAG GUC_LOG_ALLOC_IN_MEGABYTE
> > + #else
> > #define UNIT (4 << 10)
> > + #define FLAG 0
> > + #endif
> > BUILD_BUG_ON(!CRASH_BUFFER_SIZE);
> > BUILD_BUG_ON(!IS_ALIGNED(CRASH_BUFFER_SIZE, UNIT));
> > @@ -280,13 +286,15 @@ static u32 guc_ctl_log_params_flags(struct
> > intel_guc *guc)
> > (GUC_LOG_ISR_MASK >> GUC_LOG_ISR_SHIFT));
> > flags = GUC_LOG_VALID |
> > - GUC_LOG_NOTIFY_ON_HALF_FULL |
> > - ((CRASH_BUFFER_SIZE/UNIT - 1) <<
> > GUC_LOG_CRASH_SHIFT) |
> > + GUC_LOG_NOTIFY_ON_HALF_FULL;
> > + flags |= FLAG;
>
> I think you can inject FLAG into existing statement without
> introducing two additional |=
>
> > + flags |= ((CRASH_BUFFER_SIZE/UNIT - 1) <<
> > GUC_LOG_CRASH_SHIFT) |
> > ((DPC_BUFFER_SIZE/UNIT - 1) << GUC_LOG_DPC_SHIFT)
> > |
> > ((ISR_BUFFER_SIZE/UNIT - 1) << GUC_LOG_ISR_SHIFT)
> > |
> > (offset << GUC_LOG_BUF_ADDR_SHIFT);
> > #undef UNIT
> > + #undef FLAG
> > return flags;
> > }
> > diff --git a/drivers/gpu/drm/i915/intel_guc_log.h
> > b/drivers/gpu/drm/i915/intel_guc_log.h
> > index 1b3afdae6d0d..de39b965ae7a 100644
> > --- a/drivers/gpu/drm/i915/intel_guc_log.h
> > +++ b/drivers/gpu/drm/i915/intel_guc_log.h
> > @@ -34,9 +34,15 @@
> > struct intel_guc;
> > +#ifdef DRM_I915_DEBUG_GUC
> > +#define CRASH_BUFFER_SIZE 2097152
> > +#define DPC_BUFFER_SIZE 8388608
> > +#define ISR_BUFFER_SIZE 8388608
>
> can we make it more friendly: (8 * 1024 * 1024)
>
> > +#else
> > #define CRASH_BUFFER_SIZE 8192
> > #define DPC_BUFFER_SIZE 32768
> > #define ISR_BUFFER_SIZE 32768
> > +#endif
>
> btw, are these values just max possible or selected
> as most valuable ? question for both debug/ndebug
For debug I use the possibility of defining values in MB and I set the
maximum possible values, and for ndebug I set old values of these
buffers
>
> Michal
>
> > /*
> > * While we're using plain log level in i915, GuC controls are
> > much
> > more...
[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3278 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-06-04 12:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-30 13:53 [PATCH 1/7] drm/i915/guc: Don't store runtime GuC log level in modparam Piotr Piorkowski
2018-05-30 13:53 ` [PATCH 2/7] drm/i915/guc: Refactoring preparation of the GUC_CTL_DEBUG parameter Piotr Piorkowski
2018-05-30 14:58 ` Michal Wajdeczko
2018-05-30 13:53 ` [PATCH 3/7] drm/i915/guc: Refactoring preparation of the GUC_CTL_FEATURE parameter Piotr Piorkowski
2018-05-30 14:59 ` Michal Wajdeczko
2018-05-30 13:53 ` [PATCH 4/7] drm/i915/guc: Refactoring preparation of the GUC_CTL_LOG_PARAMS parameter Piotr Piorkowski
2018-05-30 15:01 ` Michal Wajdeczko
2018-05-30 13:53 ` [PATCH 5/7] drm/i915/guc: Refactoring preparation of the GUC_CTL_CTXINFO parameter Piotr Piorkowski
2018-05-30 15:06 ` Michal Wajdeczko
2018-05-30 13:53 ` [PATCH 6/7] drm/i915/guc: Move defines with size of GuC logs to intel_guc_log.h Piotr Piorkowski
2018-05-30 16:18 ` Michal Wajdeczko
2018-05-30 13:53 ` [PATCH 7/7] drm/i915/guc: Add support for define guc_log_size in megabytes Piotr Piorkowski
2018-05-30 16:46 ` Michal Wajdeczko
2018-06-04 12:53 ` Piorkowski, Piotr [this message]
2018-05-30 14:49 ` [PATCH 1/7] drm/i915/guc: Don't store runtime GuC log level in modparam Michal Wajdeczko
2018-05-30 15:30 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/7] " Patchwork
2018-05-30 15:46 ` ✗ Fi.CI.BAT: failure " 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=1528116795.27702.13.camel@intel.com \
--to=piotr.piorkowski@intel.com \
--cc=Michal.Wajdeczko@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