MLK-17537-9: gpu/imx: dcss: Add support for mode_valid
authorRobert Chiras <robert.chiras@nxp.com>
Thu, 7 Feb 2019 13:04:53 +0000 (15:04 +0200)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
commit46e38f01157e243f85efd0db8619ec549e7548c5
tree74b7528dbeb5a4d943a31ba4b3081db142edb77e
parent64f39fcebc04ad44b0964c753091ab26043fffd5
MLK-17537-9: gpu/imx: dcss: Add support for mode_valid

Implement mode_valid and mode_fixup functions for the dcss-crtc
driver so that DCSS can filter-out unsupported modes and save the
configuration for the supported ones.
Use mode_fixup to apply the saved configuration of a supported mode.
The mechanism to determine if a mode is supported or not is made in
dcss-dtg.

Also, add 2 new clocks:
- pll: this is the video PLL that provides the pixel clock; it's rate
  needs to be set such that the pixel clock can be achieved
- pll_src*: this is an oscillator that can be used as source clock for
  the video pll; currently, there are possible maximum 3 pll sources,
  defined as pll_src1, pll_src2 and pll_src3. The actual clocks that
  can be used as pll source are: CLK_25M, CLK_27M and CLK_PHY_27MHZ

Removed the pdiv_clk and pout_clk and replaced them with pix_clk,
since out of those two only one was used: pdiv_clk, representing the pixel
clock.

In dcss-dtg, each mode is tested and if we can achieve it's pixel
clock we save this mode configuration into an internal list and apply this
configuration later on when mode_fixup is called.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
drivers/gpu/imx/dcss/dcss-common.c
drivers/gpu/imx/dcss/dcss-dtg.c
drivers/gpu/imx/dcss/dcss-prv.h
include/video/imx-dcss.h