From: Lee Jones <lee@kernel.org>
To: Manikandan Muralidharan <manikandan.m@microchip.com>
Cc: simona@ffwll.ch, alexandre.belloni@bootlin.com,
linux-kernel@vger.kernel.org, bbrezillon@kernel.org,
sam@ravnborg.org, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, claudiu.beznea@tuxon.dev,
dri-devel@lists.freedesktop.org, tzimmermann@suse.de,
airlied@gmail.com, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] drm: atmel-hlcdc: bypass LCDC pixel clock divider when using LCDC Generic Clock
Date: Thu, 10 Oct 2024 17:25:47 +0100 [thread overview]
Message-ID: <20241010162547.GK661995@google.com> (raw)
In-Reply-To: <20241010093132.235177-1-manikandan.m@microchip.com>
On Thu, 10 Oct 2024, Manikandan Muralidharan wrote:
> In sam9x7 SoC where XLCDC IP is used,add support to bypass the LCDC pixel
> clock divider when LCDC Generic clock is enabled.Used to match
> and drive the panel requested Pixel clock.
>
> Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
> ---
> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 8 +++++++-
> include/linux/mfd/atmel-hlcdc.h | 1 +
Acked-by: Lee Jones <lee@kernel.org>
> 2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> index 0f7ffb3ced20..c54770cecaa8 100644
> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> @@ -146,13 +146,19 @@ static void atmel_hlcdc_crtc_mode_set_nofb(struct drm_crtc *c)
>
> if (div_low >= 2 &&
> (10 * (prate / div_low - mode_rate) <
> - (mode_rate - prate / div)))
> + (mode_rate - prate / div))) {
> /*
> * At least 10 times better when using a higher
> * frequency than requested, instead of a lower.
> * So, go with that.
> */
> div = div_low;
> + } else {
> + if (crtc->dc->desc->is_xlcdc) {
> + cfg |= ATMEL_XLCDC_CLKBYP;
> + mask |= ATMEL_XLCDC_CLKBYP;
> + }
> + }
> }
>
> cfg |= ATMEL_HLCDC_CLKDIV(div);
> diff --git a/include/linux/mfd/atmel-hlcdc.h b/include/linux/mfd/atmel-hlcdc.h
> index 80d675a03b39..982f494e6307 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 [李琼斯]
prev parent reply other threads:[~2024-10-10 17:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-10 9:31 [PATCH] drm: atmel-hlcdc: bypass LCDC pixel clock divider when using LCDC Generic Clock Manikandan Muralidharan
2024-10-10 16:25 ` Lee Jones [this message]
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=20241010162547.GK661995@google.com \
--to=lee@kernel.org \
--cc=airlied@gmail.com \
--cc=alexandre.belloni@bootlin.com \
--cc=bbrezillon@kernel.org \
--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=sam@ravnborg.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;
as well as URLs for NNTP newsgroup(s).