Re: [Intel-gfx] [PATCH v2] drm/i915/huc: Don't try to check HuC status if it's not loaded

2019-05-27 Thread Michal Wajdeczko
On Fri, 24 May 2019 15:29:22 +0200, Michal Wajdeczko wrote: On Fri, 24 May 2019 15:10:58 +0200, Joonas Lahtinen wrote: Quoting Ye, Tony (2019-05-22 14:32:41) From UMD perspective, when HuC is not working as expected, usually we look into the kernel log and i915_huc_load_status debugfs

Re: [Intel-gfx] [PATCH v2] drm/i915/huc: Don't try to check HuC status if it's not loaded

2019-05-24 Thread Michal Wajdeczko
On Fri, 24 May 2019 15:10:58 +0200, Joonas Lahtinen wrote: Quoting Ye, Tony (2019-05-22 14:32:41) From UMD perspective, when HuC is not working as expected, usually we look into the kernel log and i915_huc_load_status debugfs to find out why it's not working. It will be helpful to know the

Re: [Intel-gfx] [PATCH v2] drm/i915/huc: Don't try to check HuC status if it's not loaded

2019-05-24 Thread Joonas Lahtinen
Quoting Ye, Tony (2019-05-22 14:32:41) > From UMD perspective, when HuC is not working as expected, usually we > look into the kernel log and i915_huc_load_status debugfs to find out > why it's not working. It will be helpful to know the reason of the > failure from the error code. The typicall

Re: [Intel-gfx] [PATCH v2] drm/i915/huc: Don't try to check HuC status if it's not loaded

2019-05-22 Thread Ye, Tony
On 5/21/2019 7:08 PM, Michal Wajdeczko wrote: On Tue, 21 May 2019 13:04:12 +0200, Ye, Tony wrote: There are two users of I915_PARAM_HUC_STATUS, the intel-media driver and the legacy intel-vaapi-driver. Both drivers check the return value like this: has_huc = !! ret_value; So the ABI

Re: [Intel-gfx] [PATCH v2] drm/i915/huc: Don't try to check HuC status if it's not loaded

2019-05-21 Thread Michal Wajdeczko
On Tue, 21 May 2019 13:04:12 +0200, Ye, Tony wrote: There are two users of I915_PARAM_HUC_STATUS, the intel-media driver and the legacy intel-vaapi-driver. Both drivers check the return value like this: has_huc = !! ret_value; So the ABI change will break the existing stack because ne

Re: [Intel-gfx] [PATCH v2] drm/i915/huc: Don't try to check HuC status if it's not loaded

2019-05-21 Thread Ye, Tony
There are two users of I915_PARAM_HUC_STATUS, the intel-media driver and the legacy intel-vaapi-driver. Both drivers check the return value like this:     has_huc = !! ret_value; So the ABI change will break the existing stack because negative values are treated as 1, won't it? On 5/20/2019

Re: [Intel-gfx] [PATCH v2] drm/i915/huc: Don't try to check HuC status if it's not loaded

2019-05-20 Thread Michal Wajdeczko
On Mon, 20 May 2019 12:44:43 +0200, Chris Wilson wrote: Quoting Michal Wajdeczko (2019-05-20 11:24:37) On Mon, 20 May 2019 11:35:26 +0200, Chris Wilson wrote: > Quoting Michal Wajdeczko (2019-05-19 22:50:43) >> If we never attempted to load HuC firmware, or we already wedged >> or reset Gu

Re: [Intel-gfx] [PATCH v2] drm/i915/huc: Don't try to check HuC status if it's not loaded

2019-05-20 Thread Chris Wilson
Quoting Michal Wajdeczko (2019-05-20 11:24:37) > On Mon, 20 May 2019 11:35:26 +0200, Chris Wilson > wrote: > > > Quoting Michal Wajdeczko (2019-05-19 22:50:43) > >> If we never attempted to load HuC firmware, or we already wedged > >> or reset GuC/HuC, then there is no reason to wake up the dev

Re: [Intel-gfx] [PATCH v2] drm/i915/huc: Don't try to check HuC status if it's not loaded

2019-05-20 Thread Michal Wajdeczko
On Mon, 20 May 2019 11:35:26 +0200, Chris Wilson wrote: Quoting Michal Wajdeczko (2019-05-19 22:50:43) If we never attempted to load HuC firmware, or we already wedged or reset GuC/HuC, then there is no reason to wake up the device to check one bit in the register that will be for sure clear

Re: [Intel-gfx] [PATCH v2] drm/i915/huc: Don't try to check HuC status if it's not loaded

2019-05-20 Thread Chris Wilson
Quoting Michal Wajdeczko (2019-05-19 22:50:43) > If we never attempted to load HuC firmware, or we already wedged > or reset GuC/HuC, then there is no reason to wake up the device > to check one bit in the register that will be for sure cleared. > > v2: check if HuC was enabled; subtle change in A

[Intel-gfx] [PATCH v2] drm/i915/huc: Don't try to check HuC status if it's not loaded

2019-05-19 Thread Michal Wajdeczko
If we never attempted to load HuC firmware, or we already wedged or reset GuC/HuC, then there is no reason to wake up the device to check one bit in the register that will be for sure cleared. v2: check if HuC was enabled; subtle change in ABI reuse hus_is_load helper Suggested-by: Chris Wils