diff --git a/media_common/agnostic/common/hw/mhw_mi.h b/media_common/agnostic/common/hw/mhw_mi.h index 519634f232..3b75df04c4 100644 --- a/media_common/agnostic/common/hw/mhw_mi.h +++ b/media_common/agnostic/common/hw/mhw_mi.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2015-2021, Intel Corporation +* Copyright (c) 2015-2024, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -50,6 +50,10 @@ class MhwCpInterface; #define MHW_MI_DECODER_AV1_WATCHDOG_THRESHOLD_IN_MS 80 #define MHW_MI_DECODER_16K_WATCHDOG_THRESHOLD_IN_MS 180 #define MHW_MI_DECODER_16Kx16K_WATCHDOG_THRESHOLD_IN_MS 256 +#define MHW_MI_DECODER_FHD_WATCHDOG_THRESHOLD_IN_MS_PLUS 30 +#define MHW_MI_DECODER_4K_WATCHDOG_THRESHOLD_IN_MS_PLUS 60 +#define MHW_MI_DECODER_8K_WATCHDOG_THRESHOLD_IN_MS_PLUS 120 +#define MHW_MI_DECODER_16K_WATCHDOG_THRESHOLD_IN_MS_PLUS 200 #define MHW_MI_WATCHDOG_COUNTS_PER_MILLISECOND (19200123 / 1000) // Time stamp counts per millisecond typedef enum _MHW_COMMON_MI_ADDRESS_SHIFT diff --git a/media_softlet/agnostic/Xe3_M_plus/Xe3_LPM_base/hw/mhw_mi_xe3_lpm_base_impl.h b/media_softlet/agnostic/Xe3_M_plus/Xe3_LPM_base/hw/mhw_mi_xe3_lpm_base_impl.h index 3b07b37e5a..5fcb3a1a3f 100644 --- a/media_softlet/agnostic/Xe3_M_plus/Xe3_LPM_base/hw/mhw_mi_xe3_lpm_base_impl.h +++ b/media_softlet/agnostic/Xe3_M_plus/Xe3_LPM_base/hw/mhw_mi_xe3_lpm_base_impl.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2022, Intel Corporation +* Copyright (c) 2022-2024, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -233,24 +233,21 @@ class Impl : public mi::Impl } else { - if ((frameWidth * frameHeight) >= (7680 * 4320)) + if ((frameWidth * frameHeight) > (7680 * 4320)) { - MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_8K_WATCHDOG_THRESHOLD_IN_MS; + MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_16K_WATCHDOG_THRESHOLD_IN_MS_PLUS; } - else if ((frameWidth * frameHeight) >= (3840 * 2160)) + else if ((frameWidth * frameHeight) > (3840 * 2160)) { - MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_4K_WATCHDOG_THRESHOLD_IN_MS; + MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_8K_WATCHDOG_THRESHOLD_IN_MS_PLUS; } - else + else if ((frameWidth * frameHeight) > (1920 * 1080)) { - MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_720P_WATCHDOG_THRESHOLD_IN_MS; + MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_4K_WATCHDOG_THRESHOLD_IN_MS_PLUS; } - - if ((CODECHAL_STANDARD)codecMode == CODECHAL_AV1) + else { - // This is temporary solution to address the inappropriate threshold setting for high bit-rate AV1 decode. - // The final solution will incorporate bitstream size, increasing the setting when the bit-rate is high. - MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_AV1_WATCHDOG_THRESHOLD_IN_MS; + MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_FHD_WATCHDOG_THRESHOLD_IN_MS_PLUS; } }