Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp314195ybl; Tue, 10 Dec 2019 23:40:42 -0800 (PST) X-Google-Smtp-Source: APXvYqxAgSYZ793WQ6nZHwkikyzqIqzURBbSd8z2gngocSBqSVp+SGC1M5ZrYpbJzo8HIuSsAsVb X-Received: by 2002:aca:d5d3:: with SMTP id m202mr1574187oig.161.1576050042592; Tue, 10 Dec 2019 23:40:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576050042; cv=none; d=google.com; s=arc-20160816; b=BIMxAdRJGk/O4NKzgfNXwU5HxQ9Q6/Y+DGLxAyPN/rDCKwp14jlOlE25Xw3+PIqLbU hdfT0x302LLE2Z+le9Luc44jnsHHHUMrPuKRDe01PZMwc/tED00Uqw8DEmzxOKgeEfYG ygXY5lMZf5/wjt833PTh21wdlCyEI4qH3KgfVLDshV/8uogwqSi84KtjGB/u/kjeH6WJ sB8NwLaBb97ifHUIQ4L1gdMT1IKhRTvbMD1P2toSx8c2iCJKGnvwrWaNxRVi34wPk8r8 SBSWq5SJV8ufS5yPcuGdz5cLZLwJgEer2O2FFY/cR6A+HYpVqA4Ff0Mb1MxH9cL51e5e tlCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject; bh=m4Htzxq6l/lfTIXpGhKil7K3cWadIpYUTW+kx1Ud5F8=; b=cKacYKcJ9KJZfqUOi5XkpQtFIQQ8aOwiDLM8rQNJ9JZc8KBzQvtQbxicP6M4WdqOCg W/YwuwM+o1q9bvCsIJwvcImlIUVASvJEbdBLkKOk38PjcTfYp3EN/n+9AFWrHU7B4yk+ 8Uuwpt8DMb3qs0VKSe9HbGuFhxWG8WkG+wXjdphMW+R98AZUnyYFd7KJHg1JfC7o39TB p8lKygicou+6xs6gos1Kd8OcsTRKaLokW5BH3h2BMdRJIIIC3vAenNxidGHy0wv8V9HM G4Y/zrRRgX9RTHFoiX6UnhsU0H7vljkfNifziMBPw70NE8jN6ByZKvi0LAY3df1GM8nG /P0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si654260oix.100.2019.12.10.23.40.29; Tue, 10 Dec 2019 23:40:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728025AbfLKHij (ORCPT + 99 others); Wed, 11 Dec 2019 02:38:39 -0500 Received: from mx2.suse.de ([195.135.220.15]:34566 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726082AbfLKHij (ORCPT ); Wed, 11 Dec 2019 02:38:39 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E756EB23E; Wed, 11 Dec 2019 07:38:33 +0000 (UTC) Subject: Re: [PATCH] drm: remove drm_bridge->dev To: Mihail Atanassov , "dri-devel@lists.freedesktop.org" Cc: "freedreno@lists.freedesktop.org" , Martyn Welch , Neil Armstrong , David Airlie , "linux-arm-msm@vger.kernel.org" , Peter Senna Tschudin , Russell King , "linux-kernel@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" , Kieran Bingham , nd , Sean Paul References: <20191205163028.19941-1-mihail.atanassov@arm.com> <20191210151111.21510-1-mihail.atanassov@arm.com> From: Thomas Zimmermann Autocrypt: addr=tzimmermann@suse.de; keydata= mQENBFs50uABCADEHPidWt974CaxBVbrIBwqcq/WURinJ3+2WlIrKWspiP83vfZKaXhFYsdg XH47fDVbPPj+d6tQrw5lPQCyqjwrCPYnq3WlIBnGPJ4/jreTL6V+qfKRDlGLWFjZcsrPJGE0 BeB5BbqP5erN1qylK9i3gPoQjXGhpBpQYwRrEyQyjuvk+Ev0K1Jc5tVDeJAuau3TGNgah4Yc hdHm3bkPjz9EErV85RwvImQ1dptvx6s7xzwXTgGAsaYZsL8WCwDaTuqFa1d1jjlaxg6+tZsB 9GluwvIhSezPgnEmimZDkGnZRRSFiGP8yjqTjjWuf0bSj5rUnTGiyLyRZRNGcXmu6hjlABEB AAG0J1Rob21hcyBaaW1tZXJtYW5uIDx0emltbWVybWFubkBzdXNlLmRlPokBVAQTAQgAPhYh BHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJbOdLgAhsDBQkDwmcABQsJCAcCBhUKCQgLAgQWAgMB Ah4BAheAAAoJEGgNwR1TC3ojR80H/jH+vYavwQ+TvO8ksXL9JQWc3IFSiGpuSVXLCdg62AmR irxW+qCwNncNQyb9rd30gzdectSkPWL3KSqEResBe24IbA5/jSkPweJasgXtfhuyoeCJ6PXo clQQGKIoFIAEv1s8l0ggPZswvCinegl1diyJXUXmdEJRTWYAtxn/atut1o6Giv6D2qmYbXN7 mneMC5MzlLaJKUtoH7U/IjVw1sx2qtxAZGKVm4RZxPnMCp9E1MAr5t4dP5gJCIiqsdrVqI6i KupZstMxstPU//azmz7ZWWxT0JzgJqZSvPYx/SATeexTYBP47YFyri4jnsty2ErS91E6H8os Bv6pnSn7eAq5AQ0EWznS4AEIAMYmP4M/V+T5RY5at/g7rUdNsLhWv1APYrh9RQefODYHrNRH UE9eosYbT6XMryR9hT8XlGOYRwKWwiQBoWSDiTMo/Xi29jUnn4BXfI2px2DTXwc22LKtLAgT RjP+qbU63Y0xnQN29UGDbYgyyK51DW3H0If2a3JNsheAAK+Xc9baj0LGIc8T9uiEWHBnCH+R dhgATnWWGKdDegUR5BkDfDg5O/FISymJBHx2Dyoklv5g4BzkgqTqwmaYzsl8UxZKvbaxq0zb ehDda8lvhFXodNFMAgTLJlLuDYOGLK2AwbrS3Sp0AEbkpdJBb44qVlGm5bApZouHeJ/+n+7r 12+lqdsAEQEAAYkBPAQYAQgAJhYhBHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJbOdLgAhsMBQkD wmcAAAoJEGgNwR1TC3ojpfcIAInwP5OlcEKokTnHCiDTz4Ony4GnHRP2fXATQZCKxmu4AJY2 h9ifw9Nf2TjCZ6AMvC3thAN0rFDj55N9l4s1CpaDo4J+0fkrHuyNacnT206CeJV1E7NYntxU n+LSiRrOdywn6erjxRi9EYTVLCHcDhBEjKmFZfg4AM4GZMWX1lg0+eHbd5oL1as28WvvI/uI aMyV8RbyXot1r/8QLlWldU3NrTF5p7TMU2y3ZH2mf5suSKHAMtbE4jKJ8ZHFOo3GhLgjVrBW HE9JXO08xKkgD+w6v83+nomsEuf6C6LYrqY/tsZvyEX6zN8CtirPdPWu/VXNRYAl/lat7lSI 3H26qrE= Message-ID: Date: Wed, 11 Dec 2019 08:38:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20191210151111.21510-1-mihail.atanassov@arm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8FJBslncYlSdiO8aT8cexcEJ3rzxL4g2V" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --8FJBslncYlSdiO8aT8cexcEJ3rzxL4g2V Content-Type: multipart/mixed; boundary="SBz0YmXbjLvh1meetqCw6dn3HuF9ek5FE"; protected-headers="v1" From: Thomas Zimmermann To: Mihail Atanassov , "dri-devel@lists.freedesktop.org" Cc: "freedreno@lists.freedesktop.org" , Martyn Welch , Neil Armstrong , David Airlie , "linux-arm-msm@vger.kernel.org" , Peter Senna Tschudin , Russell King , "linux-kernel@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" , Kieran Bingham , nd , Sean Paul Message-ID: Subject: Re: [PATCH] drm: remove drm_bridge->dev References: <20191205163028.19941-1-mihail.atanassov@arm.com> <20191210151111.21510-1-mihail.atanassov@arm.com> In-Reply-To: <20191210151111.21510-1-mihail.atanassov@arm.com> --SBz0YmXbjLvh1meetqCw6dn3HuF9ek5FE Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi Am 10.12.19 um 16:11 schrieb Mihail Atanassov: > As suggested in [1], the 'dev' field is a bit repetitive, since it 1:1 > follows the setting and NULLing of the 'encoder' field. Therefore, use > drm_bridge->encoder->dev in place of drm_bridge->dev. >=20 > [1] https://patchwork.freedesktop.org/patch/343824/ >=20 > Cc: Daniel Vetter > Suggested-by: Thomas Zimmermann > Signed-off-by: Mihail Atanassov Do you need help with merging the patch? Best regards Thomas > --- > drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 2 +- > drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 2 +- > drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c | 2 +- > drivers/gpu/drm/bridge/cdns-dsi.c | 2 +- > drivers/gpu/drm/bridge/dumb-vga-dac.c | 2 +- > .../gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 2 +- > drivers/gpu/drm/bridge/nxp-ptn3460.c | 2 +- > drivers/gpu/drm/bridge/panel.c | 2 +- > drivers/gpu/drm/bridge/parade-ps8622.c | 2 +- > drivers/gpu/drm/bridge/sii902x.c | 6 +++--- > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 +++--- > drivers/gpu/drm/bridge/tc358764.c | 4 ++-- > drivers/gpu/drm/bridge/tc358767.c | 6 +++--- > drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 +- > drivers/gpu/drm/bridge/ti-tfp410.c | 6 +++--- > drivers/gpu/drm/drm_bridge.c | 10 ++++------= > drivers/gpu/drm/i2c/tda998x_drv.c | 2 +- > drivers/gpu/drm/mcde/mcde_dsi.c | 2 +- > drivers/gpu/drm/msm/edp/edp_bridge.c | 2 +- > drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 4 ++-- > drivers/gpu/drm/rcar-du/rcar_lvds.c | 3 ++- > include/drm/drm_bridge.h | 2 -- > 22 files changed, 35 insertions(+), 38 deletions(-) >=20 > diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu= /drm/bridge/adv7511/adv7511_drv.c > index 9e13e466e72c..009cf1fef8d4 100644 > --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c > +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c > @@ -863,7 +863,7 @@ static int adv7511_bridge_attach(struct drm_bridge = *bridge) > adv->connector.polled =3D DRM_CONNECTOR_POLL_CONNECT | > DRM_CONNECTOR_POLL_DISCONNECT; > =20 > - ret =3D drm_connector_init(bridge->dev, &adv->connector, > + ret =3D drm_connector_init(bridge->encoder->dev, &adv->connector, > &adv7511_connector_funcs, > DRM_MODE_CONNECTOR_HDMIA); > if (ret) { > diff --git a/drivers/gpu/drm/bridge/analogix/analogix-anx6345.c b/drive= rs/gpu/drm/bridge/analogix/analogix-anx6345.c > index 9917ce0d86a0..5b806d23fcb3 100644 > --- a/drivers/gpu/drm/bridge/analogix/analogix-anx6345.c > +++ b/drivers/gpu/drm/bridge/analogix/analogix-anx6345.c > @@ -541,7 +541,7 @@ static int anx6345_bridge_attach(struct drm_bridge = *bridge) > return err; > } > =20 > - err =3D drm_connector_init(bridge->dev, &anx6345->connector, > + err =3D drm_connector_init(bridge->encoder->dev, &anx6345->connector,= > &anx6345_connector_funcs, > DRM_MODE_CONNECTOR_eDP); > if (err) { > diff --git a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c b/drive= rs/gpu/drm/bridge/analogix/analogix-anx78xx.c > index 41867be03751..7463537950cb 100644 > --- a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c > +++ b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c > @@ -908,7 +908,7 @@ static int anx78xx_bridge_attach(struct drm_bridge = *bridge) > return err; > } > =20 > - err =3D drm_connector_init(bridge->dev, &anx78xx->connector, > + err =3D drm_connector_init(bridge->encoder->dev, &anx78xx->connector,= > &anx78xx_connector_funcs, > DRM_MODE_CONNECTOR_DisplayPort); > if (err) { > diff --git a/drivers/gpu/drm/bridge/cdns-dsi.c b/drivers/gpu/drm/bridge= /cdns-dsi.c > index 3a5bd4e7fd1e..32863e3ad537 100644 > --- a/drivers/gpu/drm/bridge/cdns-dsi.c > +++ b/drivers/gpu/drm/bridge/cdns-dsi.c > @@ -651,7 +651,7 @@ static int cdns_dsi_bridge_attach(struct drm_bridge= *bridge) > struct cdns_dsi *dsi =3D input_to_dsi(input); > struct cdns_dsi_output *output =3D &dsi->output; > =20 > - if (!drm_core_check_feature(bridge->dev, DRIVER_ATOMIC)) { > + if (!drm_core_check_feature(bridge->encoder->dev, DRIVER_ATOMIC)) { > dev_err(dsi->base.dev, > "cdns-dsi driver is only compatible with DRM devices supporting ato= mic updates"); > return -ENOTSUPP; > diff --git a/drivers/gpu/drm/bridge/dumb-vga-dac.c b/drivers/gpu/drm/br= idge/dumb-vga-dac.c > index cc33dc411b9e..67ad6cecf68d 100644 > --- a/drivers/gpu/drm/bridge/dumb-vga-dac.c > +++ b/drivers/gpu/drm/bridge/dumb-vga-dac.c > @@ -112,7 +112,7 @@ static int dumb_vga_attach(struct drm_bridge *bridg= e) > =20 > drm_connector_helper_add(&vga->connector, > &dumb_vga_con_helper_funcs); > - ret =3D drm_connector_init_with_ddc(bridge->dev, &vga->connector, > + ret =3D drm_connector_init_with_ddc(bridge->encoder->dev, &vga->conne= ctor, > &dumb_vga_con_funcs, > DRM_MODE_CONNECTOR_VGA, > vga->ddc); > diff --git a/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c b= /drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c > index e8a49f6146c6..c914f01e4707 100644 > --- a/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c > +++ b/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c > @@ -223,7 +223,7 @@ static int ge_b850v3_lvds_attach(struct drm_bridge = *bridge) > drm_connector_helper_add(connector, > &ge_b850v3_lvds_connector_helper_funcs); > =20 > - ret =3D drm_connector_init(bridge->dev, connector, > + ret =3D drm_connector_init(bridge->encoder->dev, connector, > &ge_b850v3_lvds_connector_funcs, > DRM_MODE_CONNECTOR_DisplayPort); > if (ret) { > diff --git a/drivers/gpu/drm/bridge/nxp-ptn3460.c b/drivers/gpu/drm/bri= dge/nxp-ptn3460.c > index 57ff01339559..3999bb864eb9 100644 > --- a/drivers/gpu/drm/bridge/nxp-ptn3460.c > +++ b/drivers/gpu/drm/bridge/nxp-ptn3460.c > @@ -247,7 +247,7 @@ static int ptn3460_bridge_attach(struct drm_bridge = *bridge) > } > =20 > ptn_bridge->connector.polled =3D DRM_CONNECTOR_POLL_HPD; > - ret =3D drm_connector_init(bridge->dev, &ptn_bridge->connector, > + ret =3D drm_connector_init(bridge->encoder->dev, &ptn_bridge->connect= or, > &ptn3460_connector_funcs, DRM_MODE_CONNECTOR_LVDS); > if (ret) { > DRM_ERROR("Failed to initialize connector with drm\n"); > diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/pa= nel.c > index f66777e24968..4ba4e9d9537a 100644 > --- a/drivers/gpu/drm/bridge/panel.c > +++ b/drivers/gpu/drm/bridge/panel.c > @@ -67,7 +67,7 @@ static int panel_bridge_attach(struct drm_bridge *bri= dge) > drm_connector_helper_add(connector, > &panel_bridge_connector_helper_funcs); > =20 > - ret =3D drm_connector_init(bridge->dev, connector, > + ret =3D drm_connector_init(bridge->encoder->dev, connector, > &panel_bridge_connector_funcs, > panel_bridge->connector_type); > if (ret) { > diff --git a/drivers/gpu/drm/bridge/parade-ps8622.c b/drivers/gpu/drm/b= ridge/parade-ps8622.c > index 10c47c008b40..c32af9c2bbcc 100644 > --- a/drivers/gpu/drm/bridge/parade-ps8622.c > +++ b/drivers/gpu/drm/bridge/parade-ps8622.c > @@ -487,7 +487,7 @@ static int ps8622_attach(struct drm_bridge *bridge)= > } > =20 > ps8622->connector.polled =3D DRM_CONNECTOR_POLL_HPD; > - ret =3D drm_connector_init(bridge->dev, &ps8622->connector, > + ret =3D drm_connector_init(bridge->encoder->dev, &ps8622->connector, > &ps8622_connector_funcs, DRM_MODE_CONNECTOR_LVDS); > if (ret) { > DRM_ERROR("Failed to initialize connector with drm\n"); > diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/= sii902x.c > index b70e8c5cf2e1..6ca297d78a26 100644 > --- a/drivers/gpu/drm/bridge/sii902x.c > +++ b/drivers/gpu/drm/bridge/sii902x.c > @@ -402,7 +402,7 @@ static void sii902x_bridge_mode_set(struct drm_brid= ge *bridge, > static int sii902x_bridge_attach(struct drm_bridge *bridge) > { > struct sii902x *sii902x =3D bridge_to_sii902x(bridge); > - struct drm_device *drm =3D bridge->dev; > + struct drm_device *drm =3D bridge->encoder->dev; > int ret; > =20 > drm_connector_helper_add(&sii902x->connector, > @@ -820,8 +820,8 @@ static irqreturn_t sii902x_interrupt(int irq, void = *data) > =20 > mutex_unlock(&sii902x->mutex); > =20 > - if ((status & SII902X_HOTPLUG_EVENT) && sii902x->bridge.dev) > - drm_helper_hpd_irq_event(sii902x->bridge.dev); > + if ((status & SII902X_HOTPLUG_EVENT) && sii902x->bridge.encoder) > + drm_helper_hpd_irq_event(sii902x->bridge.encoder->dev); > =20 > return IRQ_HANDLED; > } > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/dr= m/bridge/synopsys/dw-hdmi.c > index dbe38a54870b..99274ca0fdf6 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > @@ -2346,7 +2346,7 @@ static int dw_hdmi_bridge_attach(struct drm_bridg= e *bridge) > =20 > drm_connector_helper_add(connector, &dw_hdmi_connector_helper_funcs);= > =20 > - drm_connector_init_with_ddc(bridge->dev, connector, > + drm_connector_init_with_ddc(bridge->encoder->dev, connector, > &dw_hdmi_connector_funcs, > DRM_MODE_CONNECTOR_HDMIA, > hdmi->ddc); > @@ -2554,8 +2554,8 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev= _id) > if (intr_stat & HDMI_IH_PHY_STAT0_HPD) { > dev_dbg(hdmi->dev, "EVENT=3D%s\n", > phy_int_pol & HDMI_PHY_HPD ? "plugin" : "plugout"); > - if (hdmi->bridge.dev) > - drm_helper_hpd_irq_event(hdmi->bridge.dev); > + if (hdmi->bridge.encoder) > + drm_helper_hpd_irq_event(hdmi->bridge.encoder->dev); > } > =20 > hdmi_writeb(hdmi, intr_stat, HDMI_IH_PHY_STAT0); > diff --git a/drivers/gpu/drm/bridge/tc358764.c b/drivers/gpu/drm/bridge= /tc358764.c > index 96207fcfde19..e35e17b1f396 100644 > --- a/drivers/gpu/drm/bridge/tc358764.c > +++ b/drivers/gpu/drm/bridge/tc358764.c > @@ -352,7 +352,7 @@ static void tc358764_enable(struct drm_bridge *brid= ge) > static int tc358764_attach(struct drm_bridge *bridge) > { > struct tc358764 *ctx =3D bridge_to_tc358764(bridge); > - struct drm_device *drm =3D bridge->dev; > + struct drm_device *drm =3D bridge->encoder->dev; > int ret; > =20 > ctx->connector.polled =3D DRM_CONNECTOR_POLL_HPD; > @@ -378,7 +378,7 @@ static int tc358764_attach(struct drm_bridge *bridg= e) > static void tc358764_detach(struct drm_bridge *bridge) > { > struct tc358764 *ctx =3D bridge_to_tc358764(bridge); > - struct drm_device *drm =3D bridge->dev; > + struct drm_device *drm =3D bridge->encoder->dev; > =20 > drm_connector_unregister(&ctx->connector); > drm_fb_helper_remove_one_connector(drm->fb_helper, &ctx->connector); > diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge= /tc358767.c > index 3709e5ace724..ab1524c00777 100644 > --- a/drivers/gpu/drm/bridge/tc358767.c > +++ b/drivers/gpu/drm/bridge/tc358767.c > @@ -1407,7 +1407,7 @@ static int tc_bridge_attach(struct drm_bridge *br= idge) > { > u32 bus_format =3D MEDIA_BUS_FMT_RGB888_1X24; > struct tc_data *tc =3D bridge_to_tc(bridge); > - struct drm_device *drm =3D bridge->dev; > + struct drm_device *drm =3D bridge->encoder->dev; > int ret; > =20 > /* Create DP/eDP connector */ > @@ -1514,7 +1514,7 @@ static irqreturn_t tc_irq_handler(int irq, void *= arg) > dev_err(tc->dev, "syserr %x\n", stat); > } > =20 > - if (tc->hpd_pin >=3D 0 && tc->bridge.dev) { > + if (tc->hpd_pin >=3D 0 && tc->bridge.encoder) { > /* > * H is triggered when the GPIO goes high. > * > @@ -1528,7 +1528,7 @@ static irqreturn_t tc_irq_handler(int irq, void *= arg) > h ? "H" : "", lc ? "LC" : ""); > =20 > if (h || lc) > - drm_kms_helper_hotplug_event(tc->bridge.dev); > + drm_kms_helper_hotplug_event(tc->bridge.encoder->dev); > } > =20 > regmap_write(tc->regmap, INTSTS_G, val); > diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/br= idge/ti-sn65dsi86.c > index 9a2dd986afa5..8a4e64cfca1e 100644 > --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c > +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c > @@ -275,7 +275,7 @@ static int ti_sn_bridge_attach(struct drm_bridge *b= ridge) > .node =3D NULL, > }; > =20 > - ret =3D drm_connector_init(bridge->dev, &pdata->connector, > + ret =3D drm_connector_init(bridge->encoder->dev, &pdata->connector, > &ti_sn_bridge_connector_funcs, > DRM_MODE_CONNECTOR_eDP); > if (ret) { > diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridg= e/ti-tfp410.c > index aa3198dc9903..76229367e2f4 100644 > --- a/drivers/gpu/drm/bridge/ti-tfp410.c > +++ b/drivers/gpu/drm/bridge/ti-tfp410.c > @@ -135,7 +135,7 @@ static int tfp410_attach(struct drm_bridge *bridge)= > =20 > drm_connector_helper_add(&dvi->connector, > &tfp410_con_helper_funcs); > - ret =3D drm_connector_init_with_ddc(bridge->dev, &dvi->connector, > + ret =3D drm_connector_init_with_ddc(bridge->encoder->dev, &dvi->conne= ctor, > &tfp410_con_funcs, > dvi->connector_type, > dvi->ddc); > @@ -179,8 +179,8 @@ static void tfp410_hpd_work_func(struct work_struct= *work) > =20 > dvi =3D container_of(work, struct tfp410, hpd_work.work); > =20 > - if (dvi->bridge.dev) > - drm_helper_hpd_irq_event(dvi->bridge.dev); > + if (dvi->bridge.encoder) > + drm_helper_hpd_irq_event(dvi->bridge.encoder->dev); > } > =20 > static irqreturn_t tfp410_hpd_irq_thread(int irq, void *arg) > diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.= c > index c2cf0c90fa26..eaa20804b038 100644 > --- a/drivers/gpu/drm/drm_bridge.c > +++ b/drivers/gpu/drm/drm_bridge.c > @@ -119,13 +119,12 @@ int drm_bridge_attach(struct drm_encoder *encoder= , struct drm_bridge *bridge, > if (!encoder || !bridge) > return -EINVAL; > =20 > - if (previous && (!previous->dev || previous->encoder !=3D encoder)) > + if (previous && (previous->encoder !=3D encoder)) > return -EINVAL; > =20 > - if (bridge->dev) > + if (bridge->encoder) > return -EBUSY; > =20 > - bridge->dev =3D encoder->dev; > bridge->encoder =3D encoder; > =20 > if (previous) > @@ -137,7 +136,6 @@ int drm_bridge_attach(struct drm_encoder *encoder, = struct drm_bridge *bridge, > ret =3D bridge->funcs->attach(bridge); > if (ret < 0) { > list_del(&bridge->chain_node); > - bridge->dev =3D NULL; > bridge->encoder =3D NULL; > return ret; > } > @@ -152,14 +150,14 @@ void drm_bridge_detach(struct drm_bridge *bridge)= > if (WARN_ON(!bridge)) > return; > =20 > - if (WARN_ON(!bridge->dev)) > + if (WARN_ON(!bridge->encoder)) > return; > =20 > if (bridge->funcs->detach) > bridge->funcs->detach(bridge); > =20 > list_del(&bridge->chain_node); > - bridge->dev =3D NULL; > + bridge->encoder =3D NULL; > } > =20 > /** > diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/td= a998x_drv.c > index a63790d32d75..17a66ef3dfd4 100644 > --- a/drivers/gpu/drm/i2c/tda998x_drv.c > +++ b/drivers/gpu/drm/i2c/tda998x_drv.c > @@ -1360,7 +1360,7 @@ static int tda998x_bridge_attach(struct drm_bridg= e *bridge) > { > struct tda998x_priv *priv =3D bridge_to_tda998x_priv(bridge); > =20 > - return tda998x_connector_init(priv, bridge->dev); > + return tda998x_connector_init(priv, bridge->encoder->dev); > } > =20 > static void tda998x_bridge_detach(struct drm_bridge *bridge) > diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcd= e_dsi.c > index 42fff811653e..c08d7ede9fb8 100644 > --- a/drivers/gpu/drm/mcde/mcde_dsi.c > +++ b/drivers/gpu/drm/mcde/mcde_dsi.c > @@ -846,7 +846,7 @@ static void mcde_dsi_bridge_disable(struct drm_brid= ge *bridge) > static int mcde_dsi_bridge_attach(struct drm_bridge *bridge) > { > struct mcde_dsi *d =3D bridge_to_mcde_dsi(bridge); > - struct drm_device *drm =3D bridge->dev; > + struct drm_device *drm =3D bridge->encoder->dev; > int ret; > =20 > if (!drm_core_check_feature(drm, DRIVER_ATOMIC)) { > diff --git a/drivers/gpu/drm/msm/edp/edp_bridge.c b/drivers/gpu/drm/msm= /edp/edp_bridge.c > index b65b5cc2dba2..301dd7a80bde 100644 > --- a/drivers/gpu/drm/msm/edp/edp_bridge.c > +++ b/drivers/gpu/drm/msm/edp/edp_bridge.c > @@ -47,7 +47,7 @@ static void edp_bridge_mode_set(struct drm_bridge *br= idge, > const struct drm_display_mode *mode, > const struct drm_display_mode *adjusted_mode) > { > - struct drm_device *dev =3D bridge->dev; > + struct drm_device *dev =3D bridge->encoder->dev; > struct drm_connector *connector; > struct edp_bridge *edp_bridge =3D to_edp_bridge(bridge); > struct msm_edp *edp =3D edp_bridge->edp; > diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c b/drivers/gpu/drm/m= sm/hdmi/hdmi_bridge.c > index ba81338a9bf8..07c098dce310 100644 > --- a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c > +++ b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c > @@ -20,7 +20,7 @@ void msm_hdmi_bridge_destroy(struct drm_bridge *bridg= e) > =20 > static void msm_hdmi_power_on(struct drm_bridge *bridge) > { > - struct drm_device *dev =3D bridge->dev; > + struct drm_device *dev =3D bridge->encoder->dev; > struct hdmi_bridge *hdmi_bridge =3D to_hdmi_bridge(bridge); > struct hdmi *hdmi =3D hdmi_bridge->hdmi; > const struct hdmi_platform_config *config =3D hdmi->config; > @@ -56,7 +56,7 @@ static void msm_hdmi_power_on(struct drm_bridge *brid= ge) > =20 > static void power_off(struct drm_bridge *bridge) > { > - struct drm_device *dev =3D bridge->dev; > + struct drm_device *dev =3D bridge->encoder->dev; > struct hdmi_bridge *hdmi_bridge =3D to_hdmi_bridge(bridge); > struct hdmi *hdmi =3D hdmi_bridge->hdmi; > const struct hdmi_platform_config *config =3D hdmi->config; > diff --git a/drivers/gpu/drm/rcar-du/rcar_lvds.c b/drivers/gpu/drm/rcar= -du/rcar_lvds.c > index 2cf44b91853c..83538125a722 100644 > --- a/drivers/gpu/drm/rcar-du/rcar_lvds.c > +++ b/drivers/gpu/drm/rcar-du/rcar_lvds.c > @@ -622,7 +622,8 @@ static int rcar_lvds_attach(struct drm_bridge *brid= ge) > if (!lvds->panel) > return 0; > =20 > - ret =3D drm_connector_init(bridge->dev, connector, &rcar_lvds_conn_fu= ncs, > + ret =3D drm_connector_init(bridge->encoder->dev, connector, > + &rcar_lvds_conn_funcs, > DRM_MODE_CONNECTOR_LVDS); > if (ret < 0) > return ret; > diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h > index 694e153a7531..695d0898df38 100644 > --- a/include/drm/drm_bridge.h > +++ b/include/drm/drm_bridge.h > @@ -380,8 +380,6 @@ struct drm_bridge_timings { > * struct drm_bridge - central DRM bridge control structure > */ > struct drm_bridge { > - /** @dev: DRM device this bridge belongs to */ > - struct drm_device *dev; > /** @encoder: encoder to which this bridge is connected */ > struct drm_encoder *encoder; > /** @chain_node: used to form a bridge chain */ >=20 --=20 Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany (HRB 36809, AG N=C3=BCrnberg) Gesch=C3=A4ftsf=C3=BChrer: Felix Imend=C3=B6rffer --SBz0YmXbjLvh1meetqCw6dn3HuF9ek5FE-- --8FJBslncYlSdiO8aT8cexcEJ3rzxL4g2V Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAl3wnPgACgkQaA3BHVML eiNL/QgAjv6kgKW+owPKktasbZ8/Andv9COWid2dYIINp1Gm2ggYYozudsO9YcyV kml3qLWYNXFCjnletiFerf+XW5WPL2A1qBzBna/vQK7fhaS4Yjs4VaEmyENHfINy Y1eOdQntzOc0gQ5TCFExRsNQvR7S9Eio2kGZ39PgHrc/MPcMWIwFQedUBj/UM0wb LqiFSmGE+vyowIvhPMR+f7828LpOhTiZXGh3tBtxZPE3HpVkx2KVEt+8Cg6/tO7T ExH4101xOLiqHVD1PaotQmpdvyYqabGMtPNkL4qEOa3JOKqbdWvs2PYYeYII136J 1Wm8GQkCkM7ueZ0hDYaDyuRzzTZH6A== =y772 -----END PGP SIGNATURE----- --8FJBslncYlSdiO8aT8cexcEJ3rzxL4g2V--