* [PATCH RFC v1 22/52] drm/meson: Use struct drm_crtc::drm_dev instead of struct drm_crtc::dev [not found] <20230712094702.1770121-1-u.kleine-koenig@pengutronix.de> @ 2023-07-12 9:46 ` Uwe Kleine-König [not found] ` <abf26a82-4f17-51f2-5753-785f8516a81a@suse.de> 1 sibling, 0 replies; 2+ messages in thread From: Uwe Kleine-König @ 2023-07-12 9:46 UTC (permalink / raw) To: Neil Armstrong, David Airlie, Daniel Vetter, Kevin Hilman Cc: Jerome Brunet, Martin Blumenstingl, dri-devel, linux-amlogic, linux-arm-kernel, kernel Prepare dropping the alias "dev" for struct drm_crtc::drm_dev. "drm_dev" is the better name as "dev" is usually a struct device pointer. No semantic changes. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> --- drivers/gpu/drm/meson/meson_crtc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/meson/meson_crtc.c b/drivers/gpu/drm/meson/meson_crtc.c index d70616da8ce2..4bc082e45ed1 100644 --- a/drivers/gpu/drm/meson/meson_crtc.c +++ b/drivers/gpu/drm/meson/meson_crtc.c @@ -162,9 +162,9 @@ static void meson_g12a_crtc_atomic_disable(struct drm_crtc *crtc, priv->viu.vd1_commit = false; if (crtc->state->event && !crtc->state->active) { - spin_lock_irq(&crtc->dev->event_lock); + spin_lock_irq(&crtc->drm_dev->event_lock); drm_crtc_send_vblank_event(crtc, crtc->state->event); - spin_unlock_irq(&crtc->dev->event_lock); + spin_unlock_irq(&crtc->drm_dev->event_lock); crtc->state->event = NULL; } @@ -192,9 +192,9 @@ static void meson_crtc_atomic_disable(struct drm_crtc *crtc, priv->io_base + _REG(VPP_MISC)); if (crtc->state->event && !crtc->state->active) { - spin_lock_irq(&crtc->dev->event_lock); + spin_lock_irq(&crtc->drm_dev->event_lock); drm_crtc_send_vblank_event(crtc, crtc->state->event); - spin_unlock_irq(&crtc->dev->event_lock); + spin_unlock_irq(&crtc->drm_dev->event_lock); crtc->state->event = NULL; } @@ -209,9 +209,9 @@ static void meson_crtc_atomic_begin(struct drm_crtc *crtc, if (crtc->state->event) { WARN_ON(drm_crtc_vblank_get(crtc) != 0); - spin_lock_irqsave(&crtc->dev->event_lock, flags); + spin_lock_irqsave(&crtc->drm_dev->event_lock, flags); meson_crtc->event = crtc->state->event; - spin_unlock_irqrestore(&crtc->dev->event_lock, flags); + spin_unlock_irqrestore(&crtc->drm_dev->event_lock, flags); crtc->state->event = NULL; } } -- 2.39.2 _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic ^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <abf26a82-4f17-51f2-5753-785f8516a81a@suse.de>]
[parent not found: <20230712105432.urgwb4zzwgsyfbwq@pengutronix.de>]
* Re: [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev [not found] ` <20230712105432.urgwb4zzwgsyfbwq@pengutronix.de> @ 2023-07-12 11:18 ` Javier Martinez Canillas 0 siblings, 0 replies; 2+ messages in thread From: Javier Martinez Canillas @ 2023-07-12 11:18 UTC (permalink / raw) To: Uwe Kleine-König, Thomas Zimmermann Cc: linux-samsung-soc, amd-gfx, linux-stm32, linux-rockchip, Xinwei Kong, VMware Graphics Reviewers, NXP Linux Team, spice-devel, linux-sunxi, Martin Blumenstingl, linux-arm-msm, intel-gfx, linux-mediatek, xen-devel, linux-tegra, linux-amlogic, Gurchetan Singh, Sean Paul, linux-arm-kernel, AngeloGioacchino Del Regno, Andrew Jeffery, linux-mips, Chia-I Wu, linux-renesas-soc, kernel, John Stultz, freedreno, Lucas Stach Uwe Kleine-König <u.kleine-koenig@pengutronix.de> writes: [dropping some recipients since my SMTP server was complaining about the size] > Hello Thomas, > > On Wed, Jul 12, 2023 at 12:19:37PM +0200, Thomas Zimmermann wrote: >> Am 12.07.23 um 11:46 schrieb Uwe Kleine-König: >> > Hello, >> > >> > while I debugged an issue in the imx-lcdc driver I was constantly >> > irritated about struct drm_device pointer variables being named "dev" >> > because with that name I usually expect a struct device pointer. >> > >> > I think there is a big benefit when these are all renamed to "drm_dev". >> >> If you rename drm_crtc.dev, you should also address *all* other data >> structures. > > Yes. Changing drm_crtc::dev was some effort, so I thought to send that > one out before doing the same to > > drm_dp_mst_topology_mgr > drm_atomic_state > drm_master > drm_bridge > drm_client_dev > drm_connector > drm_debugfs_entry > drm_encoder > drm_fb_helper > drm_minor > drm_framebuffer > drm_gem_object > drm_plane > drm_property > drm_property_blob > drm_vblank_crtc > > when in the end the intention isn't welcome. > >> > I have no strong preference here though, so "drmdev" or "drm" are fine >> > for me, too. Let the bikesheding begin! >> >> We've discussed this to death. IIRC 'drm' would be the prefered choice. > > "drm" at least has the advantage to be the 2nd most common name. With > Paul Kocialkowski prefering "drm_dev" there is no clear favourite yet. I think that either "drm" or "drm_dev" would be more clear than "dev", which I also found it confusing and thinking about a "struct device". Probably leaning to "drm", since as you said is the second most used name in drivers that assign crtc->dev to a local variable. > Maybe all the other people with strong opinions are dead if this was > "discussed to death" before? :-) > > Best regards > Uwe > > -- > Pengutronix e.K. | Uwe Kleine-König | > Industrial Linux Solutions | https://www.pengutronix.de/ | -- Best regards, Javier Martinez Canillas Core Platforms Red Hat _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-12 11:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20230712094702.1770121-1-u.kleine-koenig@pengutronix.de>
2023-07-12 9:46 ` [PATCH RFC v1 22/52] drm/meson: Use struct drm_crtc::drm_dev instead of struct drm_crtc::dev Uwe Kleine-König
[not found] ` <abf26a82-4f17-51f2-5753-785f8516a81a@suse.de>
[not found] ` <20230712105432.urgwb4zzwgsyfbwq@pengutronix.de>
2023-07-12 11:18 ` [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev Javier Martinez Canillas
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®