]> Git Repo - linux.git/commitdiff
Merge tag 'gvt-next-2017-08-15' of https://github.com/01org/gvt-linux into drm-intel...
authorDaniel Vetter <[email protected]>
Tue, 15 Aug 2017 10:52:38 +0000 (12:52 +0200)
committerDaniel Vetter <[email protected]>
Tue, 15 Aug 2017 10:52:39 +0000 (12:52 +0200)
gvt-next-2017-08-15

gvt update for 4.14
- MMIO save/restore optimization (Changbin)
- Split workload scan vs. dispatch for more parallel exec (Ping)
- vGPU full 48bit ppgtt support (Joonas, Tina)
- vGPU hw id expose for perf (Zhenyu)
- other misc cleanup and fixes

Signed-off-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1  2 
drivers/gpu/drm/i915/i915_drv.h

index ef5af697732d79389804ccbb5219a632c132ec5d,c38f46fd1fba4b1bd4895a28b97a916b481b09f0..5aa214a05c517e45f04778c12cb9c7f65588bb8d
@@@ -1166,8 -1166,8 +1166,8 @@@ enum intel_pch 
        PCH_CPT,        /* Cougarpoint/Pantherpoint PCH */
        PCH_LPT,        /* Lynxpoint/Wildcatpoint PCH */
        PCH_SPT,        /* Sunrisepoint PCH */
 -      PCH_KBP,        /* Kabypoint PCH */
 -      PCH_CNP,        /* Cannonpoint PCH */
 +      PCH_KBP,        /* Kaby Lake PCH */
 +      PCH_CNP,        /* Cannon Lake PCH */
        PCH_NOP,
  };
  
@@@ -1528,8 -1528,6 +1528,8 @@@ struct i915_gpu_error 
        /* Protected by the above dev->gpu_error.lock. */
        struct i915_gpu_state *first_error;
  
 +      atomic_t pending_fb_pin;
 +
        unsigned long missed_irq_rings;
  
        /**
        unsigned long flags;
  #define I915_RESET_BACKOFF    0
  #define I915_RESET_HANDOFF    1
 +#define I915_RESET_MODESET    2
  #define I915_WEDGED           (BITS_PER_LONG - 1)
  #define I915_RESET_ENGINE     (I915_WEDGED - I915_NUM_ENGINES)
  
@@@ -1905,6 -1902,7 +1905,7 @@@ struct i915_workarounds 
  
  struct i915_virtual_gpu {
        bool active;
+       u32 caps;
  };
  
  /* used in computing the new watermarks state */
