1. 06 8月, 2014 1 次提交
  2. 04 8月, 2014 12 次提交
  3. 08 7月, 2014 3 次提交
    • T
      drm/tegra: Implement race-free hotplug detection · e2215321
      Thierry Reding 提交于
      A race condition currently exists on Tegra, where it can happen that a
      monitor attached via HDMI isn't detected during the initial FB helper
      setup, but the hotplug event happens too early to be processed by the
      poll helpers because they haven't been initialized yet. This happens
      because on some boards the HDMI driver can control the regulator that
      supplies the +5V pin on the HDMI connector. Therefore depending on the
      timing between the initialization of the HDMI driver and the rest of
      DRM, it's possible that the monitor returns the hotplug signal right
      within the window where we would miss it.
      
      Unfortunately, drm_kms_helper_poll_init() will wreak havoc when called
      before at least some parts of the FB helpers have been set up.
      
      This commit fixes this by splitting out the minimum of initialization
      required to make drm_kms_helper_poll_init() work into a separate
      function that can be called early. It is then safe to move all of the
      poll helper initialization to an earlier point in time (before the
      HDMI output driver has a chance to enable the +5V supply). That way if
      the hotplug signal is returned before the initial FB helper setup, the
      monitor will be forcefully detected at that point, and if the hotplug
      signal is returned after that it will be properly handled by the poll
      helpers.
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      e2215321
    • T
      drm: Introduce drm_fb_helper_prepare() · 10a23102
      Thierry Reding 提交于
      To implement hotplug detection in a race-free manner, drivers must call
      drm_kms_helper_poll_init() before hotplug events can be triggered. Such
      events can be triggered right after any of the encoders or connectors
      are initialized. At the same time, if the drm_fb_helper_hotplug_event()
      helper is used by a driver, then the poll helper requires some parts of
      the FB helper to be initialized to prevent a crash.
      
      At the same time, drm_fb_helper_init() requires information that is not
      necessarily available at such an early stage (number of CRTCs and
      connectors), so it cannot be used yet.
      
      Add a new helper, drm_fb_helper_prepare(), that initializes the bare
      minimum needed to allow drm_kms_helper_poll_init() to execute and any
      subsequent hotplug events to be processed properly.
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      10a23102
    • T
      drm: Constify struct drm_fb_helper_funcs · 3a493879
      Thierry Reding 提交于
      There's no need for this to be modifiable. Make it const so that it can
      be put into the .rodata section.
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      3a493879
  4. 19 6月, 2014 1 次提交
  5. 09 6月, 2014 10 次提交
  6. 06 6月, 2014 13 次提交