From: Thierry Reding <thierry.reding@kernel.org>
To: Svyatoslav Ryhel <clamor95@gmail.com>
Cc: Neil Armstrong <neil.armstrong@linaro.org>,
Jessica Zhang <jesszhan0024@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jonathan Hunter <jonathanh@nvidia.com>,
Mikko Perttunen <mperttunen@nvidia.com>,
dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH v1 1/6] drm/tegra: dc: Expand available registers layouts
Date: Wed, 30 Sep 2026 10:34:58 +0200 [thread overview]
Message-ID: <arzI6PXbGAgXs9Uh@orome> (raw)
In-Reply-To: <20260930070535.47130-2-clamor95@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3346 bytes --]
On Wed, Sep 30, 2026 at 10:05:30AM +0300, Svyatoslav Ryhel wrote:
> Expand existing DC register definitions with additional fields in
> preparation for adding the 8-bit CPU interface.
>
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
> drivers/gpu/drm/tegra/dc.c | 3 ++-
> drivers/gpu/drm/tegra/dc.h | 54 ++++++++++++++++++++++++++++++++++----
> 2 files changed, 51 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
> index b0bfa946e6979..5c67928bcabfa 100644
> --- a/drivers/gpu/drm/tegra/dc.c
> +++ b/drivers/gpu/drm/tegra/dc.c
> @@ -2384,7 +2384,8 @@ static void tegra_crtc_atomic_enable(struct drm_crtc *crtc,
>
> if (dc->rgb) {
> /* XXX: parameterize? */
> - value = SC0_H_QUALIFIER_NONE | SC1_H_QUALIFIER_NONE;
> + value = SC0_H_QUALIFIER(SC_H_QUALIFIER_NONE) |
> + SC1_H_QUALIFIER(SC_H_QUALIFIER_NONE);
> tegra_dc_writel(dc, value, DC_DISP_SHIFT_CLOCK_OPTIONS);
> }
>
> diff --git a/drivers/gpu/drm/tegra/dc.h b/drivers/gpu/drm/tegra/dc.h
> index 0cb0515968b35..5679e1ca0c2a5 100644
> --- a/drivers/gpu/drm/tegra/dc.h
> +++ b/drivers/gpu/drm/tegra/dc.h
> @@ -274,8 +274,11 @@ int tegra_dc_rgb_exit(struct tegra_dc *dc);
> #define DC_COM_CRC_CHECKSUM 0x301
> #define DC_COM_PIN_OUTPUT_ENABLE(x) (0x302 + (x))
> #define DC_COM_PIN_OUTPUT_POLARITY(x) (0x306 + (x))
> +#define LSC0_OUTPUT_POLARITY_LOW BIT(24)
> #define LVS_OUTPUT_POLARITY_LOW (1 << 28)
> #define LHS_OUTPUT_POLARITY_LOW (1 << 30)
> +#define LSPI_OUTPUT_POLARITY_LOW BIT(8)
> +#define LDC_OUTPUT_SELECT_V_PULSE1 BIT(14)
> #define DC_COM_PIN_OUTPUT_DATA(x) (0x30a + (x))
> #define DC_COM_PIN_INPUT_ENABLE(x) (0x30e + (x))
> #define DC_COM_PIN_INPUT_DATA(x) (0x312 + (x))
> @@ -303,9 +306,15 @@ int tegra_dc_rgb_exit(struct tegra_dc *dc);
> #define UNDERFLOW_REPORT_ENABLE (1 << 0)
>
> #define DC_DISP_DISP_SIGNAL_OPTIONS0 0x400
> -#define H_PULSE0_ENABLE (1 << 8)
> -#define H_PULSE1_ENABLE (1 << 10)
> -#define H_PULSE2_ENABLE (1 << 12)
> +#define H_PULSE0_ENABLE BIT(8)
> +#define H_PULSE1_ENABLE BIT(10)
> +#define H_PULSE2_ENABLE BIT(12)
> +#define V_PULSE0_ENABLE BIT(16)
> +#define V_PULSE1_ENABLE BIT(18)
> +#define V_PULSE2_ENABLE BIT(19)
> +#define V_PULSE3_ENABLE BIT(20)
> +#define M0_ENABLE BIT(24)
> +#define M1_ENABLE BIT(26)
>
> #define DC_DISP_DISP_SIGNAL_OPTIONS1 0x401
>
> @@ -451,11 +460,30 @@ int tegra_dc_rgb_exit(struct tegra_dc *dc);
> #define BASE_COLOR_SIZE_888 ( 8 << 0)
> #define BASE_COLOR_SIZE_101010 ( 10 << 0)
> #define BASE_COLOR_SIZE_121212 ( 12 << 0)
> +#define DISP_COLOR_SWAP_BGR BIT(16)
> #define CMU_ENABLE_ENABLE (1 << 20)
>
> #define DC_DISP_SHIFT_CLOCK_OPTIONS 0x431
> -#define SC1_H_QUALIFIER_NONE (1 << 16)
> -#define SC0_H_QUALIFIER_NONE (1 << 0)
> +#define SC0_H_QUALIFIER(x) (((x) & 0x7) << 0)
> +#define SC1_H_QUALIFIER(x) (((x) & 0x7) << 16)
> +enum {
> + SC_H_QUALIFIER_DISABLE,
> + SC_H_QUALIFIER_NONE,
> + SC_H_QUALIFIER_HACTIVE,
> + SC_H_QUALIFIER_EXT_HACTIVE,
> + SC_H_QUALIFIER_HPULSE,
> + SC_H_QUALIFIER_EXT_HPULSE,
> +};
Let's stick with regular defines for this, there's really no advantage
in using enums for this and the other enums introduced by this patch.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-09-30 8:35 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 7:05 [PATCH v1 0/6] drm/tegra: Add support for Tegra20/Tegra30 8-bit CPU interface Svyatoslav Ryhel
2026-09-30 7:05 ` [PATCH v1 1/6] drm/tegra: dc: Expand available registers layouts Svyatoslav Ryhel
2026-09-30 8:34 ` Thierry Reding [this message]
2026-09-30 8:55 ` Svyatoslav Ryhel
2026-09-30 7:05 ` [PATCH v1 2/6] drm/tegra: rgb: Parameterize configuration based on bus flags Svyatoslav Ryhel
2026-09-30 7:05 ` [PATCH v1 3/6] dt-bindings: display: tegra: Document 8-bit CPU parallel interface Svyatoslav Ryhel
2026-09-30 8:47 ` Thierry Reding
2026-09-30 9:00 ` Svyatoslav Ryhel
2026-09-30 10:34 ` Thierry Reding
2026-09-30 10:42 ` Svyatoslav Ryhel
2026-09-30 10:54 ` Thierry Reding
2026-09-30 11:10 ` Svyatoslav Ryhel
2026-09-30 11:41 ` Thierry Reding
2026-09-30 11:47 ` Svyatoslav Ryhel
2026-09-30 9:19 ` Mikko Perttunen
2026-09-30 9:52 ` Svyatoslav Ryhel
2026-09-30 10:50 ` Thierry Reding
2026-09-30 10:56 ` Svyatoslav Ryhel
2026-09-30 11:46 ` Thierry Reding
2026-09-30 11:56 ` Svyatoslav Ryhel
2026-09-30 12:58 ` Thierry Reding
2026-09-30 13:10 ` Svyatoslav Ryhel
2026-09-30 11:51 ` Rob Herring (Arm)
2026-09-30 7:05 ` [PATCH v1 4/6] drm/tegra: Add support for 8-bit CPU interface Svyatoslav Ryhel
2026-09-30 8:48 ` Thierry Reding
2026-09-30 9:02 ` Svyatoslav Ryhel
2026-09-30 10:39 ` Thierry Reding
2026-09-30 7:05 ` [PATCH v1 5/6] dt-bindings: display: panel: Document Hitachi TX10D07VM0BAA and LG LH400WV3 panels Svyatoslav Ryhel
2026-09-30 7:05 ` [PATCH v1 6/6] drm/panel: Add Hitachi TX10D07VM0BAA and LG LH400WV3-SD04 MIPI DBI panel driver Svyatoslav Ryhel
2026-09-30 9:02 ` Thierry Reding
2026-09-30 9:08 ` Svyatoslav Ryhel
2026-09-30 10:23 ` Thierry Reding
2026-09-30 10:34 ` Svyatoslav Ryhel
2026-09-30 10:43 ` Thierry Reding
2026-09-30 10:48 ` Svyatoslav Ryhel
2026-09-30 10:58 ` Thierry Reding
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=arzI6PXbGAgXs9Uh@orome \
--to=thierry.reding@kernel.org \
--cc=airlied@gmail.com \
--cc=clamor95@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mperttunen@nvidia.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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
all inboxes | Powered by JetHome®