1. 09 8月, 2016 3 次提交
  2. 25 2月, 2016 4 次提交
    • J
      drm/tilcdc: Allocate register storage based on the actual number registers · 29ddd6e1
      Jyri Sarha 提交于
      Allocate suspend/resume register storage based on the actual number
      registers the driver is aware of. The static allocation for register
      storage had fallen behind badly.
      Reported-by: NMichael Bode <michael@bumbleB.de>
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      Reviewed-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      29ddd6e1
    • D
      drm/tilcdc: disable the lcd controller/dma engine when suspend invoked · 614b3cfe
      Darren Etheridge 提交于
      The LCD controller must be deactivated and all DMA transactions stopped
      when the suspend power state is entered otherwise the PRCM causes the L3
      bus to get stuck in transition state.
      
      This commit forces the lcdc to be shut down and waits for all pending DMA
      transactions to complete as part of the suspend handler for this driver.
      Signed-off-by: NDarren Etheridge <detheridge@ti.com>
      Tested-by: NDave Gerlach <d-gerlach@ti.com>
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      Reviewed-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      614b3cfe
    • D
      drm/tilcdc: fix kernel panic on suspend when no hdmi monitor connected · 85fd27f8
      Darren Etheridge 提交于
      On BeagleBone Black if no HDMI monitor is connected and suspend
      is requested a kernel panic will result:
      
      root@am335x-evm:~# echo mem > /sys/power/state
      [ 65.548710] PM: Syncing filesystems ... done.
      [ 65.631311] Freezing user space processes ... (elapsed 0.006 seconds) done.
      [ 65.648619] Freezing remaining freezable tasks ... (elapsed 0.005 seconds) done.
      [ 65.833500] Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa30e004
      [ 65.841692] Internal error: : 1028 [#1] SMP ARM
        <snip>
      [ 66.105287] [<c03765f0>] (platform_pm_suspend) from [<c037b6d4>] (dpm_run_callback+0x34/0x70)
      [ 66.114370] [<c037b6d4>] (dpm_run_callback) from [<c037ba84>] (__device_suspend+0x10c/0x2f4)
      [ 66.123357] [<c037ba84>] (__device_suspend) from [<c037d004>] (dpm_suspend+0x58/0x218)
      [ 66.131796] [<c037d004>] (dpm_suspend) from [<c008d948>] (suspend_devices_and_enter+0x9c/0x3c0)
      [ 66.141055] [<c008d948>] (suspend_devices_and_enter) from [<c008de7c>] (pm_suspend+0x210/0x24c)
      [ 66.150312] [<c008de7c>] (pm_suspend) from [<c008cabc>] (state_store+0x68/0xb8)
      [ 66.158103] [<c008cabc>] (state_store) from [<c02e9654>] (kobj_attr_store+0x14/0x20)
      [ 66.166355] [<c02e9654>] (kobj_attr_store) from [<c0185c70>] (sysfs_kf_write+0x4c/0x50)
      [ 66.174883] [<c0185c70>] (sysfs_kf_write) from [<c018926c>] (kernfs_fop_write+0xb4/0x150)
      [ 66.183598] [<c018926c>] (kernfs_fop_write) from [<c0122638>] (vfs_write+0xa8/0x180)
      [ 66.191846] [<c0122638>] (vfs_write) from [<c01229f8>] (SyS_write+0x40/0x8c)
      [ 66.199365] [<c01229f8>] (SyS_write) from [<c000e580>] (ret_fast_syscall+0x0/0x48)
      [ 66.207426] Code: e595c210 e5932000 e59cc000 e08c2002 (e592c000)
      
      This is because the lcdc module is not enabled when no monitor is detected
      to save power.  However the suspend handler just blindly tries to save the
      lcdc state by copying out the pertinent registers. However module is off
      so no good things happen when you try and access it.
      
      This patch only saves off the registers if the module is enabled, and
      then only restores the registers on resume if they were saved off during
      suspend.
      Signed-off-by: NDarren Etheridge <detheridge@ti.com>
      Tested-by: NDave Gerlach <d-gerlach@ti.com>
      Acked-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      Reviewed-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      85fd27f8
    • D
      drm/tilcdc: rewrite pixel clock calculation · 3d19306a
      Darren Etheridge 提交于
      Updating the tilcdc DRM driver code to calculate the LCD controller
      pixel clock more accurately. Based on a suggested implementation by
      Tomi Valkeinen.
      
      The current code does not work correctly and produces wrong results
      with many requested clock rates. It also oddly uses two different
      clocks, a display pll clock and a divider clock (child of display
      pll), instead of just using the clock coming to the lcdc.
      
      This patch removes the use of the display pll clock, and rewrites the
      code to calculate the clock rates. The idea is simply to request a
      clock rate of pixelclock*2, as the LCD controller has an internal
      divider which we set to 2.
      Signed-off-by: NDarren Etheridge <detheridge@ti.com>
      [Rewrapped description]
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      Reviewed-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      3d19306a
  3. 08 2月, 2016 1 次提交
  4. 27 5月, 2015 2 次提交
    • J
      drm/tilcdc: Add support for external tda998x encoder · 103cd8bc
      Jyri Sarha 提交于
      Add support for an external compontised DRM encoder. The external
      encoder can be connected to tilcdc trough device tree graph binding.
      The binding document for tilcdc has been updated. The current
      implementation supports only tda998x encoder.
      
      To be able to filter out the unsupported video modes the tilcdc driver
      needs to hijack the external connectors helper functions. The tilcdc
      installes new helper functions that are otherwise identical to
      orignals, but the mode_valid() call-back check the mode first localy,
      before calling the original call-back. The tilcdc dirver restores the
      original helper functions before it is unbound from the external
      device.
      
      I got the idea and some lines of code from Jean-Francois Moine's
      "drm/tilcdc: Change the interface with the tda998x driver"-patch.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      Acked-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      103cd8bc
    • J
      drm/tilcdc: Remove tilcdc slave support for tda998x driver · 6730201f
      Jyri Sarha 提交于
      Remove tilcdc slave support for tda998x driver. The tilcdc slave
      support would conflicts with componentized use of tda998x.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      Acked-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      6730201f
  5. 08 7月, 2014 1 次提交
    • G
      drm/tilcdc: remove submodule destroy calls · 7cdcce9f
      Guido Martínez 提交于
      The TI tilcdc driver is designed with a notion of submodules. Currently,
      at unload time, these submodules are iterated and destroyed.
      
      Now that the tilcdc remove order is fixed, this can be handled perfectly
      by the kernel using the device infrastructure, since each submodule
      is a kernel driver itself, and they are only destroy()'ed at unload
      time. Therefore we move the destroy() functionality to each submodule's
      remove().
      
      Also, remove some checks in the unloading process since the new code
      guarantees the resources are allocated and need a release.
      Signed-off-by: NGuido Martínez <guido@vanguardiasur.com.ar>
      Tested-by: NDarren Etheridge <detheridge@ti.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      7cdcce9f
  6. 28 6月, 2013 2 次提交
  7. 20 6月, 2013 1 次提交
  8. 20 2月, 2013 1 次提交
    • R
      drm/tilcdc: add TI LCD Controller DRM driver (v4) · 16ea975e
      Rob Clark 提交于
      A simple DRM/KMS driver for the TI LCD Controller found in various
      smaller TI parts (AM33xx, OMAPL138, etc).  This driver uses the
      CMA helpers.  Currently only the TFP410 DVI encoder is supported
      (tested with beaglebone + DVI cape).  There are also various LCD
      displays, for which support can be added (as I get hw to test on),
      and an external i2c HDMI encoder found on some boards.
      
      The display controller supports a single CRTC.  And the encoder+
      connector are split out into sub-devices.  Depending on which LCD
      or external encoder is actually present, the appropriate output
      module(s) will be loaded.
      
      v1: original
      v2: fix fb refcnting and few other cleanups
      v3: get +/- vsync/hsync from timings rather than panel-info, add
          option DT max-bandwidth field so driver doesn't attempt to
          pick a display mode with too high memory bandwidth, and other
          small cleanups
      v4: remove some unneeded stuff from panel-info struct, properly
          set high bits for hfp/hsw/hbp for rev 2, add DT bindings docs
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Tested-by: NKoen Kooi <koen@dominion.thruhere.net>
      16ea975e