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 E4A1E21423C for ; Thu, 11 Dec 2025 22:06:06 +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=1765490768; cv=none; b=KKkzMdzGVCJEJUQqjwroC+d98p8mP1KRakdn55bfdyFDwYodQEhVne/13ShMOUHK/6TdVLE/GVEZnki0beXJVhQa2CsanZVwV6UJSr+pKySrXQTBLL/Rq8dagY1iIo5bSE+bk7/DWQ1kodvhhj79sOa22x+xy1bLT/zYlbBhfMw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765490768; c=relaxed/simple; bh=UIJi8A5enw0jKPdBAcq9mdV3DtYs80Ia+m9Sa3y5QpM=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=nYWUjGDKio30URa0EU5jroVvdiNplTRRKhiwG5kAYZmxpaX7wQVu7quqaY+SoAgpfccQQ6muj9qN6TeoiBcTakFwn9KCEWhxNKfEo5qbg5TVI5qsNrL5xh1u4OyReaY/Huy4Y36wz2B+n4tTxGkyXkd4jmrrrcIhPqaLo4avcvU= 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=eZm1w7Og; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=gCq6kIzD; 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="eZm1w7Og"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="gCq6kIzD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765490765; 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=UIJi8A5enw0jKPdBAcq9mdV3DtYs80Ia+m9Sa3y5QpM=; b=eZm1w7OgJJB2VWbRAgv5bV3xbYNKtFtJQlwVlE19nvOGKihcs8oNufqLPP9LU8CebUWUL7 4AqlGsUeRdzqjjWnPzA2Ggmws/k0gbSuBhmKsuesS8YlNP0HirlPXJSTPx3ayGBe2j+CyL uHAWrkACI68FISUAN3UQfBE9yNrue9E= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-270-MqzV3kE2MZqaQ_9SBjYajg-1; Thu, 11 Dec 2025 17:06:04 -0500 X-MC-Unique: MqzV3kE2MZqaQ_9SBjYajg-1 X-Mimecast-MFC-AGG-ID: MqzV3kE2MZqaQ_9SBjYajg_1765490764 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-8b19a112b75so120412185a.1 for ; Thu, 11 Dec 2025 14:06:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1765490764; x=1766095564; 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=UIJi8A5enw0jKPdBAcq9mdV3DtYs80Ia+m9Sa3y5QpM=; b=gCq6kIzD9+mNXp4iDpt1gy6X3WVmx5snxpCrFTYBFXiLOoGl+J8GA/UkLhQFjkzgSI 2d6xKASOWLO+IhsvwjNPC8KdFoEKPDHQFljXp74X6bLH+mbSVSF//zPNdohfW0YSxCql wNlT3bFjhQgGTSccSjAaaJ1CiqS3bWSRTTqdPaM6FLm+kSuSJ8DEGFblVHM0PD13uFUK pWPuW/iiHbir0KKhLEV2zvYhmDWx9niYT/iYWhdk6R72noCgwNd1LhmVk1Gbi79o5sMS It9YOhiDa0A8OWi8JAYswzD0bXsxjrqyDy9QWC62OAP3O+12416pMT7bWQohLn56QDT3 sm5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765490764; x=1766095564; 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=UIJi8A5enw0jKPdBAcq9mdV3DtYs80Ia+m9Sa3y5QpM=; b=vVJiQEefmROM5F2MaEid024UKHRaQw+oeld3zu9qzOm2W4PqadEc16kbrpIq3GNGc5 imayOWxuv89LdNoin9PWHnnFa7ZlC+Jl3m0eujmxo/Ujw1xuO7W10oqd4N5CI2H9mf0n wtFkHERzLp79w/lh+oZDWqdfpBIPizxOF1U5+SrLNIhPQUtxXN8SmqNFKoB8XTy/Rdp3 Hjn31ToU8nQEQZcdAYMqjIfVd4ymCLIZkUnKCE0+NTRpOHPzeJQ8+UM0TR7FRjlsFTA1 WHzMyHPnTGLhpJ12vrdXpP/yUdv/L045G3z++HUSR0lg5UQNiqZTx32wOaMU4ACtxlxt KTHQ== X-Forwarded-Encrypted: i=1; AJvYcCXltEUVd7Seod2QhZOpKSlXO3ksBgZ+lmeOcWzrF+y7ZbDQR1yXnVgV32CVu+rOSytWBPe3ghY5g+FsRL8=@vger.kernel.org X-Gm-Message-State: AOJu0YxFtvlHpvZilF978o+vSpISQEmeOmFNNzrtXwnQ4zncRj7BjCOI VBxPT+YTJGGqJ+tDoc7nWAM9HiUFxzwpOycPWCnm/DpqmgeUESaCBD+A8IHypzzRiNF1DvJZCtU zDloY2i3VqNXDcU6Br/6VDbRCjAodRM00ffaiVEZTF9XzloyeI+9x+/SXOwhzAsFuUw== X-Gm-Gg: AY/fxX72Yo8A5FJWZGGxYGONEcUuRtPASVHxUdbMJMU0UmqdR4JPngVRm+i9sSB4qGT qcvEa5Op3w4N65oMAPBS6d2PyhhIQP7SErwrYGGpnLAQZkgVDz7Lt0UWVsI7tYIGxpR9BzKq6xQ haWaTFgh1GGTXsqf33dSM7RFwfKfFNrFon0a7zecz4TX46A8dOMkwrIz0yunYAPA5CSYYyUwKxD MbuIcWc9RkrJK818LJjqaLg+S9CS0TBOgSfWT6bkyFjeLMN/guGAPCDs3eoFlF9zMNJ9639upe6 u7n2xzr5Zrtzx+TQzrjE2lsdZBTJhA2t/R07f7I7Z+rzUXdW1dQ/TvdXgrKLmlakx3xf4jpQ9R0 ydr8rvg15W61lierelu6vR8Gi/Pj/VwDxznWoZtOLSoWoNo1jN/GoB+g= X-Received: by 2002:a05:620a:7007:b0:8b2:6538:6b4a with SMTP id af79cd13be357-8bb39faf64emr8428685a.20.1765490764122; Thu, 11 Dec 2025 14:06:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IEeQGmo8QAzGHrPNh9dtBmXlMiOjCoOPGpEBjjdzbY/e4K13DUPj/88xc0QeIDjiQmjO9IPMQ== X-Received: by 2002:a05:620a:7007:b0:8b2:6538:6b4a with SMTP id af79cd13be357-8bb39faf64emr8422985a.20.1765490763675; Thu, 11 Dec 2025 14:06:03 -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 af79cd13be357-8bab5665e0dsm318609085a.18.2025.12.11.14.06.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Dec 2025 14:06:03 -0800 (PST) Message-ID: <2a416f38699994a6e709ab7e4990ff17023d4c16.camel@redhat.com> Subject: Re: [PATCH 4/9] gpu: nova-core: gsp: remove unneeded sequencer trait 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:02 -0500 In-Reply-To: <20251208-nova-misc-v1-4-a3ce01376169@nvidia.com> References: <20251208-nova-misc-v1-0-a3ce01376169@nvidia.com> <20251208-nova-misc-v1-4-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: > The `GspSeqCmdRunner` trait is never used as we never call the `run` > methods from generic code. Remove it. >=20 > Signed-off-by: Alexandre Courbot > --- > =C2=A0drivers/gpu/nova-core/gsp/sequencer.rs | 17 ++++++----------- > =C2=A01 file changed, 6 insertions(+), 11 deletions(-) >=20 > diff --git a/drivers/gpu/nova-core/gsp/sequencer.rs > b/drivers/gpu/nova-core/gsp/sequencer.rs > index 2d0369c49092..4efa048b9d93 100644 > --- a/drivers/gpu/nova-core/gsp/sequencer.rs > +++ b/drivers/gpu/nova-core/gsp/sequencer.rs > @@ -147,12 +147,7 @@ pub(crate) struct GspSequencer<'a> { > =C2=A0=C2=A0=C2=A0=C2=A0 dev: ARef, > =C2=A0} > =C2=A0 > -/// Trait for running sequencer commands. > -pub(crate) trait GspSeqCmdRunner { > -=C2=A0=C2=A0=C2=A0 fn run(&self, sequencer: &GspSequencer<'_>) -> Result= ; > -} > - > -impl GspSeqCmdRunner for fw::RegWritePayload { > +impl fw::RegWritePayload { > =C2=A0=C2=A0=C2=A0=C2=A0 fn run(&self, sequencer: &GspSequencer<'_>) -> R= esult { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 let addr =3D usize::from= _safe_cast(self.addr()); > =C2=A0 > @@ -160,7 +155,7 @@ fn run(&self, sequencer: &GspSequencer<'_>) -> > Result { > =C2=A0=C2=A0=C2=A0=C2=A0 } > =C2=A0} > =C2=A0 > -impl GspSeqCmdRunner for fw::RegModifyPayload { > +impl fw::RegModifyPayload { > =C2=A0=C2=A0=C2=A0=C2=A0 fn run(&self, sequencer: &GspSequencer<'_>) -> R= esult { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 let addr =3D usize::from= _safe_cast(self.addr()); > =C2=A0 > @@ -172,7 +167,7 @@ fn run(&self, sequencer: &GspSequencer<'_>) -> > Result { > =C2=A0=C2=A0=C2=A0=C2=A0 } > =C2=A0} > =C2=A0 > -impl GspSeqCmdRunner for fw::RegPollPayload { > +impl fw::RegPollPayload { > =C2=A0=C2=A0=C2=A0=C2=A0 fn run(&self, sequencer: &GspSequencer<'_>) -> R= esult { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 let addr =3D usize::from= _safe_cast(self.addr()); > =C2=A0 > @@ -197,14 +192,14 @@ fn run(&self, sequencer: &GspSequencer<'_>) -> > Result { > =C2=A0=C2=A0=C2=A0=C2=A0 } > =C2=A0} > =C2=A0 > -impl GspSeqCmdRunner for fw::DelayUsPayload { > +impl fw::DelayUsPayload { > =C2=A0=C2=A0=C2=A0=C2=A0 fn run(&self, _sequencer: &GspSequencer<'_>) -> = Result { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fsleep(Delta::from_micro= s(i64::from(self.val()))); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Ok(()) > =C2=A0=C2=A0=C2=A0=C2=A0 } > =C2=A0} > =C2=A0 > -impl GspSeqCmdRunner for fw::RegStorePayload { > +impl fw::RegStorePayload { > =C2=A0=C2=A0=C2=A0=C2=A0 fn run(&self, sequencer: &GspSequencer<'_>) -> R= esult { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 let addr =3D usize::from= _safe_cast(self.addr()); > =C2=A0 > @@ -212,7 +207,7 @@ fn run(&self, sequencer: &GspSequencer<'_>) -> > Result { > =C2=A0=C2=A0=C2=A0=C2=A0 } > =C2=A0} > =C2=A0 > -impl GspSeqCmdRunner for GspSeqCmd { > +impl GspSeqCmd { > =C2=A0=C2=A0=C2=A0=C2=A0 fn run(&self, seq: &GspSequencer<'_>) -> Result = { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 match self { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = GspSeqCmd::RegWrite(cmd) =3D> cmd.run(seq),