[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <66sugjsmvv5wiyvw3t7zlu2n736q4crwgvukzgbg2gjm7pvg2i@vu7c5zy2c44h>
Date: Thu, 28 Aug 2025 09:42:43 +1000
From: Alistair Popple <apopple@...dia.com>
To: John Hubbard <jhubbard@...dia.com>
Cc: dri-devel@...ts.freedesktop.org, dakr@...nel.org, acourbot@...dia.com,
Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>, Benno Lossin <lossin@...nel.org>,
Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>, David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>, Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
Joel Fernandes <joelagnelf@...dia.com>, Timur Tabi <ttabi@...dia.com>, linux-kernel@...r.kernel.org,
nouveau@...ts.freedesktop.org
Subject: Re: [PATCH 05/10] gpu: nova-core: gsp: Add GSP command queue handling
On 2025-08-28 at 06:35 +1000, John Hubbard <jhubbard@...dia.com> wrote...
> On 8/27/25 1:20 AM, Alistair Popple wrote:
> ...
>
> Hi Alistair,
>
> Not a real review yet, but one thing I noticed on a quick first pass:
>
> > + pub(crate) fn send_cmd_to_gsp(cmd: GspQueueCommand<'_>, bar: &Bar0) -> Result {
> > + // Find the start of the message. We could also re-read the HW pointer.
> > + // SAFETY: The command was previously allocated and initialised on the
> > + // queue and is therefore not-NULL and aligned.
> > + let slice_1: &[u8] = unsafe {
> > + core::slice::from_raw_parts(
> > + ptr::from_ref(cmd.msg_header).cast::<u8>(),
> > + size_of::<GspMsgHeader>() + size_of::<GspRpcHeader>() + cmd.slice_1.len(),
> > + )
> > + };
> > +
> > + dev_info!(
> > + &cmd.cmdq.dev,
> > + "GSP RPC: send: seq# {}, function=0x{:x} ({}), length=0x{:x}\n",
> > + cmd.cmdq.seq - 1,
> > + cmd.rpc_header.function,
> > + decode_gsp_function(cmd.rpc_header.function),
> > + cmd.rpc_header.length,
> > + );
>
> Let's please make this (and the corresponding receive) a dev_dbg!().
> Otherwise the driver is too chatty at INFO log levels.
>
> I suspect that I'm to blame here, because I recall pretty-ing up the
> output of these, and I probably set dev_info!() at the same time. doh!
You probably took "inspiration" from my original pr_info though! So all good,
I'm sure there will be a v2 so will clean these up then.
> ...
> > + // Log RPC receive with message type decoding
> > + dev_info!(
> > + self.dev,
> > + "GSP RPC: receive: seq# {}, function=0x{:x} ({}), length=0x{:x}\n",
> > + rpc_header.sequence,
> > + rpc_header.function,
> > + decode_gsp_function(rpc_header.function),
> > + rpc_header.length,
> > + );
>
> Here also: please use dev_dbg!() for this one.
>
>
> thanks,
> --
> John Hubbard
>
Powered by blists - more mailing lists