drm/sun4i: request exact rates to our parents
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Sat, 2 Apr 2016 10:30:11 +0000 (12:30 +0200)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Mon, 30 May 2016 06:28:33 +0000 (08:28 +0200)
commit4731a72df273bdbd225445424057c15dbb8d3495
tree4c83197a5bfba781e0246a27efc505888127c79a
parent9fa2568d9fe0c6dbf3253af6840de9389f4e89cb
drm/sun4i: request exact rates to our parents

Our pixel clock currently only tries to deal with the current parent rate.

While that works when the resolution is the same than the one already
program, or when we can compute directly the rate from the current parent
rate, it cannot work in most situation when we want to change the
frequency, and we end up with an improper pixel clock rate, which obviously
doesn't work as expected.

Ask our parent for all the possible dividers if it can reach that
frequency, and return the best parent rate to the clock framework so that
we can use it.

Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support")
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
drivers/gpu/drm/sun4i/sun4i_dotclock.c