stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Matt Redfearn <matt.redfearn@thinci.com>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Sasha Levin <sashal@kernel.org>,
	dri-devel@lists.freedesktop.org
Subject: [PATCH AUTOSEL 4.19 02/50] drm/bridge: adv7511: Attach to DSI host at probe time
Date: Tue, 24 Sep 2019 12:47:59 -0400	[thread overview]
Message-ID: <20190924164847.27780-2-sashal@kernel.org> (raw)
In-Reply-To: <20190924164847.27780-1-sashal@kernel.org>

From: Matt Redfearn <matt.redfearn@thinci.com>

[ Upstream commit 83f35bc3a852f1c3892c7474998c5cec707c7ba3 ]

In contrast to all of the DSI panel drivers in drivers/gpu/drm/panel
which attach to the DSI host via mipi_dsi_attach() at probe time, the
ADV7533 bridge device does not. Instead it defers this to the point that
the upstream device connects to its bridge via drm_bridge_attach().
The generic Synopsys MIPI DSI host driver does not register it's own
drm_bridge until the MIPI DSI has attached. But it does not call
drm_bridge_attach() on the downstream device until the upstream device
has attached. This leads to a chicken and the egg failure and the DRM
pipeline does not complete.
Since all other mipi_dsi_device drivers call mipi_dsi_attach() in
probe(), make the adv7533 mipi_dsi_device do the same. This ensures that
the Synopsys MIPI DSI host registers it's bridge such that it is
available for the upstream device to connect to.

Signed-off-by: Matt Redfearn <matt.redfearn@thinci.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190627151740.2277-1-matt.redfearn@thinci.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
index e7ddd3e3db920..807827bd910e5 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -874,9 +874,6 @@ static int adv7511_bridge_attach(struct drm_bridge *bridge)
 				 &adv7511_connector_helper_funcs);
 	drm_connector_attach_encoder(&adv->connector, bridge->encoder);
 
-	if (adv->type == ADV7533)
-		ret = adv7533_attach_dsi(adv);
-
 	if (adv->i2c_main->irq)
 		regmap_write(adv->regmap, ADV7511_REG_INT_ENABLE(0),
 			     ADV7511_INT0_HPD);
@@ -1222,8 +1219,17 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
 	drm_bridge_add(&adv7511->bridge);
 
 	adv7511_audio_init(dev, adv7511);
+
+	if (adv7511->type == ADV7533) {
+		ret = adv7533_attach_dsi(adv7511);
+		if (ret)
+			goto err_remove_bridge;
+	}
+
 	return 0;
 
+err_remove_bridge:
+	drm_bridge_remove(&adv7511->bridge);
 err_unregister_cec:
 	i2c_unregister_device(adv7511->i2c_cec);
 	if (adv7511->cec_clk)
-- 
2.20.1


  reply	other threads:[~2019-09-24 16:57 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24 16:47 [PATCH AUTOSEL 4.19 01/50] drm/bridge: tc358767: Increase AUX transfer length limit Sasha Levin
2019-09-24 16:47 ` Sasha Levin [this message]
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 03/50] drm/kms: Catch mode_object lifetime errors Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 04/50] drm/panel: simple: fix AUO g185han01 horizontal blanking Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 05/50] video: ssd1307fb: Start page range at page_offset Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 06/50] drm/stm: attach gem fence to atomic state Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 07/50] drm/panel: check failure cases in the probe func Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 08/50] drm/rockchip: Check for fast link training before enabling psr Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 09/50] drm/radeon: Fix EEH during kexec Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 10/50] gpu: drm: radeon: Fix a possible null-pointer dereference in radeon_connector_set_property() Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 11/50] PCI: rpaphp: Avoid a sometimes-uninitialized warning Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 12/50] ipmi_si: Only schedule continuously in the thread in maintenance mode Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 13/50] clk: qoriq: Fix -Wunused-const-variable Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 14/50] clk: sunxi-ng: v3s: add missing clock slices for MMC2 module clocks Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 15/50] drm/amd/display: fix issue where 252-255 values are clipped Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 16/50] drm/amd/display: reprogram VM config when system resume Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 17/50] powerpc/powernv/ioda2: Allocate TCE table levels on demand for default DMA window Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 18/50] drm/amd/powerplay/smu7: enforce minimal VBITimeout (v2) Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 19/50] clk: actions: Don't reference clk_init_data after registration Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 20/50] clk: sirf: " Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 21/50] clk: sprd: " Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 22/50] clk: zx296718: " Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 23/50] powerpc/xmon: Check for HV mode when dumping XIVE info from OPAL Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 24/50] powerpc/rtas: use device model APIs and serialization during LPM Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 25/50] powerpc/futex: Fix warning: 'oldval' may be used uninitialized in this function Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 26/50] powerpc/64s/radix: Remove redundant pfn_pte bitop, add VM_BUG_ON Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 27/50] powerpc/pseries/mobility: use cond_resched when updating device tree Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 28/50] pinctrl: tegra: Fix write barrier placement in pmx_writel Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 29/50] powerpc/eeh: Clear stale EEH_DEV_NO_HANDLER flag Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 30/50] vfio_pci: Restore original state on release Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 31/50] drm/nouveau/volt: Fix for some cards having 0 maximum voltage Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 32/50] pinctrl: amd: disable spurious-firing GPIO IRQs Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 33/50] clk: renesas: mstp: Set GENPD_FLAG_ALWAYS_ON for clock domain Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 34/50] clk: renesas: cpg-mssr: " Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 35/50] drm/amd/display: support spdif Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 36/50] drm/amdgpu/si: fix ASIC tests Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 37/50] powerpc/64s/exception: machine check use correct cfar for late handler Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 38/50] pstore: fs superblock limits Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 39/50] powerpc/imc: Dont create debugfs files for cpu-less nodes Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 40/50] clk: qcom: gcc-sdm845: Use floor ops for sdcc clks Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 41/50] powerpc/pseries: correctly track irq state in default idle Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 42/50] pinctrl: meson-gxbb: Fix wrong pinning definition for uart_c Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 43/50] arm64: fix unreachable code issue with cmpxchg Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 44/50] clk: at91: select parent if main oscillator or bypass is enabled Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 45/50] powerpc: dump kernel log before carrying out fadump or kdump Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 46/50] mbox: qcom: add APCS child device for QCS404 Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 47/50] clk: sprd: add missing kfree Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 48/50] scsi: core: Reduce memory required for SCSI logging Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 49/50] dma-buf/sw_sync: Synchronize signal vs syncpt free Sasha Levin
2019-09-24 16:48 ` [PATCH AUTOSEL 4.19 50/50] ext4: fix potential use after free after remounting with noblock_validity Sasha Levin

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=20190924164847.27780-2-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=a.hajda@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.redfearn@thinci.com \
    --cc=stable@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).