AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: <sunpeng.li-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Leo Li <sunpeng.li-5C7GfCeVMHo@public.gmane.org>,
	Jerry Zuo <Jerry.Zuo-5C7GfCeVMHo@public.gmane.org>,
	harry.wentland-5C7GfCeVMHo@public.gmane.org,
	nicholas.kazlauskas-5C7GfCeVMHo@public.gmane.org,
	ville.syrjala-VuQAYsv1563Yd54FQh9/CA@public.gmane.org
Subject: [PATCH 5/9] drm/amd/display: Use connector kdev as aux device parent
Date: Tue, 23 Jul 2019 19:28:04 -0400	[thread overview]
Message-ID: <20190723232808.28128-6-sunpeng.li@amd.com> (raw)
In-Reply-To: <20190723232808.28128-1-sunpeng.li-5C7GfCeVMHo@public.gmane.org>

From: Leo Li <sunpeng.li@amd.com>

Set the connector's kernel device as the parent for the aux kernel
device. This allows udev rules to access connector attributes when
creating symlinks to aux devices.

For example, the following udev rule:

SUBSYSTEM=="drm_dp_aux_dev", SUBSYSTEMS=="drm", ATTRS{edid}=="*",
	SYMLINK+="drm_dp_aux/by-name/$id"

Will create the following symlinks using the connector's name:

$ ls /dev/drm_dp_aux/by-name/
card0-DP-1  card0-DP-2  card0-DP-3

Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Cc: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Leo Li <sunpeng.li@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
index 6e205ee36ac3..53d2cfe62e13 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -388,7 +388,7 @@ void amdgpu_dm_initialize_dp_connector(struct amdgpu_display_manager *dm,
 				       struct amdgpu_dm_connector *aconnector)
 {
 	aconnector->dm_dp_aux.aux.name = "dmdc";
-	aconnector->dm_dp_aux.aux.dev = dm->adev->dev;
+	aconnector->dm_dp_aux.aux.dev = aconnector->base.kdev;
 	aconnector->dm_dp_aux.aux.transfer = dm_dp_aux_transfer;
 	aconnector->dm_dp_aux.ddc_service = aconnector->dc_link->ddc;
 
-- 
2.22.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2019-07-23 23:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23 23:27 [PATCH 0/9] MST AUX Devices (v3) sunpeng.li
     [not found] ` <20190723232808.28128-1-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
2019-07-23 23:28   ` [PATCH 1/9] drm/dp: Use non-cyclic idr sunpeng.li-5C7GfCeVMHo
2019-07-23 23:28   ` [PATCH 2/9 v3] drm/dp_mst: Enable registration of AUX devices for MST ports sunpeng.li-5C7GfCeVMHo
     [not found]     ` <20190723232808.28128-3-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
2019-07-25 19:59       ` Lyude Paul
2019-07-23 23:28   ` [PATCH 3/9] drm/nouveau: Use connector kdev as aux device parent sunpeng.li-5C7GfCeVMHo
2019-07-23 23:28   ` [PATCH 4/9] drm/bridge/analogix-anx78xx: " sunpeng.li-5C7GfCeVMHo
2019-07-23 23:28   ` sunpeng.li-5C7GfCeVMHo [this message]
2019-07-23 23:28   ` [PATCH 7/9] drm/nouveau/kms/nv50: Implement MST Aux device registration sunpeng.li-5C7GfCeVMHo
     [not found]     ` <20190723232808.28128-8-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
2019-07-25 20:57       ` Lyude Paul
2019-07-23 23:28 ` [PATCH 6/9 v2] drm/i915: " sunpeng.li
2019-07-23 23:28 ` [PATCH 8/9] drm/radeon: " sunpeng.li
2019-07-23 23:28 ` [PATCH 9/9] drm/amd/display: " sunpeng.li
2019-07-24 20:05   ` Kazlauskas, Nicholas
2019-07-24 20:06     ` Li, Sun peng (Leo)

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=20190723232808.28128-6-sunpeng.li@amd.com \
    --to=sunpeng.li-5c7gfcevmho@public.gmane.org \
    --cc=Jerry.Zuo-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=harry.wentland-5C7GfCeVMHo@public.gmane.org \
    --cc=nicholas.kazlauskas-5C7GfCeVMHo@public.gmane.org \
    --cc=ville.syrjala-VuQAYsv1563Yd54FQh9/CA@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