From: Matthew Brost <matthew.brost@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: "Roper, Matthew D" <matthew.d.roper@intel.com>,
"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [Intel-xe] [PATCH 1/2] drm/xe: Add DRIVER_DATE to coredump error.
Date: Thu, 27 Jul 2023 00:11:45 +0000 [thread overview]
Message-ID: <ZMG2QeWpRabPTXd3@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <gfkhtmyxmaag4s2z7ux4a5lgx5l2ad2f6oohibbpvcidn4xngi@vfyqjexmrjwd>
On Wed, Jul 26, 2023 at 06:58:01PM -0300, Lucas De Marchi wrote:
> On Wed, Jul 26, 2023 at 05:35:08PM -0400, Rodrigo Vivi wrote:
> > On Wed, Jul 26, 2023 at 05:38:13PM -0300, Lucas De Marchi wrote:
> > > On Wed, Jul 26, 2023 at 07:37:43PM +0000, Rodrigo Vivi wrote:
> > > > On Wed, 2023-07-26 at 19:29 +0000, Matthew Brost wrote:
> > > > On Wed, Jul 26, 2023 at 03:25:19PM -0400, Rodrigo Vivi wrote:
> > > > This might be an useful debugging information if the driver
> > > > date is properly updated with a certain cadence. With this
> > > > we know from which point in time in our development the
> > > > driver was from.
> > > >
> > > >
> > > > Make sense to have this, wondering what the cadence should be...
> > > >
> > > > before we are merged we should probably change the date along with our rebases.
> > > >
> > > > after we are in tree probably after the latest pull request towards the next version.
> > >
> > >
> > > does it really make sense though? I think this exists only because of a
> > > pre-git era. What's the problem with using the git short hash that will
> > > automatically be updated and accurate?
> >
> > well, we still have the drm->date to fill so we need to maintain it.
> >
> > maybe we could do like nouveau?!
> >
> > #ifdef GIT_REVISION
> > .date = GIT_REVISION,
> > #else
> > .date = DRIVER_DATE,
> > #endif
>
> Sounds better. I don't see any value on DRIVER_DATE and having to update
> it. Just setting to some dummy value when GIT_REVISION is not available
> would be ok
>
> $ git grep "\.date\s*=" -- drivers/gpu/drm/ | grep 2023
> $ git grep DRIVER_DATE -- drivers/gpu/drm/ | grep 2023
>
> Tells me nobody really maintains that.
>
Well I think we should attempt to maintain this, a date is helpful to
give us a very quick idea of when the driver is from without having to
dig through the git logs.
My opinion is both of these patches are valid but let's add a 3rd patch
which also includes the GIT_REVISION in the core dump and perhaps a 4th
that makes the date plus GIT_REVISION easily available in debugfs entry
or something.
Matt
> Lucas De Marchi
>
> >
> > >
> > > Lucas De Marchi
> > >
> > > >
> > > >
> > > > Anyways:
> > > > Reviewed-by: Matthew Brost <matthew.brost@intel.com<mailto:matthew.brost@intel.com>>
> > > >
> > > > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com<mailto:rodrigo.vivi@intel.com>>
> > > > ---
> > > > drivers/gpu/drm/xe/xe_devcoredump.c | 2 ++
> > > > 1 file changed, 2 insertions(+)
> > > >
> > > > diff --git a/drivers/gpu/drm/xe/xe_devcoredump.c b/drivers/gpu/drm/xe/xe_devcoredump.c
> > > > index f53f4b51233a..79b506dc2622 100644
> > > > --- a/drivers/gpu/drm/xe/xe_devcoredump.c
> > > > +++ b/drivers/gpu/drm/xe/xe_devcoredump.c
> > > > @@ -10,6 +10,7 @@
> > > > #include <generated/utsrelease.h>
> > > >
> > > > #include "xe_device.h"
> > > > +#include "xe_drv.h"
> > > > #include "xe_engine.h"
> > > > #include "xe_force_wake.h"
> > > > #include "xe_gt.h"
> > > > @@ -83,6 +84,7 @@ static ssize_t xe_devcoredump_read(char *buffer, loff_t offset,
> > > > drm_printf(&p, "**** Xe Device Coredump ****\n");
> > > > drm_printf(&p, "kernel: " UTS_RELEASE "\n");
> > > > drm_printf(&p, "module: " KBUILD_MODNAME "\n");
> > > > + drm_printf(&p, "driver date: " DRIVER_DATE "\n");
> > > >
> > > > ts = ktime_to_timespec64(ss->snapshot_time);
> > > > drm_printf(&p, "Snapshot time: %lld.%09ld\n", ts.tv_sec, ts.tv_nsec);
> > > > --
> > > > 2.41.0
> > > >
> > > >
next prev parent reply other threads:[~2023-07-27 0:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 19:25 [Intel-xe] [PATCH 1/2] drm/xe: Add DRIVER_DATE to coredump error Rodrigo Vivi
2023-07-26 19:25 ` [Intel-xe] [PATCH 2/2] drm/xe: Update DRIVER_DATE to 20230726 Rodrigo Vivi
2023-07-26 19:32 ` Matthew Brost
2023-07-26 19:36 ` Vivi, Rodrigo
2023-07-26 19:29 ` [Intel-xe] [PATCH 1/2] drm/xe: Add DRIVER_DATE to coredump error Matthew Brost
2023-07-26 19:37 ` Vivi, Rodrigo
2023-07-26 20:38 ` Lucas De Marchi
2023-07-26 21:35 ` Rodrigo Vivi
2023-07-26 21:58 ` Lucas De Marchi
2023-07-27 0:11 ` Matthew Brost [this message]
2023-07-27 12:04 ` Lucas De Marchi
2023-07-27 14:16 ` Rodrigo Vivi
2023-07-26 20:58 ` [Intel-xe] ✗ CI.Patch_applied: failure for series starting with [1/2] drm/xe: Add DRIVER_DATE to coredump error. (rev2) 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=ZMG2QeWpRabPTXd3@DUT025-TGLU.fm.intel.com \
--to=matthew.brost@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=rodrigo.vivi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox