AMD-GFX Archive on lore.kernel.org
 help / color / Atom feed
From: Lyude Paul <lyude@redhat.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Thierry Reding" <thierry.reding@gmail.com>
Cc: "Neil Armstrong" <narmstrong@baylibre.com>,
	"David Airlie" <airlied@linux.ie>,
	nouveau@lists.freedesktop.org, "Guido Günther" <agx@sigxcpu.org>,
	"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
	"Oleg Vasilev" <oleg.vasilev@intel.com>,
	dri-devel@lists.freedesktop.org,
	"Meenakshikumar Somasundaram"
	<meenakshikumar.somasundaram@amd.com>,
	"Andrzej Hajda" <a.hajda@samsung.com>,
	"Aurabindo Pillai" <aurabindo.pillai@amd.com>,
	"Laurent Pinchart" <Laurent.pinchart@ideasonboard.com>,
	"Sam Ravnborg" <sam@ravnborg.org>,
	"Tomi Valkeinen" <tomi.valkeinen@ti.com>,
	"Parshuram Thombare" <pthombar@cadence.com>,
	"Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>,
	"Michal Simek" <michal.simek@xilinx.com>,
	amd-gfx@lists.freedesktop.org,
	"Jonathan Hunter" <jonathanh@nvidia.com>,
	"Luben Tuikov" <luben.tuikov@amd.com>,
	"Ben Skeggs" <bskeggs@redhat.com>,
	"Swapnil Jakhade" <sjakhade@cadence.com>,
	"Thierry Reding" <treding@nvidia.com>,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Imre Deak" <imre.deak@intel.com>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Jonas Karlman" <jonas@kwiboo.se>, "Leo Li" <sunpeng.li@amd.com>,
	intel-gfx@lists.freedesktop.org,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Joe Perches" <joe@perches.com>,
	"Yuti Amonkar" <yamonkar@cadence.com>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"Mikita Lipski" <mikita.lipski@amd.com>,
	"Sean Paul" <sean@poorly.run>,
	"Navid Emamdoost" <navid.emamdoost@gmail.com>,
	"Jernej Skrabec" <jernej.skrabec@siol.net>,
	"Chris Park" <Chris.Park@amd.com>,
	"Eryk Brol" <eryk.brol@amd.com>,
	"Hyun Kwon" <hyun.kwon@xilinx.com>,
	"Robert Foss" <robert.foss@linaro.org>,
	"Julia Lawall" <Julia.Lawall@inria.fr>,
	"Rob Clark" <robdclark@gmail.com>,
	"Boris Brezillon" <boris.brezillon@collabora.com>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH v3 03/20] drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini
Date: Fri, 23 Apr 2021 00:11:06 -0400
Message-ID: <17aa145e4cfa3d8852f7411067c5c37bff771b16.camel@redhat.com> (raw)
In-Reply-To: <2e211a6623664714af1d180eadcd74aa7ef417db.camel@redhat.com>

On Thu, 2021-04-22 at 18:33 -0400, Lyude Paul wrote:
> OK - talked with Ville a bit on this and did some of my own research, I
> actually think that moving i2c to drm_dp_aux_init() is the right decision
> for
> the time being. The reasoning behind this being that as shown by my previous
> work of fixing drivers that call drm_dp_aux_register() too early - it seems
> like there's already been drivers that have been working just fine with
> setting up the i2c device before DRM registration. 
> 
> In the future, it'd probably be better if we can split up i2c_add_adapter()
> into an init and register function - but we'll have to talk with the i2c
> maintainers to see if this is acceptable w/ them

Actually - I think adding the ability to refcount dp aux adapters might be a
better solution so I'm going to try that!

> 
> On Thu, 2021-04-22 at 13:18 -0400, Lyude Paul wrote:
> > On Tue, 2021-04-20 at 02:16 +0300, Ville Syrjälä wrote:
> > > 
> > > The init vs. register split is intentional. Registering the thing
> > > and allowing userspace access to it before the rest of the driver
> > > is ready isn't particularly great. For a while now we've tried to
> > > move towards an architecture where the driver is fully initialzied
> > > before anything gets exposed to userspace.
> > 
> > Yeah-thank you for pointing this out. Thierry - do you think there's an
> > alternate solution we could go with in Tegra to fix the get_device() issue
> > that wouldn't require us trying to expose the i2c adapter early?
> > 
> > > 
> > 
> 

