3 * (C) COPYRIGHT 2012-2013 ARM Limited. All rights reserved.
6 * Parts of this file were based on sources as follows:
8 * Copyright (c) 2006-2008 Intel Corporation
9 * Copyright (c) 2007 Dave Airlie <airlied@linux.ie>
10 * Copyright (C) 2011 Texas Instruments
12 * This program is free software and is provided to you under the terms of the
13 * GNU General Public License version 2 as published by the Free Software
14 * Foundation, and any use by you of this program is subject to the terms of
22 #include <drm/drm_gem.h>
23 #include <drm/drm_simple_kms_helper.h>
24 #include <linux/clk-provider.h>
26 #define CLCD_IRQ_NEXTBASE_UPDATE BIT(2)
28 struct pl111_drm_connector {
29 struct drm_connector connector;
30 struct drm_panel *panel;
33 struct pl111_drm_dev_private {
34 struct drm_device *drm;
36 struct pl111_drm_connector connector;
37 struct drm_simple_display_pipe pipe;
38 struct drm_fbdev_cma *fbdev;
41 /* The pixel clock (a reference to our clock divider off of CLCDCLK). */
43 /* pl111's internal clock divider. */
44 struct clk_hw clk_div;
45 /* Lock to sync access to CLCD_TIM2 between the common clock
46 * subsystem and pl111_display_enable().
51 #define to_pl111_connector(x) \
52 container_of(x, struct pl111_drm_connector, connector)
54 int pl111_display_init(struct drm_device *dev);
55 int pl111_enable_vblank(struct drm_device *drm, unsigned int crtc);
56 void pl111_disable_vblank(struct drm_device *drm, unsigned int crtc);
57 irqreturn_t pl111_irq(int irq, void *data);
58 int pl111_connector_init(struct drm_device *dev);
59 int pl111_encoder_init(struct drm_device *dev);
60 int pl111_dumb_create(struct drm_file *file_priv,
61 struct drm_device *dev,
62 struct drm_mode_create_dumb *args);
64 #endif /* _PL111_DRM_H_ */