OpenCloudOS-Kernel/drivers/gpu/drm/tilcdc
Bartosz Golaszewski cb42e20ea0 drm/tilcdc: add a workaround for failed clk_set_rate()
Some architectures don't use the common clock framework and don't
implement all the clk interfaces for every clock. This is the case
for da850-lcdk where clk_set_rate() only works for PLL0 and PLL1.

Trying to set the clock rate for the LCDC clock results in -EINVAL
being returned.

As a workaround for that: if the call to clk_set_rate() fails, fall
back to adjusting the clock divider instead. Proper divider value is
calculated by dividing the current clock rate by the required pixel
clock rate in HZ.

This code is based on a hack initially developed internally for
baylibre by Karl Beldan <kbeldan@baylibre.com>.

Tested with a da850-lcdk with an LCD display connected over VGA.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
2016-11-29 21:03:15 +02:00
..
Kconfig drm/tilcdc: make fbdev support really optional 2016-07-18 09:11:38 +02:00
Makefile drm/tilcdc: Add dummy primary plane implementation 2016-08-08 23:05:00 +03:00
tilcdc_crtc.c drm/tilcdc: add a workaround for failed clk_set_rate() 2016-11-29 21:03:15 +02:00
tilcdc_drv.c drm: define drm_compat_ioctl NULL on CONFIG_COMPAT=n and reduce #ifdefs 2016-11-02 11:33:47 -04:00
tilcdc_drv.h drm/tilcdc: Clean up LCDC functional clock rate setting code 2016-09-07 15:54:40 +03:00
tilcdc_external.c drm: convert DT component matching to component_match_add_release() 2016-10-25 11:52:38 -04:00
tilcdc_external.h drm/tilcdc: Choose console BPP that supports RGB 2016-09-01 22:32:23 +03:00
tilcdc_panel.c drm/tilcdc: add missing header dependencies 2016-09-22 23:50:08 +03:00
tilcdc_panel.h drm/tilcdc: add support for LCD panels (v5) 2013-02-19 17:57:45 -05:00
tilcdc_plane.c drm: tilcdc: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp() 2016-10-18 15:21:57 +05:30
tilcdc_regs.h drm/tilcdc: Write DMA base and ceiling address with single instruction 2016-09-01 22:31:59 +03:00
tilcdc_slave_compat.c drm/tilcdc: Return directly after a failed kfree_table_init() in tilcdc_convert_slave_node() 2016-09-23 13:49:52 +03:00
tilcdc_slave_compat.dts drm/tilcdc: Add DRM_TILCDC_SLAVE_COMPAT for ti,tilcdc,slave binding support 2015-05-27 13:13:33 +03:00
tilcdc_slave_compat.h drm/tilcdc: Add DRM_TILCDC_SLAVE_COMPAT for ti,tilcdc,slave binding support 2015-05-27 13:13:33 +03:00
tilcdc_tfp410.c drm/tilcdc: add missing header dependencies 2016-09-22 23:50:08 +03:00
tilcdc_tfp410.h drm/tilcdc: add TI LCD Controller DRM driver (v4) 2013-02-19 17:57:44 -05:00