1. 10 6月, 2016 1 次提交
  2. 02 6月, 2016 1 次提交
  3. 21 5月, 2016 1 次提交
    • D
      drm: Nuke ->vblank_disable_allowed · fcee5906
      Daniel Vetter 提交于
      This was added in
      
      commit 0a3e67a4
      Author: Jesse Barnes <jbarnes@virtuousgeek.org>
      Date:   Tue Sep 30 12:14:26 2008 -0700
      
          drm: Rework vblank-wait handling to allow interrupt reduction.
      
      to stay backwards-compatible with old UMS code that didn't even tell
      the kernel when it did a modeset, so that the kernel could
      save/restore vblank counters. At worst this means vblanks will be
      somewhat funky on a setup that very likely no one still runs.
      
      So let's just nuke it.
      
      Plan B would be to set it unconditionally in drm_vblank_init for kms
      drivers, instead of in each driver separately. So if this patch breaks
      anything please only restore the hunks in drmP.h and drm_irq.c, plus
      add a check for DRIVER_MODESET in drm_vblank_init.
      
      Stumbled over this in a discussion on irc with Chris.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Liviu Dudau <liviu.dudau@arm.com>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Cc: Inki Dae <inki.dae@samsung.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Mark Yao <mark.yao@rock-chips.com>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Acked-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Tested-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      fcee5906
  4. 10 5月, 2016 2 次提交
  5. 02 5月, 2016 1 次提交
  6. 13 3月, 2016 1 次提交
  7. 01 3月, 2016 2 次提交
  8. 08 2月, 2016 1 次提交
  9. 12 1月, 2016 1 次提交
    • I
      drm/exynos: fix kernel panic issue at drm releasing · c74d8eb5
      Inki Dae 提交于
      This patch fixes a kernel panic issue which happened
      when drm driver is closed while modetest.
      
      This issue could be reproduced easily by launching modetest
      with page flip repeatedly.
      
      The reason is that invalid drm_file object could be accessed by
      send_vblank_event function when finishing page flip if the drm_file
      object was removed by drm_release and there was a pended page
      flip event which was already committed to hardware.
      
      So this patch makes the pended page flip event to be cancelled by
      preclose callback which is called at front of drm_release function.
      
      Changelog v2:
      - free vblank event objects belonging to the request process,
        increment event space and decrease pending_update when cancelling
        the event
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      Reviewed-by: NDaniel Stone <daniels@collabora.com>
      Acked-by: NDaniel Vetter <daniel@ffwll.ch>
      c74d8eb5
  10. 13 12月, 2015 1 次提交
  11. 03 11月, 2015 1 次提交
  12. 16 10月, 2015 1 次提交
  13. 07 10月, 2015 1 次提交
  14. 30 9月, 2015 1 次提交
  15. 08 9月, 2015 1 次提交
    • D
      drm/atomic-helper: Add option to update planes only on active crtc · aef9dbb8
      Daniel Vetter 提交于
      With drivers supporting runtime pm it's generally not a good idea to
      touch the hardware when it's off. Add an option to the commit_planes
      helper to support this case.
      
      Note that the helpers already add all planes on a crtc when a modeset
      happens, hence plane updates will not be lost if drivers set this to
      true.
      
      v2: Check for NULL state->crtc before chasing the pointer. Also check
      both old and new crtc if there's a switch. Finally just outright
      disallow switching crtcs for a plane if the plane is in active use, on
      most hardware that doesn't make sense.
      
      v3: Since commit_planes(active_only = true) is for enabling things
      only after all the crtc are on we should only look at the new crtc to
      decide whether to call the plane hooks - if the current CRTC isn't on
      then skip. If the old crtc (when moving a plane) went down then the
      plane should have been disabled as part of the pipe shutdown work
      already. For which there's currently no helper really unfortunately.
      Also move the check for wether a plane gets a new CRTC assigned while
      still in active use out of this patch.
      
      v4: Rebase over exynos changes.
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Thierry Reding <treding@nvidia.com>
      Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Reviewed-by: NThierry Reding <treding@nvidia.com>
      Tested-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      aef9dbb8
  16. 31 8月, 2015 2 次提交
  17. 30 8月, 2015 3 次提交
  18. 16 8月, 2015 4 次提交
  19. 22 6月, 2015 1 次提交
  20. 19 6月, 2015 4 次提交
  21. 13 4月, 2015 2 次提交
  22. 11 2月, 2015 1 次提交
  23. 12 1月, 2015 1 次提交
  24. 25 11月, 2014 1 次提交
    • I
      drm/exynos: fix exynos_drm_component_del · 33e2192f
      Inki Dae 提交于
      This patch resolves the issue that component object isn't removed
      correctly.
      
      A given component object couldn't be placed to head of drm_component_list
      so all component objects added to the drm_component_list should be checked
      to remove the given component object.
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      33e2192f
  25. 24 11月, 2014 4 次提交
    • I
      drm/exynos: clean up machine compatible string check · 4846e452
      Inki Dae 提交于
      Use 'for' statemant instead of hard-coded 'if' statement.
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      4846e452
    • G
      drm/exynos: move Exynos platform drivers registration to init · 820687be
      Gustavo Padovan 提交于
      Registering the Exynos DRM subdevices platform drivers in the probe
      function is causing an infinite loop. Fix this by moving it to the
      exynos_drm_init() function to register the drivers on module init.
      
      Registering drivers in the probe functions causes a deadlock in the parent
      device lock. See Grant Likely explanation on the topic:
      
      "I think the problem is that exynos_drm_init() is registering a normal
      (non-OF) platform device, so the parent will be /sys/devices/platform.
      It immediately gets bound against exynos_drm_platform_driver which
      calls the exynos drm_platform_probe() hook. The driver core obtains
      device_lock() on the device *and on the device parent*.
      
      Inside the probe hook, additional platform_drivers get registered.
      Each time one does, it tries to bind against every platform device in
      the system, which includes the ones created by OF. When it attempts to
      bind, it obtains device_lock() on the device *and on the device
      parent*.
      
      Before the change to move of-generated platform devices into
      /sys/devices/platform, the devices had different parents. Now both
      devices have /sys/devices/platform as the parent, so yes they are
      going to deadlock.
      
      The real problem is registering drivers from within a probe hook. That
      is completely wrong for the above deadlock reason. __driver_attach()
      will deadlock. Those registrations must be pulled out of .probe().
      
      Registering devices in .probe() is okay because __device_attach()
      doesn't try to obtain device_lock() on the parent."
      
       INFO: task swapper/0:1 blocked for more than 120 seconds.
             Not tainted 3.18.0-rc3-next-20141105 #794
       "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
       swapper/0       D c052534c     0     1      0 0x00000000
       [<c052534c>] (__schedule) from [<c0525b34>] (schedule_preempt_disabled+0x14/0x20)
       [<c0525b34>] (schedule_preempt_disabled) from [<c0526d44>] (mutex_lock_nested+0x1c4/0x464
      
       [<c0526d44>] (mutex_lock_nested) from [<c02be908>] (__driver_attach+0x48/0x98)
       [<c02be908>] (__driver_attach) from [<c02bcc00>] (bus_for_each_dev+0x54/0x88)
       [<c02bcc00>] (bus_for_each_dev) from [<c02bdce0>] (bus_add_driver+0xe4/0x200)
       [<c02bdce0>] (bus_add_driver) from [<c02bef94>] (driver_register+0x78/0xf4)
       [<c02bef94>] (driver_register) from [<c029e99c>] (exynos_drm_platform_probe+0x34/0x234)
       [<c029e99c>] (exynos_drm_platform_probe) from [<c02bfcf0>] (platform_drv_probe+0x48/0xa4)
       [<c02bfcf0>] (platform_drv_probe) from [<c02be680>] (driver_probe_device+0x13c/0x37c)
       [<c02be680>] (driver_probe_device) from [<c02be954>] (__driver_attach+0x94/0x98)
       [<c02be954>] (__driver_attach) from [<c02bcc00>] (bus_for_each_dev+0x54/0x88)
       [<c02bcc00>] (bus_for_each_dev) from [<c02bdce0>] (bus_add_driver+0xe4/0x200)
       [<c02bdce0>] (bus_add_driver) from [<c02bef94>] (driver_register+0x78/0xf4)
       [<c02bef94>] (driver_register) from [<c029e938>] (exynos_drm_init+0x70/0xa0)
       [<c029e938>] (exynos_drm_init) from [<c00089b0>] (do_one_initcall+0xac/0x1f0)
       [<c00089b0>] (do_one_initcall) from [<c074bd90>] (kernel_init_freeable+0x10c/0x1d8)
       [<c074bd90>] (kernel_init_freeable) from [<c051eabc>] (kernel_init+0x8/0xec)
       [<c051eabc>] (kernel_init) from [<c000f268>] (ret_from_fork+0x14/0x2c)
       3 locks held by swapper/0/1:
        #0:  (&dev->mutex){......}, at: [<c02be908>] __driver_attach+0x48/0x98
        #1:  (&dev->mutex){......}, at: [<c02be918>] __driver_attach+0x58/0x98
        #2:  (&dev->mutex){......}, at: [<c02be908>] __driver_attach+0x48/0x98
      
      Changelog v2:
      - call platform_driver_register after all kms and non kms drivers are
        registered
      - rebased it to exynos-drm-next
      Signed-off-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      820687be
    • G
      Revert "drm/exynos: fix null pointer dereference issue" · b6713957
      Gustavo Padovan 提交于
      This reverts commit cea24824ab432f8acabb254d6805e9aa756de6af.
      
      Moving subdriver probe to exynos_drm_platform_probe() was making
      exynos_drm_device_subdrv_probe() fail because the platform data wasn't set
      yet. It only gets set in exynos_drm_load.
      
      We need to find a smarter way to fix this issue.
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      b6713957
    • K
      drm/exynos: Fix DSI resuming fail because power domain being off · 030794a3
      Krzysztof Kozlowski 提交于
      During system resume from suspend to RAM the Exynos DRM driver forced
      CRTC mode thus turning display on (DPMS_ON). This lead to runtime resuming
      of DSI which failed because whole LCD power domain was off and it was
      not allowed to turn on because of system resume in progress.
      
      Forcing mode should not be needed and removing it solves this particular
      problem.
      
      This necessary fix for following scenario reproduced on Exynos DRM:
      1. Power domain is off before suspending the system.
      2. System is suspended to RAM.
      3. Resuming starts. The Exynos DRM driver resume callback is called.
      4. The Exynos DRM driver calls drm_helper_resume_force_mode() which turns
         on the screen by calling exynos_dsi_dpms with DRM_MODE_DPMS_ON.
      5. The Exynos DSI driver calls pm_runtime_get. The driver runtime
         resumes and this should turn LCD power domain on.
      6. Unfortunately the domain cannot be turned on because system resume is
         in progress and genpd->prepared_count is positive.
      
      Steps to reproduce:
      1. Add runtime PM to Exynos DSI driver.
      2. Build Exynos DRM/FB without FRAMEBUFFER_CONSOLE.
      3. Enable the connector and screen (e.g. with modeset-vsync).
      4. echo 3 > /sys/devices/platform/exynos-drm/graphics/fb0/blank
      5. echo mem > /sys/power/state
      6. Resume.
      [   77.712469] PM: early resume of devices complete after 3.854 msecs
      [   77.712739] exynos-dsi 11c80000.dsi: pm_genpd_resume()
      [   77.712758] exynos4-fimc 11800000.fimc: pm_genpd_resume()
      [   77.712774] exynos4-fimc 11810000.fimc: pm_genpd_resume()
      [   77.712787] exynos-drm-fimc 11820000.fimc: pm_genpd_resume()
      [   77.712802] exynos-drm-fimc 11830000.fimc: pm_genpd_resume()
      [   77.712815] s5p-mipi-csis 11880000.csis: pm_genpd_resume()
      [   77.712829] s5p-mipi-csis 11890000.csis: pm_genpd_resume()
      [   77.712843] exynos-fimc-lite 12390000.fimc-lite: pm_genpd_resume()
      [   77.712856] exynos-fimc-lite 123a0000.fimc-lite: pm_genpd_resume()
      [   77.713788] exynos4-fb 11c00000.fimd: pm_genpd_resume()
      [   77.713912] wake disabled for irq 184
      [   77.713923] wake disabled for irq 185
      [   77.714082] wake disabled for irq 173
      [   77.715676] wake disabled for irq 176
      [   77.718540] exynos4-fb 11c00000.fimd: pm_genpd_runtime_resume()
      [   77.718567] exynos4-fb 11c00000.fimd: state restore latency exceeded, new value 1708 ns
      [   77.718636] exynos-dsi 11c80000.dsi: pm_genpd_runtime_resume()
      [   77.892366] exynos-dsi 11c80000.dsi: PLL failed to stabilize
      [   77.892377] exynos-dsi 11c80000.dsi: failed to configure DSI PLL
      [   78.192168] exynos-dsi 11c80000.dsi: timeout waiting for reset
      [   78.211578] exynos-dsi 11c80000.dsi: waiting for bus lanes timed out
      [   78.307173] exynos-dsi 11c80000.dsi: xfer timed out: d1 00 (null)
      [   78.307190] panel_s6e8aa0 11c80000.dsi.0: error -110 reading dcs seq(0xd1)
      [   78.307199] panel_s6e8aa0 11c80000.dsi.0: read id failed
      Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      030794a3