All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
To: dri-devel@lists.freedesktop.org
Cc: amd-gfx@lists.freedesktop.org, Sam Ravnborg <sam@ravnborg.org>,
	Neil Armstrong <narmstrong@baylibre.com>,
	David Airlie <airlied@linux.ie>,
	Douglas Anderson <dianders@chromium.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	kernel@collabora.com, linux-samsung-soc@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	Vincent Abriou <vincent.abriou@st.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Chen-Yu Tsai <wens@csie.org>, Kukjin Kim <kgene@kernel.org>,
	NXP Linux Team <linux-imx@nxp.com>,
	Dave Airlie <airlied@redhat.com>,
	intel-gfx@lists.freedesktop.org, freedreno@lists.freedesktop.org,
	linux-tegra@vger.kernel.org, Jonas Karlman <jonas@kwiboo.se>,
	linux-arm-msm@vger.kernel.org,
	Alexios Zavras <alexios.zavras@intel.com>Mamta Shukla <ma>
Subject: [PATCH v5 03/24] drm/exynos: Provide ddc symlink in connector's sysfs
Date: Wed, 24 Jul 2019 15:59:25 +0200	[thread overview]
Message-ID: <6fea36724e29e0a6629a19a821727043e730a1e5.1563960855.git.andrzej.p@collabora.com> (raw)
In-Reply-To: <cover.1563960855.git.andrzej.p@collabora.com>
In-Reply-To: <cover.1563960855.git.andrzej.p@collabora.com>

Switch to using the ddc provided by the generic connector.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
---
 drivers/gpu/drm/exynos/exynos_hdmi.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index bc1565f1822a..dda94de4afe0 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -125,7 +125,6 @@ struct hdmi_context {
 	void __iomem			*regs;
 	void __iomem			*regs_hdmiphy;
 	struct i2c_client		*hdmiphy_port;
-	struct i2c_adapter		*ddc_adpt;
 	struct gpio_desc		*hpd_gpio;
 	int				irq;
 	struct regmap			*pmureg;
@@ -871,10 +870,10 @@ static int hdmi_get_modes(struct drm_connector *connector)
 	struct edid *edid;
 	int ret;
 
-	if (!hdata->ddc_adpt)
+	if (!connector->ddc)
 		return -ENODEV;
 
-	edid = drm_get_edid(connector, hdata->ddc_adpt);
+	edid = drm_get_edid(connector, connector->ddc);
 	if (!edid)
 		return -ENODEV;
 
@@ -940,8 +939,10 @@ static int hdmi_create_connector(struct drm_encoder *encoder)
 	connector->interlace_allowed = true;
 	connector->polled = DRM_CONNECTOR_POLL_HPD;
 
-	ret = drm_connector_init(hdata->drm_dev, connector,
-			&hdmi_connector_funcs, DRM_MODE_CONNECTOR_HDMIA);
+	ret = drm_connector_init_with_ddc(hdata->drm_dev, connector,
+					  &hdmi_connector_funcs,
+					  DRM_MODE_CONNECTOR_HDMIA,
+					  connector->ddc);
 	if (ret) {
 		DRM_DEV_ERROR(hdata->dev,
 			      "Failed to initialize connector with drm\n");
@@ -1892,7 +1893,7 @@ static int hdmi_get_ddc_adapter(struct hdmi_context *hdata)
 		return -EPROBE_DEFER;
 	}
 
-	hdata->ddc_adpt = adpt;
+	hdata->connector.ddc = adpt;
 
 	return 0;
 }
@@ -2044,7 +2045,7 @@ static int hdmi_probe(struct platform_device *pdev)
 	if (hdata->regs_hdmiphy)
 		iounmap(hdata->regs_hdmiphy);
 err_ddc:
-	put_device(&hdata->ddc_adpt->dev);
+	put_device(&hdata->connector.ddc->dev);
 
 	return ret;
 }
@@ -2071,7 +2072,7 @@ static int hdmi_remove(struct platform_device *pdev)
 	if (hdata->regs_hdmiphy)
 		iounmap(hdata->regs_hdmiphy);
 
-	put_device(&hdata->ddc_adpt->dev);
+	put_device(&hdata->connector.ddc->dev);
 
 	mutex_destroy(&hdata->mutex);
 
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2019-07-24 13:59 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-24 13:59 [PATCH v5 00/24] Associate ddc adapters with connectors Andrzej Pietrasiewicz
2019-07-24 13:59 ` [PATCH v5 01/24] drm: Include ddc adapter pointer in struct drm_connector Andrzej Pietrasiewicz
     [not found]   ` <e82d6aca4f8abc95834c8a36c101d153518bb1ac.1563960855.git.andrzej.p-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2019-07-26  6:37     ` Sam Ravnborg
2019-07-26  8:08       ` Sam Ravnborg
2019-07-26  8:08         ` Sam Ravnborg
2019-07-26 12:18       ` Andrzej Pietrasiewicz
2019-07-26 12:18         ` Andrzej Pietrasiewicz
2019-07-24 13:59 ` [PATCH v5 02/24] drm: Add drm_connector_init() variant with ddc Andrzej Pietrasiewicz
     [not found]   ` <53f5ded2971235e5b63c9a3ed4ed8bccf10c78f2.1563960855.git.andrzej.p-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2019-07-24 17:16     ` Thomas Zimmermann
