[PATCH] drm/xe: Make force_reset attributes write-only
Michal Wajdeczko
michal.wajdeczko at intel.com
Tue Jun 24 20:40:10 UTC 2025
On 10.06.2025 00:13, John Harrison wrote:
> On 6/3/2025 12:22 PM, Michal Wajdeczko wrote:
>> Stop supporting triggering GT resets from readoperations, as main
>> user of this feature (IGT) already switched to use write operation.
>>
>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
>> Cc: John Harrison <John.C.Harrison at Intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_gt_debugfs.c | 10 ++--------
>> 1 file changed, 2 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_gt_debugfs.c b/drivers/gpu/drm/xe/
>> xe_gt_debugfs.c
>> index 848618acdca8..3afd0d58fa6b 100644
>> --- a/drivers/gpu/drm/xe/xe_gt_debugfs.c
>> +++ b/drivers/gpu/drm/xe/xe_gt_debugfs.c
>> @@ -349,9 +349,6 @@ static ssize_t force_reset_write(struct file *file,
>> static int force_reset_show(struct seq_file *s, void *unused)
>> {
>> - struct xe_gt *gt = s->private;
>> -
>> - force_reset(gt); /* to be deprecated! */
>> return 0;
>> }
>> DEFINE_SHOW_STORE_ATTRIBUTE(force_reset);
>> @@ -377,9 +374,6 @@ static ssize_t force_reset_sync_write(struct file
>> *file,
>> static int force_reset_sync_show(struct seq_file *s, void *unused)
>> {
>> - struct xe_gt *gt = s->private;
>> -
>> - force_reset_sync(gt); /* to be deprecated! */
>> return 0;
>> }
>> DEFINE_SHOW_STORE_ATTRIBUTE(force_reset_sync);
> Is the show function still needed for either of these if they are now
> read only?
unfortunately yes, since there is no DEFINE_STORE_ATTRIBUTE() helper
macro, only DEFINE_SHOW_ATTRIBUTE() is there, and maybe we can try to
add new helper, I was even considering this, but likely it is not
something deadly required for this patch IMO
>
> John.
>
>> @@ -408,8 +402,8 @@ void xe_gt_debugfs_register(struct xe_gt *gt)
>> root->d_inode->i_private = gt;
>> /* VF safe */
>> - debugfs_create_file("force_reset", 0600, root, gt,
>> &force_reset_fops);
>> - debugfs_create_file("force_reset_sync", 0600, root, gt,
>> &force_reset_sync_fops);
>> + debugfs_create_file("force_reset", 0200, root, gt,
>> &force_reset_fops);
>> + debugfs_create_file("force_reset_sync", 0200, root, gt,
>> &force_reset_sync_fops);
>> drm_debugfs_create_files(vf_safe_debugfs_list,
>> ARRAY_SIZE(vf_safe_debugfs_list),
>
More information about the Intel-xe
mailing list