mbox series

[V2,0/4] clk: imx: Improve imx8mm/imx8mn LCDIF clocks

Message ID 20230321023136.57986-1-aford173@gmail.com (mailing list archive)
Headers show
Series clk: imx: Improve imx8mm/imx8mn LCDIF clocks | expand

Message

Adam Ford March 21, 2023, 2:31 a.m. UTC
Both the i.MX8M Mini and Nano have a video_pll which can be used 
to source a clock which feeds the lcdif interface.  This interface
currently fixes video_pll and divides down the clock feeding LCDIF.
However, when connected to an HDMI bridge chip that supports a
variety of video resolutions and refresh rates, the only settings
that properly sync are ones that evenly divide from the video_pll_out
clock.

This series adds the ability for the clk-compolsite-8m to
request a better parent clock rate if the proper clock flag is
enable and sets that flag in the corresponding imx8mm and 
imx8mn video_pll clocks to increase the number of resolutions
and refresh rates timings that the LCDIF can produce.

This also has a side benefit of allowing the video-pll to run
at a lower clock speed which can potentially save some power
depending on the requested resolution and refresh rate.

V2:  Split off the new imx8m_clk_hw_composite_flags definition
     into its own patch and re-order to fix build error.
      
Adam Ford (3):
  clk: imx: composite-8m: Add support to determine_rate
  clk: imx8mm: Let IMX8MM_CLK_LCDIF_PIXEL set parent rate
  clk: imx: Let IMX8MN_CLK_DISP_PIXEL set parent rate

 drivers/clk/imx/clk-composite-8m.c | 7 +++++++
 drivers/clk/imx/clk-imx8mm.c       | 2 +-
 drivers/clk/imx/clk-imx8mn.c       | 2 +-
 drivers/clk/imx/clk.h              | 4 ++++
 4 files changed, 13 insertions(+), 2 deletions(-)

Comments

Fabio Estevam March 23, 2023, 10:31 p.m. UTC | #1
On Mon, Mar 20, 2023 at 11:31 PM Adam Ford <aford173@gmail.com> wrote:
>
> Both the i.MX8M Mini and Nano have a video_pll which can be used
> to source a clock which feeds the lcdif interface.  This interface
> currently fixes video_pll and divides down the clock feeding LCDIF.
> However, when connected to an HDMI bridge chip that supports a
> variety of video resolutions and refresh rates, the only settings
> that properly sync are ones that evenly divide from the video_pll_out
> clock.
>
> This series adds the ability for the clk-compolsite-8m to
> request a better parent clock rate if the proper clock flag is
> enable and sets that flag in the corresponding imx8mm and
> imx8mn video_pll clocks to increase the number of resolutions
> and refresh rates timings that the LCDIF can produce.
>
> This also has a side benefit of allowing the video-pll to run
> at a lower clock speed which can potentially save some power
> depending on the requested resolution and refresh rate.
>
> V2:  Split off the new imx8m_clk_hw_composite_flags definition
>      into its own patch and re-order to fix build error.
>
> Adam Ford (3):
>   clk: imx: composite-8m: Add support to determine_rate
>   clk: imx8mm: Let IMX8MM_CLK_LCDIF_PIXEL set parent rate
>   clk: imx: Let IMX8MN_CLK_DISP_PIXEL set parent rate

For the series:

Reviewed-by: Fabio Estevam <festevam@gmail.com>

Should drivers/clk/imx/clk-imx8mp.c also be adjusted in the same way?
Adam Ford March 23, 2023, 10:44 p.m. UTC | #2
On Thu, Mar 23, 2023 at 5:31 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> On Mon, Mar 20, 2023 at 11:31 PM Adam Ford <aford173@gmail.com> wrote:
> >
> > Both the i.MX8M Mini and Nano have a video_pll which can be used
> > to source a clock which feeds the lcdif interface.  This interface
> > currently fixes video_pll and divides down the clock feeding LCDIF.
> > However, when connected to an HDMI bridge chip that supports a
> > variety of video resolutions and refresh rates, the only settings
> > that properly sync are ones that evenly divide from the video_pll_out
> > clock.
> >
> > This series adds the ability for the clk-compolsite-8m to
> > request a better parent clock rate if the proper clock flag is
> > enable and sets that flag in the corresponding imx8mm and
> > imx8mn video_pll clocks to increase the number of resolutions
> > and refresh rates timings that the LCDIF can produce.
> >
> > This also has a side benefit of allowing the video-pll to run
> > at a lower clock speed which can potentially save some power
> > depending on the requested resolution and refresh rate.
> >
> > V2:  Split off the new imx8m_clk_hw_composite_flags definition
> >      into its own patch and re-order to fix build error.
> >
> > Adam Ford (3):
> >   clk: imx: composite-8m: Add support to determine_rate
> >   clk: imx8mm: Let IMX8MM_CLK_LCDIF_PIXEL set parent rate
> >   clk: imx: Let IMX8MN_CLK_DISP_PIXEL set parent rate
>
> For the series:
>
> Reviewed-by: Fabio Estevam <festevam@gmail.com>
>
Thanks!

> Should drivers/clk/imx/clk-imx8mp.c also be adjusted in the same way?

The LVDS and the DSI clocks are shared from a common parent, so I am
not sure of the impact of this.  I have an IMX8MP and I have it
working with DSI->HDMI and the LVDS, but I was waiting on the DSI
series from Jagan to get applied first and I wanted to make sure this
series gets accepted before I started work on the 8MP.

I will be traveling to Thailand for the next 3 weeks, so I'm hoping to
review the 8MP when I return.

adam