summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/pl111/pl111_drm.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2017-05-08 22:33:48 +0300
committerEric Anholt <eric@anholt.net>2017-05-19 21:11:35 +0300
commit032838f9cb4014af8a974374db9e2ce6f3aa8d3b (patch)
tree4fc8a4219ad3fdd59d8ced82cdf746f6bad34899 /drivers/gpu/drm/pl111/pl111_drm.h
parent2098105ec65cb364f3d77baa446b2ad5ba6bc7b9 (diff)
downloadlinux-032838f9cb4014af8a974374db9e2ce6f3aa8d3b.tar.xz
drm/pl111: Register the clock divider and use it.
This is required for the panel to work on bcm911360, where CLCDCLK is the fixed 200Mhz AXI41 clock. The rate set is still passed up to the CLCDCLK, for platforms that have a settable rate on that one. v2: Set SET_RATE_PARENT (caught by Linus Walleij), depend on COMMON_CLK. v3: Mark the clk_ops static (caught by Stephen). Signed-off-by: Eric Anholt <eric@anholt.net> Link: http://patchwork.freedesktop.org/patch/msgid/20170508193348.30236-1-eric@anholt.net Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/gpu/drm/pl111/pl111_drm.h')
-rw-r--r--drivers/gpu/drm/pl111/pl111_drm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/pl111/pl111_drm.h b/drivers/gpu/drm/pl111/pl111_drm.h
index f381593921b7..4162c6aa5dbb 100644
--- a/drivers/gpu/drm/pl111/pl111_drm.h
+++ b/drivers/gpu/drm/pl111/pl111_drm.h
@@ -21,6 +21,7 @@
#include <drm/drm_gem.h>
#include <drm/drm_simple_kms_helper.h>
+#include <linux/clk-provider.h>
#define CLCD_IRQ_NEXTBASE_UPDATE BIT(2)
@@ -37,7 +38,14 @@ struct pl111_drm_dev_private {
struct drm_fbdev_cma *fbdev;
void *regs;
+ /* The pixel clock (a reference to our clock divider off of CLCDCLK). */
struct clk *clk;
+ /* pl111's internal clock divider. */
+ struct clk_hw clk_div;
+ /* Lock to sync access to CLCD_TIM2 between the common clock
+ * subsystem and pl111_display_enable().
+ */
+ spinlock_t tim2_lock;
};
#define to_pl111_connector(x) \