i965: Move device info initialization to common code
[mesa.git] / src / intel / dev / gen_device_info.h
index a5ab14b36631ffdf2e0513a92cd2b9d4e18e9c4c..d1c7230b0ffb514ffa4cf20a898adf94828af0be 100644 (file)
@@ -74,6 +74,7 @@ struct gen_device_info
    bool has_surface_tile_offset;
    bool supports_simd16_3src;
    bool has_resource_streamer;
+   bool disable_ccs_repack;
 
    /**
     * \name Intel hardware quirks
@@ -247,6 +248,15 @@ struct gen_device_info
     */
    int simulator_id;
 
+   /**
+    * holds the pci device id
+    */
+   uint32_t chipset_id;
+
+   /**
+    * no_hw is true when the chipset_id pci device id has been overridden
+    */
+   bool no_hw;
    /** @} */
 };
 
@@ -267,7 +277,7 @@ bool gen_get_device_info(int devid, struct gen_device_info *devinfo);
 const char *gen_get_device_name(int devid);
 
 /* Used with SLICE_MASK/SUBSLICE_MASK values from DRM_I915_GETPARAM. */
-void gen_device_info_update_from_masks(struct gen_device_info *devinfo,
+bool gen_device_info_update_from_masks(struct gen_device_info *devinfo,
                                        uint32_t slice_mask,
                                        uint32_t subslice_mask,
                                        uint32_t n_eus);
@@ -275,6 +285,15 @@ void gen_device_info_update_from_masks(struct gen_device_info *devinfo,
 void gen_device_info_update_from_topology(struct gen_device_info *devinfo,
                                           const struct drm_i915_query_topology_info *topology);
 
+static inline uint64_t
+gen_device_info_timebase_scale(const struct gen_device_info *devinfo,
+                               uint64_t gpu_timestamp)
+{
+   return (1000000000ull * gpu_timestamp) / devinfo->timestamp_frequency;
+}
+
+bool gen_get_device_info_from_fd(int fh, struct gen_device_info *devinfo);
+
 #ifdef __cplusplus
 }
 #endif