From: "Christian König" <christian.koenig@amd.com>
To: Woody Suwalski <terraluna977@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
amd-gfx@lists.freedesktop.org
Cc: "Deucher, Alexander" <alexander.deucher@amd.com>
Subject: Re: [PATCH] drm/radeon: Prevent multiple error lines on suspend
Date: Mon, 11 Dec 2023 11:54:47 +0100 [thread overview]
Message-ID: <38f3c90a-9f11-43ba-8657-336486607a4f@amd.com> (raw)
In-Reply-To: <6beb3bab-b559-9333-320f-f0c03eb24326@gmail.com>
Am 10.12.23 um 19:24 schrieb Woody Suwalski:
> Hello, it has been now over 2 weeks and I have not seen any response
> to this patch.
> Has it been lost in the cracks of the wide internet ? :-(
Well your patch is malformed ("#" before each line in the commit
message) and probably ended up being ignored because of that.
Apart from that it would probably be much easier to move the call to
radeon_debugfs_ring_init() into the if (ring->ring_obj == NULL) check in
the caller.
Regards,
Christian.
>
> Thanks, Woody
>
>
> Woody Suwalski wrote:
>> # Fix to avoid multiple error lines printed on every suspend by
>> Radeon driver's debugfs.
>> #
>> # radeon_debugfs_init() calls debugfs_create_file() for every ring.
>> #
>> # This results in printing multiple error lines to the screen and
>> dmesg similar to this:
>> # debugfs: File 'radeon_ring_vce2' in directory '0000:00:01.0'
>> already present!
>> #
>> # The fix is to run lookup for the file before trying to (re)create
>> that debug file.
>>
>> # Signed-off-by: Woody Suwalski <terraluna977@gmail.com>
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_ring.c
>> b/drivers/gpu/drm/radeon/radeon_ring.c
>> index e6534fa9f1fb..72b1d2d31295 100644
>> --- a/drivers/gpu/drm/radeon/radeon_ring.c
>> +++ b/drivers/gpu/drm/radeon/radeon_ring.c
>> @@ -549,10 +549,15 @@ static void radeon_debugfs_ring_init(struct
>> radeon_device *rdev, struct radeon_r
>> #if defined(CONFIG_DEBUG_FS)
>> const char *ring_name = radeon_debugfs_ring_idx_to_name(ring->idx);
>> struct dentry *root = rdev->ddev->primary->debugfs_root;
>> -
>> - if (ring_name)
>> - debugfs_create_file(ring_name, 0444, root, ring,
>> - &radeon_debugfs_ring_info_fops);
>> + struct dentry *lookup;
>> +
>> + if (ring_name) {
>> + if ((lookup = debugfs_lookup(ring_name, root)) == NULL)
>> + debugfs_create_file(ring_name, 0444, root, ring,
>> + &radeon_debugfs_ring_info_fops);
>> + else
>> + dput(lookup);
>> + }
>>
>> #endif
>> }
>>
>
prev parent reply other threads:[~2023-12-11 10:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-23 4:25 [PATCH] drm/radeon: Prevent multiple error lines on suspend Woody Suwalski
2023-12-10 18:24 ` Woody Suwalski
2023-12-11 10:54 ` Christian König [this message]
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=38f3c90a-9f11-43ba-8657-336486607a4f@amd.com \
--to=christian.koenig@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=terraluna977@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;
as well as URLs for NNTP newsgroup(s).