From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Ruhl, Michael J" <michael.j.ruhl@intel.com>
Cc: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>,
"david.e.box@linux.intel.com" <david.e.box@linux.intel.com>,
"ilpo.jarvinen@linux.intel.com" <ilpo.jarvinen@linux.intel.com>,
"Brost, Matthew" <matthew.brost@intel.com>,
"hdegoede@redhat.com" <hdegoede@redhat.com>,
"Vivi, Rodrigo" <rodrigo.vivi@intel.com>
Subject: Re: [PATCH v11] drm/xe/vsec: Support BMG devices
Date: Wed, 14 Aug 2024 16:56:20 +0300 [thread overview]
Message-ID: <Zry3hOBb_fHbvlIN@smile.fi.intel.com> (raw)
In-Reply-To: <IA1PR11MB6418FAAD8AC5104D6F8FDE33C1862@IA1PR11MB6418.namprd11.prod.outlook.com>
On Tue, Aug 13, 2024 at 02:29:27PM +0000, Ruhl, Michael J wrote:
> > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Sent: Tuesday, August 13, 2024 10:11 AM
> > On Mon, Aug 12, 2024 at 04:04:22PM -0400, Michael J. Ruhl wrote:
...
> > > +#define SOC_BASE 0x280000
> > > +
> > > +#define BMG_PMT_BASE 0xDB000
> > > +#define BMG_DISCOVERY_OFFSET (SOC_BASE + BMG_PMT_BASE)
> >
> > > +#define BMG_TELEMETRY_BASE 0xE0000
> > > +#define BMG_TELEMETRY_OFFSET (SOC_BASE + BMG_TELEMETRY_BASE)
> >
> > This looks like double indirection.
> > Wouldn't suffix _BASE_OFFSET be better for PMT and TELEMETRY cases?
>
> I am not sure I understand.
>
> Are you saying rename BMG_PMT_BASE to BMG_PMT_BASE_OFFSET?
Yes. Same for BMG_TELEMETRY_.
...
> > > +#define BMG_DEVICE_ID 0xE2F8
> >
> > Is this defined in any specification? I mean is the format the same as PCI device
> > ID?
>
> I think that this is defined in BMG PMT yaml definition. It is provide in
> the PMT discovery data, so it is defined by the specific device.
Is there any documentation / specification about this?
Can it be UUID or 64-bit number or other format?
_Where_ is this being specified?
...
> > > + switch (record_id) {
> > > + case PUNIT:
> > > + *index = 0;
> > > + if (cap_type == TELEMETRY)
> > > + *offset = PUNIT_TELEMETRY_OFFSET;
> > > + else
> > > + *offset = PUNIT_WATCHER_OFFSET;
> > > + break;
> > > +
> > > + case OOBMSM_0:
> > > + *index = 1;
> > > + if (cap_type == WATCHER)
> > > + *offset = OOBMSM_0_WATCHER_OFFSET;
> > > + break;
> > > +
> > > + case OOBMSM_1:
> > > + *index = 1;
> > > + if (cap_type == TELEMETRY)
> > > + *offset = OOBMSM_1_TELEMETRY_OFFSET;
> > > + break;
> >
> > default case?
>
> I validate the record_id and cap_type values at the beginning of the function,
> so default would be redundant.
>
> The goal was to validate, then set data.
>
> So adding the default will remove the record_id check from the if. Do you prefer
> that path?
Yes.
> > > + }
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-08-14 13:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-12 20:04 [PATCH v11] drm/xe/vsec: Support BMG devices Michael J. Ruhl
2024-08-12 20:11 ` ✗ CI.Patch_applied: failure for drm/xe/vsec: Support BMG devices (rev3) Patchwork
2024-08-13 14:11 ` [PATCH v11] drm/xe/vsec: Support BMG devices Andy Shevchenko
2024-08-13 14:29 ` Ruhl, Michael J
2024-08-14 13:56 ` Andy Shevchenko [this message]
2024-08-14 16:49 ` Ruhl, Michael J
2024-08-14 18:41 ` Andy Shevchenko
2024-08-14 20:47 ` Ruhl, Michael J
2024-08-15 10:55 ` Andy Shevchenko
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=Zry3hOBb_fHbvlIN@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=david.e.box@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=michael.j.ruhl@intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--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