1. 24 4月, 2020 3 次提交
  2. 21 4月, 2020 4 次提交
  3. 18 4月, 2020 2 次提交
  4. 16 4月, 2020 2 次提交
  5. 04 4月, 2020 6 次提交
  6. 28 3月, 2020 4 次提交
  7. 27 3月, 2020 1 次提交
  8. 26 3月, 2020 3 次提交
  9. 20 3月, 2020 1 次提交
    • V
      drm/i915: Fix crtc nv12 etc. plane bitmasks for DPMS off · cb1824bb
      Ville Syrjälä 提交于
      We only consider crtc_state->enable when initially calculating plane
      visibility. Later on we try to override the plane's state to invisible
      if the crtc is in DPMS off state (crtc_state->active==false).
      Unfortunately the code doing that only updates the plane_state.visible
      flag and the crtc_state.active_planes bimask, but forgets to update
      some of the other plane bitmasks stored in the crtc_state. Namely
      crtc_state.nv12_planes is left set up based on the original visibility
      check which makes icl_check_nv12_planes() pick a slave plane for the
      flagged plane in the bitmask. Later on we hit the watermark code
      which sees a plane with a slave assigned and it then makes the
      logical assumption that the master plane must itself be visible.
      Since the master's plane_state.visible flag was already cleared
      we get a WARN.
      
      Fix the problem by clearing all the plane bitmasks for DPMS off.
      This is more or less the wrong approach and instead we should
      calculate all the plane related state purely based crtc_state->enable
      (to guarantee that the subsequent DPMS on can't fail). However in
      the past we definitely had some roadblocks to making that happen.
      Not sure how many are left these days, but let's stick to the current
      approach since it's a much simpler fix to the immediate problem
      (the WARN).
      
      v2: Keep the visible=false, it's important (Rodrigo)
      
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200318174515.31637-1-ville.syrjala@linux.intel.comReviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      cb1824bb
  10. 03 3月, 2020 3 次提交
  11. 02 3月, 2020 1 次提交
  12. 28 2月, 2020 2 次提交
  13. 27 2月, 2020 1 次提交
  14. 26 2月, 2020 5 次提交
  15. 23 2月, 2020 2 次提交
    • P
      drm/i915/display/display: Make WARN* drm specific where drm_device ptr is available · e57291c2
      Pankaj Bharadiya 提交于
      drm specific WARN* calls include device information in the
      backtrace, so we know what device the warnings originate from.
      
      Covert all the calls of WARN* with device specific drm_WARN*
      variants in functions where drm_device or drm_i915_private struct
      pointer is readily available.
      
      The conversion was done automatically with below coccinelle semantic
      patch. checkpatch errors/warnings are fixed manually.
      
      @rule1@
      identifier func, T;
      @@
      func(...) {
      ...
      struct drm_device *T = ...;
      <...
      (
      -WARN(
      +drm_WARN(T,
      ...)
      |
      -WARN_ON(
      +drm_WARN_ON(T,
      ...)
      |
      -WARN_ONCE(
      +drm_WARN_ONCE(T,
      ...)
      |
      -WARN_ON_ONCE(
      +drm_WARN_ON_ONCE(T,
      ...)
      )
      ...>
      }
      
      @rule2@
      identifier func, T;
      @@
      func(struct drm_device *T,...) {
      <...
      (
      -WARN(
      +drm_WARN(T,
      ...)
      |
      -WARN_ON(
      +drm_WARN_ON(T,
      ...)
      |
      -WARN_ONCE(
      +drm_WARN_ONCE(T,
      ...)
      |
      -WARN_ON_ONCE(
      +drm_WARN_ON_ONCE(T,
      ...)
      )
      ...>
      }
      
      @rule3@
      identifier func, T;
      @@
      func(...) {
      ...
      struct drm_i915_private *T = ...;
      <+...
      (
      -WARN(
      +drm_WARN(&T->drm,
      ...)
      |
      -WARN_ON(
      +drm_WARN_ON(&T->drm,
      ...)
      |
      -WARN_ONCE(
      +drm_WARN_ONCE(&T->drm,
      ...)
      |
      -WARN_ON_ONCE(
      +drm_WARN_ON_ONCE(&T->drm,
      ...)
      )
      ...+>
      }
      
      @rule4@
      identifier func, T;
      @@
      func(struct drm_i915_private *T,...) {
      <+...
      (
      -WARN(
      +drm_WARN(&T->drm,
      ...)
      |
      -WARN_ON(
      +drm_WARN_ON(&T->drm,
      ...)
      |
      -WARN_ONCE(
      +drm_WARN_ONCE(&T->drm,
      ...)
      |
      -WARN_ON_ONCE(
      +drm_WARN_ON_ONCE(&T->drm,
      ...)
      )
      ...+>
      }
      Signed-off-by: NPankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200220165507.16823-4-pankaj.laxminarayan.bharadiya@intel.com
      e57291c2
    • K
      drm/i915: Distribute switch variables for initialization · 2713eb41
      Kees Cook 提交于
      Variables declared in a switch statement before any case statements
      cannot be automatically initialized with compiler instrumentation (as
      they are not part of any execution flow). With GCC's proposed automatic
      stack variable initialization feature, this triggers a warning (and they
      don't get initialized). Clang's automatic stack variable initialization
      (via CONFIG_INIT_STACK_ALL=y) doesn't throw a warning, but it also
      doesn't initialize such variables[1]. Note that these warnings (or silent
      skipping) happen before the dead-store elimination optimization phase,
      so even when the automatic initializations are later elided in favor of
      direct initializations, the warnings remain.
      
      To avoid these problems, move such variables into the "case" where
      they're used or lift them up into the main function body.
      
      drivers/gpu/drm/i915/display/intel_display.c: In function ‘check_digital_port_conflicts’:
      drivers/gpu/drm/i915/display/intel_display.c:12963:17: warning: statement will never be executed [-Wswitch-unreachable]
      12963 |    unsigned int port_mask;
            |                 ^~~~~~~~~
      
      drivers/gpu/drm/i915/intel_pm.c: In function ‘vlv_get_fifo_size’:
      drivers/gpu/drm/i915/intel_pm.c:474:7: warning: statement will never be executed [-Wswitch-unreachable]
        474 |   u32 dsparb, dsparb2, dsparb3;
            |       ^~~~~~
      drivers/gpu/drm/i915/intel_pm.c: In function ‘vlv_atomic_update_fifo’:
      drivers/gpu/drm/i915/intel_pm.c:1997:7: warning: statement will never be executed [-Wswitch-unreachable]
       1997 |   u32 dsparb, dsparb2, dsparb3;
            |       ^~~~~~
      
      [1] https://bugs.llvm.org/show_bug.cgi?id=44916Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/202002201602.92CADF7D@keescook
      2713eb41