diff --git a/media_driver/linux/common/os/mos_os_specific.c b/media_driver/linux/common/os/mos_os_specific.c index 29c97eb788d..1fd149f31a1 100644 --- a/media_driver/linux/common/os/mos_os_specific.c +++ b/media_driver/linux/common/os/mos_os_specific.c @@ -3790,6 +3790,43 @@ MOS_STATUS Mos_Specific_CreateGpuContext( pOsContextSpecific->SetGpuContextHandle(mosGpuCxt, gpuContextSpecific->GetGpuContextHandle()); } + if (createOption->SSEUValue) + { + struct drm_i915_gem_context_param_sseu sseu = { .flags = I915_EXEC_RENDER }; + + if (mos_get_context_param_sseu(pOsInterface->pOsContext->intel_context, &sseu)) + { + MOS_OS_ASSERTMESSAGE("Failed to get sseu configuration."); + return MOS_STATUS_UNKNOWN; + }; + + if (createOption->packed.SliceCount) + { + sseu.packed.slice_mask = mos_get_slice_mask(createOption->packed.SliceCount); + } + + if (createOption->packed.SubSliceCount) + { + sseu.packed.subslice_mask = mos_get_slice_mask(createOption->packed.SubSliceCount); + } + + if (createOption->packed.MinEUcountPerSubSlice) + { + sseu.packed.min_eu_per_subslice = createOption->packed.MinEUcountPerSubSlice; + } + + if (createOption->packed.MaxEUcountPerSubSlice) + { + sseu.packed.max_eu_per_subslice = createOption->packed.MaxEUcountPerSubSlice; + } + + if (mos_set_context_param_sseu(pOsInterface->pOsContext->intel_context, sseu)) + { + MOS_OS_ASSERTMESSAGE("Failed to set sseu configuration."); + return MOS_STATUS_UNKNOWN; + }; + } + return MOS_STATUS_SUCCESS; }