1. 15 10月, 2019 1 次提交
  2. 04 10月, 2019 1 次提交
  3. 03 10月, 2019 1 次提交
    • M
      drm/i915/dp: Fix dsc bpp calculations, v5. · cffb4c3e
      Maarten Lankhorst 提交于
      There was a integer wraparound when mode_clock became too high,
      and we didn't correct for the FEC overhead factor when dividing,
      with the calculations breaking at HBR3.
      
      As a result our calculated bpp was way too high, and the link width
      limitation never came into effect.
      
      Print out the resulting bpp calcululations as a sanity check, just
      in case we ever have to debug it later on again.
      
      We also used the wrong factor for FEC. While bspec mentions 2.4%,
      all the calculations use 1/0.972261, and the same ratio should be
      applied to data M/N as well, so use it there when FEC is enabled.
      
      This fixes the FIFO underrun we are seeing with FEC enabled.
      
      Changes since v2:
      - Handle fec_enable in intel_link_compute_m_n, so only data M/N is adjusted. (Ville)
      - Fix initial hardware readout for FEC. (Ville)
      Changes since v3:
      - Remove bogus fec_to_mode_clock. (Ville)
      Changes since v4:
      - Use the correct register for icl. (Ville)
      - Split hw readout to a separate patch.
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Fixes: d9218c8f ("drm/i915/dp: Add helpers for Compressed BPP and Slice Count for DSC")
      Cc: <stable@vger.kernel.org> # v5.0+
      Cc: Manasi Navare <manasi.d.navare@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190925082110.17439-1-maarten.lankhorst@linux.intel.comReviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      (cherry picked from commit ed06efb8)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      cffb4c3e
  4. 02 10月, 2019 1 次提交
  5. 27 9月, 2019 1 次提交
  6. 25 9月, 2019 1 次提交
    • M
      drm/i915/dp: Fix dsc bpp calculations, v5. · ed06efb8
      Maarten Lankhorst 提交于
      There was a integer wraparound when mode_clock became too high,
      and we didn't correct for the FEC overhead factor when dividing,
      with the calculations breaking at HBR3.
      
      As a result our calculated bpp was way too high, and the link width
      limitation never came into effect.
      
      Print out the resulting bpp calcululations as a sanity check, just
      in case we ever have to debug it later on again.
      
      We also used the wrong factor for FEC. While bspec mentions 2.4%,
      all the calculations use 1/0.972261, and the same ratio should be
      applied to data M/N as well, so use it there when FEC is enabled.
      
      This fixes the FIFO underrun we are seeing with FEC enabled.
      
      Changes since v2:
      - Handle fec_enable in intel_link_compute_m_n, so only data M/N is adjusted. (Ville)
      - Fix initial hardware readout for FEC. (Ville)
      Changes since v3:
      - Remove bogus fec_to_mode_clock. (Ville)
      Changes since v4:
      - Use the correct register for icl. (Ville)
      - Split hw readout to a separate patch.
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Fixes: d9218c8f ("drm/i915/dp: Add helpers for Compressed BPP and Slice Count for DSC")
      Cc: <stable@vger.kernel.org> # v5.0+
      Cc: Manasi Navare <manasi.d.navare@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190925082110.17439-1-maarten.lankhorst@linux.intel.comReviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      ed06efb8
  7. 21 9月, 2019 1 次提交
  8. 20 9月, 2019 1 次提交
    • V
      drm/i915: Don't advertise modes that exceed the max plane size · 2d20411e
      Ville Syrjälä 提交于
      Modern platforms allow the transcoders hdisplay/vdisplay to exceed the
      planes' max resolution. This has the nasty implication that modes on the
      connectors' mode list may not be usable when the user asks for a
      fullscreen plane. Seeing as that is the most common use case it seems
      prudent to filter out modes that don't allow for fullscreen planes to
      be enabled.
      
      Let's do that in the connetor .mode_valid() hook so that normally
      such modes are kept hidden but the user is still able to forcibly
      specify such a mode if they know they don't need fullscreen planes.
      
      This is in line with ealier policies regarding certain clock limits.
      The idea is to prevent the casual user from encountering a mode that
      would fail under typical conditions, but allow the expert user to
      force things if they so wish.
      
      Maybe in the future we should consider automagically using two
      planes when one can't cover the entire screen? Wouldn't be a
      great match for the current uapi with explicit planes though,
      but I guess no worse than using two pipes (which we apparently
      have to in the future anyway). Either that or we'd have to
      teach userspace to do it for us.
      
      v2: Fix icl+ max plane heigth (Manasi)
      
      Cc: Manasi Navare <manasi.d.navare@intel.com>
      Cc: Leho Kraav <leho@kraav.com>
      Cc: Sean Paul <sean@poorly.run>
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: NManasi Navare <manasi.d.navare@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190918150707.32420-1-ville.syrjala@linux.intel.com
      2d20411e
  9. 05 9月, 2019 1 次提交
  10. 02 9月, 2019 1 次提交
  11. 30 8月, 2019 1 次提交
  12. 29 8月, 2019 1 次提交
  13. 27 8月, 2019 2 次提交
  14. 23 8月, 2019 1 次提交
  15. 21 8月, 2019 3 次提交
  16. 17 8月, 2019 1 次提交
  17. 09 8月, 2019 1 次提交
  18. 07 8月, 2019 2 次提交
  19. 26 7月, 2019 1 次提交
    • G
      drm/i915: Mark expected switch fall-throughs · 2defb94e
      Gustavo A. R. Silva 提交于
      In preparation to enabling -Wimplicit-fallthrough, mark switch
      cases where we are expecting to fall through.
      
      This patch fixes the following warnings:
      
      drivers/gpu/drm/i915/gem/i915_gem_mman.c: In function ‘i915_gem_fault’:
      drivers/gpu/drm/i915/gem/i915_gem_mman.c:342:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (!i915_terminally_wedged(i915))
            ^
      drivers/gpu/drm/i915/gem/i915_gem_mman.c:345:2: note: here
        case -EAGAIN:
        ^~~~
      
      drivers/gpu/drm/i915/gem/i915_gem_pages.c: In function ‘i915_gem_object_map’:
      ./include/linux/compiler.h:78:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
       # define unlikely(x) __builtin_expect(!!(x), 0)
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
      ./include/asm-generic/bug.h:136:2: note: in expansion of macro ‘unlikely’
        unlikely(__ret_warn_on);     \
        ^~~~~~~~
      drivers/gpu/drm/i915/i915_utils.h:49:25: note: in expansion of macro ‘WARN’
       #define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \
                               ^~~~
      drivers/gpu/drm/i915/gem/i915_gem_pages.c:270:3: note: in expansion of macro ‘MISSING_CASE’
         MISSING_CASE(type);
         ^~~~~~~~~~~~
      drivers/gpu/drm/i915/gem/i915_gem_pages.c:272:2: note: here
        case I915_MAP_WB:
        ^~~~
      
      drivers/gpu/drm/i915/i915_gpu_error.c: In function ‘error_record_engine_registers’:
      ./include/linux/compiler.h:78:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
       # define unlikely(x) __builtin_expect(!!(x), 0)
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
      ./include/asm-generic/bug.h:136:2: note: in expansion of macro ‘unlikely’
        unlikely(__ret_warn_on);     \
        ^~~~~~~~
      drivers/gpu/drm/i915/i915_utils.h:49:25: note: in expansion of macro ‘WARN’
       #define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \
                               ^~~~
      drivers/gpu/drm/i915/i915_gpu_error.c:1196:5: note: in expansion of macro ‘MISSING_CASE’
           MISSING_CASE(engine->id);
           ^~~~~~~~~~~~
      drivers/gpu/drm/i915/i915_gpu_error.c:1197:4: note: here
          case RCS0:
          ^~~~
      
      drivers/gpu/drm/i915/display/intel_dp.c: In function ‘intel_dp_get_fia_supported_lane_count’:
      ./include/linux/compiler.h:78:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
       # define unlikely(x) __builtin_expect(!!(x), 0)
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
      ./include/asm-generic/bug.h:136:2: note: in expansion of macro ‘unlikely’
        unlikely(__ret_warn_on);     \
        ^~~~~~~~
      drivers/gpu/drm/i915/i915_utils.h:49:25: note: in expansion of macro ‘WARN’
       #define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \
                               ^~~~
      drivers/gpu/drm/i915/display/intel_dp.c:233:3: note: in expansion of macro ‘MISSING_CASE’
         MISSING_CASE(lane_info);
         ^~~~~~~~~~~~
      drivers/gpu/drm/i915/display/intel_dp.c:234:2: note: here
        case 1:
        ^~~~
      
      drivers/gpu/drm/i915/display/intel_display.c: In function ‘check_digital_port_conflicts’:
        CC [M]  drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgv100.o
      drivers/gpu/drm/i915/display/intel_display.c:12043:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
          if (WARN_ON(!HAS_DDI(to_i915(dev))))
             ^
      drivers/gpu/drm/i915/display/intel_display.c:12046:3: note: here
         case INTEL_OUTPUT_DP:
         ^~~~
      
      Also, notice that the Makefile is modified to stop ignoring
      fall-through warnings. The -Wimplicit-fallthrough option
      will be enabled globally in v5.3.
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      This patch is part of the ongoing efforts to enable
      -Wimplicit-fallthrough.
      Reviewed-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      2defb94e
  20. 16 7月, 2019 2 次提交
  21. 12 7月, 2019 2 次提交
  22. 11 7月, 2019 1 次提交
  23. 05 7月, 2019 1 次提交
  24. 01 7月, 2019 3 次提交
  25. 17 6月, 2019 1 次提交
  26. 12 6月, 2019 1 次提交
  27. 07 6月, 2019 2 次提交
  28. 06 6月, 2019 1 次提交
  29. 23 5月, 2019 3 次提交
    • G
      drm/i915/dp: Support DP ports YUV 4:2:0 output to GEN11 · 47d0ccec
      Gwan-gyeong Mun 提交于
      Bspec describes that GEN10 only supports capability of YUV 4:2:0 output to
      HDMI port and GEN11 supports capability of YUV 4:2:0 output to both DP and
      HDMI ports.
      
      v2: Minor style fix.
      Signed-off-by: NGwan-gyeong Mun <gwan-gyeong.mun@intel.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190521121721.32010-7-gwan-gyeong.mun@intel.com
      47d0ccec
    • G
      drm/i915/dp: Change a link bandwidth computation for DP · 16668f48
      Gwan-gyeong Mun 提交于
      Data M/N calculations were assumed a bpp as RGB format. But when we are
      using YCbCr 4:2:0 output format on DP, we should change bpp calculations
      as YCbCr 4:2:0 format. The pipe_bpp value was assumed RGB format,
      therefore, it was multiplied with 3. But YCbCr 4:2:0 requires a multiplier
      value to 1.5.
      Therefore we need to divide pipe_bpp to 2 while DP output uses YCbCr4:2:0
      format.
       - RGB format bpp = bpc x 3
       - YCbCr 4:2:0 format bpp = bpc x 1.5
      
      But Link M/N values are calculated and applied based on the Full Clock for
      YCbCr 4:2:0. And DP YCbCr 4:2:0 does not need to pixel clock double for
      a dotclock caluation. Only for HDMI YCbCr 4:2:0 needs to pixel clock double
      for a dot clock calculation.
      
      It only affects dp and edp port which use YCbCr 4:2:0 output format.
      And for now, it does not consider a use case of DSC + YCbCr 4:2:0.
      
      v2:
        Addressed review comments from Ville.
        Remove a changing of pipe_bpp on intel_ddi_set_pipe_settings().
        Because the pipe is running at the full bpp, keep pipe_bpp as RGB
        even though YCbCr 4:2:0 output format is used.
        Add a link bandwidth computation for YCbCr4:2:0 output format.
      
      v3:
        Addressed reivew comments from Ville.
        In order to make codes simple, it adds and uses intel_dp_output_bpp()
        function.
      
      v6:
        Link M/N values are calculated and applied based on the Full Clock for
        YCbCr420. The Bit per Pixel needs to be adjusted for YUV420 mode as it
        requires only half of the RGB case.
          - Link M/N values are calculated and applied based on the Full Clock
          - Data M/N values needs to be calculated considering the data is half
            due to subsampling
        Remove a doubling of pixel clock on a dot clock calculator for
        DP YCbCr 4:2:0.
        Rebase and remove a duplicate setting of vsc_sdp.DB17.
        Add a setting of dynamic range bit to  vsc_sdp.DB17.
        Change Content Type bit to "Graphics" from "Not defined".
        Change a dividing of pipe_bpp to muliplying to constant values on a
        switch-case statement.
      
      v7:
        Addressed review comments from Ville.
        Move a setting of dynamic range bit and a setting of bpc which is based
        on pipe_bpp to a "drm/i915/dp: Program VSC Header and DB for Pixel
        Encoding/Colorimetry Format" commit.
        Change Content Type bit to "Not defined" from "Graphics".
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NGwan-gyeong Mun <gwan-gyeong.mun@intel.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190521121721.32010-6-gwan-gyeong.mun@intel.com
      16668f48
    • G
      drm/i915/dp: Program VSC Header and DB for Pixel Encoding/Colorimetry Format · 3c053a96
      Gwan-gyeong Mun 提交于
      Function intel_pixel_encoding_setup_vsc handles vsc header and data block
      setup for pixel encoding / colorimetry format.
      
      Setup VSC header and data block in function intel_pixel_encoding_setup_vsc
      for pixel encoding / colorimetry format as per dp 1.4a spec,
      section 2.2.5.7.1, table 2-119: VSC SDP Header Bytes, section 2.2.5.7.5,
      table 2-120:VSC SDP Payload for DB16 through DB18.
      
      v2:
        Minor style fix. [Maarten]
        Refer to commit ids instead of patchwork. [Maarten]
      
      v6: Rebase
      
      v7:
        Rebase and addressed review comments from Ville.
        Use a structure initializer instead of memset().
        Fix non-standard comment format.
        Remove a referring to specific commit.
        Add a setting of dynamic range bit to  vsc_sdp.DB17.
        Add a setting of bpc which is based on pipe_bpp.
        Remove duplicated checking of connector's ycbcr_420_allowed from
        intel_pixel_encoding_setup_vsc(). It is already checked from
        intel_dp_ycbcr420_config().
        Remove comments for VSC_SDP_EXTENSION_FOR_COLORIMETRY_SUPPORTED. It is
        already implemented on intel_dp_get_colorimetry_status().
      
      v8:
        A missing of setting bpc to VSC setup is the pretty fatal case, it
        replaces DRM_DEBUG_KMS() to MISSING_CASE(). [Maarten]
      
      v9: Use a changed member name of struct dp_sdp. it renamed to db from DB.
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NGwan-gyeong Mun <gwan-gyeong.mun@intel.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190521121721.32010-4-gwan-gyeong.mun@intel.com
      3c053a96