From: Guilherme Ivo Bozi <guilherme.bozi@usp.br>
To: airlied@gmail.com, alexander.deucher@amd.com,
christian.koenig@amd.com, harry.wentland@amd.com,
simona@ffwll.ch, siqueira@igalia.com, sunpeng.li@amd.com
Cc: Guilherme Ivo Bozi <guilherme.bozi@usp.br>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: [PATCH 0/9] drm/amd/display: convert GPIO translation logic to lookup tables
Date: Tue, 12 May 2026 15:59:43 -0300 [thread overview]
Message-ID: <20260512190019.228440-1-guilherme.bozi@usp.br> (raw)
This series converts the GPIO HW translation logic used by
multiple DCN generations from large switch statements to
static lookup tables with shared helper functions.
The new implementation reduces duplicated translation logic
across generations and makes the GPIO mappings easier to
maintain and extend.
The series introduces generic GPIO translation helpers first,
followed by per-generation conversions.
The following generations were converted:
- dcn10
- dcn20
- dcn21
- dcn30
- dcn315
- dcn32
- dcn401
- dcn42
The dce60, dce80, dce110 and dce120 implementations were
left unchanged for now.
dce60 and dce80 contain special switch-case handling paths
that currently do not map cleanly to the new table-based
representation, so they were intentionally excluded from
this refactor.
No functional changes intended.
Guilherme Ivo Bozi (9):
drm/amd/display: add GPIO HW translation helpers
drm/amd/display: convert dcn10 GPIO translation to lookup tables
drm/amd/display: convert dcn20 GPIO translation to lookup tables
drm/amd/display: convert dcn21 GPIO translation to lookup tables
drm/amd/display: convert dcn30 GPIO translation to lookup tables
drm/amd/display: convert dcn315 GPIO translation to lookup tables
drm/amd/display: convert dcn32 GPIO translation to lookup tables
drm/amd/display: convert dcn401 GPIO translation to lookup tables
drm/amd/display: convert dcn42 GPIO translation to lookup tables
.../dc/gpio/dcn10/hw_translate_dcn10.c | 484 +++++++-----------
.../dc/gpio/dcn20/hw_translate_dcn20.c | 432 ++++++----------
.../dc/gpio/dcn21/hw_translate_dcn21.c | 417 ++++++---------
.../dc/gpio/dcn30/hw_translate_dcn30.c | 432 ++++++----------
.../dc/gpio/dcn315/hw_translate_dcn315.c | 418 ++++++---------
.../dc/gpio/dcn32/hw_translate_dcn32.c | 386 +++++---------
.../dc/gpio/dcn401/hw_translate_dcn401.c | 392 +++++---------
.../dc/gpio/dcn42/hw_translate_dcn42.c | 193 +++----
.../drm/amd/display/dc/gpio/hw_translate.c | 86 ++++
.../drm/amd/display/dc/gpio/hw_translate.h | 21 +
.../gpu/drm/amd/display/include/gpio_types.h | 48 ++
11 files changed, 1274 insertions(+), 2035 deletions(-)
--
2.47.3
next reply other threads:[~2026-05-12 19:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 18:59 Guilherme Ivo Bozi [this message]
2026-05-12 18:59 ` [PATCH 1/9] drm/amd/display: add GPIO HW translation helpers Guilherme Ivo Bozi
2026-05-16 3:03 ` Claude review: " Claude Code Review Bot
2026-05-12 18:59 ` [PATCH 2/9] drm/amd/display: convert dcn10 GPIO translation to lookup tables Guilherme Ivo Bozi
2026-05-16 3:03 ` Claude review: " Claude Code Review Bot
2026-05-12 18:59 ` [PATCH 3/9] drm/amd/display: convert dcn20 " Guilherme Ivo Bozi
2026-05-16 3:03 ` Claude review: " Claude Code Review Bot
2026-05-12 18:59 ` [PATCH 4/9] drm/amd/display: convert dcn21 " Guilherme Ivo Bozi
2026-05-16 3:03 ` Claude review: " Claude Code Review Bot
2026-05-12 18:59 ` [PATCH 5/9] drm/amd/display: convert dcn30 " Guilherme Ivo Bozi
2026-05-16 3:03 ` Claude review: " Claude Code Review Bot
2026-05-12 18:59 ` [PATCH 6/9] drm/amd/display: convert dcn315 " Guilherme Ivo Bozi
2026-05-16 3:03 ` Claude review: " Claude Code Review Bot
2026-05-12 18:59 ` [PATCH 7/9] drm/amd/display: convert dcn32 " Guilherme Ivo Bozi
2026-05-16 3:03 ` Claude review: " Claude Code Review Bot
2026-05-12 18:59 ` [PATCH 8/9] drm/amd/display: convert dcn401 " Guilherme Ivo Bozi
2026-05-16 3:03 ` Claude review: " Claude Code Review Bot
2026-05-12 18:59 ` [PATCH 9/9] drm/amd/display: convert dcn42 " Guilherme Ivo Bozi
2026-05-16 3:03 ` Claude review: " Claude Code Review Bot
2026-05-16 3:03 ` Claude review: drm/amd/display: convert GPIO translation logic " Claude Code Review Bot
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=20260512190019.228440-1-guilherme.bozi@usp.br \
--to=guilherme.bozi@usp.br \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=simona@ffwll.ch \
--cc=siqueira@igalia.com \
--cc=sunpeng.li@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox