1. 14 4月, 2014 6 次提交
    • T
      drm/omap: fix enabling/disabling of video pipeline · 506096a1
      Tomi Valkeinen 提交于
      At the moment the omap_crtc_pre_apply() handles the enabling, disabling
      and configuring of encoders and panels separately from the CRTC (i.e.
      the overlay manager).
      
      However, this doesn't work correctly. The encoder driver has to be in
      control of its video input (i.e. the crtc) for correct operation.
      
      This problem causes bugs with (at least) HDMI: the HDMI encoder supplies
      pixel clock for DISPC, and DISPC supplies video stream for HDMI. The
      current code first enables the HDMI encoder, and CRTC after that.
      However, the encoder expects the video stream to start during the
      encoder's enable, and if it doesn't, there will be sync lost errors.
      
      The encoder enables its video source by calling src->enable(), and this
      call goes to omapdrm (omap_crtc_enable), but omapdrm doesn't do anything
      in that function. Similarly for disable, which goes to
      omap_crtc_disable().
      
      This patch moves the code to setup and enable/disable the crtc to
      omap_crtc_enable. and omap_crtc_disable().
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      506096a1
    • T
      drm/omap: fix missing disable for unused encoder · c7aef12f
      Tomi Valkeinen 提交于
      When an encoder is no longer connected to a crtc, the driver will leave
      the encoder enabled.
      
      This patch adds code to track the encoder used for a crtc, and when the
      encoder changes, the old one is disabled.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      c7aef12f
    • T
      drm/omap: fix race issue when unloading omapdrm · e2f8fd74
      Tomi Valkeinen 提交于
      At module unload, omap_fbdev_free() gets called which releases the
      framebuffers. However, the framebuffers are still used by crtcs, and
      will be released only later at vsync. The driver doesn't wait for this,
      and goes on to release the rest of the resources, which often
      causes a crash.
      
      This patchs adds a omap_crtc_flush() function which waits until the crtc
      has finished with its apply queue and page flips.
      
      The function utilizes a simple polling while-loop, as the performance is
      not an issue here.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      e2f8fd74
    • T
      drm/omap: fix DMM driver (un)registration · ea7e3a66
      Tomi Valkeinen 提交于
      At the moment the DMM driver is never unregistered, even if it's
      registered in the omapdrm module's init function. This means we'll get
      errors when reloading the omapdrm module.
      
      Fix this by unregistering the DMM driver properly, and also change the
      module init to fail if DMM driver cannot be registered, simplifying the
      unregister path as we don't need to keep the state whether we registered
      the DMM driver or not.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      ea7e3a66
    • T
      drm/omap: fix uninit order in pdev_remove() · 707cf58a
      Tomi Valkeinen 提交于
      When unloading omapdrm driver, the omapdrm platform device is
      uninitialized last, after the displays have been disconnected omap_crtc
      callbacks have been removed. As the omapdrm pdev uninitialization needs
      the features uninitialized in earlier steps, a crash is guaranteed.
      
      This patch fixes the uninitialize order so that the omapdrm pdev is
      removed first.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      707cf58a
    • T
      drm/omap: fix output enable/disable sequence · 2ec8e378
      Tomi Valkeinen 提交于
      At the moment it's quite easy to get the following errors when the HDMI
      output is enabled or disabled:
      
      [drm:omap_crtc_error_irq] *ERROR* tv: errors: 00008000
      
      The reason for the errors is that the omapdrm driver doesn't properly
      handle the sync-lost irqs that happen when enabling the DIGIT crtc,
      which is used for HDMI and analog TV. The driver does disable the
      sync-lost irq properly, but it fails to wait until the output has been
      fully enabled (i.e. the first vsync), so the sync-lost errors are still
      seen occasionally.
      
      This patch makes the omapdrm act the same way as the omapfb does:
      
      - When enabling a display, we'll wait for the first vsync.
      - When disabling a display, we'll wait for framedone if available, or
        odd and even vsyncs.
      
      These changes make sure the output is fully enabled or disabled at the
      end of the function.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Reported-by: NSanjay Singh Rawat <sanjay.rawat@linaro.org>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      2ec8e378
  2. 08 4月, 2014 1 次提交
  3. 05 4月, 2014 1 次提交
  4. 04 4月, 2014 31 次提交
  5. 03 4月, 2014 1 次提交