linux-kernel.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: Lyude Paul <lyude@redhat.com>,
	Robert Foss <robert.foss@linaro.org>,
	Sasha Levin <sashal@kernel.org>,
	dri-devel@lists.freedesktop.org
Subject: [PATCH AUTOSEL 4.14 11/31] drm/bridge/analogix/anx78xx: Setup encoder before registering connector
Date: Mon,  3 May 2021 12:41:44 -0400	[thread overview]
Message-ID: <20210503164204.2854178-11-sashal@kernel.org> (raw)
In-Reply-To: <20210503164204.2854178-1-sashal@kernel.org>

From: Lyude Paul <lyude@redhat.com>

[ Upstream commit 9962849d0871f5e53d0e3b3d84561f8f2847fbf4 ]

Since encoder mappings for connectors are exposed to userspace, we should
be attaching the encoder before exposing the connector to userspace. Just a
drive-by fix for an issue I noticed while fixing up usages of
drm_dp_aux_init()/drm_dp_aux_register() across the tree.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210219215326.2227596-9-lyude@redhat.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/bridge/analogix-anx78xx.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/bridge/analogix-anx78xx.c b/drivers/gpu/drm/bridge/analogix-anx78xx.c
index cd2bfd7bf048..a5a690dd44c2 100644
--- a/drivers/gpu/drm/bridge/analogix-anx78xx.c
+++ b/drivers/gpu/drm/bridge/analogix-anx78xx.c
@@ -1044,12 +1044,6 @@ static int anx78xx_bridge_attach(struct drm_bridge *bridge)
 	drm_connector_helper_add(&anx78xx->connector,
 				 &anx78xx_connector_helper_funcs);
 
-	err = drm_connector_register(&anx78xx->connector);
-	if (err) {
-		DRM_ERROR("Failed to register connector: %d\n", err);
-		return err;
-	}
-
 	anx78xx->connector.polled = DRM_CONNECTOR_POLL_HPD;
 
 	err = drm_mode_connector_attach_encoder(&anx78xx->connector,
@@ -1059,6 +1053,12 @@ static int anx78xx_bridge_attach(struct drm_bridge *bridge)
 		return err;
 	}
 
+	err = drm_connector_register(&anx78xx->connector);
+	if (err) {
+		DRM_ERROR("Failed to register connector: %d\n", err);
+		return err;
+	}
+
 	return 0;
 }
 
-- 
2.30.2


  parent reply	other threads:[~2021-05-03 17:07 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-03 16:41 [PATCH AUTOSEL 4.14 01/31] scsi: lpfc: Fix incorrect dbde assignment when building target abts wqe Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 02/31] scsi: lpfc: Fix pt2pt connection does not recover after LOGO Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 03/31] scsi: target: pscsi: Fix warning in pscsi_complete_cmd() Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 04/31] media: ite-cir: check for receive overflow Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 05/31] power: supply: bq27xxx: fix power_avg for newer ICs Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 06/31] extcon: arizona: Fix some issues when HPDET IRQ fires after the jack has been unplugged Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 07/31] media: media/saa7164: fix saa7164_encoder_register() memory leak bugs Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 08/31] media: gspca/sq905.c: fix uninitialized variable Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 09/31] media: pci: saa7164: Rudimentary spelling fixes in the file saa7164-types.h Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 10/31] power: supply: Use IRQF_ONESHOT Sasha Levin
2021-05-03 16:41 ` Sasha Levin [this message]
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 12/31] drm/bridge/analogix/anx78xx: Cleanup on error in anx78xx_bridge_attach() Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 13/31] drm/amdgpu : Fix asic reset regression issue introduce by 8f211fe8ac7c4f Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 14/31] scsi: qla2xxx: Always check the return value of qla24xx_get_isp_stats() Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 15/31] scsi: qla2xxx: Fix use after free in bsg Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 16/31] scsi: scsi_dh_alua: Remove check for ASC 24h in alua_rtpg() Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 17/31] media: em28xx: fix memory leak Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 18/31] media: vivid: update EDID Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 19/31] clk: socfpga: arria10: Fix memory leak of socfpga_clk on error return Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 20/31] power: supply: generic-adc-battery: fix possible use-after-free in gab_remove() Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 21/31] power: supply: s3c_adc_battery: fix possible use-after-free in s3c_adc_bat_remove() Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 22/31] media: adv7604: fix possible use-after-free in adv76xx_remove() Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 23/31] media: i2c: adv7511-v4l2: fix possible use-after-free in adv7511_remove() Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 24/31] media: i2c: adv7842: fix possible use-after-free in adv7842_remove() Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 25/31] media: dvb-usb: fix memory leak in dvb_usb_adapter_init Sasha Levin
2021-05-03 16:41 ` [PATCH AUTOSEL 4.14 26/31] media: gscpa/stv06xx: fix memory leak Sasha Levin
2021-05-03 16:42 ` [PATCH AUTOSEL 4.14 27/31] drm/msm/mdp5: Configure PP_SYNC_HEIGHT to double the vtotal Sasha Levin
2021-05-03 16:42 ` [PATCH AUTOSEL 4.14 28/31] drm/amdgpu: fix NULL pointer dereference Sasha Levin
2021-05-03 16:42 ` [PATCH AUTOSEL 4.14 29/31] scsi: lpfc: Fix crash when a REG_RPI mailbox fails triggering a LOGO response Sasha Levin
2021-05-03 16:42 ` [PATCH AUTOSEL 4.14 30/31] scsi: lpfc: Remove unsupported mbox PORT_CAPABILITIES logic Sasha Levin
2021-05-03 16:42 ` [PATCH AUTOSEL 4.14 31/31] scsi: libfc: Fix a format specifier 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=20210503164204.2854178-11-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lyude@redhat.com \
    --cc=robert.foss@linaro.org \
    --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).