From: Lee Jones <lee@kernel.org>
To: Manikandan Muralidharan <manikandan.m@microchip.com>
Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org,
tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch,
nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com,
claudiu.beznea@tuxon.dev, dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/8] drm: atmel-hlcdc: add XLCDC clock bypass support for small dividers
Date: Wed, 27 May 2026 15:55:12 +0100 [thread overview]
Message-ID: <20260527145512.GD671544@google.com> (raw)
In-Reply-To: <20260519090135.1188405-7-manikandan.m@microchip.com>
On Tue, 19 May 2026, Manikandan Muralidharan wrote:
> Define ATMEL_XLCDC_CLKBYP and set the clock bypass bit on XLCDC
> hardware when the computed divider is less than 2, avoiding an
> invalid divider value. Non-XLCDC hardware retains the existing
> minimum divider clamp of 2.
>
> Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
> ---
> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 7 +++++++
> include/linux/mfd/atmel-hlcdc.h | 1 +
Acked-by: Lee Jones <lee@kernel.org>
> 2 files changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> index 6da428361c19..f837684654ea 100644
> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> @@ -87,6 +87,13 @@ static int atmel_hlcdc_crtc_setup_clock(struct atmel_hlcdc_crtc *crtc,
>
> div = DIV_ROUND_CLOSEST(prate, mode_rate);
> if (div < 2) {
> + /* XLCDC: bypass divider when div < 2 */
> + if (crtc->dc->desc->is_xlcdc) {
> + *cfg |= ATMEL_XLCDC_CLKBYP;
> + *mask |= ATMEL_XLCDC_CLKBYP;
> + return 0;
> + }
> + /* Enforce minimum divider for non-XLCDC */
> div = 2;
> } else if (ATMEL_HLCDC_CLKDIV(div) & ~ATMEL_HLCDC_CLKDIV_MASK) {
> /* The divider ended up too big, try a lower base rate. */
> diff --git a/include/linux/mfd/atmel-hlcdc.h b/include/linux/mfd/atmel-hlcdc.h
> index 8e86219293b7..1463c7db0e64 100644
> --- a/include/linux/mfd/atmel-hlcdc.h
> +++ b/include/linux/mfd/atmel-hlcdc.h
> @@ -44,6 +44,7 @@
> #define ATMEL_XLCDC_HEO_UPDATE BIT(3)
>
> #define ATMEL_HLCDC_CLKPOL BIT(0)
> +#define ATMEL_XLCDC_CLKBYP BIT(1)
> #define ATMEL_HLCDC_CLKSEL BIT(2)
> #define ATMEL_HLCDC_CLKPWMSEL BIT(3)
> #define ATMEL_HLCDC_CGDIS(i) BIT(8 + (i))
> --
> 2.25.1
>
--
Lee Jones
next prev parent reply other threads:[~2026-05-27 14:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 9:01 [PATCH 0/8] drm: atmel-hlcdc: fix clock handling and add LVDS support Manikandan Muralidharan
2026-05-19 9:01 ` [PATCH 1/8] drm: atmel-hlcdc: Fix off-by-one in vertical back porch setting Manikandan Muralidharan
2026-05-19 9:01 ` [PATCH 2/8] drm: atmel-hlcdc: reorder timing register writes after clock setup Manikandan Muralidharan
2026-05-19 9:01 ` [PATCH 3/8] drm: atmel-hlcdc: simplify clock divider selection with DIV_ROUND_CLOSEST Manikandan Muralidharan
2026-05-19 9:01 ` [PATCH 4/8] drm: atmel-hlcdc: define ATMEL_HLCDC_CLKDIV_MAX and fix divider fallback Manikandan Muralidharan
2026-05-19 9:01 ` [PATCH 5/8] drm: atmel-hlcdc: extract clock setup into a dedicated helper Manikandan Muralidharan
2026-05-19 9:01 ` [PATCH 6/8] drm: atmel-hlcdc: add XLCDC clock bypass support for small dividers Manikandan Muralidharan
2026-05-27 14:55 ` Lee Jones [this message]
2026-05-19 9:01 ` [PATCH 7/8] drm: atmel-hlcdc: add and configure LVDS PLL clock support Manikandan Muralidharan
2026-05-19 9:01 ` [PATCH 8/8] drm: atmel-hlcdc: add LVDS output mode support Manikandan Muralidharan
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=20260527145512.GD671544@google.com \
--to=lee@kernel.org \
--cc=airlied@gmail.com \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=manikandan.m@microchip.com \
--cc=mripard@kernel.org \
--cc=nicolas.ferre@microchip.com \
--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