2019-07-24 17:16       ` Thomas Zimmermann
2019-07-24 17:16       ` Thomas Zimmermann
2019-07-26  6:35     ` Sam Ravnborg
2019-07-29  8:42   ` Jani Nikula
2019-07-24 13:59 ` Andrzej Pietrasiewicz [this message]
2019-07-24 13:59 ` [PATCH v5 04/24] drm: rockchip: Provide ddc symlink in rk3066_hdmi sysfs directory Andrzej Pietrasiewicz
2019-07-24 13:59 ` [PATCH v5 05/24] drm: rockchip: Provide ddc symlink in inno_hdmi " Andrzej Pietrasiewicz
2019-07-24 13:59 ` [PATCH v5 06/24] drm/msm/hdmi: Provide ddc symlink in hdmi connector " Andrzej Pietrasiewicz
2019-07-24 13:59 ` [PATCH v5 08/24] drm/mediatek: " Andrzej Pietrasiewicz
2019-07-24 13:59 ` [PATCH v5 09/24] drm/tegra: Provide ddc symlink in output " Andrzej Pietrasiewicz
2019-07-24 13:59 ` [PATCH v5 10/24] drm/imx: imx-ldb: Provide ddc symlink in connector's sysfs Andrzej Pietrasiewicz
2019-07-24 13:59 ` [PATCH v5 11/24] drm/imx: imx-tve: " Andrzej Pietrasiewicz
2019-07-24 13:59 ` [PATCH v5 12/24] drm/vc4: Provide ddc symlink in connector sysfs directory Andrzej Pietrasiewicz
2019-07-24 13:59 ` [PATCH v5 13/24] drm: zte: Provide ddc symlink in hdmi " Andrzej Pietrasiewicz
2019-07-24 13:59 ` [PATCH v5 14/24] drm: zte: Provide ddc symlink in vga " Andrzej Pietrasiewicz
2019-07-24 13:59 ` [PATCH v5 15/24] drm/tilcdc: Provide ddc symlink in " Andrzej Pietrasiewicz
2019-07-24 13:59 ` [PATCH v5 16/24] drm: sti: Provide ddc symlink in hdmi " Andrzej Pietrasiewicz
2019-07-24 13:59 ` [PATCH v5 17/24] drm/mgag200: Provide ddc symlink in " Andrzej Pietrasiewicz
     [not found]   ` <f86dfa1ed6e84ab8b36a0b2c24df897bdb957294.1563960855.git.andrzej.p-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2019-07-24 17:17     ` Thomas Zimmermann
2019-07-24 13:59 ` [PATCH v5 18/24] drm/ast: " Andrzej Pietrasiewicz
2019-07-24 17:17   ` Thomas Zimmermann
2019-07-24 17:17     ` Thomas Zimmermann
2019-07-24 17:17     ` Thomas Zimmermann
2019-07-24 13:59 ` [PATCH v5 19/24] drm/bridge: dumb-vga-dac: " Andrzej Pietrasiewicz
2019-07-24 13:59 ` [PATCH v5 20/24] drm/bridge: dw-hdmi: " Andrzej Pietrasiewicz
2019-07-24 13:59 ` [PATCH v5 21/24] drm/bridge: ti-tfp410: " Andrzej Pietrasiewicz
2019-07-24 13:59 ` [PATCH v5 22/24] drm/amdgpu: " Andrzej Pietrasiewicz
     [not found] ` <cover.1563960855.git.andrzej.p-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2019-07-24 13:59   ` [PATCH v5 07/24] drm/sun4i: hdmi: Provide ddc symlink in sun4i hdmi " Andrzej Pietrasiewicz
2019-07-24 13:59   ` [PATCH v5 23/24] drm/radeon: Provide ddc symlink in " Andrzej Pietrasiewicz
2019-07-24 13:59   ` [PATCH v5 24/24] drm/i915: Provide ddc symlink in hdmi " Andrzej Pietrasiewicz
2019-07-24 14:19 ` ✗ Fi.CI.CHECKPATCH: warning for Associate ddc adapters with connectors (rev2) Patchwork
2019-07-24 16:37 ` ✓ Fi.CI.BAT: success " Patchwork
2019-07-24 19:47 ` ✓ 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=6fea36724e29e0a6629a19a821727043e730a1e5.1563960855.git.andrzej.p@collabora.com \
    --to=andrzej.p@collabora.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@linux.ie \
    --cc=airlied@redhat.com \
    --cc=alexios.zavras@intel.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jonas@kwiboo.se \
    --cc=jonathanh@nvidia.com \
    --cc=kernel@collabora.com \
    --cc=kgene@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=maxime.ripard@bootlin.com \
    --cc=narmstrong@baylibre.com \
    --cc=sam@ravnborg.org \
    --cc=thierry.reding@gmail.com \
    --cc=vincent.abriou@st.com \
    --cc=wens@csie.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 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.