-- 
Cheers,
 Lyude Paul (she/her)
 Software Engineer at Red Hat

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

  reply index

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-19 22:55 [PATCH v3 00/20] drm: Use new DRM printk funcs (like drm_dbg_*()) in DP helpers Lyude Paul
2021-04-19 22:55 ` [PATCH v3 01/20] drm/amdgpu: Add error handling to amdgpu_dm_initialize_dp_connector() Lyude Paul
2021-04-21 14:23   ` Mikita Lipski
2021-04-21 15:22     ` Deucher, Alexander
2021-04-19 22:55 ` [PATCH v3 02/20] drm/dp: Add __no_check to drm_dp_aux_register() Lyude Paul
2021-04-19 22:55 ` [PATCH v3 03/20] drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini Lyude Paul
2021-04-19 23:16   ` Ville Syrjälä
2021-04-22 17:18     ` Lyude Paul
2021-04-22 22:33       ` Lyude Paul
2021-04-23  4:11         ` Lyude Paul [this message]
2021-04-23 12:39           ` Thierry Reding
2021-04-23 17:53             ` Lyude Paul
2021-04-23 12:38         ` Thierry Reding
2021-04-23 12:34       ` Thierry Reding
2021-04-19 22:55 ` [PATCH v3 04/20] drm/bridge/cdns-mhdp8546: Register DP aux channel with userspace Lyude Paul
2021-04-19 22:55 ` [PATCH v3 05/20] drm/nouveau/kms/nv50-: Move AUX adapter reg to connector late register/early unregister Lyude Paul
2021-04-19 22:55 ` [PATCH v3 06/20] drm/dp: Add backpointer to drm_device in drm_dp_aux Lyude Paul
2021-04-19 22:55 ` [PATCH v3 07/20] drm/dp: Clarify DP AUX registration time Lyude Paul
2021-04-19 22:55 ` [PATCH v3 08/20] drm/dp: Pass drm_dp_aux to drm_dp_link_train_clock_recovery_delay() Lyude Paul
2021-04-19 22:55 ` [PATCH v3 09/20] drm/dp: Pass drm_dp_aux to drm_dp*_link_train_channel_eq_delay() Lyude Paul
2021-04-19 22:55 ` [PATCH v3 10/20] drm/dp: Always print aux channel name in logs Lyude Paul
2021-04-19 22:55 ` [PATCH v3 11/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_detect() Lyude Paul
2021-04-19 22:55 ` [PATCH v3 12/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_set_tmds_output() Lyude Paul
2021-04-19 22:55 ` [PATCH v3 13/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_max_tmds_clock() Lyude Paul
2021-04-19 22:55 ` [PATCH v3 14/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_get_tmds_output() Lyude Paul
2021-04-19 22:55 ` [PATCH v3 15/20] drm/dp_dual_mode: Pass drm_device to drm_lspcon_(get|set)_mode() Lyude Paul
2021-04-19 22:55 ` [PATCH v3 16/20] drm/dp_mst: Pass drm_dp_mst_topology_mgr to drm_dp_get_vc_payload_bw() Lyude Paul
2021-04-19 22:55 ` [PATCH v3 17/20] drm/print: Handle potentially NULL drm_devices in drm_dbg_* Lyude Paul
2021-04-19 22:55 ` [PATCH v3 18/20] drm/dp: Convert drm_dp_helper.c to using drm_err/drm_dbg_*() Lyude Paul
2021-04-19 22:55 ` [PATCH v3 19/20] drm/dp_dual_mode: Convert drm_dp_dual_mode_helper.c to using drm_err/drm_dbg_kms() Lyude Paul
2021-04-19 22:55 ` [PATCH v3 20/20] drm/dp_mst: Convert drm_dp_mst_topology.c to drm_err()/drm_dbg*() Lyude Paul

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=17aa145e4cfa3d8852f7411067c5c37bff771b16.camel@redhat.com \
    --to=lyude@redhat.com \
    --cc=Chris.Park@amd.com \
    --cc=Julia.Lawall@inria.fr \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=a.hajda@samsung.com \
    --cc=agx@sigxcpu.org \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=aurabindo.pillai@amd.com \
    --cc=boris.brezillon@collabora.com \
    --cc=bskeggs@redhat.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eryk.brol@amd.com \
    --cc=harry.wentland@amd.com \
    --cc=hyun.kwon@xilinx.com \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=jernej.skrabec@siol.net \
    --cc=joe@perches.com \
    --cc=jonas@kwiboo.se \
    --cc=jonathanh@nvidia.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=luben.tuikov@amd.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=meenakshikumar.somasundaram@amd.com \
    --cc=michal.simek@xilinx.com \
    --cc=mikita.lipski@amd.com \
    --cc=mripard@kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=navid.emamdoost@gmail.com \
    --cc=nouveau@lists.freedesktop.org \
    --cc=oleg.vasilev@intel.com \
    --cc=pthombar@cadence.com \
    --cc=robdclark@gmail.com \
    --cc=robert.foss@linaro.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=sam@ravnborg.org \
    --cc=sean@poorly.run \
    --cc=sjakhade@cadence.com \
    --cc=sunpeng.li@amd.com \
    --cc=thierry.reding@gmail.com \
    --cc=tomi.valkeinen@ti.com \
    --cc=treding@nvidia.com \
    --cc=tzimmermann@suse.de \
    --cc=ville.syrjala@linux.intel.com \
    --cc=yamonkar@cadence.com \
    /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

AMD-GFX Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/amd-gfx/0 amd-gfx/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 amd-gfx amd-gfx/ https://lore.kernel.org/amd-gfx \
		amd-gfx@lists.freedesktop.org
	public-inbox-index amd-gfx

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.freedesktop.lists.amd-gfx


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git