public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: wens@csie.org (Chen-Yu Tsai)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 7/9] drm/sun4i: tcon: Copy ID from associated backend
Date: Fri, 21 Apr 2017 16:38:55 +0800	[thread overview]
Message-ID: <20170421083857.29636-8-wens@csie.org> (raw)
In-Reply-To: <20170421083857.29636-1-wens@csie.org>

The tcons and backends have a one-to-one relationship. Their IDs,
or indexes in the documentation, are also the same.

Copy the ID from the associated backend and save it in the tcon
structure. This will later be used when we add support for the
output data path muxes.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 drivers/gpu/drm/sun4i/sun4i_tcon.c | 1 +
 drivers/gpu/drm/sun4i/sun4i_tcon.h | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
index 4409e7b6c74d..8301389c411d 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -540,6 +540,7 @@ static int sun4i_tcon_bind(struct device *dev, struct device *master,
 	dev_set_drvdata(dev, tcon);
 	tcon->drm = drm;
 	tcon->dev = dev;
+	tcon->id = backend->id;
 	tcon->quirks = of_device_get_match_data(dev);
 
 	tcon->lcd_rst = devm_reset_control_get(dev, "lcd");
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.h b/drivers/gpu/drm/sun4i/sun4i_tcon.h
index 1bda4d183eec..d37e1e2ed60e 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.h
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.h
@@ -174,6 +174,8 @@ struct sun4i_tcon {
 	/* Associated crtc */
 	struct sun4i_crtc		*crtc;
 
+	int				id;
+
 	/* TCON list management */
 	struct list_head		list;
 };
-- 
2.11.0

  parent reply	other threads:[~2017-04-21  8:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-21  8:38 [PATCH v2 0/9] drm/sun4i: Support multiple display pipelines Chen-Yu Tsai
2017-04-21  8:38 ` [PATCH v2 1/9] dt-bindings: display: sun4i: Add component endpoint ID numbering scheme Chen-Yu Tsai
2017-04-28 13:48   ` Rob Herring
2017-05-02 14:54     ` Maxime Ripard
2017-04-21  8:38 ` [PATCH v2 2/9] drm/sun4i: Use lists to track registered display backends and TCONs Chen-Yu Tsai
2017-04-21  8:38 ` [PATCH v2 3/9] drm/sun4i: backend: Drop trailing 0 from backend in error message Chen-Yu Tsai
2017-04-21  8:38 ` [PATCH v2 4/9] drm/sun4i: backend: Fetch backend ID from device tree Chen-Yu Tsai
2017-04-21  8:38 ` [PATCH v2 5/9] drm/sun4i: backend: Save pointer to device tree node Chen-Yu Tsai
2017-04-21  8:38 ` [PATCH v2 6/9] drm/sun4i: tcon: Find matching display backend by device node matching Chen-Yu Tsai
2017-04-21  8:38 ` Chen-Yu Tsai [this message]
2017-04-21  8:38 ` [PATCH v2 8/9] ARM: dts: sun6i: Add second display pipeline device nodes Chen-Yu Tsai
2017-04-21  8:38 ` [PATCH v2 9/9] ARM: dts: sun6i: Enable tcon0 by default Chen-Yu Tsai
2017-04-24  5:51 ` [PATCH v2 0/9] drm/sun4i: Support multiple display pipelines Maxime Ripard

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=20170421083857.29636-8-wens@csie.org \
    --to=wens@csie.org \
    --cc=linux-arm-kernel@lists.infradead.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