AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: amd-gfx@lists.freedesktop.org, "Paneer Selvam,
	Arunpravin" <Arunpravin.PaneerSelvam@amd.com>
Subject: Re: [PATCH] drm/amdgpu: hide VRAM sysfs attributes on GPUs without VRAM
Date: Wed, 8 Oct 2025 17:00:45 +0200	[thread overview]
Message-ID: <c729abf1-6147-4f24-b67e-95ee912ca330@amd.com> (raw)
In-Reply-To: <20251007091925.18470-1-christian.koenig@amd.com>

Arun sorry I should have CCed you in the first place.

Please take a look as well.

Thanks,
Christian.

On 07.10.25 11:19, Christian König wrote:
> Otherwise accessing them can cause a crash.
> 
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
> index a5adb2ed9b3c..9d934c07fa6b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
> @@ -234,6 +234,9 @@ static umode_t amdgpu_vram_attrs_is_visible(struct kobject *kobj,
>  	    !adev->gmc.vram_vendor)
>  		return 0;
>  
> +	if (!ttm_resource_manager_used(&adev->mman.vram_mgr.manager))
> +		return 0;
> +
>  	return attr->mode;
>  }
>  


  parent reply	other threads:[~2025-10-08 15:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-07  9:19 [PATCH] drm/amdgpu: hide VRAM sysfs attributes on GPUs without VRAM Christian König
2025-10-07 10:29 ` Gadre, Mangesh
2025-10-07 12:36 ` Alex Deucher
2025-10-08 15:00 ` Christian König [this message]
2025-10-09  6:00   ` Arunpravin Paneer Selvam

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=c729abf1-6147-4f24-b67e-95ee912ca330@amd.com \
    --to=christian.koenig@amd.com \
    --cc=Arunpravin.PaneerSelvam@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /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