lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 26 Nov 2015 09:04:49 +0100
From:	Thierry Reding <treding@...dia.com>
To:	Chris Zhong <zyw@...k-chips.com>
CC:	<heiko@...ech.de>, <linux-rockchip@...ts.infradead.org>,
	<mark.yao@...k-chips.com>, <emil.l.velikov@...il.com>,
	<airlied@...ux.ie>, <ajaykumar.rs@...sung.com>,
	<rmk+kernel@....linux.org.uk>, <dri-devel@...ts.freedesktop.org>,
	Inki Dae <inki.dae@...sung.com>,
	"Takashi Iwai" <tiwai@...e.de>,
	Vincent Palatin <vpalatin@...omium.org>,
	Andy Yan <andy.yan@...k-chips.com>,
	Rahul Sharma <rahul.sharma@...sung.com>,
	Sean Paul <seanpaul@...omium.org>,
	Andrew Bresticker <abrestic@...omium.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 06/13] drm/bridge: Add Synopsys DesignWare MIPI DSI
 host controller driver

On Thu, Nov 26, 2015 at 03:03:54PM +0800, Chris Zhong wrote:
> Hi Thierry
> 
> Thanks for your feedback.
> 
> 
> On 11/21/2015 12:07 AM, Thierry Reding wrote:
> >On Fri, Nov 20, 2015 at 04:15:32PM +0800, Chris Zhong wrote:
> >>add Synopsys DesignWare MIPI DSI host controller driver support.
> >>
> >>Signed-off-by: Chris Zhong <zyw@...k-chips.com>
> >>---
> >>
> >>Changes in v4:
> >>eliminate some warnning
> >>
> >>Changes in v3: None
> >>Changes in v2: None
> >>
> >>  drivers/gpu/drm/bridge/Kconfig       |   11 +
> >>  drivers/gpu/drm/bridge/Makefile      |    1 +
> >>  drivers/gpu/drm/bridge/dw_mipi_dsi.c | 1056 ++++++++++++++++++++++++++++++++++
> >>  include/drm/bridge/dw_mipi_dsi.h     |   27 +
> >>  4 files changed, 1095 insertions(+)
> >>  create mode 100644 drivers/gpu/drm/bridge/dw_mipi_dsi.c
> >>  create mode 100644 include/drm/bridge/dw_mipi_dsi.h
> >>
> >>
> >>+struct dw_mipi_dsi {
> >>+	struct mipi_dsi_host dsi_host;
> >>+	struct drm_connector connector;
> >>+	struct drm_encoder *encoder;
> >struct drm_bridge already has a pointer to an encoder, can't you reuse
> >that instead?
> >
> >>+	struct drm_bridge *bridge;
> >Typically you'd embed the bridge into the driver structure.
> I'm almost done with all the modifications according to your comments.
> Remaining this point I can not understand, the dsi is a pointer of
> drm_bridge,
> hence I can not get the bridge by container_of.
> Although, the "bridge->driver_private = dsi" have done in
> dw_mipi_dsi_register.

I don't understand. If you don't make bridge a pointer, but rather embed
it within the structure, then you can use container_of(), can't you? You
get it allocated automatically as part of allocating the dw_mipi_dsi
structure. See for example the ps8622 and ptn3460 bridge drivers.

On a slightly unrelated note, I'm not sure if we discussed this already
or if it was in another thread, but why is this even a bridge driver? A
bridge is typically some IC outside of the SoC, whereas this clearly is
IP designed into the SoC. So it's really more of an encoder rather than
a bridge.

Thierry

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