blob: f381593921b75b53b8bd0864d873b9487ade5e2e [file] [log] [blame]
Tom Cookseybed41002017-04-12 20:17:46 -07001/*
2 *
3 * (C) COPYRIGHT 2012-2013 ARM Limited. All rights reserved.
4 *
5 *
6 * Parts of this file were based on sources as follows:
7 *
8 * Copyright (c) 2006-2008 Intel Corporation
9 * Copyright (c) 2007 Dave Airlie <airlied@linux.ie>
10 * Copyright (C) 2011 Texas Instruments
11 *
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
15 * such GNU licence.
16 *
17 */
18
19#ifndef _PL111_DRM_H_
20#define _PL111_DRM_H_
21
22#include <drm/drm_gem.h>
23#include <drm/drm_simple_kms_helper.h>
24
25#define CLCD_IRQ_NEXTBASE_UPDATE BIT(2)
26
27struct pl111_drm_connector {
28 struct drm_connector connector;
29 struct drm_panel *panel;
30};
31
32struct pl111_drm_dev_private {
33 struct drm_device *drm;
34
35 struct pl111_drm_connector connector;
36 struct drm_simple_display_pipe pipe;
37 struct drm_fbdev_cma *fbdev;
38
39 void *regs;
40 struct clk *clk;
41};
42
43#define to_pl111_connector(x) \
44 container_of(x, struct pl111_drm_connector, connector)
45
46int pl111_display_init(struct drm_device *dev);
47int pl111_enable_vblank(struct drm_device *drm, unsigned int crtc);
48void pl111_disable_vblank(struct drm_device *drm, unsigned int crtc);
49irqreturn_t pl111_irq(int irq, void *data);
50int pl111_connector_init(struct drm_device *dev);
51int pl111_encoder_init(struct drm_device *dev);
52int pl111_dumb_create(struct drm_file *file_priv,
53 struct drm_device *dev,
54 struct drm_mode_create_dumb *args);
55
56#endif /* _PL111_DRM_H_ */