1. 25 2月, 2016 6 次提交
    • J
      drm/tilcdc: Implement dma-buf support for tilcdc · 9c153905
      Jyri Sarha 提交于
      There is nothing special about tilcdc HW when the video memory is
      concerned. Just using the standard drm helpers for implementation is
      enough.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      Reviewed-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      9c153905
    • 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: make frame_done interrupt active at all times · b62222fc
      Darren Etheridge 提交于
      The frame_done interrupt was only being enabled when the vsync
      interrupts were being enabled by DRM.  However the frame_done is
      used to determine if the LCD controller has successfully completed
      the raster_enable, raster_disable commands and the vsync interrupts
      are not always enabled during these operations.
      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>
      b62222fc
    • 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: adopt pinctrl support · 416a07fb
      Dave Gerlach 提交于
      Update tilcdc driver to set the state of the pins to:
      - "default on resume
      - "sleep" on suspend
      
      By optionally putting the pins into sleep state in the suspend callback
      we can accomplish two things.
      - minimize current leakage from pins and thus save power,
      - prevent the IP from driving pins output in an uncontrolled manner,
      which may happen if the power domain drops the domain regulator.
      Signed-off-by: NDave Gerlach <d-gerlach@ti.com>
      Signed-off-by: NDarren Etheridge <detheridge@ti.com>
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      Reviewed-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      416a07fb
    • 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
  2. 08 2月, 2016 1 次提交
  3. 15 1月, 2016 1 次提交
  4. 24 11月, 2015 1 次提交
  5. 07 10月, 2015 1 次提交
  6. 06 10月, 2015 1 次提交
    • T
      drm/irq: Use unsigned int pipe in public API · 88e72717
      Thierry Reding 提交于
      This continues the pattern started in commit cc1ef118 ("drm/irq:
      Make pipe unsigned and name consistent"). This is applied to the public
      APIs and driver callbacks, so pretty much all drivers need to be updated
      to match the new prototypes.
      
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Inki Dae <inki.dae@samsung.com>
      Cc: Jianwei Wang <jianwei.wang.chn@gmail.com>
      Cc: Alison Wang <alison.wang@freescale.com>
      Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Mark Yao <mark.yao@rock-chips.com>
      Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
      Cc: Vincent Abriou <vincent.abriou@st.com>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      88e72717
  7. 27 5月, 2015 3 次提交
  8. 21 11月, 2014 1 次提交
  9. 20 10月, 2014 1 次提交
  10. 17 9月, 2014 1 次提交
  11. 10 9月, 2014 1 次提交
  12. 08 7月, 2014 4 次提交
  13. 23 4月, 2014 1 次提交
  14. 14 1月, 2014 1 次提交
  15. 18 12月, 2013 2 次提交
  16. 19 8月, 2013 1 次提交
    • D
      drm: remove FASYNC support · b0e898ac
      Daniel Vetter 提交于
      So I've stumbled over drm_fasync and wondered what it does. Digging
      that up is quite a story.
      
      First I've had to read up on what this does and ended up being rather
      bewildered why peopled loved signals so much back in the days that
      they've created SIGIO just for that ...
      
      Then I wondered how this ever works, and what that strange "No-op."
      comment right above it should mean. After all calling the core fasync
      helper is pretty obviously not a noop. After reading through the
      kernels FASYNC implementation I've noticed that signals are only sent
      out to the processes attached with FASYNC by calling kill_fasync.
      
      No merged drm driver has ever done that.
      
      After more digging I've found out that the only driver that ever used
      this is the so called GAMMA driver. I've frankly never heard of such a
      gpu brand ever before. Now FASYNC seems to not have been the only bad
      thing with that driver, since Dave Airlie removed it from the drm
      driver with prejudice:
      
      commit 1430163b4bbf7b00367ea1066c1c5fe85dbeefed
      Author: Dave Airlie <airlied@linux.ie>
      Date:   Sun Aug 29 12:04:35 2004 +0000
      
          Drop GAMMA DRM from a great height ...
      
      Long story short, the drm fasync support seems to be doing absolutely
      nothing. And the only user of it was never merged into the upstream
      kernel. And we don't need any fops->fasync callback since the fcntl
      implementation in the kernel already implements the noop case
      correctly.
      
      So stop this particular cargo-cult and rip it all out.
      
      v2: Kill drm_fasync assignments in rcar (newly added) and imx drivers
      (somehow I've missed that one in staging). Also drop the reference in
      the drm DocBook. ARM compile-fail reported by Rob Clark.
      
      v3: Move the removal of dev->buf_asnyc assignment in drm_setup to this
      patch here.
      
      v4: Actually git add ... tsk.
      
      Cc: Dave Airlie <airlied@linux.ie>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      b0e898ac
  17. 07 8月, 2013 1 次提交
  18. 28 6月, 2013 2 次提交
  19. 20 6月, 2013 1 次提交
  20. 24 4月, 2013 3 次提交
  21. 20 2月, 2013 3 次提交
    • R
      drm/tilcdc: add support for LCD panels (v5) · 0d4bbaf9
      Rob Clark 提交于
      Add an output panel driver for LCD panels.  Tested with LCD3 cape on
      beaglebone.
      
      v1: original
      v2: s/of_find_node_by_name()/of_get_child_by_name()/ from Pantelis
          Antoniou
      v3: add backlight support
      v4: rebase to latest of video timing helpers
      v5: remove some unneeded fields from panel-info struct, add DT bindings
          docs
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Tested-by: NKoen Kooi <koen@dominion.thruhere.net>
      0d4bbaf9
    • R
      drm/tilcdc: add encoder slave (v2) · 6e8de0bd
      Rob Clark 提交于
      Add output panel driver for i2c encoder slaves.
      
      v1: original
      v2: add DT bindings docs, and minor updates for review comments
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Tested-by: NKoen Kooi <koen@dominion.thruhere.net>
      6e8de0bd
    • 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