intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Lionel Landwerlin <lionel.g.landwerlin@intel.com>,
	Tvrtko Ursulin <tursulin@ursulin.net>,
	Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Fix subslice configuration on Gen9LP
Date: Wed, 22 Aug 2018 16:17:35 +0100	[thread overview]
Message-ID: <bed28ee6-fb8d-656b-4385-3148f85090a9@linux.intel.com> (raw)
In-Reply-To: <882706a8-379e-fca6-d887-fb306fd42e80@intel.com>


On 22/08/2018 16:08, Lionel Landwerlin wrote:
> On 22/08/2018 15:29, Tvrtko Ursulin wrote:
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> According to the documentation, when programming the subslice count 
>> power-
>> gating configuration register, the value to be written into it on Gen9LP
>> should actually in the format of:
>>
>>    1 slice  = 0x001
>>    2 slices = 0x010
>>    3 slices = 0x100
> 
> 
> s/slice/subslice/
> 
> 
> Also 0b001 etc... Not hexadecimal.

Oops, you're right.

>>
>> And not the popcount of the enabled subslice mask as on other platforms.
>>
>> So on Gen9LP platforms we have been programming 0x11 into those bits, but
>> the documentation does not explain what would that achieve. Could it be
>> that we enable only two subslice on three sub-slice parts? Or hardware
>> simply ignores it and sticks with the maximum configuration?
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
>> Bspec: 12247
>> ---
>> Could this actually be true or I am severely misreading the docs? It does
>> not sound plausible to me this would have been missed all this time..
>>
>> How to test in what configuration do these parts run before and after 
>> this
>> patch?
>> ---
>>   drivers/gpu/drm/i915/intel_lrc.c | 10 ++++++++--
>>   1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_lrc.c 
>> b/drivers/gpu/drm/i915/intel_lrc.c
>> index 36050f085071..cdfa962a1975 100644
>> --- a/drivers/gpu/drm/i915/intel_lrc.c
>> +++ b/drivers/gpu/drm/i915/intel_lrc.c
>> @@ -2508,9 +2508,15 @@ make_rpcs(struct drm_i915_private *dev_priv)
>>       }
>>       if (INTEL_INFO(dev_priv)->sseu.has_subslice_pg) {
>> +        u8 val;
>> +
>> +        val = hweight8(INTEL_INFO(dev_priv)->sseu.subslice_mask[0]);
>> +
>> +        if (IS_GEN9_LP(dev_priv))
>> +            val = BIT(val - 1);
> 
> 
> Hmm... Are you breaking the 2 subslices setting here then?
> 
> (2 subslices = 0b10 which should be equal to hweight8(subslice_mask) if 
> I'm thinking right)

No and yes, I think.

subslice_mask = 0b011 => hweight = 2 => BIT(2 - 1) = BIT(1) = 0b010 into 
the register

In the same way, all together:

subslice_mask = 0b001 => hweight = 1 => BIT(0) = 0b001
subslice_mask = 0b011 => hweight = 2 => BIT(1) = 0b010
subslice_mask = 0b111 => hweight = 3 => BIT(2) = 0b100

Have I made a mistake somewhere?

Regards,

Tvrtko

> 
>> +
>>           rpcs |= GEN8_RPCS_SS_CNT_ENABLE;
>> -        rpcs |= hweight8(INTEL_INFO(dev_priv)->sseu.subslice_mask[0]) <<
>> -            GEN8_RPCS_SS_CNT_SHIFT;
>> +        rpcs |= val << GEN8_RPCS_SS_CNT_SHIFT;
>>           rpcs |= GEN8_RPCS_ENABLE;
>>       }
> 
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-08-22 15:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-22 14:29 [PATCH] drm/i915: Fix subslice configuration on Gen9LP Tvrtko Ursulin
2018-08-22 14:37 ` Tvrtko Ursulin
2018-08-22 14:54 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-08-22 15:08 ` [PATCH] " Lionel Landwerlin
2018-08-22 15:17   ` Tvrtko Ursulin [this message]
2018-08-22 15:22     ` Lionel Landwerlin
2018-08-22 15:27       ` Tvrtko Ursulin
2018-08-22 15:47         ` Lionel Landwerlin
2018-08-23  8:59           ` Tvrtko Ursulin
2018-08-29 10:41             ` Tvrtko Ursulin
2018-08-22 16:12 ` ✓ Fi.CI.IGT: success for " 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=bed28ee6-fb8d-656b-4385-3148f85090a9@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=lionel.g.landwerlin@intel.com \
    --cc=tursulin@ursulin.net \
    /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;
as well as URLs for NNTP newsgroup(s).