From: Maxime Ripard <mripard@kernel.org>
To: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>,
Dave Stevenson <dave.stevenson@raspberrypi.com>,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
Dmitry Baryshkov <lumag@kernel.org>,
kernel@collabora.com, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 14/23] drm/tests: hdmi: Add macro to support EDEADLK handling
Date: Mon, 26 May 2025 08:44:04 +0200 [thread overview]
Message-ID: <20250526-brawny-determined-lizard-aeef92@houat> (raw)
In-Reply-To: <88e1fed3-47eb-4925-b11a-71557af9add5@collabora.com>
[-- Attachment #1: Type: text/plain, Size: 2695 bytes --]
On Thu, May 22, 2025 at 07:47:00PM +0300, Cristian Ciocaltea wrote:
> On 5/22/25 7:06 PM, Maxime Ripard wrote:
> > On Mon, May 19, 2025 at 01:35:46PM +0300, Cristian Ciocaltea wrote:
> >> On 5/19/25 10:22 AM, Maxime Ripard wrote:
> >>> Hi,
> >>>
> >>> On Fri, Apr 25, 2025 at 01:27:05PM +0300, Cristian Ciocaltea wrote:
> >>>> In preparation to improve error handling throughout all test cases,
> >>>> introduce a macro to check for EDEADLK and automate the restart of the
> >>>> atomic sequence.
> >>>>
> >>>> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
> >>>> ---
> >>>> drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 10 ++++++++++
> >>>> 1 file changed, 10 insertions(+)
> >>>>
> >>>> diff --git a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
> >>>> index c8969ee6518954ab4496d3a4398f428bf4104a36..c8bb131d63ea6d0c9e166c8d9ba5e403118cd9f1 100644
> >>>> --- a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
> >>>> +++ b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
> >>>> @@ -224,6 +224,16 @@ drm_kunit_helper_connector_hdmi_init(struct kunit *test,
> >>>> test_edid_hdmi_1080p_rgb_max_200mhz);
> >>>> }
> >>>>
> >>>> +#define drm_kunit_atomic_restart_on_deadlock(ret, state, ctx, start) do { \
> >>>> + if (ret == -EDEADLK) { \
> >>>> + if (state) \
> >>>> + drm_atomic_state_clear(state); \
> >>>> + ret = drm_modeset_backoff(ctx); \
> >>>> + if (!ret) \
> >>>> + goto start; \
> >>>> + } \
> >>>> +} while (0)
> >>>> +
> >>>
> >>> I'm not sure here either, for pretty much the same reason. As far as
> >>> locking goes, I really think we should prefer something explicit even if
> >>> it means a bit more boilerplate.
> >>>
> >>> If you still want to push this forward though, this has nothing to do
> >>> with kunit so it should be made a common helper.
> >>
> >> Ack.
> >>
> >>> I do think it should be
> >>> done in a separate series though. Ever-expanding series are a nightmare,
> >>> both to contribute and to review :)
> >>
> >> Indeed, let me take this separately.
> >>
> >> If you agree, I'd prefer to drop EDEADLK handling from the new tests as
> >> well, to allow sorting this out for all in a consistent manner.
> >
> > We can't unfortunately. Most CI runners now run with WW_DEBUG that will
> > test for EDEADBLK handling.
>
> Ok, in that case I'll proceed with the explicit error handling for the
> new tests only. And as soon as the series gets merged, I'll come up
> with a common helper and apply it for all tests.
Sounds like a good plan :)
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]
next prev parent reply other threads:[~2025-05-26 6:44 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-25 10:26 [PATCH v4 00/23] drm/connector: hdmi: Allow using the YUV420 output format Cristian Ciocaltea
2025-04-25 10:26 ` [PATCH v4 01/23] drm/connector: hdmi: Evaluate limited range after computing format Cristian Ciocaltea
2025-04-25 10:26 ` [PATCH v4 02/23] drm/connector: hdmi: Add support for YUV420 format verification Cristian Ciocaltea
2025-04-25 10:26 ` [PATCH v4 03/23] drm/connector: hdmi: Improve debug message for supported format Cristian Ciocaltea
2025-04-25 10:26 ` [PATCH v4 04/23] drm/connector: hdmi: Add missing bpc debug info to hdmi_try_format_bpc() Cristian Ciocaltea
2025-04-25 10:26 ` [PATCH v4 05/23] drm/connector: hdmi: Factor out bpc and format computation logic Cristian Ciocaltea
2025-04-25 10:26 ` [PATCH v4 06/23] drm/connector: hdmi: Use YUV420 output format as an RGB fallback Cristian Ciocaltea
2025-05-13 13:35 ` Maxime Ripard
2025-05-15 12:44 ` Cristian Ciocaltea
2025-05-15 14:52 ` Maxime Ripard
2025-04-25 10:26 ` [PATCH v4 07/23] drm/tests: hdmi: Replace '[_]MHz' with 'mhz' Cristian Ciocaltea
2025-04-26 2:06 ` Dmitry Baryshkov
2025-04-25 10:26 ` [PATCH v4 08/23] drm/tests: hdmi: Add macro to simplify EDID setup Cristian Ciocaltea
2025-04-28 9:52 ` Jani Nikula
2025-04-29 9:58 ` Cristian Ciocaltea
2025-05-13 13:45 ` Maxime Ripard
2025-04-25 10:27 ` [PATCH v4 09/23] drm/tests: hdmi: Replace open coded " Cristian Ciocaltea
2025-05-15 15:35 ` Maxime Ripard
2025-04-25 10:27 ` [PATCH v4 10/23] drm/tests: hdmi: Drop unused drm_kunit_helper_connector_hdmi_init_funcs() Cristian Ciocaltea
2025-05-16 13:06 ` Maxime Ripard
2025-04-25 10:27 ` [PATCH v4 11/23] drm/tests: hdmi: Setup ycbcr_420_allowed before initializing connector Cristian Ciocaltea
2025-04-25 10:27 ` [PATCH v4 12/23] drm/tests: helpers: Add a (re)try helper variant to enable CRTC connector Cristian Ciocaltea
2025-05-16 13:15 ` Maxime Ripard
2025-05-19 10:20 ` Cristian Ciocaltea
2025-04-25 10:27 ` [PATCH v4 13/23] drm/tests: hdmi: Switch to drm_kunit_helper_try_enable_crtc_connector() Cristian Ciocaltea
2025-04-25 10:27 ` [PATCH v4 14/23] drm/tests: hdmi: Add macro to support EDEADLK handling Cristian Ciocaltea
2025-05-19 7:22 ` Maxime Ripard
2025-05-19 10:35 ` Cristian Ciocaltea
2025-05-22 16:06 ` Maxime Ripard
2025-05-22 16:47 ` Cristian Ciocaltea
2025-05-26 6:44 ` Maxime Ripard [this message]
2025-04-25 10:27 ` [PATCH v4 15/23] drm/tests: hdmi: Restart atomic sequence on EDEADLK Cristian Ciocaltea
2025-04-25 10:27 ` [PATCH v4 16/23] drm/tests: hdmi: Switch to drm_atomic_get_new_connector_state() where possible Cristian Ciocaltea
2025-05-19 7:23 ` Maxime Ripard
2025-04-25 10:27 ` [PATCH v4 17/23] drm/tests: hdmi: Provide EDID supporting 4K@30Hz with YUV420 only Cristian Ciocaltea
2025-05-19 7:57 ` Maxime Ripard
2025-04-25 10:27 ` [PATCH v4 18/23] drm/tests: hdmi: Add limited range tests for YUV420 mode Cristian Ciocaltea
2025-05-19 7:58 ` Maxime Ripard
2025-04-25 10:27 ` [PATCH v4 19/23] drm/tests: hdmi: Rename max TMDS rate fallback tests Cristian Ciocaltea
2025-05-19 8:38 ` Maxime Ripard
2025-04-25 10:27 ` [PATCH v4 20/23] drm/tests: hdmi: Provide EDID supporting 4K@30Hz with RGB/YUV Cristian Ciocaltea
2025-05-19 7:57 ` Maxime Ripard
2025-04-25 10:27 ` [PATCH v4 21/23] drm/tests: hdmi: Add max TMDS rate fallback tests for YUV420 mode Cristian Ciocaltea
2025-05-19 8:40 ` Maxime Ripard
2025-04-25 10:27 ` [PATCH v4 22/23] drm/tests: hdmi: Add test for unsuccessful fallback to YUV420 Cristian Ciocaltea
2025-05-19 8:41 ` Maxime Ripard
2025-04-25 10:27 ` [PATCH v4 23/23] drm/tests: hdmi: Add test for unsupported RGB/YUV420 mode Cristian Ciocaltea
2025-05-19 8:42 ` Maxime Ripard
2025-05-19 10:55 ` Cristian Ciocaltea
2025-05-22 16:16 ` Maxime Ripard
2025-05-22 17:37 ` Cristian Ciocaltea
2025-05-27 12:59 ` Maxime Ripard
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=20250526-brawny-determined-lizard-aeef92@houat \
--to=mripard@kernel.org \
--cc=airlied@gmail.com \
--cc=cristian.ciocaltea@collabora.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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®