From: Erico Nunes <nunes.erico@gmail.com>
To: Qiang Yu <yuq825@gmail.com>,
anarsoul@gmail.com, dri-devel@lists.freedesktop.org,
lima@lists.freedesktop.org
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
christian.koenig@amd.com, megi@xff.cz,
linux-kernel@vger.kernel.org, Erico Nunes <nunes.erico@gmail.com>
Subject: [PATCH 0/2] drm/lima: fix devfreq refcount imbalance for job timeouts
Date: Mon, 1 Apr 2024 23:20:00 +0200 [thread overview]
Message-ID: <20240401212002.1191549-1-nunes.erico@gmail.com> (raw)
This is a followup to https://patchwork.freedesktop.org/series/128856/
Patch 1 rev1 from that series
https://patchwork.freedesktop.org/patch/574745/?series=128856&rev=1
was dropped because it needed a better solution for a race condition
between the irq and the timeout handler.
The proposed solution in that discussion is to solve the race condition
by masking the irqs during the timeout handler execution, which is what
is done here.
This bug is very hard to reproduce with regular applications, but I
found it to be reliable to reproduce with a program that triggers many
jobs right in the boundary between timeouting, so that jobs still manage
to complete while the timeout handler runs.
With this series, I was unable to further reproduce the bug.
At first I had only the pp and gp irqs masked and the problem never
reproduced again on Mali-400, but I still managed to reproduce it on
Mali-450 after hours of test time. After masking the pp bcast irq as
well I was not able to reproduce it anymore even on Mali-450, so I think
that was the missing bit for it.
Erico Nunes (2):
drm/lima: add mask irq callback to gp and pp
drm/lima: mask irqs in timeout path before hard reset
drivers/gpu/drm/lima/lima_bcast.c | 12 ++++++++++++
drivers/gpu/drm/lima/lima_bcast.h | 3 +++
drivers/gpu/drm/lima/lima_gp.c | 8 ++++++++
drivers/gpu/drm/lima/lima_pp.c | 18 ++++++++++++++++++
drivers/gpu/drm/lima/lima_sched.c | 9 +++++++++
drivers/gpu/drm/lima/lima_sched.h | 1 +
6 files changed, 51 insertions(+)
--
2.44.0
next reply other threads:[~2024-04-01 21:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-01 21:20 Erico Nunes [this message]
2024-04-01 21:20 ` [PATCH 1/2] drm/lima: add mask irq callback to gp and pp Erico Nunes
2024-04-04 12:30 ` Qiang Yu
2024-04-01 21:20 ` [PATCH 2/2] drm/lima: mask irqs in timeout path before hard reset Erico Nunes
2024-04-04 12:32 ` Qiang Yu
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=20240401212002.1191549-1-nunes.erico@gmail.com \
--to=nunes.erico@gmail.com \
--cc=airlied@gmail.com \
--cc=anarsoul@gmail.com \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=lima@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=megi@xff.cz \
--cc=mripard@kernel.org \
--cc=tzimmermann@suse.de \
--cc=yuq825@gmail.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
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
all inboxes | Powered by JetHome®