Skip to contentSkip to conversation

Enabling sample_c optimization for Broadwell GPUs

DISCUSSION André Almeida 3 participants 4 messages May 5, 2021

lore
Share & tools
lore
#0 lore raw

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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

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.

Quoted 12 lines · André Almeida

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?

Quoted 6 lines

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

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

Hi Rodrigo,

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

Às 07:16 de 05/05/21, Rodrigo Vivi escreveu:

Quoted 15 lines

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.

Quoted 25 lines

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.

Quoted 18 lines · André Almeida

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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to André Almeida

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

Quoted 12 lines · PDT André Almeida

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?

Quoted 9 lines

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

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx