===================================================================
@@ -37,6 +37,7 @@
static const struct rcar_du_device_info rzg1_du_r8a7743_info = {
.gen = 2,
+ .model = R8A7743,
.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
| RCAR_DU_FEATURE_EXT_CTRL_REGS,
.num_crtcs = 2,
@@ -58,6 +59,7 @@ static const struct rcar_du_device_info
static const struct rcar_du_device_info rzg1_du_r8a7745_info = {
.gen = 2,
+ .model = R8A7745,
.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
| RCAR_DU_FEATURE_EXT_CTRL_REGS,
.num_crtcs = 2,
@@ -79,6 +81,7 @@ static const struct rcar_du_device_info
static const struct rcar_du_device_info rcar_du_r8a7779_info = {
.gen = 2,
+ .model = R8A7779,
.features = 0,
.num_crtcs = 2,
.routes = {
@@ -100,6 +103,7 @@ static const struct rcar_du_device_info
static const struct rcar_du_device_info rcar_du_r8a7790_info = {
.gen = 2,
+ .model = R8A7790,
.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
| RCAR_DU_FEATURE_EXT_CTRL_REGS,
.quirks = RCAR_DU_QUIRK_ALIGN_128B | RCAR_DU_QUIRK_LVDS_LANES,
@@ -128,6 +132,7 @@ static const struct rcar_du_device_info
/* M2-W (r8a7791) and M2-N (r8a7793) are identical */
static const struct rcar_du_device_info rcar_du_r8a7791_info = {
.gen = 2,
+ .model = R8A7791,
.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
| RCAR_DU_FEATURE_EXT_CTRL_REGS,
.num_crtcs = 2,
@@ -150,6 +155,7 @@ static const struct rcar_du_device_info
static const struct rcar_du_device_info rcar_du_r8a7792_info = {
.gen = 2,
+ .model = R8A7792,
.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
| RCAR_DU_FEATURE_EXT_CTRL_REGS,
.num_crtcs = 2,
@@ -169,6 +175,7 @@ static const struct rcar_du_device_info
static const struct rcar_du_device_info rcar_du_r8a7794_info = {
.gen = 2,
+ .model = R8A7794,
.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
| RCAR_DU_FEATURE_EXT_CTRL_REGS,
.num_crtcs = 2,
@@ -191,6 +198,7 @@ static const struct rcar_du_device_info
static const struct rcar_du_device_info rcar_du_r8a7795_info = {
.gen = 3,
+ .model = R8A7795,
.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
| RCAR_DU_FEATURE_EXT_CTRL_REGS
| RCAR_DU_FEATURE_VSP1_SOURCE,
@@ -223,6 +231,7 @@ static const struct rcar_du_device_info
static const struct rcar_du_device_info rcar_du_r8a7796_info = {
.gen = 3,
+ .model = R8A7796,
.features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
| RCAR_DU_FEATURE_EXT_CTRL_REGS
| RCAR_DU_FEATURE_VSP1_SOURCE,
===================================================================
@@ -49,9 +49,22 @@ struct rcar_du_output_routing {
unsigned int port;
};
+enum rcar_du_model {
+ R8A7743,
+ R8A7745,
+ R8A7779,
+ R8A7790,
+ R8A7791,
+ R8A7792,
+ R8A7794,
+ R8A7795,
+ R8A7796,
+};
+
/*
* struct rcar_du_device_info - DU model-specific information
* @gen: device generation (2 or 3)
+ * @model: device model
* @features: device features (RCAR_DU_FEATURE_*)
* @quirks: device quirks (RCAR_DU_QUIRK_*)
* @num_crtcs: total number of CRTCs
@@ -60,6 +73,7 @@ struct rcar_du_output_routing {
*/
struct rcar_du_device_info {
unsigned int gen;
+ enum rcar_du_model model;
unsigned int features;
unsigned int quirks;
unsigned int num_crtcs;
In order to add the R-Car V3M (R8A77970) support to the DU driver we'd need to keep track not only of the SoC generation but also of the exact model (for the LVDS encoder support). Therefore add the 'model' field to the 'struct rcar_du_device_info' and initialize it accordingly for the already supported SoCs. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> --- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 9 +++++++++ drivers/gpu/drm/rcar-du/rcar_du_drv.h | 14 ++++++++++++++ 2 files changed, 23 insertions(+)