1. 25 2月, 2016 10 次提交
    • 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
    • G
      drm/tilcdc: fix build error when !CONFIG_CPU_FREQ · 7974dff4
      Grygorii Strashko 提交于
      Fix build error when !CONFIG_CPU_FREQ
      drivers/gpu/drm/tilcdc/tilcdc_drv.c: In function 'tilcdc_load':
      drivers/gpu/drm/tilcdc/tilcdc_drv.c:327:1: error: label 'fail_put_clk' defined but not used [-Werror=unused-label]
       fail_put_clk:
       ^
      Signed-off-by: NGrygorii Strashko <Grygorii.Strashko@linaro.org>
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      Reviewed-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      7974dff4
    • 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
    • T
      drm/tilcdc: verify fb pitch · 6f206e9d
      Tomi Valkeinen 提交于
      LCDC hardware does not support fb pitch that is different (i.e. larger)
      than the screen size. The driver currently does no checks for this, and
      the results of too big pitch are are flickering and lower fps.
      
      This issue easily happens when using libdrm's modetest tool with non-32
      bpp modes. As modetest always allocated 4 bytes per pixel, it implies a
      bigger pitch for 16 or 24 bpp modes.
      
      This patch adds a check to reject pitches the hardware cannot support.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Signed-off-by: NDarren Etheridge <detheridge@ti.com>
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      6f206e9d
    • 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
    • D
      Merge branch 'drm/next/du' of git://linuxtv.org/pinchartl/fbdev into drm-next · 0041ee4d
      Dave Airlie 提交于
      rcar-du updates.
      
      * 'drm/next/du' of git://linuxtv.org/pinchartl/fbdev: (281 commits)
        drm: rcar-du: Add tri-planar memory formats support
        drm: rcar-du: Add probe deferral debug messages
        drm: rcar-du: lvds: Add R-Car Gen3 support
        drm: rcar-du: lvds: Rename PLLEN bit to PLLON
        drm: rcar-du: lvds: Fix PLL frequency-related configuration
        drm: rcar-du: lvds: Avoid duplication of clock clamp code
        drm: rcar-du: Add R8A7795 device support
        drm: rcar-du: Output the DISP signal on the ODDF pin
        drm: rcar-du: Output the DISP signal on the DISP pin
        drm: rcar-du: Support up to 4 CRTCs
        drm: rcar-du: Drop LVDS double dependency on OF
        drm: rcar-du: Enable compilation on ARM64
        drm: rcar-du: Fix compile warning on 64-bit platforms
        drm: rcar-du: Expose the VSP1 compositor through KMS planes
        drm: rcar-du: Move plane allocator to rcar_du_plane.c
        drm: rcar-du: Restart the DU group when a plane source changes
        drm: rcar-du: Add VSP1 compositor support
        drm: rcar-du: Add VSP1 support to the planes allocator
        drm: rcar-du: Refactor plane setup
        drm: rcar-du: Compute plane DDCR4 register value directly
        ...
      0041ee4d
  2. 23 2月, 2016 14 次提交
  3. 20 2月, 2016 10 次提交
  4. 19 2月, 2016 6 次提交