summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/pl111/pl111_drm.h
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2017-09-08 15:47:05 +0300
committerLinus Walleij <linus.walleij@linaro.org>2017-09-11 00:58:02 +0300
commit001485d5255cb17e99aa9e3712e43865b92d6adc (patch)
treee67a32160eff08c51704475087c928bb05c28e49 /drivers/gpu/drm/pl111/pl111_drm.h
parentbcaf9ff425cc2dc9a16373f9d9e36354e2f09a52 (diff)
downloadlinux-001485d5255cb17e99aa9e3712e43865b92d6adc.tar.xz
drm/pl111: Replace custom connector with panel bridge
This replaces the custom connector in the PL111 with the panel bridge helper. This works nicely for all standard panels, but since there are several PL11x-based systems that will need to use the dumb VGA connector bridge we use drm_of_find_panel_or_bridge() and make some headroom for dealing with bridges that are not panels as well, and drop a TODO in the code. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20170908124709.4758-3-linus.walleij@linaro.org
Diffstat (limited to 'drivers/gpu/drm/pl111/pl111_drm.h')
-rw-r--r--drivers/gpu/drm/pl111/pl111_drm.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/gpu/drm/pl111/pl111_drm.h b/drivers/gpu/drm/pl111/pl111_drm.h
index a97f303f6833..000534d85b43 100644
--- a/drivers/gpu/drm/pl111/pl111_drm.h
+++ b/drivers/gpu/drm/pl111/pl111_drm.h
@@ -21,21 +21,22 @@
#include <drm/drm_gem.h>
#include <drm/drm_simple_kms_helper.h>
+#include <drm/drm_connector.h>
+#include <drm/drm_encoder.h>
+#include <drm/drm_panel.h>
+#include <drm/drm_bridge.h>
#include <linux/clk-provider.h>
#define CLCD_IRQ_NEXTBASE_UPDATE BIT(2)
struct drm_minor;
-struct pl111_drm_connector {
- struct drm_connector connector;
- struct drm_panel *panel;
-};
-
struct pl111_drm_dev_private {
struct drm_device *drm;
- struct pl111_drm_connector connector;
+ struct drm_connector *connector;
+ struct drm_panel *panel;
+ struct drm_bridge *bridge;
struct drm_simple_display_pipe pipe;
struct drm_fbdev_cma *fbdev;
@@ -50,14 +51,10 @@ struct pl111_drm_dev_private {
spinlock_t tim2_lock;
};
-#define to_pl111_connector(x) \
- container_of(x, struct pl111_drm_connector, connector)
-
int pl111_display_init(struct drm_device *dev);
int pl111_enable_vblank(struct drm_device *drm, unsigned int crtc);
void pl111_disable_vblank(struct drm_device *drm, unsigned int crtc);
irqreturn_t pl111_irq(int irq, void *data);
-int pl111_connector_init(struct drm_device *dev);
int pl111_debugfs_init(struct drm_minor *minor);
#endif /* _PL111_DRM_H_ */