From: "Ghimiray, Himal Prasad" <himal.prasad.ghimiray@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH v3 6/7] drm/xe/tile: Abort driver load for sysfs creation failure
Date: Fri, 12 Apr 2024 21:09:59 +0530 [thread overview]
Message-ID: <9339338f-5b11-47b9-8278-ebb5896904c1@intel.com> (raw)
In-Reply-To: <6utingku2ql5achp5wf52jkvduohvngrcr7mcfitjpdbdjth6c@rn5yhmhuryze>
On 12-04-2024 19:02, Lucas De Marchi wrote:
> On Fri, Apr 12, 2024 at 01:32:44PM +0530, Himal Prasad Ghimiray wrote:
>> Ensure that the status of all tile associated sysfs entries creation is
>> relayed to xe_tile_init_noalloc, leading to a driver load abort if any
>> sysfs creation failures occur.
>>
>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
>> Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_tile.c | 2 +-
>> drivers/gpu/drm/xe/xe_tile_sysfs.c | 17 ++++++++---------
>> drivers/gpu/drm/xe/xe_tile_sysfs.h | 2 +-
>> drivers/gpu/drm/xe/xe_vram_freq.c | 21 +++++++++------------
>> drivers/gpu/drm/xe/xe_vram_freq.h | 2 +-
>> 5 files changed, 20 insertions(+), 24 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_tile.c b/drivers/gpu/drm/xe/xe_tile.c
>> index 0650b2fa75ef..409cf55aa8a1 100644
>> --- a/drivers/gpu/drm/xe/xe_tile.c
>> +++ b/drivers/gpu/drm/xe/xe_tile.c
>> @@ -173,7 +173,7 @@ int xe_tile_init_noalloc(struct xe_tile *tile)
>> }
>> xe_wa_apply_tile_workarounds(tile);
>>
>> - xe_tile_sysfs_init(tile);
>> + err = xe_tile_sysfs_init(tile);
>>
>> err_mem_access:
>> xe_device_mem_access_put(tile_to_xe(tile));
>> diff --git a/drivers/gpu/drm/xe/xe_tile_sysfs.c
>> b/drivers/gpu/drm/xe/xe_tile_sysfs.c
>> index 237a0761d3ad..3cd340984c34 100644
>> --- a/drivers/gpu/drm/xe/xe_tile_sysfs.c
>> +++ b/drivers/gpu/drm/xe/xe_tile_sysfs.c
>> @@ -29,7 +29,7 @@ static void tile_sysfs_fini(struct drm_device *drm,
>> void *arg)
>> kobject_put(tile->sysfs);
>> }
>>
>> -void xe_tile_sysfs_init(struct xe_tile *tile)
>> +int xe_tile_sysfs_init(struct xe_tile *tile)
>> {
>> struct xe_device *xe = tile_to_xe(tile);
>> struct device *dev = xe->drm.dev;
>> @@ -38,7 +38,7 @@ void xe_tile_sysfs_init(struct xe_tile *tile)
>>
>> kt = kzalloc(sizeof(*kt), GFP_KERNEL);
>> if (!kt)
>> - return;
>> + return -ENOMEM;
>>
>> kobject_init(&kt->base, &xe_tile_sysfs_kobj_type);
>> kt->tile = tile;
>> @@ -46,16 +46,15 @@ void xe_tile_sysfs_init(struct xe_tile *tile)
>> err = kobject_add(&kt->base, &dev->kobj, "tile%d", tile->id);
>> if (err) {
>> kobject_put(&kt->base);
>> - drm_warn(&xe->drm, "failed to register TILE sysfs directory,
>> err: %d\n", err);
>> - return;
>> + drm_err(&xe->drm, "failed to register TILE sysfs directory,
>> err: %d\n", err);
>
> same comments here and below as previous patch
Noted.
>
> Lucas De Marchi
next prev parent reply other threads:[~2024-04-12 15:40 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 8:02 [PATCH 0/4] Cleanup and fixes in drmm_add_action_or_reset usage Himal Prasad Ghimiray
2024-04-12 8:02 ` [PATCH v3 1/7] drm/xe: Simplify function return using drmm_add_action_or_reset() Himal Prasad Ghimiray
2024-04-12 12:52 ` Lucas De Marchi
2024-04-12 14:54 ` Ghimiray, Himal Prasad
2024-04-12 8:02 ` [PATCH v3 2/7] drm/xe: Incase of action add failure, remove sysfs only once Himal Prasad Ghimiray
2024-04-12 13:09 ` Lucas De Marchi
2024-04-12 13:13 ` Lucas De Marchi
2024-04-12 14:41 ` Jani Nikula
2024-04-12 14:55 ` Ghimiray, Himal Prasad
2024-04-12 8:02 ` [PATCH v3 3/7] drm/xe: Incase of action add failure, free_gsc_pkt " Himal Prasad Ghimiray
2024-04-12 13:14 ` Lucas De Marchi
2024-04-12 15:38 ` Ghimiray, Himal Prasad
2024-04-12 8:02 ` [PATCH v3 4/7] drm/xe: Return NULL incase of drmm_add_action_or_reset failure Himal Prasad Ghimiray
2024-04-12 8:02 ` [PATCH v3 5/7] drm/xe/gt: Abort driver load for sysfs creation failure Himal Prasad Ghimiray
2024-04-12 13:30 ` Lucas De Marchi
2024-04-12 15:38 ` Ghimiray, Himal Prasad
2024-04-12 8:02 ` [PATCH v3 6/7] drm/xe/tile: " Himal Prasad Ghimiray
2024-04-12 13:32 ` Lucas De Marchi
2024-04-12 15:39 ` Ghimiray, Himal Prasad [this message]
2024-04-12 8:02 ` [PATCH v3 7/7] drm/xe/pm: Capture errors and handle them Himal Prasad Ghimiray
2024-04-12 13:42 ` Lucas De Marchi
2024-04-12 16:31 ` Ghimiray, Himal Prasad
2024-04-12 16:58 ` Lucas De Marchi
2024-04-12 17:07 ` Ghimiray, Himal Prasad
2024-04-12 8:15 ` ✓ CI.Patch_applied: success for Cleanup and fixes in drmm_add_action_or_reset usage (rev3) Patchwork
2024-04-12 8:15 ` ✓ CI.checkpatch: " Patchwork
2024-04-12 8:17 ` ✓ CI.KUnit: " Patchwork
2024-04-12 8:31 ` ✓ CI.Build: " Patchwork
2024-04-12 8:34 ` ✓ CI.Hooks: " Patchwork
2024-04-12 8:35 ` ✓ CI.checksparse: " Patchwork
2024-04-12 8:58 ` ✓ CI.BAT: " Patchwork
2024-04-12 12:13 ` ✗ CI.FULL: failure " Patchwork
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=9339338f-5b11-47b9-8278-ebb5896904c1@intel.com \
--to=himal.prasad.ghimiray@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=rodrigo.vivi@intel.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