From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) (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 A28613CCFDF for ; Fri, 13 Mar 2026 18:27:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.112 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773426459; cv=pass; b=gXNd5I1XyD2WeGHzpbdvU1npHpjbIt9/mkKkUOkBLABaM5hD/daZTbso+orBuHqQPlz0uaSrW/9tO4e0wz5VXIUJBkKHpLBhlWs7nTJp1jaxvB1kkZSy0M42hKS1dbY2NHWynE4BhSCnotVchV8Z6pWNUMquSBI/M8saCBlODnM= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773426459; c=relaxed/simple; bh=d5TnXmx5qZFU3TB3HIMWB/anQTtZkeA5lOjbUdS1qYQ=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=kfzNAQxnHFCUP3RH9V1mnByyLi81m1K9XYukT7GNqFiU04gV7OoChxJRKZq3VPNW7CMu5TepATTBTUkq0ecDNljzsawPjmS0nPfSIHIdxakgVBOEfRMSISrQhstVuivlGT72+2VKN1HT7jf2O5D46jkMOalNj23FSweRM2W7CKw= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (1024-bit key) header.d=collabora.com header.i=daniel.almeida@collabora.com header.b=Ojd1SazZ; arc=pass smtp.client-ip=136.143.188.112 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=collabora.com header.i=daniel.almeida@collabora.com header.b="Ojd1SazZ" ARC-Seal: i=1; a=rsa-sha256; t=1773426433; cv=none; d=zohomail.com; s=zohoarc; b=eRnTvKeqbTAzd8i9MKqJxPQHk+pf0xvKZRvdh51hXs9cwepCNVGKtAMgM7j8bsvTOSnKCtHqZpr1UT9Oa522wyro8TLd2S/s39bENzGpjbi6DPQQyPj2TQa2WTNCgQVGtAJ2wyZtShL1RzCzDxeVkHc058YI/pKRwFfDlX1vfUE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773426433; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=CHS3BjQq0VBAi4mRT9TwPnGIyWeOsSa/CugvrbGKyuw=; b=kD8/w0mL4qJfqNejaGZntidZ8SqiCQ3p40S/V9HHqK2Fp9j9GbIE4JAX96XB3JF7uWaNUa3T6XmCjkr28wpkfUv/8yoJxXyC4sZD+j6xR/ujZy+WcdpQ8n9JuhdlFazPFOo6fzEX4exRx+BsDOfSPfz7tVZPzjxraFTXO4hN9Kg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=daniel.almeida@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773426433; s=zohomail; d=collabora.com; i=daniel.almeida@collabora.com; h=Content-Type:Mime-Version:Subject:Subject:From:From:In-Reply-To:Date:Date:Cc:Cc:Content-Transfer-Encoding:Message-Id:Message-Id:References:To:To:Reply-To; bh=CHS3BjQq0VBAi4mRT9TwPnGIyWeOsSa/CugvrbGKyuw=; b=Ojd1SazZXsiQvi/N+d0kzop2wg4sVp9T9rvh61hrWtgLriyYkXfwzWFFg2IVRPCy 0AC081juzaxQxVUIITI4tT7pvQltpyyUyb0BcXjrM0EWM+SdxbaRGa4lK54SYAZyyvu PxkNb+gi0C7iEYsM/T/6hEb79V3ZJqADTco6Qra0= Received: by mx.zohomail.com with SMTPS id 1773426430902383.77139251966423; Fri, 13 Mar 2026 11:27:10 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: [PATCH v2 1/5] drm/tyr: Use register! macro for GPU_CONTROL From: Daniel Almeida In-Reply-To: <20260311-b4-tyr-use-register-macro-v2-v2-1-b936d9eb8f51@collabora.com> Date: Fri, 13 Mar 2026 15:26:52 -0300 Cc: dri-devel@lists.freedesktop.org, rust-for-linux@vger.kernel.org, Danilo Krummrich , Alice Ryhl , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Miguel Ojeda , Gary Guo , =?utf-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Trevor Gross , Steven Price , Boris Brezillon , Dirk Behme , Alexandre Courbot , Boqun Feng Content-Transfer-Encoding: quoted-printable Message-Id: <7C2EA827-5DA1-4FEC-AC6D-93BF374FCFF3@collabora.com> References: <20260311-b4-tyr-use-register-macro-v2-v2-0-b936d9eb8f51@collabora.com> <20260311-b4-tyr-use-register-macro-v2-v2-1-b936d9eb8f51@collabora.com> To: Deborah Brouwer X-Mailer: Apple Mail (2.3826.700.81) X-ZohoMailClient: External Hi Deb, I went through the addresses and ranges again. I couldn=E2=80=99t spot = any errors. To avoid accidentally damaging devices, let=E2=80=99s not include these: > + /// Power state key. Write only. > + pub(crate) PWR_KEY(u32) @ 0x50 { > + /// Set to [`PWR_KEY::KEY_UNLOCK`] to unlock writes to = other power state registers. > + 31:0 key; > + } > + } > + > + impl PWR_KEY { > + /// Key value to unlock writes to other power state = registers. > + /// This value was generated at random. > + pub(crate) const KEY_UNLOCK: u32 =3D 0x2968A819; > + } > + > + register! { > + /// Power manager override settings. > + pub(crate) PWR_OVERRIDE0(u32) @ 0x54 { > + /// Override the PWRUP signal. > + 1:0 pwrup_override; > + /// Override the ISOLATE signal. > + 3:2 isolate_override; > + /// Override the RESET signal. > + 5:4 reset_override; > + /// Override the PWRUP_ACK signal. > + 9:8 pwrup_ack_override; > + /// Override the ISOLATE_ACK signal. > + 11:10 isolate_ack_override; > + /// Override the FUNC_ISOLATE signal. > + 13:12 func_iso_override; > + /// Override the FUNC_ISOLATE_ACK signal. > + 15:14 func_iso_ack_override; > + /// Maximum number of power transitions. > + 21:16 pwrtrans_limit; > + /// Core startup throttling enabled. > + 23:23 throttle_enable; > + /// Maximum number of simultaneous core startups. > + 29:24 throttle_limit; > + } > + } > + > + /// Power override mode constants (`pwr_override_t` in hardware = spec). > + /// > + /// These constants can be used with any field in = [`PWR_OVERRIDE0`] that ends with > + /// the `_override` suffix. > + impl PWR_OVERRIDE0 { > + /// The signal behaves normally. > + pub(crate) const NONE: u32 =3D 0; > + /// The signal is inverted (on when normally off, and off = when normally on). > + pub(crate) const INVERT: u32 =3D 1; > + /// The signal is always kept on. > + pub(crate) const ON: u32 =3D 2; > + /// The signal is always kept off. > + pub(crate) const OFF: u32 =3D 3; > + } > + > + register! { > + /// Power manager override settings for device manufacturer. > + pub(crate) PWR_OVERRIDE1(u32) @ 0x58 { > + 31:0 pwrtrans_vendor; > + } Alex might have more suggestions as he said, but to me at least, this is = acceptable. =E2=80=94 Daniel=