All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
To: dri-devel@lists.freedesktop.org
Cc: "Y.C. Chen" <yc_chen@aspeedtech.com>,
	"Heiko Stübner" <heiko@sntech.de>,
	"Sam Ravnborg" <sam@ravnborg.org>,
	"Neil Armstrong" <narmstrong@baylibre.com>,
	"Maxime Ripard" <maxime.ripard@bootlin.com>,
	"Douglas Anderson" <dianders@chromium.org>,
	"Andrzej Hajda" <a.hajda@samsung.com>,
	"Laurent Pinchart" <Laurent.pinchart@ideasonboard.com>,
	"Benjamin Gaignard" <benjamin.gaignard@linaro.org>,
	kernel@collabora.com, "Fabio Estevam" <festevam@gmail.com>,
	"David (ChunMing) Zhou" <David1.Zhou@amd.com>,
	linux-samsung-soc@vger.kernel.org,
	"Joonyoung Shim" <jy0922.shim@samsung.com>,
	linux-rockchip@lists.infradead.org,
	"Vincent Abriou" <vincent.abriou@st.com>,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	"Jonathan Hunter" <jonathanh@nvidia.com>,
	"David Airlie" <airlied@linux.ie>, "Chen-Yu Tsai" <wens@csie.org>,
	"Kukjin Kim" <kgene@kernel.org>,
	"NXP Linux Team" <linux-imx@nxp.com>, "CK Hu" <ck.hu@mediatek.>
Subject: [PATCH v4 08/23] drm/tegra: Provide ddc symlink in output connector sysfs directory
Date: Thu, 11 Jul 2019 13:26:35 +0200	[thread overview]
Message-ID: <3cdef66e1360570b48d7b74b512262f4081037e3.1562843413.git.andrzej.p@collabora.com> (raw)
In-Reply-To: <cover.1562843413.git.andrzej.p@collabora.com>
In-Reply-To: <cover.1562843413.git.andrzej.p@collabora.com>

Use the ddc pointer provided by the generic connector.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
---
 drivers/gpu/drm/tegra/drm.h    |  1 -
 drivers/gpu/drm/tegra/output.c | 12 ++++++------
 drivers/gpu/drm/tegra/sor.c    |  6 +++---
 3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h
