All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@kernel.org>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH 2/7] drm/xe/guc: Handle RCU_MODE as masked from definition
Date: Fri, 5 May 2023 14:17:51 -0400	[thread overview]
Message-ID: <ZFVIT/u0d8rqxgSx@rdvivi-mobl4> (raw)
In-Reply-To: <fies3nkjy3spmq7w26n7kut4endjgm3wq3uku3lghl25ykqev4@s5ub2t3de6hn>

On Fri, May 05, 2023 at 10:08:48AM -0700, Lucas De Marchi wrote:
> On Fri, May 05, 2023 at 12:55:28PM -0400, Rodrigo Vivi wrote:
> > On Fri, Apr 28, 2023 at 11:23:27PM -0700, Lucas De Marchi wrote:
> > > guc_mmio_regset_write() had a flags for the registers to be added to the
> > > GuC's regset list. The only register actually using that was RCU_MODE,
> > > but it was setting the flags to a bogus value. From
> > > struct xe_guc_fwif.h,
> > > 
> > > 	#define GUC_REGSET_MASKED               BIT(0)
> > > 	#define GUC_REGSET_MASKED_WITH_VALUE    BIT(2)
> > > 	#define GUC_REGSET_RESTORE_ONLY         BIT(3)
> > > 
> > > Cross checking with i915, the only flag to set in RCU_MODE is
> > > GUC_REGSET_MASKED. That can be done automatically from the register, as
> > > long as the definition is correct.
> > > 
> > > Add the XE_REG_OPTION_MASKED annotation to RCU_MODE and kill the "flags"
> > > field in guc_mmio_regset_write(): guc_mmio_regset_write_one() can decide
> > > that based on the register being passed.
> > > 
> > > Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> > 
> > I'm still trying to get familiarized with XE_REG_OPTION_MASKED
> > but this patch looks right to me:
> 
> basically the definition if the register is masked or not comes from
> bspec: if the spec says the upper 16bits are the mask, we add the define
> in the header saying so.
> 
> XE_REG(1) -> creates a normal register with no flags/options
> XE_REG(1, XE_REG_OPTION_MASKED) -> creates a masked register
> XE_REG_MCR(1) -> creates an MCR register: here it applies both a
> flag/option (for places that deal with that in runtime, e.g. RTP
> tables), and a different type, for the rest of the driver.

it makes sense! thanks for the explanation!

> 
> it will be much easier to eventually convert to an auto-generated
> header so these options come directly from the spec, which is my
> master plan here :)

\o/
ack!

> 
> > 
> > 
> > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> 
> thanks
> Lucas De Marchi

  reply	other threads:[~2023-05-05 18:17 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-29  6:23 [Intel-xe] [PATCH 0/7] Convert xe_mmio to struct xe_reg Lucas De Marchi
2023-04-29  6:23 ` [Intel-xe] [PATCH 1/7] fixup! drm/xe: Drop gen afixes from registers Lucas De Marchi
2023-05-05 16:55   ` Rodrigo Vivi
2023-04-29  6:23 ` [Intel-xe] [PATCH 2/7] drm/xe/guc: Handle RCU_MODE as masked from definition Lucas De Marchi
2023-05-05 16:55   ` Rodrigo Vivi
2023-05-05 17:08     ` Lucas De Marchi
2023-05-05 18:17       ` Rodrigo Vivi [this message]
2023-04-29  6:23 ` [Intel-xe] [PATCH 3/7] drm/xe: Use media base for GMD_ID access Lucas De Marchi
2023-04-30 17:47   ` Michal Wajdeczko
2023-05-01 15:07     ` Lucas De Marchi
2023-05-05 17:05       ` Rodrigo Vivi
2023-05-05 20:19         ` Lucas De Marchi
2023-04-29  6:23 ` [Intel-xe] [PATCH 4/7] drm/xe/mmio: Use struct xe_reg Lucas De Marchi
2023-05-05 16:57   ` Rodrigo Vivi
2023-05-05 19:26     ` Lucas De Marchi
2023-04-29  6:23 ` [Intel-xe] [PATCH 5/7] fixup! drm/xe/display: Implement display support Lucas De Marchi
2023-05-05 16:59   ` Rodrigo Vivi
2023-05-05 19:29     ` Lucas De Marchi
2023-05-05 19:47       ` Rodrigo Vivi
2023-04-29  6:23 ` [Intel-xe] [PATCH 6/7] drm/xe: Rename reg field to addr Lucas De Marchi
2023-05-05 17:00   ` Rodrigo Vivi
2023-04-29  6:23 ` [Intel-xe] [PATCH 7/7] drm/xe: Fix indent in xe_hw_engine_print_state() Lucas De Marchi
2023-05-05 17:01   ` Rodrigo Vivi
2023-04-29  6:27 ` [Intel-xe] ✓ CI.Patch_applied: success for Convert xe_mmio to struct xe_reg Patchwork
2023-04-29  6:28 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-04-29  6:32 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-04-29  6:58 ` [Intel-xe] ○ CI.BAT: info " 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=ZFVIT/u0d8rqxgSx@rdvivi-mobl4 \
    --to=rodrigo.vivi@kernel.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@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.