From: "Arnd Bergmann" <arnd@arndb.de>
To: "Alex Deucher" <alexander.deucher@amd.com>,
amd-gfx@lists.freedesktop.org
Cc: "George Zhang" <George.zhang@amd.com>,
"Hamza Mahfooz" <hamza.mahfooz@amd.com>,
"Harry Wentland" <harry.wentland@amd.com>,
"Leo Li" <sunpeng.li@amd.com>,
"Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>,
"Joshua Aberback" <joshua.aberback@amd.com>
Subject: Re: [PATCH 1/2] drm/amd/display: use pre-allocated temp structure for bounding box
Date: Tue, 04 Jun 2024 21:42:36 +0200 [thread overview]
Message-ID: <bd5302af-ae99-4af9-91c3-b1a95a29879d@app.fastmail.com> (raw)
In-Reply-To: <20240604180619.600760-1-alexander.deucher@amd.com>
On Tue, Jun 4, 2024, at 20:06, Alex Deucher wrote:
> This mirrors what the driver does for older DCN generations.
>
> Should fix:
>
> BUG: sleeping function called from invalid context at
> include/linux/sched/mm.h:306
> in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 449, name:
> kworker/u64:8
> preempt_count: 2, expected: 0
> RCU nest depth: 0, expected: 0
> Preemption disabled at:
> ffffffffc0ce1580>] dc_fpu_begin+0x30/0xd0 [amdgpu]
> CPU: 5 PID: 449 Comm: kworker/u64:8 Tainted: G W 6.8.0+
> #35
> Hardware name: System manufacturer System Product Name/ROG STRIX X570-E
> GAMING WIFI II, BIOS 4204 02/24/2022
> Workqueue: events_unbound async_run_entry_fn
>
> Fixes: 88c61827cedc ("drm/amd/display: dynamically allocate
> dml2_configuration_options structures")
> Tested-by: George Zhang <George.zhang@amd.com>
> Suggested-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Cc: George Zhang <george.zhang@amd.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: harry.wentland@amd.com
> Cc: sunpeng.li@amd.com
> Cc: Rodrigo.Siqueira@amd.com
That looks nicer than all the other suggestions, thanks!
Acked-by: Arnd Bergmann <arnd@arndb.de>
One part sticks out though:
> @@ -2027,7 +2025,7 @@ static void dcn32_update_bw_bounding_box(struct
> dc *dc, struct clk_bw_params *bw
>
> DC_FP_END();
>
> - kfree(dml2_opt);
> + memcpy(&dc->dml2_options, dml2_opt, sizeof(dc->dml2_options));
> }
The driver did not copy the data back before, so this is a
change in behavior. Is that intentional or a mistake?
If the intention is to have the data copied back into
dc->dml2_options in the end, wouldn't it be easier to
just pass a pointer as in the old version before commit
e779f4587f61 ("drm/amd/display: Add handling for DC power
mode")?
Arnd
next prev parent reply other threads:[~2024-06-05 12:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-04 18:06 [PATCH 1/2] drm/amd/display: use pre-allocated temp structure for bounding box Alex Deucher
2024-06-04 18:06 ` [PATCH 2/2] drm/amd/display/dcn401: " Alex Deucher
2024-06-04 19:42 ` Arnd Bergmann [this message]
2024-06-04 20:24 ` [PATCH 1/2] drm/amd/display: " Deucher, Alexander
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=bd5302af-ae99-4af9-91c3-b1a95a29879d@app.fastmail.com \
--to=arnd@arndb.de \
--cc=George.zhang@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=hamza.mahfooz@amd.com \
--cc=harry.wentland@amd.com \
--cc=joshua.aberback@amd.com \
--cc=sunpeng.li@amd.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