index 86daa19fcf24..9bf72bcd3ec1 100644
--- a/drivers/gpu/drm/tegra/drm.h
+++ b/drivers/gpu/drm/tegra/drm.h
@@ -120,7 +120,6 @@ struct tegra_output {
 	struct device *dev;
 
 	struct drm_panel *panel;
-	struct i2c_adapter *ddc;
 	const struct edid *edid;
 	struct cec_notifier *cec;
 	unsigned int hpd_irq;
diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c
index 274cb955e2e1..0b5037a29c63 100644
--- a/drivers/gpu/drm/tegra/output.c
+++ b/drivers/gpu/drm/tegra/output.c
@@ -30,8 +30,8 @@ int tegra_output_connector_get_modes(struct drm_connector *connector)
 
 	if (output->edid)
 		edid = kmemdup(output->edid, sizeof(*edid), GFP_KERNEL);
-	else if (output->ddc)
-		edid = drm_get_edid(connector, output->ddc);
+	else if (connector->ddc)
+		edid = drm_get_edid(connector, connector->ddc);
 
 	cec_notifier_set_phys_addr_from_edid(output->cec, edid);
 	drm_connector_update_edid_property(connector, edid);
@@ -111,8 +111,8 @@ int tegra_output_probe(struct tegra_output *output)
 
 	ddc = of_parse_phandle(output->of_node, "nvidia,ddc-i2c-bus", 0);
 	if (ddc) {
-		output->ddc = of_find_i2c_adapter_by_node(ddc);
-		if (!output->ddc) {
+		output->connector.ddc = of_find_i2c_adapter_by_node(ddc);
+		if (!output->connector.ddc) {
 			err = -EPROBE_DEFER;
 			of_node_put(ddc);
 			return err;
@@ -174,8 +174,8 @@ void tegra_output_remove(struct tegra_output *output)
 	if (output->hpd_gpio)
 		free_irq(output->hpd_irq, output);
 
-	if (output->ddc)
-		put_device(&output->ddc->dev);
+	if (output->connector.ddc)
+		put_device(&output->connector.ddc->dev);
 }
 
 int tegra_output_init(struct drm_device *drm, struct tegra_output *output)
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index 4ffe3794e6d3..77e61f98de07 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -2311,7 +2311,7 @@ static void tegra_sor_hdmi_disable_scrambling(struct tegra_sor *sor)
 
 static void tegra_sor_hdmi_scdc_disable(struct tegra_sor *sor)
 {
-	struct i2c_adapter *ddc = sor->output.ddc;
+	struct i2c_adapter *ddc = sor->output.connector.ddc;
 
 	drm_scdc_set_high_tmds_clock_ratio(ddc, false);
 	drm_scdc_set_scrambling(ddc, false);
@@ -2339,7 +2339,7 @@ static void tegra_sor_hdmi_enable_scrambling(struct tegra_sor *sor)
 
 static void tegra_sor_hdmi_scdc_enable(struct tegra_sor *sor)
 {
-	struct i2c_adapter *ddc = sor->output.ddc;
+	struct i2c_adapter *ddc = sor->output.connector.ddc;
 
 	drm_scdc_set_high_tmds_clock_ratio(ddc, true);
 	drm_scdc_set_scrambling(ddc, true);
@@ -2350,7 +2350,7 @@ static void tegra_sor_hdmi_scdc_enable(struct tegra_sor *sor)
 static void tegra_sor_hdmi_scdc_work(struct work_struct *work)
 {
 	struct tegra_sor *sor = container_of(work, struct tegra_sor, scdc.work);
-	struct i2c_adapter *ddc = sor->output.ddc;
+	struct i2c_adapter *ddc = sor->output.connector.ddc;
 
 	if (!drm_scdc_get_scrambling_status(ddc)) {
 		DRM_DEBUG_KMS("SCDC not scrambled\n");
-- 
2.17.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-07-11 11:26 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-11 11:26 [PATCH v4 00/23] Associate ddc adapters with connectors Andrzej Pietrasiewicz
2019-07-11 11:26 ` [PATCH v4 01/23] drm: Include ddc adapter pointer in struct drm_connector Andrzej Pietrasiewicz
2019-07-11 12:00   ` Ville Syrjälä
     [not found]   ` <5957ae96ee20eed5cfcb8a9619e2f61d71fe227e.1562843413.git.andrzej.p-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2019-07-11 12:00     ` Ville Syrjälä
2019-07-11 12:00   ` Ville Syrjälä
2019-07-11 11:26 ` [PATCH v4 02/23] drm/exynos: Provide ddc symlink in connector's sysfs Andrzej Pietrasiewicz
2019-07-11 11:26 ` [PATCH v4 03/23] drm: rockchip: Provide ddc symlink in rk3066_hdmi sysfs directory Andrzej Pietrasiewicz
2019-07-11 11:26 ` [PATCH v4 06/23] drm/sun4i: hdmi: Provide ddc symlink in sun4i hdmi connector " Andrzej Pietrasiewicz
2019-07-11 11:26 ` [PATCH v4 07/23] drm/mediatek: Provide ddc symlink in " Andrzej Pietrasiewicz
2019-07-11 11:26 ` Andrzej Pietrasiewicz [this message]
2019-07-11 11:26 ` [PATCH v4 09/23] drm/imx: imx-ldb: Provide ddc symlink in connector's sysfs Andrzej Pietrasiewicz
2019-07-11 11:26 ` [PATCH v4 10/23] drm/imx: imx-tve: " Andrzej Pietrasiewicz
2019-07-11 11:26 ` [PATCH v4 11/23] drm/vc4: Provide ddc symlink in connector sysfs directory Andrzej Pietrasiewicz
2019-07-11 11:26 ` [PATCH v4 12/23] drm: zte: Provide ddc symlink in hdmi " Andrzej Pietrasiewicz
2019-07-23  5:58   ` Shawn Guo
2019-07-11 11:26 ` [PATCH v4 13/23] drm: zte: Provide ddc symlink in vga " Andrzej Pietrasiewicz
     [not found]   ` <9cdd2fc46dbcb6b596786e5a12b7176c77a38d78.1562843413.git.andrzej.p-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2019-07-23  5:58     ` Shawn Guo
2019-07-11 11:26 ` [PATCH v4 14/23] drm/tilcdc: Provide ddc symlink in " Andrzej Pietrasiewicz
     [not found]   ` <d1d415022c598fb7acd033f0f322dd67250adaa9.1562843413.git.andrzej.p-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2019-07-23  9:05     ` Sam Ravnborg
2019-07-23  9:05       ` Sam Ravnborg
2019-07-23 12:44       ` Andrzej Pietrasiewicz
2019-07-23 12:44         ` Andrzej Pietrasiewicz
2019-07-23 12:44         ` Andrzej Pietrasiewicz
     [not found]         ` <3ad60be5-49cf-4017-4b74-53a2d6272deb-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2019-07-23 15:19           ` Sam Ravnborg
2019-07-23 15:19             ` Sam Ravnborg
2019-07-23 15:19             ` Sam Ravnborg
2019-07-24  8:01         ` Thomas Zimmermann
2019-07-24  8:01           ` Thomas Zimmermann
2019-07-24  8:01           ` Thomas Zimmermann
2019-07-24  8:51           ` Andrzej Pietrasiewicz
2019-07-24  8:51             ` Andrzej Pietrasiewicz
2019-07-24  8:51             ` Andrzej Pietrasiewicz
     [not found]           ` <acfd895d-ab59-0190-e25c-1827bd8d214b-l3A5Bk7waGM@public.gmane.org>
2019-07-31 19:39             ` Ezequiel Garcia
2019-07-31 19:39               ` Ezequiel Garcia
2019-07-31 19:39               ` Ezequiel Garcia
2019-07-11 11:26 ` [PATCH v4 19/23] drm/bridge: dw-hdmi: " Andrzej Pietrasiewicz
     [not found]   ` <ec88a18feffa37eceb947bb83a6f9f51fb575566.1562843413.git.andrzej.p-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2019-07-30 12:17     ` Neil Armstrong
     [not found]       ` <449b11e6-2386-4e5b-26f7-eb6046911f24-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2019-07-30 17:30         ` Sam Ravnborg
     [not found]           ` <20190730173007.GA28537-uyr5N9Q2VtJg9hUCZPvPmw@public.gmane.org>
2019-07-31  7:32             ` Neil Armstrong
2019-07-11 11:26 ` [PATCH v4 21/23] drm/amdgpu: " Andrzej Pietrasiewicz
2019-07-11 11:26 ` [PATCH v4 22/23] drm/radeon: " Andrzej Pietrasiewicz
     [not found] ` <cover.1562843413.git.andrzej.p-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2019-07-11 11:26   ` [PATCH v4 04/23] drm: rockchip: Provide ddc symlink in inno_hdmi " Andrzej Pietrasiewicz
2019-07-11 11:26   ` [PATCH v4 05/23] drm/msm/hdmi: Provide ddc symlink in hdmi connector " Andrzej Pietrasiewicz
2019-07-11 11:26   ` [PATCH v4 15/23] drm: sti: " Andrzej Pietrasiewicz
     [not found]     ` <86afdc0bca6939901870176dcf55f279f7b10a08.1562843413.git.andrzej.p-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2019-07-12  7:42       ` Benjamin Gaignard
2019-07-11 11:26   ` [PATCH v4 16/23] drm/mgag200: Provide ddc symlink in " Andrzej Pietrasiewicz
2019-07-11 17:26     ` Thomas Zimmermann
2019-07-23  9:07     ` Sam Ravnborg
2019-07-23  9:07       ` Sam Ravnborg
2019-07-23  9:07       ` Sam Ravnborg
2019-07-11 11:26   ` [PATCH v4 17/23] drm/ast: " Andrzej Pietrasiewicz
2019-07-11 17:27     ` Thomas Zimmermann
2019-07-23  9:09     ` Sam Ravnborg
2019-07-23  9:09       ` Sam Ravnborg
2019-07-11 11:26   ` [PATCH v4 18/23] drm/bridge: dumb-vga-dac: " Andrzej Pietrasiewicz
2019-07-30 12:15     ` Neil Armstrong
2019-07-11 11:26   ` [PATCH v4 20/23] drm/bridge: ti-tfp410: " Andrzej Pietrasiewicz
2019-07-30 12:25     ` Neil Armstrong
2019-07-11 11:26   ` [PATCH v4 23/23] drm/i915: Provide ddc symlink in hdmi " Andrzej Pietrasiewicz
     [not found]     ` <1d9bb3d65127a5093d6e9f9cc62a5c7c7502f61d.1562843413.git.andrzej.p-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2019-07-11 11:59       ` Ville Syrjälä
2019-07-11 11:59     ` Ville Syrjälä
2019-07-11 11:59     ` Ville Syrjälä
2019-07-11 13:21       ` Daniel Vetter
2019-07-11 17:56 ` ✓ Fi.CI.BAT: success for Associate ddc adapters with connectors Patchwork
2019-07-12 17:48 ` ✓ Fi.CI.IGT: " Patchwork

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=3cdef66e1360570b48d7b74b512262f4081037e3.1562843413.git.andrzej.p@collabora.com \
    --to=andrzej.p@collabora.com \
    --cc=David1.Zhou@amd.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=benjamin.gaignard@linaro.org \
    --cc=ck.hu@mediatek. \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=festevam@gmail.com \
    --cc=heiko@sntech.de \
    --cc=jonathanh@nvidia.com \
    --cc=jy0922.shim@samsung.com \
    --cc=kernel@collabora.com \
    --cc=kgene@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=maxime.ripard@bootlin.com \
    --cc=narmstrong@baylibre.com \
    --cc=sam@ravnborg.org \
    --cc=vincent.abriou@st.com \
    --cc=wens@csie.org \
    --cc=yc_chen@aspeedtech.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.