All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Tejas Upadhyay <tejas.upadhyay@intel.com>,
	intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH V3 3/3] drm/xe: Move device sysfs init out of xe_pm_init
Date: Tue, 28 Nov 2023 17:28:27 +0100	[thread overview]
Message-ID: <2ef76845-9012-4e91-9473-808f867f163a@intel.com> (raw)
In-Reply-To: <20231128151333.4068550-4-tejas.upadhyay@intel.com>



On 28.11.2023 16:13, Tejas Upadhyay wrote:
> Device sysfs needs to happen right after device probe.

.. sysfs _setup_ needs ...

> Currently it is under xe_pm_init() which does not look
> correct now as we add more sysfs entries which are not
> specific to PM.
> 
> Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>

can you send this patch separately from rest of UID changes ?
it doesn't seem to be connected to them

> ---
>  drivers/gpu/drm/xe/xe_device.c | 3 +++
>  drivers/gpu/drm/xe/xe_pm.c     | 5 +----
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
> index b54635d512d6..c8b592acb5b2 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -18,6 +18,7 @@
>  #include "regs/xe_regs.h"
>  #include "xe_bo.h"
>  #include "xe_debugfs.h"
> +#include "xe_device_sysfs.h"
>  #include "xe_display.h"
>  #include "xe_dma_buf.h"
>  #include "xe_drm_client.h"
> @@ -463,6 +464,8 @@ int xe_device_probe(struct xe_device *xe)
>  
>  	xe_hwmon_register(xe);
>  
> +	xe_device_sysfs_init(xe);

shouldn't we register generic xe sysfs little earlier?

OTOH it looks that today order is random:

	drm_dev_register(&xe->drm, 0);
	xe_display_register(xe);
	xe_debugfs_register(xe);
	xe_pmu_register(&xe->pmu);
	xe_hwmon_register(xe);

> +
>  	err = drmm_add_action_or_reset(&xe->drm, xe_device_sanitize, xe);
>  	if (err)
>  		return err;
> diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
> index e31a91cf311c..32009da9bfeb 100644
> --- a/drivers/gpu/drm/xe/xe_pm.c
> +++ b/drivers/gpu/drm/xe/xe_pm.c
> @@ -13,7 +13,6 @@
>  #include "xe_bo.h"
>  #include "xe_bo_evict.h"
>  #include "xe_device.h"
> -#include "xe_device_sysfs.h"
>  #include "xe_display.h"
>  #include "xe_ggtt.h"
>  #include "xe_gt.h"
> @@ -175,10 +174,8 @@ void xe_pm_init(struct xe_device *xe)
>  
>  	xe->d3cold.capable = xe_pm_pci_d3cold_capable(pdev);
>  
> -	if (xe->d3cold.capable) {
> -		xe_device_sysfs_init(xe);
> +	if (xe->d3cold.capable)
>  		xe_pm_set_vram_threshold(xe, DEFAULT_VRAM_THRESHOLD);
> -	}
>  
>  	xe_pm_runtime_init(xe);
>  }

  reply	other threads:[~2023-11-28 16:28 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-28 15:13 [Intel-xe] [PATCH V3 0/3] Report ATS-M Unique device id Tejas Upadhyay
2023-11-28 15:07 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
2023-11-28 15:07 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-11-28 15:08 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-11-28 15:13 ` [Intel-xe] [PATCH V3 1/3] drm/xe: Track if platform has csc uid Tejas Upadhyay
2023-11-28 16:35   ` Michal Wajdeczko
2023-11-28 15:13 ` [Intel-xe] [PATCH V3 2/3] drm/xe/ats-m: Expose uid for ATS-M via sysfs Tejas Upadhyay
2023-11-28 17:00   ` Michal Wajdeczko
2023-11-29  5:00     ` Upadhyay, Tejas
2023-11-30 21:32       ` Rodrigo Vivi
2023-11-30 22:45         ` Matt Roper
2023-11-30 23:10         ` Lucas De Marchi
2023-12-01  2:49           ` Upadhyay, Tejas
2023-12-02  0:17             ` Matt Roper
2023-11-28 15:13 ` [Intel-xe] [PATCH V3 3/3] drm/xe: Move device sysfs init out of xe_pm_init Tejas Upadhyay
2023-11-28 16:28   ` Michal Wajdeczko [this message]
2023-11-28 15:16 ` [Intel-xe] ✓ CI.Build: success for Report ATS-M Unique device id Patchwork
2023-11-28 15:16 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-11-28 15:17 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-11-28 15:51 ` [Intel-xe] ✓ CI.BAT: " 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=2ef76845-9012-4e91-9473-808f867f163a@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=tejas.upadhyay@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.