Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/xe: Use fixed CCS mode when running in SR-IOV mode
Date: Fri, 14 Jun 2024 12:01:23 +0200	[thread overview]
Message-ID: <dd721714-460b-4849-af42-d8bc708cedaa@intel.com> (raw)
In-Reply-To: <ytfnpy6bbt7bnxgsrwzcm7kafk4alzx2rftuswa3gbbbxpggav@6vkcnb6vc3ab>



On 13.06.2024 22:51, Lucas De Marchi wrote:
> On Thu, Jun 13, 2024 at 03:54:45PM GMT, Michal Wajdeczko wrote:
>> We don't support changing CCS mode when running in SR-IOV mode yet.
>> When running as a PF driver just apply default ccs_mode=1 that VF
>> drivers will assume as already applied and fixed.
>>
>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_gt_ccs_mode.c | 9 ++++++++-
>> 1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_gt_ccs_mode.c
>> b/drivers/gpu/drm/xe/xe_gt_ccs_mode.c
>> index 5d4cdbd69bc3..aea49253d9c9 100644
>> --- a/drivers/gpu/drm/xe/xe_gt_ccs_mode.c
>> +++ b/drivers/gpu/drm/xe/xe_gt_ccs_mode.c
>> @@ -12,6 +12,7 @@
>> #include "xe_gt_printk.h"
>> #include "xe_gt_sysfs.h"
>> #include "xe_mmio.h"
>> +#include "xe_sriov.h"
>>
>> static void __xe_gt_apply_ccs_mode(struct xe_gt *gt, u32 num_engines)
>> {
>> @@ -75,7 +76,7 @@ static void __xe_gt_apply_ccs_mode(struct xe_gt *gt,
>> u32 num_engines)
>>
>> void xe_gt_apply_ccs_mode(struct xe_gt *gt)
>> {
>> -    if (!gt->ccs_mode)
>> +    if (!gt->ccs_mode || IS_SRIOV_VF(gt_to_xe(gt)))
>>         return;
>>
>>     __xe_gt_apply_ccs_mode(gt, gt->ccs_mode);
>> @@ -110,6 +111,12 @@ ccs_mode_store(struct device *kdev, struct
>> device_attribute *attr,
>>     u32 num_engines, num_slices;
>>     int ret;
>>
>> +    if (IS_SRIOV(xe)) {
>> +        xe_gt_dbg(gt, "Can't change compute mode when running as %s\n",
>> +              xe_sriov_mode_to_string(xe_device_sriov_mode(xe)));
>> +        return -EPERM;
> 
> EPERM? I'd expect ENOTSUPP

I will change to EOPNOTSUPP(95) as ENOTSUPP(524) is not correctly
recognized by the user space:

	$ echo 2 | sudo tee tile0/gt0/ccs_mode

	tee: 'tile0/gt0/ccs_mode': Unknown error 524
vs
	tee: 'tile0/gt0/ccs_mode': Operation not supported


> 
> Lucas De Marchi
> 
>> +    }
>> +
>>     ret = kstrtou32(buff, 0, &num_engines);
>>     if (ret)
>>         return ret;
>> -- 
>> 2.43.0
>>

      reply	other threads:[~2024-06-14 10:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-13 13:54 [PATCH] drm/xe: Use fixed CCS mode when running in SR-IOV mode Michal Wajdeczko
2024-06-13 14:02 ` ✓ CI.Patch_applied: success for " Patchwork
2024-06-13 14:03 ` ✓ CI.checkpatch: " Patchwork
2024-06-13 14:04 ` ✓ CI.KUnit: " Patchwork
2024-06-13 14:16 ` ✓ CI.Build: " Patchwork
2024-06-13 14:18 ` ✗ CI.Hooks: failure " Patchwork
2024-06-13 14:19 ` ✓ CI.checksparse: success " Patchwork
2024-06-13 14:42 ` ✓ CI.BAT: " Patchwork
2024-06-13 20:14 ` ✓ CI.FULL: " Patchwork
2024-06-13 20:51 ` [PATCH] " Lucas De Marchi
2024-06-14 10:01   ` Michal Wajdeczko [this message]

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=dd721714-460b-4849-af42-d8bc708cedaa@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@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