From: Daniel Vetter <daniel@ffwll.ch>
To: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
Benjamin Gaignard <benjamin.gaignard@linaro.org>
Subject: Re: [PATCH] drm: sti: remove useless call to dev->struct_mutex
Date: Wed, 27 Apr 2016 09:58:44 +0200 [thread overview]
Message-ID: <20160427075844.GV2558@phenom.ffwll.local> (raw)
In-Reply-To: <1461741689-21916-1-git-send-email-daniel.vetter@ffwll.ch>
On Wed, Apr 27, 2016 at 09:21:29AM +0200, Daniel Vetter wrote:
> From: Benjamin Gaignard <benjamin.gaignard@linaro.org>
>
> No need to protect debugfs functions with dev->struct_mutex
>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Oops, resent wrong patch, but the iteration that dropped the nouveau
special case was busted anyway.
-Daniel
> ---
> drivers/gpu/drm/sti/sti_cursor.c | 7 -------
> drivers/gpu/drm/sti/sti_drv.c | 6 ------
> drivers/gpu/drm/sti/sti_dvo.c | 7 -------
> drivers/gpu/drm/sti/sti_gdp.c | 14 --------------
> drivers/gpu/drm/sti/sti_hda.c | 7 -------
> drivers/gpu/drm/sti/sti_hdmi.c | 7 -------
> drivers/gpu/drm/sti/sti_hqvdp.c | 7 -------
> drivers/gpu/drm/sti/sti_mixer.c | 7 -------
> drivers/gpu/drm/sti/sti_tvout.c | 7 -------
> drivers/gpu/drm/sti/sti_vid.c | 7 -------
> 10 files changed, 76 deletions(-)
>
> diff --git a/drivers/gpu/drm/sti/sti_cursor.c b/drivers/gpu/drm/sti/sti_cursor.c
> index 3abb400151ac..e6ee4c526665 100644
> --- a/drivers/gpu/drm/sti/sti_cursor.c
> +++ b/drivers/gpu/drm/sti/sti_cursor.c
> @@ -103,12 +103,6 @@ static int cursor_dbg_show(struct seq_file *s, void *data)
> {
> struct drm_info_node *node = s->private;
> struct sti_cursor *cursor = (struct sti_cursor *)node->info_ent->data;
> - struct drm_device *dev = node->minor->dev;
> - int ret;
> -
> - ret = mutex_lock_interruptible(&dev->struct_mutex);
> - if (ret)
> - return ret;
>
> seq_printf(s, "%s: (vaddr = 0x%p)",
> sti_plane_to_str(&cursor->plane), cursor->regs);
> @@ -127,7 +121,6 @@ static int cursor_dbg_show(struct seq_file *s, void *data)
> DBGFS_DUMP(CUR_AWE);
> seq_puts(s, "\n");
>
> - mutex_unlock(&dev->struct_mutex);
> return 0;
> }
>
> diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c
> index 6bd6abaa5a70..a8eece20b6b4 100644
> --- a/drivers/gpu/drm/sti/sti_drv.c
> +++ b/drivers/gpu/drm/sti/sti_drv.c
> @@ -72,11 +72,6 @@ static int sti_drm_fps_dbg_show(struct seq_file *s, void *data)
> struct drm_info_node *node = s->private;
> struct drm_device *dev = node->minor->dev;
> struct drm_plane *p;
> - int ret;
> -
> - ret = mutex_lock_interruptible(&dev->struct_mutex);
> - if (ret)
> - return ret;
>
> list_for_each_entry(p, &dev->mode_config.plane_list, head) {
> struct sti_plane *plane = to_sti_plane(p);
> @@ -86,7 +81,6 @@ static int sti_drm_fps_dbg_show(struct seq_file *s, void *data)
> plane->fps_info.fips_str);
> }
>
> - mutex_unlock(&dev->struct_mutex);
> return 0;
> }
>
> diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
> index 25f76632002c..d439128e6309 100644
> --- a/drivers/gpu/drm/sti/sti_dvo.c
> +++ b/drivers/gpu/drm/sti/sti_dvo.c
> @@ -177,12 +177,6 @@ static int dvo_dbg_show(struct seq_file *s, void *data)
> {
> struct drm_info_node *node = s->private;
> struct sti_dvo *dvo = (struct sti_dvo *)node->info_ent->data;
> - struct drm_device *dev = node->minor->dev;
> - int ret;
> -
> - ret = mutex_lock_interruptible(&dev->struct_mutex);
> - if (ret)
> - return ret;
>
> seq_printf(s, "DVO: (vaddr = 0x%p)", dvo->regs);
> DBGFS_DUMP(DVO_AWG_DIGSYNC_CTRL);
> @@ -193,7 +187,6 @@ static int dvo_dbg_show(struct seq_file *s, void *data)
> dvo_dbg_awg_microcode(s, dvo->regs + DVO_DIGSYNC_INSTR_I);
> seq_puts(s, "\n");
>
> - mutex_unlock(&dev->struct_mutex);
> return 0;
> }
>
> diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c
> index ff3d3e7e7704..3d098f1ab919 100644
> --- a/drivers/gpu/drm/sti/sti_gdp.c
> +++ b/drivers/gpu/drm/sti/sti_gdp.c
> @@ -207,14 +207,8 @@ static int gdp_dbg_show(struct seq_file *s, void *data)
> {
> struct drm_info_node *node = s->private;
> struct sti_gdp *gdp = (struct sti_gdp *)node->info_ent->data;
> - struct drm_device *dev = node->minor->dev;
> struct drm_plane *drm_plane = &gdp->plane.drm_plane;
> struct drm_crtc *crtc = drm_plane->crtc;
> - int ret;
> -
> - ret = mutex_lock_interruptible(&dev->struct_mutex);
> - if (ret)
> - return ret;
>
> seq_printf(s, "%s: (vaddr = 0x%p)",
> sti_plane_to_str(&gdp->plane), gdp->regs);
> @@ -247,7 +241,6 @@ static int gdp_dbg_show(struct seq_file *s, void *data)
> seq_printf(s, " Connected to DRM CRTC #%d (%s)\n",
> crtc->base.id, sti_mixer_to_str(to_sti_mixer(crtc)));
>
> - mutex_unlock(&dev->struct_mutex);
> return 0;
> }
>
> @@ -278,13 +271,7 @@ static int gdp_node_dbg_show(struct seq_file *s, void *arg)
> {
> struct drm_info_node *node = s->private;
> struct sti_gdp *gdp = (struct sti_gdp *)node->info_ent->data;
> - struct drm_device *dev = node->minor->dev;
> unsigned int b;
> - int ret;
> -
> - ret = mutex_lock_interruptible(&dev->struct_mutex);
> - if (ret)
> - return ret;
>
> for (b = 0; b < GDP_NODE_NB_BANK; b++) {
> seq_printf(s, "\n%s[%d].top", sti_plane_to_str(&gdp->plane), b);
> @@ -293,7 +280,6 @@ static int gdp_node_dbg_show(struct seq_file *s, void *arg)
> gdp_node_dump_node(s, gdp->node_list[b].btm_field);
> }
>
> - mutex_unlock(&dev->struct_mutex);
> return 0;
> }
>
> diff --git a/drivers/gpu/drm/sti/sti_hda.c b/drivers/gpu/drm/sti/sti_hda.c
> index ec0d017eaf1a..d0e1647ce41a 100644
> --- a/drivers/gpu/drm/sti/sti_hda.c
> +++ b/drivers/gpu/drm/sti/sti_hda.c
> @@ -375,12 +375,6 @@ static int hda_dbg_show(struct seq_file *s, void *data)
> {
> struct drm_info_node *node = s->private;
> struct sti_hda *hda = (struct sti_hda *)node->info_ent->data;
> - struct drm_device *dev = node->minor->dev;
> - int ret;
> -
> - ret = mutex_lock_interruptible(&dev->struct_mutex);
> - if (ret)
> - return ret;
>
> seq_printf(s, "HD Analog: (vaddr = 0x%p)", hda->regs);
> DBGFS_DUMP(HDA_ANA_CFG);
> @@ -396,7 +390,6 @@ static int hda_dbg_show(struct seq_file *s, void *data)
> hda_dbg_video_dacs_ctrl(s, hda->video_dacs_ctrl);
> seq_puts(s, "\n");
>
> - mutex_unlock(&dev->struct_mutex);
> return 0;
> }
>
> diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c
> index 6ef0715bd5b9..85545ebf88d3 100644
> --- a/drivers/gpu/drm/sti/sti_hdmi.c
> +++ b/drivers/gpu/drm/sti/sti_hdmi.c
> @@ -628,12 +628,6 @@ static int hdmi_dbg_show(struct seq_file *s, void *data)
> {
> struct drm_info_node *node = s->private;
> struct sti_hdmi *hdmi = (struct sti_hdmi *)node->info_ent->data;
> - struct drm_device *dev = node->minor->dev;
> - int ret;
> -
> - ret = mutex_lock_interruptible(&dev->struct_mutex);
> - if (ret)
> - return ret;
>
> seq_printf(s, "HDMI: (vaddr = 0x%p)", hdmi->regs);
> DBGFS_DUMP("\n", HDMI_CFG);
> @@ -690,7 +684,6 @@ static int hdmi_dbg_show(struct seq_file *s, void *data)
> DBGFS_DUMP_DI(HDMI_SW_DI_N_PKT_WORD6, HDMI_IFRAME_SLOT_VENDOR);
> seq_puts(s, "\n");
>
> - mutex_unlock(&dev->struct_mutex);
> return 0;
> }
>
> diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
> index e05b0dc523ff..6230565048c3 100644
> --- a/drivers/gpu/drm/sti/sti_hqvdp.c
> +++ b/drivers/gpu/drm/sti/sti_hqvdp.c
> @@ -554,14 +554,8 @@ static int hqvdp_dbg_show(struct seq_file *s, void *data)
> {
> struct drm_info_node *node = s->private;
> struct sti_hqvdp *hqvdp = (struct sti_hqvdp *)node->info_ent->data;
> - struct drm_device *dev = node->minor->dev;
> int cmd, cmd_offset, infoxp70;
> void *virt;
> - int ret;
> -
> - ret = mutex_lock_interruptible(&dev->struct_mutex);
> - if (ret)
> - return ret;
>
> seq_printf(s, "%s: (vaddr = 0x%p)",
> sti_plane_to_str(&hqvdp->plane), hqvdp->regs);
> @@ -629,7 +623,6 @@ static int hqvdp_dbg_show(struct seq_file *s, void *data)
>
> seq_puts(s, "\n");
>
> - mutex_unlock(&dev->struct_mutex);
> return 0;
> }
>
> diff --git a/drivers/gpu/drm/sti/sti_mixer.c b/drivers/gpu/drm/sti/sti_mixer.c
> index e7425c38fc93..cc89d75273df 100644
> --- a/drivers/gpu/drm/sti/sti_mixer.c
> +++ b/drivers/gpu/drm/sti/sti_mixer.c
> @@ -150,12 +150,6 @@ static int mixer_dbg_show(struct seq_file *s, void *arg)
> {
> struct drm_info_node *node = s->private;
> struct sti_mixer *mixer = (struct sti_mixer *)node->info_ent->data;
> - struct drm_device *dev = node->minor->dev;
> - int ret;
> -
> - ret = mutex_lock_interruptible(&dev->struct_mutex);
> - if (ret)
> - return ret;
>
> seq_printf(s, "%s: (vaddr = 0x%p)",
> sti_mixer_to_str(mixer), mixer->regs);
> @@ -175,7 +169,6 @@ static int mixer_dbg_show(struct seq_file *s, void *arg)
> mixer_dbg_mxn(s, mixer->regs + GAM_MIXER_MX0);
> seq_puts(s, "\n");
>
> - mutex_unlock(&dev->struct_mutex);
> return 0;
> }
>
> diff --git a/drivers/gpu/drm/sti/sti_tvout.c b/drivers/gpu/drm/sti/sti_tvout.c
> index 2c99016443e5..d641a5fe512b 100644
> --- a/drivers/gpu/drm/sti/sti_tvout.c
> +++ b/drivers/gpu/drm/sti/sti_tvout.c
> @@ -514,13 +514,7 @@ static int tvout_dbg_show(struct seq_file *s, void *data)
> {
> struct drm_info_node *node = s->private;
> struct sti_tvout *tvout = (struct sti_tvout *)node->info_ent->data;
> - struct drm_device *dev = node->minor->dev;
> struct drm_crtc *crtc;
> - int ret;
> -
> - ret = mutex_lock_interruptible(&dev->struct_mutex);
> - if (ret)
> - return ret;
>
> seq_printf(s, "TVOUT: (vaddr = 0x%p)", tvout->regs);
>
> @@ -586,7 +580,6 @@ static int tvout_dbg_show(struct seq_file *s, void *data)
> DBGFS_DUMP(TVO_AUX_IN_VID_FORMAT);
> seq_puts(s, "\n");
>
> - mutex_unlock(&dev->struct_mutex);
> return 0;
> }
>
> diff --git a/drivers/gpu/drm/sti/sti_vid.c b/drivers/gpu/drm/sti/sti_vid.c
> index 5a2c5dc3687b..cba32140a763 100644
> --- a/drivers/gpu/drm/sti/sti_vid.c
> +++ b/drivers/gpu/drm/sti/sti_vid.c
> @@ -91,12 +91,6 @@ static int vid_dbg_show(struct seq_file *s, void *arg)
> {
> struct drm_info_node *node = s->private;
> struct sti_vid *vid = (struct sti_vid *)node->info_ent->data;
> - struct drm_device *dev = node->minor->dev;
> - int ret;
> -
> - ret = mutex_lock_interruptible(&dev->struct_mutex);
> - if (ret)
> - return ret;
>
> seq_printf(s, "VID: (vaddr= 0x%p)", vid->regs);
>
> @@ -121,7 +115,6 @@ static int vid_dbg_show(struct seq_file *s, void *arg)
> DBGFS_DUMP(VID_CSAT);
> seq_puts(s, "\n");
>
> - mutex_unlock(&dev->struct_mutex);
> return 0;
> }
>
> --
> 2.8.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-04-27 7:58 UTC|newest]
Thread overview: 100+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 17:29 [PATCH 00/35] Moar struct_mutex nuking Daniel Vetter
2016-04-26 17:29 ` [PATCH 01/35] drm: Give drm_agp_clear drm_legacy_ prefix Daniel Vetter
2016-04-26 21:09 ` Chris Wilson
2016-04-27 6:41 ` Daniel Vetter
2016-04-26 17:29 ` [PATCH 02/35] drm: Put legacy lastclose work into drm_legacy_dev_reinit Daniel Vetter
2016-04-26 21:31 ` Alex Deucher
2016-04-26 17:29 ` [PATCH 03/35] drm: Move drm_getmap into drm_bufs.c and give it a legacy prefix Daniel Vetter
2016-04-26 21:19 ` Chris Wilson
2016-04-26 21:32 ` Alex Deucher
2016-04-26 17:29 ` [PATCH 04/35] drm: Forbid legacy MAP functions for DRIVER_MODESET Daniel Vetter
2016-04-26 21:23 ` Chris Wilson
2016-04-26 21:35 ` Alex Deucher
2016-04-27 6:46 ` Daniel Vetter
2016-04-27 6:56 ` Daniel Vetter
2016-04-27 7:12 ` Dave Airlie
2016-04-27 7:55 ` Daniel Vetter
2016-04-27 7:21 ` [PATCH] drm: sti: remove useless call to dev->struct_mutex Daniel Vetter
2016-04-27 7:58 ` Daniel Vetter [this message]
2016-04-26 17:29 ` [PATCH 05/35] drm: Push struct_mutex into ->master_destroy Daniel Vetter
2016-04-26 20:54 ` Chris Wilson
2016-04-26 21:36 ` Alex Deucher
2016-04-26 17:29 ` [PATCH 06/35] drm: Hide master MAP cleanup in drm_bufs.c Daniel Vetter
2016-04-26 21:17 ` Chris Wilson
2016-04-26 21:41 ` Alex Deucher
2016-04-27 7:20 ` [PATCH] " Daniel Vetter
2016-04-27 8:15 ` Daniel Vetter
2016-04-26 17:29 ` [PATCH 07/35] drm: Make drm_vm_open/close_locked private to drm_vm.c Daniel Vetter
2016-04-26 21:42 ` Alex Deucher
2016-04-26 17:29 ` [PATCH 08/35] drm: Protect dev->filelist with its own mutex Daniel Vetter
2016-04-26 20:52 ` Chris Wilson
2016-04-26 21:45 ` [Intel-gfx] " Alex Deucher
2016-04-27 7:06 ` Daniel Vetter
2016-04-27 7:08 ` Daniel Vetter
2016-04-27 7:14 ` Deucher, Alexander
2016-04-27 7:17 ` [Intel-gfx] " Chris Wilson
2016-04-27 8:01 ` Daniel Vetter
2016-04-27 8:04 ` [Intel-gfx] " Chris Wilson
2016-04-27 8:17 ` Daniel Vetter
2016-04-26 17:29 ` [PATCH 09/35] drm/gem: support BO freeing without dev->struct_mutex Daniel Vetter
2016-04-26 19:47 ` Chris Wilson
2016-04-26 20:10 ` Daniel Vetter
2016-04-26 20:34 ` Chris Wilson
2016-04-26 21:52 ` Alex Deucher
2016-04-27 8:18 ` Daniel Vetter
2016-04-27 9:31 ` Lucas Stach
2016-04-27 11:21 ` Daniel Vetter
2016-04-27 11:50 ` [PATCH] " Daniel Vetter
2016-04-27 11:58 ` Chris Wilson
2016-04-27 12:12 ` Daniel Vetter
2016-04-27 12:19 ` Chris Wilson
2016-04-29 9:31 ` Daniel Vetter
2016-05-02 8:40 ` Daniel Vetter
2016-05-03 15:59 ` Alex Deucher
2016-05-04 10:26 ` Daniel Vetter
2016-04-29 11:18 ` ✗ Fi.CI.BAT: failure for " Patchwork
2016-04-29 11:39 ` Chris Wilson
2016-05-02 8:44 ` Patchwork
2016-05-02 8:48 ` Patchwork
2016-04-26 17:29 ` [PATCH 10/35] drm/amdgpu: Use lockless gem BO free callback Daniel Vetter
2016-04-26 17:29 ` [PATCH 11/35] drm/armada: " Daniel Vetter
2016-04-28 13:27 ` Russell King - ARM Linux
2016-04-26 17:29 ` [PATCH 12/35] drm/ast: " Daniel Vetter
2016-04-26 17:29 ` [PATCH 13/35] drm/atmel: " Daniel Vetter
2016-04-26 17:29 ` [PATCH 14/35] drm/bochs: " Daniel Vetter
2016-04-26 17:29 ` [PATCH 15/35] drm/cirrus: " Daniel Vetter
2016-04-26 17:29 ` [PATCH 16/35] drm/etnaviv: " Daniel Vetter
2016-04-27 9:32 ` Lucas Stach
2016-04-28 13:28 ` Russell King - ARM Linux
2016-04-26 17:29 ` [PATCH 17/35] drm/exynos: " Daniel Vetter
2016-05-10 6:52 ` Inki Dae
2016-04-26 17:29 ` [PATCH 18/35] drm/fls-dcu: " Daniel Vetter
2016-04-26 17:29 ` [PATCH 19/35] drm/imx: " Daniel Vetter
2016-04-27 10:29 ` Philipp Zabel
2016-04-27 11:21 ` Daniel Vetter
2016-04-27 12:01 ` Philipp Zabel
2016-05-04 10:28 ` Daniel Vetter
2016-05-04 10:53 ` Philipp Zabel
2016-04-26 17:29 ` [PATCH 20/35] drm/mga200g: " Daniel Vetter
2016-04-26 17:29 ` [PATCH 21/35] drm/nouveau: " Daniel Vetter
2016-04-26 17:29 ` [PATCH 22/35] drm/qxl: " Daniel Vetter
2016-04-26 17:29 ` [PATCH 23/35] drm/radeon: " Daniel Vetter
2016-04-26 17:29 ` [PATCH 24/35] drm/rcar-du: " Daniel Vetter
2016-04-26 17:29 ` [PATCH 25/35] drm/rockchip: " Daniel Vetter
2016-04-26 17:29 ` [PATCH 26/35] drm/shmob: " Daniel Vetter
[not found] ` <1461691808-12414-1-git-send-email-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
2016-04-26 17:30 ` [PATCH 27/35] drm/tegra: " Daniel Vetter
2016-05-10 13:33 ` Thierry Reding
[not found] ` <20160510133300.GA30323-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2016-05-11 7:35 ` Daniel Vetter
2016-04-26 17:30 ` [PATCH 28/35] drm/tilcdc: " Daniel Vetter
2016-04-26 17:30 ` [PATCH 29/35] drm/vc4: Use drm_gem_object_unreference_unlocked Daniel Vetter
2016-04-26 17:30 ` [PATCH 30/35] drm/vc4: Use lockless gem BO free callback Daniel Vetter
2016-04-26 17:30 ` [PATCH 31/35] drm/vgem: " Daniel Vetter
2016-04-26 17:30 ` [PATCH 32/35] drm/virtio: " Daniel Vetter
2016-04-26 17:30 ` [PATCH 33/35] drm: sti: remove useless call to dev->struct_mutex Daniel Vetter
2016-04-26 17:30 ` [PATCH 34/35] drm/virtio: Use lockless gem BO free callback Daniel Vetter
2016-04-26 17:30 ` [PATCH 35/35] drm/rockchip: Use cma gem vm ops Daniel Vetter
2016-04-27 11:38 ` [PATCH 1/3] " Daniel Vetter
2016-04-27 11:38 ` [PATCH 2/3] drm/exynos: Nuke dummy fb->dirty callback Daniel Vetter
2016-05-10 6:48 ` Inki Dae
2016-04-27 11:38 ` [PATCH 3/3] drm/msm: " Daniel Vetter
2016-04-27 6:50 ` ✗ Fi.CI.BAT: failure for Moar struct_mutex nuking Patchwork
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=20160427075844.GV2558@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=benjamin.gaignard@linaro.org \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.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