1. 28 Sep, 2016 6 commits
    • Dave Airlie's avatar
      Merge branch 'for-next' of ssh://people.freedesktop.org/~seanpaul/dogwood into drm-next · 378db830
      Dave Airlie authored
      I've included some improvements to PSR from myself, as well as a great
      series from Tomasz to clean up and tighten up vblank/flip handling.
      
      The last patch is one from Tomeu that has been floating around for a
      while, and since rockchip is one of the beneficiaries, I figured this
      would be a good place to pick it up.
      
      * 'for-next' of ssh://people.freedesktop.org/~seanpaul/dogwood:
        drm/rockchip: Balance irq refcount on failure
        drm/rockchip: Kill vop_plane_state
        drm/rockchip: Always signal event in next vblank after cfg_done
        drm/rockchip: Do not enable vblank without event
        drm/rockchip: Replace custom wait_for_vblanks with helper
        drm/rockchip: Unreference framebuffers from flip work
        drm/rockchip: Avoid race with vblank count increment
        drm/rockchip: Get rid of some unnecessary code
        drm/rockchip: Clear interrupt status bits before enabling
        drm/rockchip: Fix up bug in psr state machine
        drm/bridge: analogix_dp: Remove duplicated code
        drm/rockchip: Reduce psr flush time to 100ms
        drm/rockchip: Don't key off vblank for psr
      378db830
    • Dave Airlie's avatar
      Merge tag 'tilcdc-4.9-3.1' of https://github.com/jsarha/linux into drm-next · 662d5c95
      Dave Airlie authored
      Second attempt for 3rd drm/tilcdc pull request for v4.9.
      
      * tag 'tilcdc-4.9-3.1' of https://github.com/jsarha/linux:
        drm/tilcdc: fix wrong error handling
        drm/tilcdc: Return directly after a failed kfree_table_init() in tilcdc_convert_slave_node()
        drm/tilcdc: Remove "default" from blue-and-red-wiring property binding
        drm/tilcdc: Fix non static symbol warning
        drm/tilcdc: mark symbols static where possible
        drm/tilcdc: add missing header dependencies
        drm/tilcdc: WARN if CRTC is touched without CRTC lock
        drm/tilcdc: Take CRTC lock when calling tilcdc_crtc_disable()
        drm/tilcdc: Remove unnecessary tilcdc_crtc_disable() from tilcdc_unload()
        drm/tilcdc: Flush flip-work workqueue before drm_flip_work_cleanup()
        drm/tilcdc: Clean up LCDC functional clock rate setting code
        drm/tilcdc: Take crtc modeset lock while updating the crtc clock rate
      662d5c95
    • Dave Airlie's avatar
      Merge branch 'sti-drm-next-2016-09-20' of https://github.com/vinceab/linux into drm-next · f01ebbdb
      Dave Airlie authored
      Here are some patches for drm-next.
      It contains:
      - minor fixes for typo and warning.
      - sparse and coccicheck warning fixes
      - bunch of patches fixing issues found while testing drm/sti with an
      atomic version of weston
      - the removal of the support of stih415-416 sti platform
      
      * 'sti-drm-next-2016-09-20' of https://github.com/vinceab/linux:
        drm/sti: remove stih415-416 platform support
        drm/sti: fix compositor debugfs creation
        drm/sti: use valid video mode
        drm/sti: in crtc_atomic_flush, enable only planes of this crtc
        drm/sti: use vtg array instead of vtg_main/aux
        drm/sti: use different notifier_block for each pipe
        drm/sti: fix atomic_disable check
        drm/sti: run gdp init sequence only once
        drm/sti: run hqvdp init sequence only once
        drm/sti: fix debug logs
        drm/sti: dpms function missing for HDMI connector
        drm/sti: Fix sparse warnings
        drm: sti: fix coccicheck warnings
        drm: sti: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp()
      f01ebbdb
    • Dave Airlie's avatar
      Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm-next · f8049dd8
      Dave Airlie authored
      A bit smaller pull-req this time around.  Some continued DT binding
      cleanup to get the corresponding dts bits merged upstream (through
      other trees).  And explicit fence-fd support for submit ioctl.
      
      * 'msm-next' of git://people.freedesktop.org/~robclark/linux:
        drm/msm: bump kernel api version for explicit fencing
        drm/msm: submit support for out-fences
        drm/msm: move fence allocation out of msm_gpu_submit()
        drm/msm: submit support for in-fences
        drm/msm: extend the submit ioctl to pass in flags
        drm/msm/mdp5: Set rotation property initial value to DRM_ROTATE_0 insted of 0
        drm/msm/hdmi: don't print error when adding i2c adapter fails
        drm/msm/mdp4: mark symbols static where possible
        drm/msm: Remove call to reservation_object_test_signaled_rcu before wait
        drm/msm/hdmi: Clean up HDMI gpio DT bindings
        drm/msm/mdp4: Fix issue with LCDC/LVDS port parsing
      f8049dd8
    • Dave Airlie's avatar
      Merge tag 'topic/drm-misc-2016-09-25' of git://anongit.freedesktop.org/drm-intel into drm-next · 3f346d5d
      Dave Airlie authored
      - more core cleanup patches to prep drm_file to be used for
        kernel-internal contexts (David Herrmann)
      - more split-up+docs for drm_crtc.c
      - lots of small fixes and polish all over
      
      * tag 'topic/drm-misc-2016-09-25' of git://anongit.freedesktop.org/drm-intel: (37 commits)
        drm: bridge: analogix/dp: mark symbols static where possible
        drm/bochs: mark bochs_connector_get_modes() static
        drm/bridge: analogix_dp: Improve panel on time
        drm/bridge: analogix_dp: Don't read EDID if panel present
        drm/bridge: analogix_dp: Remove duplicated code
        Revert "drm/i2c: tda998x: don't register the connector"
        drm: Fix plane type uabi breakage
        dma-buf/sync_file: free fences array in num_fences is 1
        drm/i2c: tda998x: don't register the connector
        drm: Don't swallow error codes in drm_dev_alloc()
        drm: Distinguish no name from ENOMEM in set_unique()
        drm: Remove dirty property from docs
        drm/doc: Document color space handling
        drm: Extract drm_color_mgmt.[hc]
        drm/doc: Polish plane composition property docs
        drm: Conslidate blending properties in drm_blend.[hc]
        drm/doc: Polish for drm_plane.[hc]
        drm: Extract drm_plane.[hc]
        drm/tilcdc: Add atomic and crtc headers to crtc.c
        drm: Fix typo in encoder docs
        ...
      3f346d5d
    • Dave Airlie's avatar
      Merge tag 'drm-amdkfd-next-2016-09-19' of git://people.freedesktop.org/~gabbayo/linux into drm-next · 196ebdcc
      Dave Airlie authored
      This is amdkfd's pull request for kernel 4.9. It contains a fix to a possible
      infinite loop bug and a couple of other minor "cleaning" patches.
      
      * tag 'drm-amdkfd-next-2016-09-19' of git://people.freedesktop.org/~gabbayo/linux:
        drm/amdkfd: Pass 'struct queue_propertices' by reference
        drm/amdkfd: Unify multiple calls to pr_debug() into one
        drm/amdkfd: Fix possible infinite loop
        drm/amdkfd: Reuse function to find a process through pasid
        drm/amdkfd: Add some missing memset zero'ing in queue init func
        drm/amdkfd: Tidy up kfd_generate_gpu_id() uint64_t bitshift unpack
      196ebdcc
  2. 25 Sep, 2016 2 commits
  3. 24 Sep, 2016 3 commits
    • Sean Paul's avatar
      drm/bridge: analogix_dp: Improve panel on time · f2600d08
      Sean Paul authored
      In order to reduce the time required to turn on the panel, this patch
      makes 2 assumptions:
      1- In detect(): if there's a panel, we're connected.
      2- In get_modes(): if there's a panel, let the panel driver decide if
         it should prepare/unprepare in order to get the modes.
      
      The first is straightforward, and shouldn't need further explanation. The
      second should eliminate the prepare/unprepare delays from get_modes() in
      most cases, since panels generally hardcode their modes in the driver as
      opposed to reading EDID. If a panel does need to read EDID, it should be
      responsible for ensuring it's in a state in which it can.
      Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
      f2600d08
    • Sean Paul's avatar
      drm/bridge: analogix_dp: Don't read EDID if panel present · 8c77e2c2
      Sean Paul authored
      If there's a panel connected to the analogix_dp bridge, rely on
      the panel driver for modes, rather than reading EDID *and* calling
      get_modes() on the panel.
      
      This allows panels with a valid EDID to read it in the panel driver
      (e.g. simple_panel), and panels with invalid EDID to homebrew modes
      in their get_modes implementation.
      Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
      8c77e2c2
    • Tomeu Vizoso's avatar
      drm/bridge: analogix_dp: Remove duplicated code · 0d97ad03
      Tomeu Vizoso authored
      Remove code for reading the EDID and DPCD fields and use the helpers
      instead.
      
      Besides the obvious code reduction, other helpers are being added to the
      core that could be used in this driver and will be good to be able to
      use them instead of duplicating them.
      Signed-off-by: default avatarTomeu Vizoso <tomeu.vizoso@collabora.com>
      Tested-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
      Tested-by: default avatarSean Paul <seanpaul@chromium.org>
      Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
      Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
      Cc: Javier Martinez Canillas <javier@osg.samsung.com>
      Cc: Mika Kahola <mika.kahola@intel.com>
      Cc: Yakir Yang <ykk@rock-chips.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Archit Taneja <architt@codeaurora.org>
      0d97ad03
  4. 23 Sep, 2016 4 commits
  5. 22 Sep, 2016 16 commits
  6. 21 Sep, 2016 9 commits
    • Sean Paul's avatar
      drm/rockchip: Balance irq refcount on failure · 8c763c9b
      Sean Paul authored
      If create_crtc fails in vop bind, ensure the irq refcount is zeroed
      back out before exiting.
      Reviewed-by: default avatarDaniel Kurtz <djkurtz@chromium.org>
      Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
      8c763c9b
    • Tomasz Figa's avatar
      drm/rockchip: Kill vop_plane_state · d47a7246
      Tomasz Figa authored
      After changes introduced by last patches, there is no useful data stored
      in vop_plane_state struct.  Let's remove it and make the driver use
      generic plane state alone.
      Signed-off-by: default avatarTomasz Figa <tfiga@chromium.org>
      d47a7246
    • Tomasz Figa's avatar
      drm/rockchip: Always signal event in next vblank after cfg_done · 41ee4367
      Tomasz Figa authored
      This patch makes the driver send the pending vblank event in next vblank
      following the commit, relying on vblank signalling improvements done in
      previous patches. This gives us vblank events that always represent the
      real moment of changes hitting on the screen (which was the case only
      for complete FB changes before) and lets us remove the manual window
      update check.
      Signed-off-by: default avatarTomasz Figa <tfiga@chromium.org>
      41ee4367
    • Tomasz Figa's avatar
      drm/rockchip: Do not enable vblank without event · 646ec687
      Tomasz Figa authored
      Originally we needed to enable vblank for any atomic commit to kick the
      PSR machine, but that was changed and we no longer need to do so from
      a vblank interrupt. Let's return to original behavior of enabling
      vblank only if it is really necessary.
      
      This essentially reverts commit 5b680403 ("drm/rockchip: Enable
      vblank without event").
      Signed-off-by: default avatarTomasz Figa <tfiga@chromium.org>
      646ec687
    • Tomasz Figa's avatar
      drm/rockchip: Replace custom wait_for_vblanks with helper · 81c248f7
      Tomasz Figa authored
      Currently the driver uses a custom function to wait for flip to complete
      after an atomic commit. It was needed before because of two problems:
       - there is no hardware vblank counter, so the original helper would
         have a race condition with the vblank interrupt,
       - the driver didn't support unreferencing cursor framebuffers
         asynchronously to the commit, which was what the helper expected.
      Since both problems have been solved by previous patches, we can now
      make the driver use the generic helper and remove custom waiting code.
      Signed-off-by: default avatarTomasz Figa <tfiga@chromium.org>
      81c248f7
    • Tomasz Figa's avatar
      drm/rockchip: Unreference framebuffers from flip work · 47a7eb45
      Tomasz Figa authored
      Currently the driver waits for vblank and then unreferences old
      framebuffers from atomic commit code path. This is however breaking the
      legacy cursor API, which requires the updates to be fully asynchronous.
      Instead of just adding a special case for cursor, we can have actually
      smaller amount of code to unreference any changed framebuffer from a
      flip work.
      Signed-off-by: default avatarTomasz Figa <tfiga@chromium.org>
      47a7eb45
    • Tomasz Figa's avatar
      drm/rockchip: Avoid race with vblank count increment · 7caecdbe
      Tomasz Figa authored
      Since VOP does not have a hardware vblank count register, the ongoing
      commit might be racing with a requested vblank interrupt, which would
      increment the software vblank counter before the changes being committed
      actually happen.
      
      To avoid this, we can extend .atomic_flush(), so after it sets cfg_done
      bit, it polls the vblank interrupt bit until it's inactive to make sure
      that any old vblank interrupt gets to the handler and then uses
      synchronize_irq(vop->irq) to make sure the handler finishes running.
      
      The polling case should happen very rarely, but even if, the total wait
      time should be relatively low and in practice almost equal to the vop
      hardirq handler running time.
      Signed-off-by: default avatarTomasz Figa <tfiga@chromium.org>
      7caecdbe
    • Tomasz Figa's avatar
      drm/rockchip: Get rid of some unnecessary code · 65bcb6bc
      Tomasz Figa authored
      Current code implements prepare_fb and cleanup_fb callbacks only to
      grab/release fb references, which is already done by atomic framework
      when creating/destryoing plane state. Let's remove these
      unused bits.
      Signed-off-by: default avatarTomasz Figa <tfiga@chromium.org>
      65bcb6bc
    • Tomasz Figa's avatar
      drm/rockchip: Clear interrupt status bits before enabling · fa374107
      Tomasz Figa authored
      The enable register only masks the raw status bits to signal CPU
      interrupt only for enabled interrupts. The status bits are activated
      regardless of the enable register. This means that we might have an old
      interrupt event queued, which we are not interested in. To avoid getting
      a spurious interrupt signalled, we have to clear the old bit before we
      update the enable register.
      Signed-off-by: default avatarTomasz Figa <tfiga@chromium.org>
      fa374107