1. 28 May, 2019 34 commits
  2. 27 May, 2019 6 commits
    • Dave Airlie's avatar
      Merge tag 'drm-intel-next-2019-05-24' of git://anongit.freedesktop.org/drm/drm-intel into drm-next · 14ee642c
      Dave Airlie authored
      Features:
      - Engine discovery query (Tvrtko)
      - Support for DP YCbCr4:2:0 outputs (Gwan-gyeong)
      - HDCP revocation support, refactoring (Ramalingam)
      - Remove DRM_AUTH from IOCTLs which also have DRM_RENDER_ALLOW (Christian König)
      - Asynchronous display power disabling (Imre)
      - Perma-pin uC firmware and re-enable global reset (Fernando)
      - GTT remapping for display, for bigger fb size and stride (Ville)
      - Enable pipe HDR mode on ICL if only HDR planes are used (Ville)
      - Kconfig to tweak the busyspin durations for i915_wait_request (Chris)
      - Allow multiple user handles to the same VM (Chris)
      - GT/GEM runtime pm improvements using wakerefs (Chris)
      - Gen 4&5 render context support (Chris)
      - Allow userspace to clone contexts on creation (Chris)
      - SINGLE_TIMELINE flags for context creation (Chris)
      - Allow specification of parallel execbuf (Chris)
      
      Refactoring:
      - Header refactoring (Jani)
      - Move GraphicsTechnology files under gt/ (Chris)
      - Sideband code refactoring (Chris)
      
      Fixes:
      - ICL DSI state readout and checker fixes (Vandita)
      - GLK DSI picture corruption fix (Stanislav)
      - HDMI deep color fixes (Clinton, Aditya)
      - Fix driver unbinding from a device in use (Janusz)
      - Fix clock gating with pipe scaling (Radhakrishna)
      - Disable broken FBC on GLK (Daniel Drake)
      - Miscellaneous GuC fixes (Michal)
      - Fix MG PHY DP register programming (Imre)
      - Add missing combo PHY lane power setup (Imre)
      - Workarounds for early ICL VBT issues (Imre)
      - Fix fastset vs. pfit on/off on HSW EDP transcoder (Ville)
      - Add readout and state check for pch_pfit.force_thru (Ville)
      - Miscellaneous display fixes and refactoring (Ville)
      - Display workaround fixes (Ville)
      - Enable audio even if ELD is bogus (Ville)
      - Fix use-after-free in reporting create.size (Chris)
      - Sideband fixes to avoid BYT hard lockups (Chris)
      - Workaround fixes and improvements (Chris)
      
      Maintainer shortcomings:
      - Failure to adequately describe and give credit for all changes (Jani)
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Jani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/87sgt3n45z.fsf@intel.com
      14ee642c
    • Dave Airlie's avatar
      Merge tag 'drm-misc-next-2019-05-24' of git://anongit.freedesktop.org/drm/drm-misc into drm-next · 88cd7a2c
      Dave Airlie authored
      drm-misc-next for v5.3, try #2:
      
      UAPI Changes:
      - Add HDR source metadata property.
      - Make drm.h compile on GNU/kFreeBSD by including stdint.h
      - Clarify how the userspace reviewer has to review new kernel UAPI.
      - Clarify that for using new UAPI, merging to drm-next or drm-misc-next should be enough.
      
      Cross-subsystem Changes:
      - video/hdmi: Add unpack function for DRM infoframes.
      - Device tree bindings:
        * Updating a property for Mali Midgard GPUs
        * Updating a property for STM32 DSI panel
        * Adding support for FriendlyELEC HD702E 800x1280 panel
        * Adding support for Evervision VGG804821 800x480 5.0" WVGA TFT panel
        * Adding support for the EDT ET035012DM6 3.5" 320x240 QVGA 24-bit RGB TFT.
        * Adding support for Three Five displays TFC S9700RTWV43TR-01B 800x480 panel
          with resistive touch found on TI's AM335X-EVM.
        * Adding support for EDT ETM0430G0DH6 480x272 panel.
      - Add OSD101T2587-53TS driver with DT bindings.
      - Add Samsung S6E63M0 panel driver with DT bindings.
      - Add VXT VL050-8048NT-C01 800x480 panel with DT bindings.
      - Dma-buf:
        - Make mmap callback actually optional.
        - Documentation updates.
        - Fix debugfs refcount inbalance.
        - Remove unused sync_dump function.
      - Fix device tree bindings in drm-misc-next after a botched merge.
      
      Core Changes:
      - Add support for HDR infoframes and related EDID parsing.
      - Remove prime sg_table caching, now done inside dma-buf.
      - Add shiny new drm_gem_vram helpers for simple VRAM drivers;
        with some fixes to the new API on top.
      - Small fix to job cleanup without timeout handler.
      - Documentation fixes to drm_fourcc.
      - Replace lookups of drm_format with struct drm_format_info;
        remove functions that become obsolete by this conversion.
      - Remove double include in bridge/panel.c and some drivers.
      - Remove drmP.h include from drm/edid and drm/dp.
      - Fix null pointer deref in drm_fb_helper_hotplug_event().
      - Remove most members from drm_fb_helper_crtc, only mode_set is kept.
      - Remove race of fb helpers with userspace; only restore mode
        when userspace is not master.
      - Move legacy setup from drm_file.c to drm_legacy_misc.c
      - Rework scheduler job destruction.
      - drm/bus was removed, remove from TODO.
      - Add __drm_atomic_helper_crtc_reset() to subclass crtc_state,
        and convert some drivers to use it (conversion is not complete yet).
      - Bump vblank timeout wait to 100 ms for atomic.
      - Docbook fix for drm_hdmi_infoframe_set_hdr_metadata.
      
      Driver Changes:
      - sun4i: Use DRM_GEM_CMA_VMAP_DRIVER_OPS instead of definining manually.
      - v3d: Small cleanups, adding support for compute shaders,
             reservation/synchronization fixes and job management refactoring,
             fixes MMU and debugfs.
      - lima: Fix null pointer in irq handler on startup, set default timeout for scheduled jobs.
      - stm/ltdc: Assorted fixes and adding FB modifier support.
      - amdgpu: Avoid hw reset if guilty job was already signaled.
      - virtio: Add seqno to fences, add trace events, use correct flags for fence allocation.
      - Convert AST, bochs, mgag200, vboxvideo, hisilicon to the new drm_gem_vram API.
      - sun6i_mipi_dsi: Support DSI GENERIC_SHORT_WRITE_2 transfers.
      - bochs: Small fix to use PTR_RET_OR_ZERO and driver unload.
      - gma500: header fixes
      - cirrus: Remove unused files.
      - mediatek: Fix compiler warning after merging the HDR series.
      - vc4: Rework binner bo handling.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/052875a5-27ba-3832-60c2-193d950afdff@linux.intel.com
      88cd7a2c
    • Ville Syrjälä's avatar
      drm/i915: Make sure we have enough memory bandwidth on ICL · c457d9cf
      Ville Syrjälä authored
      ICL has so many planes that it can easily exceed the maximum
      effective memory bandwidth of the system. We must therefore check
      that we don't exceed that limit.
      
      The algorithm is very magic number heavy and lacks sufficient
      explanation for now. We also have no sane way to query the
      memory clock and timings, so we must rely on a combination of
      raw readout from the memory controller and hardcoded assumptions.
      The memory controller values obviously change as the system
      jumps between the different SAGV points, so we try to stabilize
      it first by disabling SAGV for the duration of the readout.
      
      The utilized bandwidth is tracked via a device wide atomic
      private object. That is actually not robust because we can't
      afford to enforce strict global ordering between the pipes.
      Thus I think I'll need to change this to simply chop up the
      available bandwidth between all the active pipes. Each pipe
      can then do whatever it wants as long as it doesn't exceed
      its budget. That scheme will also require that we assume that
      any number of planes could be active at any time.
      
      TODO: make it robust and deal with all the open questions
      
      v2: Sleep longer after disabling SAGV
      v3: Poll for the dclk to get raised (seen it take 250ms!)
          If the system has 2133MT/s memory then we pointlessly
          wait one full second :(
      v4: Use the new pcode interface to get the qgv points rather
          that using hardcoded numbers
      v5: Move the pcode stuff into intel_bw.c (Matt)
          s/intel_sagv_info/intel_qgv_info/
          Do the NV12/P010 as per spec for now (Matt)
          s/IS_ICELAKE/IS_GEN11/
      v6: Ignore bandwidth limits if the pcode query fails
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Acked-by: default avatarClint Taylor <Clinton.A.Taylor@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190524153614.32410-1-ville.syrjala@linux.intel.com
      c457d9cf
    • Ville Syrjälä's avatar
      drm/i915: Make sandybridge_pcode_read() deal with the second data register · d284d514
      Ville Syrjälä authored
      The pcode mailbox has two data registers. So far we've only ever used
      the one, but that's about to change. Expose the second data register to
      the callers of sandybridge_pcode_read().
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarClint Taylor <Clinton.A.Taylor@intel.com>
      Reviewed-by: default avatarRadhakrishna Sripada <radhakrishna.sripada@intel.com>
      Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190521164025.30225-1-ville.syrjala@linux.intel.com
      d284d514
    • Imre Deak's avatar
      drm/i915/icl: Fix AUX-B HW not done issue w/o AUX-A · 4361ccac
      Imre Deak authored
      Atm AUX-B transfers can fail with the following error if AUX-A is not
      enabled:
      
      [  594.594108] [drm:intel_dp_aux_xfer [i915]] dp_aux_ch timeout status 0x7c2003ff
      [  594.615854] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp aux hw did not signal timeout!
      [  594.632851] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp aux hw did not signal timeout!
      [  594.632915] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0xac2003ff
      [  594.641786] ------------[ cut here ]------------
      [  594.641790] dp_aux_ch not started status 0xac2003ff
      [  594.641874] WARNING: CPU: 4 PID: 1366 at drivers/gpu/drm/i915/intel_dp.c:1268 intel_dp_aux_xfer+0x232/0x890 [i915]
      
      Ville noticed this issue already earlier and managed to work around it
      by keeping AUX-A always powered whenever AUX-B was used. He also
      reported the issue to HW folks and they have now root caused the problem
      and updated BSpec with a fix (see internal BSpec/Index/21257,
      HSD/1607152412).
      
      I noticed the same error - even with the WA being applied - while doing
      AUX transfers with Chamelium being connected with a DP cable to the
      source but letting Chamelium imitate an unplug. This is probably some
      unstandard way on Chamelium's behalf of disconnecting itself from the
      AUX pins. For instance it could still pull on the AUX pins which would
      prevent the source from detecting AUX timeouts in the proper way,
      leading to the ERRORs or WARNs seen in the logs in the Reference: bug
      below.
      
      In case I disconnect the sink properly (the cable itself, not via the
      Chamelium unplug xmlrpc command) then the AUX timeout signaling works
      properly and so there won't be any ERRORs/WARNs emitted.
      
      Reference: https://bugs.freedesktop.org/show_bug.cgi?id=110718
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reported-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190524173532.6444-1-imre.deak@intel.com
      4361ccac
    • Jani Nikula's avatar
      drm/i915: make REG_BIT() and REG_GENMASK() work with variables · 591d4dc4
      Jani Nikula authored
      REG_BIT() and REG_GENMASK() were intended to work with both constant
      expressions and otherwise, with the former having extra compile time
      checks for the bit ranges. Incredibly, the result of
      __builtin_constant_p() is not an integer constant expression when given
      a non-constant expression, leading to errors in BUILD_BUG_ON_ZERO().
      
      Replace __builtin_constant_p() with the __is_constexpr() magic spell.
      Reported-by: default avatarVille Syrjala <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190524185253.1088-1-jani.nikula@intel.com
      591d4dc4