From: Andrzej Pietrasiewicz <andrzej.p-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
To: Thomas Zimmermann <tzimmermann-l3A5Bk7waGM@public.gmane.org>,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: "Y.C. Chen" <yc_chen-SAlXDmAnmOAqDJ6do+/SaQ@public.gmane.org>,
"Heiko Stübner" <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>,
"Sam Ravnborg" <sam-uyr5N9Q2VtJg9hUCZPvPmw@public.gmane.org>,
"Neil Armstrong"
<narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
"Maxime Ripard"
<maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>,
"Douglas Anderson"
<dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
"Andrzej Hajda" <a.hajda-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
"Thierry Reding"
<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"Laurent Pinchart"
<Laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>,
"Benjamin Gaignard"
<benjamin.gaignard-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
kernel-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org,
"Fabio Estevam"
<festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"Ville Syrjälä"
<ville.syrjala-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
"David (ChunMing) Zhou"
<David1.Zhou-5C7GfCeVMHo@public.gmane.org>,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"Joonyoung Shim"
<jy0922.shim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
"Vincent Abriou" <vincent.abriou-qxv4g6HH51o@public.gmane.org>,
"Rob Clark" <robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"Krzysztof Kozlowski"
<krzk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"Jonathan Hunter"
<jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH v3 01/22] drm: Include ddc adapter pointer in struct drm_connector
Date: Mon, 1 Jul 2019 15:27:40 +0200 [thread overview]
Message-ID: <cf1984e4-50af-302d-ef67-9ad530118c29@collabora.com> (raw)
In-Reply-To: <9b03d145-ec50-927c-55a8-dff1cd51d655-l3A5Bk7waGM@public.gmane.org>
Hi Thomas,
Thank you for your comments. Please see inline.
W dniu 30.06.2019 o 10:12, Thomas Zimmermann pisze:
> Hi
>
> I like the idea, but would prefer a more structured approach.
>
> Setting connector->ddc before calling drm_sysfs_connector_add() seems
> error prone. The dependency is not really clear from the code or interfaces.
>
> The other thing is that drivers I mostly work on, ast and mgag200, have
> code like this:
>
> struct ast_i2c_chan {
> struct i2c_adapter adapter;
> struct drm_device *dev;
> struct i2c_algo_bit_data bit;
> };
>
> struct ast_connector {
> struct drm_connector base;
> struct ast_i2c_chan *i2c;
> };
>
> It already encodes the connection between connector and ddc adapter.
>
> I suggest to introduce struct drm_i2c_adapter
>
> struct drm_i2c_adapter {
> struct i2c_adapter base;
> struct drm_connector *connector;
> };
>
> and convert drivers over to it. Ast would look like this:
>
> struct ast_i2c_chan {
> struct drm_i2c_adapter adapter;
> struct i2c_algo_bit_data bit;
> };
>
There are few flavors of these drivers. In some of them
the i2c_adapter for ddc is allocated and initialized by
the driver, which must provide a place in memory to hold
the adapter. ast is an example of this approach.
But there are others, such as for example exynos_hdmi.c.
It gets its ddc adapter with of_find_i2c_adapter_by_node()
and merely stores a pointer to it, while not managing the
memory needed to hold the i2c_adapter.
Do you have any idea how to accommodate these various
flavors of drivers in the scheme you propose?
Andrzej
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno
next prev parent reply other threads:[~2019-07-01 13:27 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3fb19371-db7d-f9dc-31a7-1ccd126f6784@collabora.com>
[not found] ` <3fb19371-db7d-f9dc-31a7-1ccd126f6784-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2019-06-28 16:01 ` [PATCH v3 00/22] Associate ddc adapters with connectors Andrzej Pietrasiewicz
[not found] ` <cover.1561735433.git.andrzej.p-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2019-06-28 16:01 ` [PATCH v3 01/22] drm: Include ddc adapter pointer in struct drm_connector Andrzej Pietrasiewicz
[not found] ` <d6381c020ea1c848a7044d830bdb0ec9663d1619.1561735433.git.andrzej.p-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2019-06-30 8:12 ` Thomas Zimmermann
[not found] ` <9b03d145-ec50-927c-55a8-dff1cd51d655-l3A5Bk7waGM@public.gmane.org>
2019-07-01 13:27 ` Andrzej Pietrasiewicz [this message]
[not found] ` <cf1984e4-50af-302d-ef67-9ad530118c29-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2019-07-01 14:41 ` Thomas Zimmermann
[not found] ` <9e65f3c0-941d-d04c-5745-6b3a2965b990-l3A5Bk7waGM@public.gmane.org>
2019-07-05 9:44 ` Andrzej Hajda
2019-06-28 16:01 ` [PATCH v3 02/22] drm/exynos: Provide ddc symlink in connector's sysfs Andrzej Pietrasiewicz
2019-06-28 16:01 ` [PATCH v3 03/22] drm: rockchip: Provide ddc symlink in rk3066_hdmi sysfs directory Andrzej Pietrasiewicz
2019-06-28 16:01 ` [PATCH v3 04/22] drm: rockchip: Provide ddc symlink in inno_hdmi " Andrzej Pietrasiewicz
2019-06-28 16:01 ` [PATCH v3 05/22] drm/msm/hdmi: Provide ddc symlink in hdmi connector " Andrzej Pietrasiewicz
2019-06-28 16:01 ` [PATCH v3 06/22] drm/sun4i: hdmi: Provide ddc symlink in sun4i " Andrzej Pietrasiewicz
2019-06-28 16:01 ` [PATCH v3 07/22] drm/mediatek: Provide ddc symlink in " Andrzej Pietrasiewicz
2019-06-28 16:01 ` [PATCH v3 08/22] drm/tegra: Provide ddc symlink in output " Andrzej Pietrasiewicz
2019-06-28 16:01 ` [PATCH v3 09/22] drm/imx: imx-ldb: Provide ddc symlink in connector's sysfs Andrzej Pietrasiewicz
2019-06-28 16:01 ` [PATCH v3 10/22] drm/imx: imx-tve: " Andrzej Pietrasiewicz
2019-06-28 16:01 ` [PATCH v3 11/22] drm/vc4: Provide ddc symlink in connector sysfs directory Andrzej Pietrasiewicz
2019-06-28 16:01 ` [PATCH v3 12/22] drm: zte: Provide ddc symlink in hdmi " Andrzej Pietrasiewicz
2019-06-28 16:01 ` [PATCH v3 13/22] drm: zte: Provide ddc symlink in vga " Andrzej Pietrasiewicz
2019-06-28 16:01 ` [PATCH v3 14/22] drm/tilcdc: Provide ddc symlink in " Andrzej Pietrasiewicz
2019-06-28 16:01 ` [PATCH v3 15/22] drm: sti: Provide ddc symlink in hdmi " Andrzej Pietrasiewicz
2019-06-28 16:01 ` [PATCH v3 16/22] drm/mgag200: Provide ddc symlink in " Andrzej Pietrasiewicz
2019-06-28 16:01 ` [PATCH v3 17/22] drm/ast: " Andrzej Pietrasiewicz
2019-06-28 16:01 ` [PATCH v3 18/22] drm/bridge: dumb-vga-dac: " Andrzej Pietrasiewicz
2019-06-28 16:01 ` [PATCH v3 19/22] drm/bridge: dw-hdmi: " Andrzej Pietrasiewicz
2019-06-28 16:01 ` [PATCH v3 20/22] drm/bridge: ti-tfp410: " Andrzej Pietrasiewicz
2019-06-28 16:01 ` [PATCH v3 21/22] drm/amdgpu: " Andrzej Pietrasiewicz
[not found] ` <5e355b8bec8fb3907566a741db8cc3e356246a32.1561735433.git.andrzej.p-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2019-07-02 20:54 ` Alex Deucher
[not found] ` <CADnq5_MrVoScVFgj3TP2Z+Ky8_32k=Cou5jebuMT5gE1+GZ0cA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-07-04 13:17 ` Andrzej Pietrasiewicz
[not found] ` <fc26ac17-dc18-f995-53cf-42b50754c916-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2019-07-05 20:17 ` Alex Deucher
2019-06-28 16:01 ` [PATCH v3 22/22] drm/radeon: " Andrzej Pietrasiewicz
2019-07-02 20:56 ` Alex Deucher
2019-06-28 16:45 ` [PATCH v3 00/22] Associate ddc adapters with connectors Daniel Vetter
[not found] ` <20190628164514.GS12905-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2019-07-02 15:08 ` Emil Velikov
2019-06-28 16:11 ` Laurent Pinchart
[not found] ` <20190628161137.GH4779-N3hz7ZxfLydczECFQUw77jytWr6r+dGw0E9HWUfgJXw@public.gmane.org>
2019-07-05 8:38 ` Andrzej Pietrasiewicz
[not found] ` <44f98134-bc8a-133a-b702-589f007b175e-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2019-07-05 8:39 ` Laurent Pinchart
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=cf1984e4-50af-302d-ef67-9ad530118c29@collabora.com \
--to=andrzej.p-zgy8ohtn/8qb+jhodadfcq@public.gmane.org \
--cc=David1.Zhou-5C7GfCeVMHo@public.gmane.org \
--cc=Laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \
--cc=a.hajda-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=benjamin.gaignard-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
--cc=jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=jy0922.shim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=kernel-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org \
--cc=krzk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org \
--cc=narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
--cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=sam-uyr5N9Q2VtJg9hUCZPvPmw@public.gmane.org \
--cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=tzimmermann-l3A5Bk7waGM@public.gmane.org \
--cc=ville.syrjala-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=vincent.abriou-qxv4g6HH51o@public.gmane.org \
--cc=yc_chen-SAlXDmAnmOAqDJ6do+/SaQ@public.gmane.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