summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/rcar-du/rcar_du_drv.c
diff options
context:
space:
mode:
authorLaurent Pinchart2018-01-10 04:47:42 +0100
committerLaurent Pinchart2018-03-07 17:06:49 +0100
commitc6a27fa41fabb35fcf0273c32a86f1424fa7de91 (patch)
tree0bff05e17443c829b495e0e21bce05f577144f2c /drivers/gpu/drm/rcar-du/rcar_du_drv.c
parentdrm: rcar-du: Fix legacy DT to create LVDS encoder nodes (diff)
downloadkernel-qcow2-linux-c6a27fa41fabb35fcf0273c32a86f1424fa7de91.tar.gz
kernel-qcow2-linux-c6a27fa41fabb35fcf0273c32a86f1424fa7de91.tar.xz
kernel-qcow2-linux-c6a27fa41fabb35fcf0273c32a86f1424fa7de91.zip
drm: rcar-du: Convert LVDS encoder code to bridge driver
The LVDS encoders used to be described in DT as part of the DU. They now have their own DT node, linked to the DU using the OF graph bindings. This allows moving internal LVDS encoder support to a separate driver modelled as a DRM bridge. Backward compatibility is retained as legacy DT is patched live to move to the new bindings. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Diffstat (limited to 'drivers/gpu/drm/rcar-du/rcar_du_drv.c')
-rw-r--r--drivers/gpu/drm/rcar-du/rcar_du_drv.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
index 6e02c762a557..06a3fbdd728a 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
@@ -29,6 +29,7 @@
#include "rcar_du_drv.h"
#include "rcar_du_kms.h"
+#include "rcar_du_of.h"
#include "rcar_du_regs.h"
/* -----------------------------------------------------------------------------
@@ -74,7 +75,6 @@ static const struct rcar_du_device_info rzg1_du_r8a7745_info = {
.port = 1,
},
},
- .num_lvds = 0,
};
static const struct rcar_du_device_info rcar_du_r8a7779_info = {
@@ -95,14 +95,13 @@ static const struct rcar_du_device_info rcar_du_r8a7779_info = {
.port = 1,
},
},
- .num_lvds = 0,
};
static const struct rcar_du_device_info rcar_du_r8a7790_info = {
.gen = 2,
.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
| RCAR_DU_FEATURE_EXT_CTRL_REGS,
- .quirks = RCAR_DU_QUIRK_ALIGN_128B | RCAR_DU_QUIRK_LVDS_LANES,
+ .quirks = RCAR_DU_QUIRK_ALIGN_128B,
.num_crtcs = 3,
.routes = {
/*
@@ -164,7 +163,6 @@ static const struct rcar_du_device_info rcar_du_r8a7792_info = {
.port = 1,
},
},
- .num_lvds = 0,
};
static const struct rcar_du_device_info rcar_du_r8a7794_info = {
@@ -186,7 +184,6 @@ static const struct rcar_du_device_info rcar_du_r8a7794_info = {
.port = 1,
},
},
- .num_lvds = 0,
};
static const struct rcar_du_device_info rcar_du_r8a7795_info = {
@@ -434,7 +431,19 @@ static struct platform_driver rcar_du_platform_driver = {
},
};
-module_platform_driver(rcar_du_platform_driver);
+static int __init rcar_du_init(void)
+{
+ rcar_du_of_init(rcar_du_of_table);
+
+ return platform_driver_register(&rcar_du_platform_driver);
+}
+module_init(rcar_du_init);
+
+static void __exit rcar_du_exit(void)
+{
+ platform_driver_unregister(&rcar_du_platform_driver);
+}
+module_exit(rcar_du_exit);
MODULE_AUTHOR("Laurent Pinchart <laurent.pinchart@ideasonboard.com>");
MODULE_DESCRIPTION("Renesas R-Car Display Unit DRM Driver");