@@@ -1924,24 -1922,6 +1925,24 @@@ struct i915_oa_reg 
        u32 value;
  };
  
 +struct i915_oa_config {
 +      char uuid[UUID_STRING_LEN + 1];
 +      int id;
 +
 +      const struct i915_oa_reg *mux_regs;
 +      u32 mux_regs_len;
 +      const struct i915_oa_reg *b_counter_regs;
 +      u32 b_counter_regs_len;
 +      const struct i915_oa_reg *flex_regs;
 +      u32 flex_regs_len;
 +
 +      struct attribute_group sysfs_metric;
 +      struct attribute *attrs[2];
 +      struct device_attribute sysfs_metric_id;
 +
 +      atomic_t ref_count;
 +};
 +
  struct i915_perf_stream;
  
  /**
@@@ -2054,36 -2034,12 +2055,36 @@@ struct i915_perf_stream 
         * type of configured stream.
         */
        const struct i915_perf_stream_ops *ops;
 +
 +      /**
 +       * @oa_config: The OA configuration used by the stream.
 +       */
 +      struct i915_oa_config *oa_config;
  };
  
  /**
   * struct i915_oa_ops - Gen specific implementation of an OA unit stream
   */
  struct i915_oa_ops {
 +      /**
 +       * @is_valid_b_counter_reg: Validates register's address for
 +       * programming boolean counters for a particular platform.
 +       */
 +      bool (*is_valid_b_counter_reg)(struct drm_i915_private *dev_priv,
 +                                     u32 addr);
 +
 +      /**
 +       * @is_valid_mux_reg: Validates register's address for programming mux
 +       * for a particular platform.
 +       */
 +      bool (*is_valid_mux_reg)(struct drm_i915_private *dev_priv, u32 addr);
 +
 +      /**
 +       * @is_valid_flex_reg: Validates register's address for programming
 +       * flex EU filtering for a particular platform.
 +       */
 +      bool (*is_valid_flex_reg)(struct drm_i915_private *dev_priv, u32 addr);
 +
        /**
         * @init_oa_buffer: Resets the head and tail pointers of the
         * circular buffer for periodic OA reports.
         */
        void (*init_oa_buffer)(struct drm_i915_private *dev_priv);
  
 -      /**
 -       * @select_metric_set: The auto generated code that checks whether a
 -       * requested OA config is applicable to the system and if so sets up
 -       * the mux, oa and flex eu register config pointers according to the
 -       * current dev_priv->perf.oa.metrics_set.
 -       */
 -      int (*select_metric_set)(struct drm_i915_private *dev_priv);
 -
        /**
         * @enable_metric_set: Selects and applies any MUX configuration to set
         * up the Boolean and Custom (B/C) counters that are part of the
         * counter reports being sampled. May apply system constraints such as
         * disabling EU clock gating as required.
         */
 -      int (*enable_metric_set)(struct drm_i915_private *dev_priv);
 +      int (*enable_metric_set)(struct drm_i915_private *dev_priv,
 +                               const struct i915_oa_config *oa_config);
  
        /**
         * @disable_metric_set: Remove system constraints associated with using
@@@ -2468,32 -2431,10 +2469,32 @@@ struct drm_i915_private 
                struct kobject *metrics_kobj;
                struct ctl_table_header *sysctl_header;
  
 +              /*
 +               * Lock associated with adding/modifying/removing OA configs
 +               * in dev_priv->perf.metrics_idr.
 +               */
 +              struct mutex metrics_lock;
 +
 +              /*
 +               * List of dynamic configurations, you need to hold
 +               * dev_priv->perf.metrics_lock to access it.
 +               */
 +              struct idr metrics_idr;
 +
 +              /*
 +               * Lock associated with anything below within this structure
 +               * except exclusive_stream.
 +               */
                struct mutex lock;
                struct list_head streams;
  
                struct {
 +                      /*
 +                       * The stream currently using the OA unit. If accessed
 +                       * outside a syscall associated to its file
 +                       * descriptor, you need to hold
 +                       * dev_priv->drm.struct_mutex.
 +                       */
                        struct i915_perf_stream *exclusive_stream;
  
                        u32 specific_ctx_id;
                        int period_exponent;
                        int timestamp_frequency;
  
 -                      int metrics_set;
 -
 -                      const struct i915_oa_reg *mux_regs[6];
 -                      int mux_regs_lens[6];
 -                      int n_mux_configs;
 -
 -                      const struct i915_oa_reg *b_counter_regs;
 -                      int b_counter_regs_len;
 -                      const struct i915_oa_reg *flex_regs;
 -                      int flex_regs_len;
 +                      struct i915_oa_config test_config;
  
                        struct {
                                struct i915_vma *vma;
  
                        struct i915_oa_ops ops;
                        const struct i915_oa_format *oa_formats;
 -                      int n_builtin_sets;
                } oa;
        } perf;
  
@@@ -3197,8 -3148,7 +3198,8 @@@ void intel_hpd_irq_handler(struct drm_i
  void intel_hpd_init(struct drm_i915_private *dev_priv);
  void intel_hpd_init_work(struct drm_i915_private *dev_priv);
  void intel_hpd_cancel_work(struct drm_i915_private *dev_priv);
 -bool intel_hpd_pin_to_port(enum hpd_pin pin, enum port *port);
 +enum port intel_hpd_pin_to_port(enum hpd_pin pin);
 +enum hpd_pin intel_hpd_pin(enum port port);
  bool intel_hpd_disable(struct drm_i915_private *dev_priv, enum hpd_pin pin);
  void intel_hpd_enable(struct drm_i915_private *dev_priv, enum hpd_pin pin);
  
@@@ -3684,10 -3634,6 +3685,10 @@@ i915_gem_context_lookup_timeline(struc
  
  int i915_perf_open_ioctl(struct drm_device *dev, void *data,
                         struct drm_file *file);
 +int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
 +                             struct drm_file *file);
 +int i915_perf_remove_config_ioctl(struct drm_device *dev, void *data,
 +                                struct drm_file *file);
  void i915_oa_init_reg_state(struct intel_engine_cs *engine,
                            struct i915_gem_context *ctx,
                            uint32_t *reg_state);
This page took 0.072479 seconds and 4 git commands to generate.