dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* Enabling sample_c optimization for Broadwell GPUs
@ 2021-05-04 23:07 André Almeida
  2021-05-05 10:16 ` Rodrigo Vivi
  2021-05-05 15:35 ` Kenneth Graunke
  0 siblings, 2 replies; 4+ messages in thread
From: André Almeida @ 2021-05-04 23:07 UTC (permalink / raw)
  To: Rodrigo Vivi, Joonas Lahtinen, Jani Nikula, Daniel Vetter,
	Kenneth Graunke
  Cc: intel-gfx, kernel, dri-devel

Hi there,

While browsing an old downstream kernel, I found a patch[0] that enables 
sample_c optimizations at Broadwell GPUs. The message from the upstream 
commit that enables it for Haswell[1] (and presumably where the code 
at[0] was copied from) states that "[..] later platforms remove this 
bit, and apparently always enable the optimization".

Could you confirm that Broadwell and following architectures enable this 
optimization by default (and thus, patch[0] is a no-op), or should I 
upstream it?

Thanks,
	André

[0] 
https://github.com/ValveSoftware/steamos_kernel/commit/198990f13e1d9429864c177d9441a6559771c5e2

[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=944115934436b1ff6cf773a9e9123858ea9ef3da
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Enabling sample_c optimization for Broadwell GPUs
  2021-05-04 23:07 Enabling sample_c optimization for Broadwell GPUs André Almeida
@ 2021-05-05 10:16 ` Rodrigo Vivi
  2021-05-05 15:02   ` André Almeida
  2021-05-05 15:35 ` Kenneth Graunke
  1 sibling, 1 reply; 4+ messages in thread
From: Rodrigo Vivi @ 2021-05-05 10:16 UTC (permalink / raw)
  To: André Almeida; +Cc: intel-gfx, dri-devel, Kenneth Graunke, kernel

Hi Andre,

I'm not familiar with the sample c message optimization.
Probably Ken can comment.

However I could check the internal spec here and I saw this bit
only exists with this meaning in Haswell.

For all the other platforms, including Broadwell it got re-purposed with
a different meaning and a programming note:
"This bit should be programmed to zero (0h) at all times."

Also, I could not find any workaround documented anywhere recommending
this bit to be set.

So, I would not recommend to use it in any product, even downstream.
Regardless the state of sample c message optimization in later platforms.

Thanks,
Rodrigo.

On Tue, May 04, 2021 at 08:07:14PM -0300, André Almeida wrote:
> Hi there,
> 
> While browsing an old downstream kernel, I found a patch[0] that enables
> sample_c optimizations at Broadwell GPUs. The message from the upstream
> commit that enables it for Haswell[1] (and presumably where the code at[0]
> was copied from) states that "[..] later platforms remove this bit, and
> apparently always enable the optimization".
> 
> Could you confirm that Broadwell and following architectures enable this
> optimization by default (and thus, patch[0] is a no-op), or should I
> upstream it?
> 
> Thanks,
> 	André
> 
> [0] https://github.com/ValveSoftware/steamos_kernel/commit/198990f13e1d9429864c177d9441a6559771c5e2
> 
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=944115934436b1ff6cf773a9e9123858ea9ef3da
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Enabling sample_c optimization for Broadwell GPUs
  2021-05-05 10:16 ` Rodrigo Vivi
@ 2021-05-05 15:02   ` André Almeida
  0 siblings, 0 replies; 4+ messages in thread
From: André Almeida @ 2021-05-05 15:02 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: intel-gfx, dri-devel, Kenneth Graunke, kernel

Hi Rodrigo,

Thank you very much for providing that information in a precise manner.

Às 07:16 de 05/05/21, Rodrigo Vivi escreveu:
> Hi Andre,
> 
> I'm not familiar with the sample c message optimization.
> Probably Ken can comment.
> 
> However I could check the internal spec here and I saw this bit
> only exists with this meaning in Haswell.
> 
> For all the other platforms, including Broadwell it got re-purposed with
> a different meaning and a programming note:
> "This bit should be programmed to zero (0h) at all times."
> 
> Also, I could not find any workaround documented anywhere recommending
> this bit to be set.
> 
> So, I would not recommend to use it in any product, even downstream.
> Regardless the state of sample c message optimization in later platforms.
> 
> Thanks,
> Rodrigo.
> 
> On Tue, May 04, 2021 at 08:07:14PM -0300, André Almeida wrote:
>> Hi there,
>>
>> While browsing an old downstream kernel, I found a patch[0] that enables
>> sample_c optimizations at Broadwell GPUs. The message from the upstream
>> commit that enables it for Haswell[1] (and presumably where the code at[0]
>> was copied from) states that "[..] later platforms remove this bit, and
>> apparently always enable the optimization".
>>
>> Could you confirm that Broadwell and following architectures enable this
>> optimization by default (and thus, patch[0] is a no-op), or should I
>> upstream it?
>>
>> Thanks,
>> 	André
>>
>> [0] https://github.com/ValveSoftware/steamos_kernel/commit/198990f13e1d9429864c177d9441a6559771c5e2
>>
>> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=944115934436b1ff6cf773a9e9123858ea9ef3da
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Enabling sample_c optimization for Broadwell GPUs
  2021-05-04 23:07 Enabling sample_c optimization for Broadwell GPUs André Almeida
  2021-05-05 10:16 ` Rodrigo Vivi
@ 2021-05-05 15:35 ` Kenneth Graunke
  1 sibling, 0 replies; 4+ messages in thread
From: Kenneth Graunke @ 2021-05-05 15:35 UTC (permalink / raw)
  To: Rodrigo Vivi, Joonas Lahtinen, Jani Nikula, Daniel Vetter,
	André Almeida
  Cc: intel-gfx, kernel, dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1334 bytes --]

Hello,

Yes, that bit only exists on Haswell.  On Haswell, sample_c operations
were processed at 1 pixel/clock unless you set that bit, in which case
they get processed at 4 pixels/clock.  The downside is that it breaks
some obscure media feature that apparently no one used.

Broadwell and later alway process sample_c operations at the fast speed,
and there is no bit to control it.  I would say that downstream patch is
incorrect.

--Ken

On Tuesday, May 4, 2021 4:07:14 PM PDT André Almeida wrote:
> Hi there,
> 
> While browsing an old downstream kernel, I found a patch[0] that enables 
> sample_c optimizations at Broadwell GPUs. The message from the upstream 
> commit that enables it for Haswell[1] (and presumably where the code 
> at[0] was copied from) states that "[..] later platforms remove this 
> bit, and apparently always enable the optimization".
> 
> Could you confirm that Broadwell and following architectures enable this 
> optimization by default (and thus, patch[0] is a no-op), or should I 
> upstream it?
> 
> Thanks,
> 	André
> 
> [0] 
> https://github.com/ValveSoftware/steamos_kernel/commit/198990f13e1d9429864c177d9441a6559771c5e2
> 
> [1] 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=944115934436b1ff6cf773a9e9123858ea9ef3da
> 


[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-05 15:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-04 23:07 Enabling sample_c optimization for Broadwell GPUs André Almeida
2021-05-05 10:16 ` Rodrigo Vivi
2021-05-05 15:02   ` André Almeida
2021-05-05 15:35 ` Kenneth Graunke

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).