From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E7E2E288C2B for ; Thu, 11 Dec 2025 22:06:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765490799; cv=none; b=ZprHixz7Jw7DQmaIbPPBNj4i/fJmmyUT+SqBMUf9I1WATe0dOpD7eRQoXef1agJscHcFgZ5bw2Yb/itj+zy0ZYwcfbN79LTTAVEugxEtc44SwEiUqcYjbx7ARQzkrzom3bvsOt1ZnawE4B9150QHYxq076vqNnE+jI/wGmdZ9VE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765490799; c=relaxed/simple; bh=FQD4zZ9at3sElDktWK9m7mDr3xTunsjTrPR6SORxQuY=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=uxQMl6Wht+N9HSViUdhOtTHIaWa2mvtO5qUqkY2UBioZet+Owb9ucktEgBAFPDkSZci4g9NPOv1uCJNMJNXVidzDindoqye9q/7Cu56Xe9ZRFIdar6/ObhwDWeSNhZzYZzF52yD88bRxRx8LbDftkMdPAq8UwcRfna8gXkKPIG4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=ZyOfB0xN; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=gth49jvu; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZyOfB0xN"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="gth49jvu" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765490797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FQD4zZ9at3sElDktWK9m7mDr3xTunsjTrPR6SORxQuY=; b=ZyOfB0xN7vmGdE5CiP9NN0kgMZKDyrovMsKyY44RkNEE518itnuBDID6QYbzlh+rMRi2at QK56sqqu71F6v9KqK2XHKPUYtryCa3OLi9kP843PcH3pms+/bdmBBPn6S1aFvZA/lgqRUw zXAgWlD4NTcllvrWfDS3manHRpkRWZ0= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-304-wW9AlrKkOyySMjHqPFl4Eg-1; Thu, 11 Dec 2025 17:06:35 -0500 X-MC-Unique: wW9AlrKkOyySMjHqPFl4Eg-1 X-Mimecast-MFC-AGG-ID: wW9AlrKkOyySMjHqPFl4Eg_1765490795 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-4ee04f4c632so9869861cf.3 for ; Thu, 11 Dec 2025 14:06:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1765490795; x=1766095595; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=FQD4zZ9at3sElDktWK9m7mDr3xTunsjTrPR6SORxQuY=; b=gth49jvukIWPgSTFM2jHCIgq/wsFMwoqvLfROYdTHhK5RzooeEB4q+Dagtr9VsY9iT a5QGSIynNowxKE+tsk1l05RI6CiPyg/jxPm7GTGVwXT6K2UbvAXeITTtS9hrQ6w3LJ4G Q+C0aPl8o2VRZf0Oy6A0wAVXzk1rPHk4qED0dHEUUN83ADnTSHP8Ab48YQWub0YGXbhZ NIVTulh0oiv4j0Pi7OXBVvgR9Lee5zq64CAvbBWsW0fxQo9xMprHB3G5502MC4oxYumq Dx+odC2YCA/A2OI7EcdL2hDTxq+LXS7PlF4LUCSEPIT3GZWe/yixVTJwANQLF4ky6b/G v5UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765490795; x=1766095595; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FQD4zZ9at3sElDktWK9m7mDr3xTunsjTrPR6SORxQuY=; b=PaLblr21JniSLQZFt/hd6+LNkwcWaHMI0a/H2IgSrHBxDIQ3VyuDof00YwzCWZttdG KPM4IlEpbilY0jO90125M7nMzfU/c6zLm+qaCksSzAZMVzNNV1+ac+UxvPPpCbKEbesF QTSJQTfLg6L+S1pHW2h7qbxgBbRiqqM/IV/Axh2Uwn1bYWzff/MnB2xgVVyKy+himGXu 7RPW/PKo5lrGjbVBNkar5wyEXk9SIEwJkFbLaJKGiZsyB+UFmsPaZCOPPl+nzs9MPoN2 1vLJxO/OLADFhCM2JRtYXxJ7YdJzsuCoaqeWnuxKHGfDJCNXWWbOsoimIcG4p15EXx6m q/1A== X-Forwarded-Encrypted: i=1; AJvYcCW5jEVSERUu2vwqynbnEELZo/e7yWZAykVSv9q4yV02eAVwWY1ifR9fdZyX7MBlKNpbnUDDdXfJDO+/tvM=@vger.kernel.org X-Gm-Message-State: AOJu0YxA/VEJ/E00Dgy3tWG+dudmxwlubaAG8eBCVTuCF+7r6spPUPvS UcWnpBZ0BXcMahU/VJxk6dkwHiRzazhwM6y7plSwwbFevkZek+zsDcylBkmFZ+ii1HuwmoEArcV TU2gglfwAlhzRxHFkrgUe55oU+bF5wghgBgfTMtqUYc42rUieB1xs5DulSKkoeWT1dUVF+2c5xg == X-Gm-Gg: AY/fxX7CnnfGlUigS1eTiO86mxqfns1A2AmsNAgkxPaHbNz4v9+muwE9+3c0v1rpHTm vE/Ce31mU81ebdwoHaz/l66MeTJ0pf3w8HTsf5RkZKymNWLpoD7v9iTswe9GmZDQJUW+V7wY8cm jw4Sf+sybKm/1ZKo6dPq++13nbUaRnqOCSsIV6hN6Lx5QBHJmjdLSOT4iMbXtXyUU2fRpTT+omn 3xSSiXeVDgoK4wk8xNGizLupFSvauHzVJcNxZ+NYkCAOpNaCgmoeia1Fb1q3FS8+5FZv1+wsePg hDDnKZCGrigvqgwSECQpFia4sb6DhHf7KeEr3245laR3pF8BL5JaGMlmpH9KbJ6AZLXPWph8SEj KkyLMzaRSdqfH3gwt+mDeYACDnj+PTBzgnpiEu1pSyxqI37p3mFnmoes= X-Received: by 2002:a05:622a:4208:b0:4ed:6e79:acf7 with SMTP id d75a77b69052e-4f1b1a7e143mr102089831cf.41.1765490795199; Thu, 11 Dec 2025 14:06:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IFaqeBiuM6CsFwruI5tizpjX8j7kpXn5KxhwmEige7pYuP2pDesrOgqZ9YYEKxErZ2GWsjRPA== X-Received: by 2002:a05:622a:4208:b0:4ed:6e79:acf7 with SMTP id d75a77b69052e-4f1b1a7e143mr102089381cf.41.1765490794825; Thu, 11 Dec 2025 14:06:34 -0800 (PST) Received: from [192.168.8.198] (pool-100-0-77-142.bstnma.fios.verizon.net. [100.0.77.142]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4f1bd5c5e17sm27572841cf.14.2025.12.11.14.06.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Dec 2025 14:06:34 -0800 (PST) Message-ID: <2a80f215aafcc39fad8eaab5a84ca499d8c40500.camel@redhat.com> Subject: Re: [PATCH 5/9] gpu: nova-core: gsp: derive `Debug` on more sequencer types From: lyude@redhat.com To: Alexandre Courbot , Danilo Krummrich , Alice Ryhl , David Airlie , Simona Vetter Cc: John Hubbard , Alistair Popple , Joel Fernandes , Timur Tabi , Edwin Peer , nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org Date: Thu, 11 Dec 2025 17:06:33 -0500 In-Reply-To: <20251208-nova-misc-v1-5-a3ce01376169@nvidia.com> References: <20251208-nova-misc-v1-0-a3ce01376169@nvidia.com> <20251208-nova-misc-v1-5-a3ce01376169@nvidia.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.2 (3.58.2-1.fc43) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reviewed-by: Lyude Paul On Mon, 2025-12-08 at 18:26 +0900, Alexandre Courbot wrote: > Being able to print these is useful when debugging the sequencer. >=20 > Signed-off-by: Alexandre Courbot > --- > =C2=A0drivers/gpu/nova-core/gsp/fw.rs=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 | 10 +++++----- > =C2=A0drivers/gpu/nova-core/gsp/sequencer.rs |=C2=A0 1 + > =C2=A02 files changed, 6 insertions(+), 5 deletions(-) >=20 > diff --git a/drivers/gpu/nova-core/gsp/fw.rs b/drivers/gpu/nova- > core/gsp/fw.rs > index d06c0fdd6154..d1fc8f111db1 100644 > --- a/drivers/gpu/nova-core/gsp/fw.rs > +++ b/drivers/gpu/nova-core/gsp/fw.rs > @@ -330,7 +330,7 @@ fn from(value: SeqBufOpcode) -> Self { > =C2=A0 > =C2=A0/// Wrapper for GSP sequencer register write payload. > =C2=A0#[repr(transparent)] > -#[derive(Copy, Clone)] > +#[derive(Copy, Clone, Debug)] > =C2=A0pub(crate) struct > RegWritePayload(bindings::GSP_SEQ_BUF_PAYLOAD_REG_WRITE); > =C2=A0 > =C2=A0impl RegWritePayload { > @@ -353,7 +353,7 @@ unsafe impl AsBytes for RegWritePayload {} > =C2=A0 > =C2=A0/// Wrapper for GSP sequencer register modify payload. > =C2=A0#[repr(transparent)] > -#[derive(Copy, Clone)] > +#[derive(Copy, Clone, Debug)] > =C2=A0pub(crate) struct > RegModifyPayload(bindings::GSP_SEQ_BUF_PAYLOAD_REG_MODIFY); > =C2=A0 > =C2=A0impl RegModifyPayload { > @@ -381,7 +381,7 @@ unsafe impl AsBytes for RegModifyPayload {} > =C2=A0 > =C2=A0/// Wrapper for GSP sequencer register poll payload. > =C2=A0#[repr(transparent)] > -#[derive(Copy, Clone)] > +#[derive(Copy, Clone, Debug)] > =C2=A0pub(crate) struct > RegPollPayload(bindings::GSP_SEQ_BUF_PAYLOAD_REG_POLL); > =C2=A0 > =C2=A0impl RegPollPayload { > @@ -414,7 +414,7 @@ unsafe impl AsBytes for RegPollPayload {} > =C2=A0 > =C2=A0/// Wrapper for GSP sequencer delay payload. > =C2=A0#[repr(transparent)] > -#[derive(Copy, Clone)] > +#[derive(Copy, Clone, Debug)] > =C2=A0pub(crate) struct > DelayUsPayload(bindings::GSP_SEQ_BUF_PAYLOAD_DELAY_US); > =C2=A0 > =C2=A0impl DelayUsPayload { > @@ -432,7 +432,7 @@ unsafe impl AsBytes for DelayUsPayload {} > =C2=A0 > =C2=A0/// Wrapper for GSP sequencer register store payload. > =C2=A0#[repr(transparent)] > -#[derive(Copy, Clone)] > +#[derive(Copy, Clone, Debug)] > =C2=A0pub(crate) struct > RegStorePayload(bindings::GSP_SEQ_BUF_PAYLOAD_REG_STORE); > =C2=A0 > =C2=A0impl RegStorePayload { > diff --git a/drivers/gpu/nova-core/gsp/sequencer.rs > b/drivers/gpu/nova-core/gsp/sequencer.rs > index 4efa048b9d93..5eead7ad4cbd 100644 > --- a/drivers/gpu/nova-core/gsp/sequencer.rs > +++ b/drivers/gpu/nova-core/gsp/sequencer.rs > @@ -70,6 +70,7 @@ fn read( > =C2=A0/// GSP Sequencer Command types with payload data. > =C2=A0/// Commands have an opcode and an opcode-dependent struct. > =C2=A0#[allow(clippy::enum_variant_names)] > +#[derive(Debug)] > =C2=A0pub(crate) enum GspSeqCmd { > =C2=A0=C2=A0=C2=A0=C2=A0 RegWrite(fw::RegWritePayload), > =C2=A0=C2=A0=C2=A0=C2=A0 RegModify(fw::RegModifyPayload),