On 09/28/2016 08:42 AM, Xiang, Haihao wrote:
Signed-off-by: Xiang, Haihao<[email protected]>

This looks good to me.

Add: Reviewed-by: Zhao Yakui <[email protected]>

Thanks
   Yakui

---
  src/intel_driver.c | 12 ++++++++++++
  src/intel_driver.h |  1 +
  2 files changed, 13 insertions(+)

diff --git a/src/intel_driver.c b/src/intel_driver.c
index 96c1994..bb19401 100644
--- a/src/intel_driver.c
+++ b/src/intel_driver.c
@@ -44,6 +44,12 @@ uint32_t g_intel_debug_option_flags = 0;
  #define LOCAL_I915_PARAM_HAS_BSD2     30
  #endif

+#ifdef I915_PARAM_HAS_HUC
+#define LOCAL_I915_PARAM_HAS_HUC I915_PARAM_HAS_HUC
+#else
+#define LOCAL_I915_PARAM_HAS_HUC 42
+#endif
+
  static Bool
  intel_driver_get_param(struct intel_driver_data *intel, int param, int *value)
  {
@@ -130,6 +136,12 @@ intel_driver_init(VADriverContextP ctx)
      if (intel_driver_get_param(intel, LOCAL_I915_PARAM_HAS_BSD2,&ret_value))
          intel->has_bsd2 = !!ret_value;

+    intel->has_huc = 0;
+    ret_value = 0;
+
+    if (intel_driver_get_param(intel, LOCAL_I915_PARAM_HAS_HUC,&ret_value))
+        intel->has_huc = !!ret_value;
+
      intel_driver_get_revid(intel,&intel->revision);
      return true;
  }
diff --git a/src/intel_driver.h b/src/intel_driver.h
index c9a80c8..dcdc03b 100644
--- a/src/intel_driver.h
+++ b/src/intel_driver.h
@@ -181,6 +181,7 @@ struct intel_driver_data
      unsigned int has_blt    : 1; /* Flag: has BLT unit? */
      unsigned int has_vebox  : 1; /* Flag: has VEBOX unit */
      unsigned int has_bsd2   : 1; /* Flag: has the second BSD video ring unit 
*/
+    unsigned int has_huc    : 1; /* Flag: has a fully loaded HuC firmware? */

      const struct intel_device_info *device_info;
  };

_______________________________________________
Libva mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libva

Reply via email to