1. 19 12月, 2016 4 次提交
  2. 09 8月, 2016 1 次提交
  3. 22 7月, 2016 1 次提交
  4. 06 6月, 2016 1 次提交
  5. 01 6月, 2016 1 次提交
  6. 31 5月, 2016 1 次提交
    • A
      drm/omap: include linux/seq_file.h where needed · 2d802453
      Arnd Bergmann 提交于
      The omapdrm driver relies on this header to be included
      implicitly, but this does not always work, and I get
      this error in randconfig builds:
      
      gpu/drm/omapdrm/dss/hdmi_phy.c: In function 'hdmi_phy_dump':
      gpu/drm/omapdrm/dss/hdmi_phy.c:34:2: error: implicit declaration of function 'seq_printf' [-Werror=implicit-function-declaration]
      gpu/drm/omapdrm/dss/hdmi_wp.c: In function 'hdmi_wp_dump':
      gpu/drm/omapdrm/dss/hdmi_wp.c:26:2: error: implicit declaration of function 'seq_printf' [-Werror=implicit-function-declaration]
      gpu/drm/omapdrm/dss/hdmi_pll.c: In function 'hdmi_pll_dump':
      gpu/drm/omapdrm/dss/hdmi_pll.c:30:2: error: implicit declaration of function 'seq_printf' [-Werror=implicit-function-declaration]
      
      This adds the #include statements in all files that have
      a seq_printf statement.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      2d802453
  7. 17 5月, 2016 1 次提交
  8. 03 3月, 2016 2 次提交
  9. 24 11月, 2015 1 次提交
  10. 05 10月, 2015 1 次提交
  11. 02 7月, 2015 1 次提交
    • T
      drm/omap: fix omap_framebuffer_unpin() error handling · 9c368506
      Tomi Valkeinen 提交于
      omap_framebuffer_unpin() check the return value of omap_gem_put_paddr()
      and return immediately if omap_gem_put_paddr() fails.
      
      This patch removes the check for the return value, and also removes the
      return value of omap_framebuffer_unpin(), because:
      
       * Nothing checks the return value of omap_framebuffer_unpin(), and even
         something did check it, there's nothing the caller can do to handle
         the error.
      
       * If a omap_gem_put_paddr() fails, the framebuffer's other planes will
         be left unreleased. So it's better to call omap_gem_put_paddr() for
         all the planes, even if one would fail.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      9c368506
  12. 13 6月, 2015 2 次提交
  13. 24 3月, 2015 3 次提交
    • T
      drm/omap: handle incompatible buffer stride and pixel size · 2dab0bab
      Tomi Valkeinen 提交于
      omapdrm doesn't check if the pitch of the framebuffer and the color
      format's bits-per-pixel are compatible. omapdss requires that the stride
      of a buffer is an integer number of pixels
      
      For example, when using modetest with a display that has x resolution of
      1280, and using packed 24 RGB mode (3 bytes per pixel), modetest
      allocates a buffer with a byte stride of 4 * 1280 = 5120. But 5120 / 3 =
      1706.666... pixels, which causes wrong colors and a tilt on the screen.
      
      Add a check into omapdrm to return an error if the user tries to use
      such a combination.
      
      Note: this is not a HW requirement at least for non-rotation use cases,
      but a SW driver requirement. In the future we should study if also
      rotation use cases are fine with any stride size, and if so, change the
      driver to allow these strides.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      2dab0bab
    • T
      drm/omap: fix error handling in omap_framebuffer_create() · 925e4940
      Tomi Valkeinen 提交于
      When an error happens in omap_framebuffer_create(),
      omap_framebuffer_create() calls omap_framebuffer_destroy() if the fb
      struct has been allocated. However, that crashes, as
      omap_framebuffer_destroy(), which calls drm_framebuffer_cleanup(),
      should only be called after drm_framebuffer_init()
      
      Fix this by just calling kfree() for the allocated fb when an error
      happens.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      925e4940
    • T
      drm/omap: add pin refcounting to omap_framebuffer · f36eb5a8
      Tomi Valkeinen 提交于
      omap_framebuffer_pin() and omap_framebuffer_unpin() are currently
      broken, as they cannot be called multiple times (i.e. pin, pin, unpin,
      unpin), which is what happens in certain cases. This issue causes the
      driver to possibly use 0 as an address for a displayed buffer, leading
      to OCP error from DSS.
      
      This patch fixes the issue by adding a simple pin_count, used to track
      the number of pins.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      f36eb5a8
  14. 20 3月, 2015 1 次提交
  15. 04 6月, 2014 1 次提交
    • D
      drm: Split connection_mutex out of mode_config.mutex (v3) · 6e9f798d
      Daniel Vetter 提交于
      After the split-out of crtc locks from the big mode_config.mutex
      there's still two major areas it protects:
      - Various connector probe states, like connector->status, EDID
        properties, probed mode lists and similar information.
      - The links from connector->encoder and encoder->crtc and other
        modeset-relevant connector state (e.g. properties which control the
        panel fitter).
      
      The later is used by modeset operations. But they don't really care
      about the former since it's allowed to e.g. enable a disconnected VGA
      output or with a mode not in the probed list.
      
      Thus far this hasn't been a problem, but for the atomic modeset
      conversion Rob Clark needs to convert all modeset relevant locks into
      w/w locks. This is required because the order of acquisition is
      determined by how userspace supplies the atomic modeset data. This has
      run into troubles in the detect path since the i915 load detect code
      needs _both_ protections offered by the mode_config.mutex: It updates
      probe state and it needs to change the modeset configuration to enable
      the temporary load detect pipe.
      
      The big deal here is that for the probe/detect users of this lock a
      plain mutex fits best, but for atomic modesets we really want a w/w
      mutex. To fix this lets split out a new connection_mutex lock for the
      modeset relevant parts.
      
      For simplicity I've decided to only add one additional lock for all
      connector/encoder links and modeset configuration states. We have
      piles of different modeset objects in addition to those (like bridges
      or panels), so adding per-object locks would be much more effort.
      
      Also, we're guaranteed (at least for now) to do a full modeset if we
      need to acquire this lock. Which means that fine-grained locking is
      fairly irrelevant compared to the amount of time the full modeset will
      take.
      
      I've done a full audit, and there's just a few things that justify
      special focus:
      - Locking in drm_sysfs.c is almost completely absent. We should
        sprinkle mode_config.connection_mutex over this file a bit, but
        since it already lacks mode_config.mutex this patch wont make the
        situation any worse. This is material for a follow-up patch.
      
      - omap has a omap_framebuffer_flush function which walks the
        connector->encoder->crtc links and is called from many contexts.
        Some look like they don't acquire mode_config.mutex, so this is
        already racy. Again fixing this is material for a separate patch.
      
      - The radeon hot_plug function to retrain DP links looks at
        connector->dpms. Currently this happens without any locking, so is
        already racy. I think radeon_hotplug_work_func should gain
        mutex_lock/unlock calls for the mode_config.connection_mutex.
      
      - Same applies to i915's intel_dp_hot_plug. But again, this is already
        racy.
      
      - i915 load_detect code needs to acquire this lock. Which means the
        w/w dance due to Rob's work will be nicely contained to _just_ this
        function.
      
      I've added fixme comments everywhere where it looks suspicious but in
      the sysfs code. After a quick irc discussion with Dave Airlie it
      sounds like the lack of locking in there is due to sysfs cleanup fun
      at module unload.
      
      v1: original (only compile tested)
      
      v2: missing mutex_init(), etc (from Rob Clark)
      
      v3: i915 needs more care in the conversion:
      - Protect the edp pp logic with the connection_mutex.
      - Use connection_mutex in the backlight code due to
        get_pipe_from_connector.
      - Use drm_modeset_lock_all in suspend/resume paths.
      - Update lock checks in the overlay code.
      
      Cc: Alex Deucher <alexdeucher@gmail.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      6e9f798d
  16. 15 4月, 2014 1 次提交
  17. 02 4月, 2014 1 次提交
    • M
      drm: Replace crtc fb with primary plane fb (v3) · f4510a27
      Matt Roper 提交于
      Now that CRTC's have a primary plane, there's no need to track the
      framebuffer in the CRTC.  Replace all references to the CRTC fb with the
      primary plane's fb.
      
      This patch was generated by the Coccinelle semantic patching tool using
      the following rules:
      
              @@ struct drm_crtc C; @@
              -   (C).fb
              +   C.primary->fb
      
              @@ struct drm_crtc *C; @@
              -   (C)->fb
              +   C->primary->fb
      
      v3: Generate patch via coccinelle.  Actual removal of crtc->fb has been
          moved to a subsequent patch.
      
      v2: Fixup several lingering crtc->fb instances that were missed in the
          first patch iteration.  [Rob Clark]
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      f4510a27
  18. 31 3月, 2014 1 次提交
  19. 18 12月, 2013 1 次提交
  20. 19 8月, 2013 1 次提交
    • R
      drm/omap: use flip-work helper · 5833bd2f
      Rob Clark 提交于
      And simplify how we hold a ref+pin to what is being scanned out by using
      fb refcnt'ing.  The previous logic pre-dated fb refcnt, and as a result
      was less straightforward than it could have been.  By holding a ref to
      the fb, we don't have to care about how many plane's there are and
      holding a ref to each color plane's bo.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      5833bd2f
  21. 17 2月, 2013 1 次提交
    • R
      drm/omap: move out of staging · 8bb0daff
      Rob Clark 提交于
      Now that the omapdss interface has been reworked so that omapdrm can use
      dispc directly, we have been able to fix the remaining functional kms
      issues with omapdrm.  And in the mean time the PM sequencing and many
      other of that open issues have been solved.  So I think it makes sense
      to finally move omapdrm out of staging.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      8bb0daff
  22. 12 2月, 2013 1 次提交
  23. 20 1月, 2013 1 次提交
    • D
      drm/<drivers>: reorder framebuffer init sequence · c7d73f6a
      Daniel Vetter 提交于
      With more fine-grained locking we can no longer rely on the big
      mode_config lock to prevent concurrent access to mode resources
      like framebuffers. Instead a framebuffer becomes accessible to
      other threads as soon as it is added to the relevant lookup
      structures. Hence it needs to be fully set up by the time drivers
      call drm_framebuffer_init.
      
      This patch here is the drivers part of that reorg. Nothing really fancy
      going on safe for three special cases.
      
      - exynos needs to be careful to properly unref all handles.
      - nouveau gets a resource leak fixed for free: one of the error
        cases didn't cleanup the framebuffer, which is now moot since
        the framebuffer is only registered once it is fully set up.
      - vmwgfx requires a slight reordering of operations, I'm hoping I didn't
        break anything (but it's refcount management only, so should be safe).
      
      v2: Split out exynos, since it's a bit more hairy than expected.
      
      v3: Drop bogus cirrus hunk noticed by Richard Wilbur.
      
      v4: Split out vmwgfx since there's a small change in return values.
      
      Reviewed-by: Rob Clark <rob@ti.com> (core + omapdrm)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c7d73f6a
  24. 15 11月, 2012 1 次提交
  25. 23 10月, 2012 1 次提交
    • R
      drm/omap: fix issue w/ fb attached to multiple CRTCs · b74af83d
      Rob Clark 提交于
      When the fb is detached from one CRTC/plane, paddr was set back to
      zero.  But really we don't want to do this because the fb could still
      be attached to other CRTC/plane(s).  This originally worked like this
      to catch cases of freeing a pinned fb (but with the refcnt'ing this
      should no longer be needed).  Also, there is checking in the GEM code
      for freeing a pinned GEM object, so this extra level of checking is
      redundant.
      Signed-off-by: NRob Clark <rob@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b74af83d
  26. 16 8月, 2012 1 次提交
  27. 17 5月, 2012 1 次提交
  28. 11 4月, 2012 1 次提交
  29. 08 3月, 2012 4 次提交
  30. 09 2月, 2012 1 次提交
    • R
      staging: drm/omap: multiplanar and YUV support · 9a0774e0
      Rob Clark 提交于
      Add support in framebuffer objects for other color formats and multi-
      planar YUV (NV12).  Since this requires changing the API between the
      plane and fb for getting scanout information (paddr, etc), take
      advantage of the opportunity and put in place a way to allow fb's to
      be unpinned when they are not being scanned out.  Now, before start
      of scanout the plane calls omap_framebuffer_pin() which takes care
      to pin all the backing bo's, then omap_framebuffer_update_scanout()
      however many times to update the scanout address(es), etc, and then
      when finished omap_framebuffer_unpin().
      Signed-off-by: NRob Clark <rob@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9a0774e0