Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Riana Tauro <riana.tauro@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <anshuman.gupta@intel.com>,
	<aravind.iddamsetty@intel.com>, <jani.nikula@linux.intel.com>,
	<matthew.d.roper@intel.com>, <alexander.usyskin@intel.com>
Subject: Re: [PATCH v2 3/3] drm/xe: Initialize mei-gsc and vsec in survivability mode
Date: Thu, 16 Jan 2025 15:22:20 +0530	[thread overview]
Message-ID: <0e7661f0-b2f3-45d1-a460-fbb86798f13b@intel.com> (raw)
In-Reply-To: <Z4E8IuZy64CN2j3m@intel.com>



On 1/10/2025 8:56 PM, Rodrigo Vivi wrote:
> On Wed, Jan 08, 2025 at 04:09:59PM +0530, Riana Tauro wrote:
>> Initialize mei-gsc in survivability mode and disable HECI
>> interrupts. Also initialize vsec in survivability mode
>>
>> Signed-off-by: Riana Tauro <riana.tauro@intel.com>
>> ---
>>   drivers/gpu/drm/xe/xe_heci_gsc.c           | 3 ++-
>>   drivers/gpu/drm/xe/xe_survivability_mode.c | 7 +++++++
>>   2 files changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_heci_gsc.c b/drivers/gpu/drm/xe/xe_heci_gsc.c
>> index d765bfd3636b..06dc78d3a812 100644
>> --- a/drivers/gpu/drm/xe/xe_heci_gsc.c
>> +++ b/drivers/gpu/drm/xe/xe_heci_gsc.c
>> @@ -12,6 +12,7 @@
>>   #include "xe_drv.h"
>>   #include "xe_heci_gsc.h"
>>   #include "xe_platform_types.h"
>> +#include "xe_survivability_mode.h"
>>   
>>   #define GSC_BAR_LENGTH  0x00000FFC
>>   
>> @@ -200,7 +201,7 @@ void xe_heci_gsc_init(struct xe_device *xe)
>>   		return;
>>   	}
>>   
>> -	if (!def->use_polling) {
>> +	if (!def->use_polling && !xe_survivability_mode_enabled(xe)) {
> 
> perhaps this could be avoided by adding a new argument to the
> function? It gets strange that in this path we came from that component
> and we need to peek back there...
> 
> otoh I know that sometimes these calls with true/false in arguments
> can lead to confusion... and this is done really only once or twice
> during probe, so not so hard feelings here...
yeah that is the reason i used the function here. One of my previous 
patch, had got review comments against using boolean in arguments

Yeah this gets checked once during probe.

Thanks,
Riana
> 
> up to you:
> 
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> 
>>   		ret = heci_gsc_irq_setup(xe);
>>   		if (ret)
>>   			goto fail;
>> diff --git a/drivers/gpu/drm/xe/xe_survivability_mode.c b/drivers/gpu/drm/xe/xe_survivability_mode.c
>> index 4a978c7018c9..39ab898193a1 100644
>> --- a/drivers/gpu/drm/xe/xe_survivability_mode.c
>> +++ b/drivers/gpu/drm/xe/xe_survivability_mode.c
>> @@ -13,8 +13,10 @@
>>   
>>   #include "xe_device.h"
>>   #include "xe_gt.h"
>> +#include "xe_heci_gsc.h"
>>   #include "xe_mmio.h"
>>   #include "xe_pcode_api.h"
>> +#include "xe_vsec.h"
>>   
>>   #define MAX_SCRATCH_MMIO 8
>>   
>> @@ -152,6 +154,10 @@ static void enable_survivability_mode(struct xe_device *xe)
>>   		drm_warn(&xe->drm, "Failed to create survivability sysfs files\n");
>>   		return;
>>   	}
>> +
>> +	xe_heci_gsc_init(xe);
>> +
>> +	xe_vsec_init(xe);
>>   }
>>   
>>   /**
>> @@ -203,6 +209,7 @@ void xe_survivability_mode_remove(struct xe_device *xe)
>>   	struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
>>   
>>   	sysfs_remove_file(&xe->drm.dev->kobj, &dev_attr_survivability_mode.attr);
>> +	xe_heci_gsc_fini(xe);
>>   	kfree(survivability->info);
>>   	pci_set_drvdata(pdev, NULL);
>>   }
>> -- 
>> 2.47.1
>>


  reply	other threads:[~2025-01-16  9:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08 10:39 [PATCH v2 0/3] Enable Survivability Mode Riana Tauro
2025-01-08 10:38 ` ✓ CI.Patch_applied: success for Enable Survivability mode (rev2) Patchwork
2025-01-08 10:38 ` ✗ CI.checkpatch: warning " Patchwork
2025-01-08 10:39 ` [PATCH v2 1/3] drm/xe: Add functions and sysfs for boot survivability Riana Tauro
2025-01-09  9:13   ` Riana Tauro
2025-01-09 10:25     ` Kulkarni, Ashwin Kumar
2025-01-10 15:21   ` Rodrigo Vivi
2025-01-15 16:17     ` Riana Tauro
2025-01-15 19:42       ` Rodrigo Vivi
2025-01-16  9:47         ` Riana Tauro
2025-01-08 10:39 ` [PATCH v2 2/3] drm/xe: Enable Boot Survivability mode Riana Tauro
2025-01-08 10:39 ` [PATCH v2 3/3] drm/xe: Initialize mei-gsc and vsec in survivability mode Riana Tauro
2025-01-10 15:26   ` Rodrigo Vivi
2025-01-16  9:52     ` Riana Tauro [this message]
2025-01-08 10:40 ` ✓ CI.KUnit: success for Enable Survivability mode (rev2) Patchwork
2025-01-08 10:58 ` ✓ CI.Build: " Patchwork
2025-01-08 11:00 ` ✓ CI.Hooks: " Patchwork
2025-01-08 11:01 ` ✓ CI.checksparse: " Patchwork
2025-01-08 11:29 ` ✓ Xe.CI.BAT: " Patchwork
2025-01-10  4:14 ` ✗ Xe.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=0e7661f0-b2f3-45d1-a460-fbb86798f13b@intel.com \
    --to=riana.tauro@intel.com \
    --cc=alexander.usyskin@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=aravind.iddamsetty@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=matthew.d.roper@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