From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Subject: [PATCH 2/3] drm: rcar-du: add model field to struct rcar_du_device_info
Date: Thu, 11 Jan 2018 19:54:34 +0300 [thread overview]
Message-ID: <20180111170059.858419764@cogentembedded.com> (raw)
[-- Attachment #1: drm-rcar-du-add-model-field-to-struct-rcar_du_device_info.patch --]
[-- Type: text/plain, Size: 4206 bytes --]
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(+)
Index: linux/drivers/gpu/drm/rcar-du/rcar_du_drv.c
===================================================================
--- linux.orig/drivers/gpu/drm/rcar-du/rcar_du_drv.c
+++ linux/drivers/gpu/drm/rcar-du/rcar_du_drv.c
@@ -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,
Index: linux/drivers/gpu/drm/rcar-du/rcar_du_drv.h
===================================================================
--- linux.orig/drivers/gpu/drm/rcar-du/rcar_du_drv.h
+++ linux/drivers/gpu/drm/rcar-du/rcar_du_drv.h
@@ -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;
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
reply other threads:[~2018-01-11 16:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180111170059.858419764@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=airlied@linux.ie \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).