1. 25 1月, 2015 19 次提交
  2. 18 1月, 2015 3 次提交
    • J
      drm/exynos: fix warning of vblank reference count · 7c4c5584
      Joonyoung Shim 提交于
      Prevented re-enabling the vblank interrupt by drm_vblank_off and
      drm_vblank_get from mixer_wait_for_vblank returns error after
      drm_vblank_off. We get below warnings without this error handling
      because vblank reference count is mismatched by above sequence.
      
      setting mode 1920x1080-60Hz@XR24 on connectors 16, crtc 13
      [   19.900793] ------------[ cut here ]------------
      [   19.903959] WARNING: CPU: 0 PID: 0 at drivers/gpu/drm/drm_irq.c:1072 exynos_drm_crtc_finish_pageflip+0xac/0xdc()
      [   19.914076] Modules linked in:
      [   19.917116] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.19.0-rc4-00040-g3d729789-dirty #46
      [   19.925342] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
      [   19.931437] [<c0014430>] (unwind_backtrace) from [<c001158c>] (show_stack+0x10/0x14)
      [   19.939131] [<c001158c>] (show_stack) from [<c04cdd50>] (dump_stack+0x84/0xc4)
      [   19.946329] [<c04cdd50>] (dump_stack) from [<c00226f4>] (warn_slowpath_common+0x80/0xb0)
      [   19.954382] [<c00226f4>] (warn_slowpath_common) from [<c00227c0>] (warn_slowpath_null+0x1c/0x24)
      [   19.963132] [<c00227c0>] (warn_slowpath_null) from [<c02c20cc>] (exynos_drm_crtc_finish_pageflip+0xac/0xdc)
      [   19.972841] [<c02c20cc>] (exynos_drm_crtc_finish_pageflip) from [<c02cb7ec>] (mixer_irq_handler+0xdc/0x104)
      [   19.982546] [<c02cb7ec>] (mixer_irq_handler) from [<c005c904>] (handle_irq_event_percpu+0x78/0x134)
      [   19.991555] [<c005c904>] (handle_irq_event_percpu) from [<c005c9fc>] (handle_irq_event+0x3c/0x5c)
      [   20.000395] [<c005c9fc>] (handle_irq_event) from [<c005f384>] (handle_fasteoi_irq+0xe0/0x1ac)
      [   20.008885] [<c005f384>] (handle_fasteoi_irq) from [<c005bf88>] (generic_handle_irq+0x2c/0x3c)
      [   20.017463] [<c005bf88>] (generic_handle_irq) from [<c005c254>] (__handle_domain_irq+0x7c/0xec)
      [   20.026128] [<c005c254>] (__handle_domain_irq) from [<c0008698>] (gic_handle_irq+0x30/0x68)
      [   20.034449] [<c0008698>] (gic_handle_irq) from [<c00120c0>] (__irq_svc+0x40/0x74)
      [   20.041893] Exception stack(0xc06fff68 to 0xc06fffb0)
      [   20.046923] ff60:                   00000000 00000000 000052f6 c001b460 c06fe000 c07064e8
      [   20.055070] ff80: c04d743c c07392a2 c0739440 c06da340 ef7fca80 00000000 01000000 c06fffb0
      [   20.063212] ffa0: c000f24c c000f250 60000013 ffffffff
      [   20.068245] [<c00120c0>] (__irq_svc) from [<c000f250>] (arch_cpu_idle+0x38/0x3c)
      [   20.075611] [<c000f250>] (arch_cpu_idle) from [<c0050948>] (cpu_startup_entry+0x108/0x16c)
      [   20.083846] [<c0050948>] (cpu_startup_entry) from [<c06aec5c>] (start_kernel+0x3a0/0x3ac)
      [   20.091980] ---[ end trace 2c76ee0500489d1b ]---
      Signed-off-by: NJoonyoung Shim <jy0922.shim@samsung.com>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      7c4c5584
    • J
      drm/exynos: remove unnecessary runtime pm operations · bd508666
      Joonyoung Shim 提交于
      In booting, we can see a below message.
      
      [    3.241728] exynos-mixer 14450000.mixer: Unbalanced pm_runtime_enable!
      
      Already pm_runtime_enable is called by probe function. Remove
      pm_runtime_enable/disable from mixer_bind and mixer_unbind.
      Signed-off-by: NJoonyoung Shim <jy0922.shim@samsung.com>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      bd508666
    • J
      drm/exynos: fix reset codes for memory mapped hdmi phy · 265134a0
      Joonyoung Shim 提交于
      This fixes reset codes to support memory mapped hdmi phy as well as hdmi
      phy dedicated i2c lines.
      Signed-off-by: NJoonyoung Shim <jy0922.shim@samsung.com>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      265134a0
  3. 12 1月, 2015 1 次提交
  4. 04 12月, 2014 1 次提交
  5. 25 11月, 2014 4 次提交
    • G
      drm/exynos: avoid leak if exynos_dpi_probe() fails · 5baf5d44
      Gustavo Padovan 提交于
      The component must be deleted if the probe fails.
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      5baf5d44
    • G
      drm/exynos: Fix exynos_dpi_remove() parameter · 1c9ff4ab
      Gustavo Padovan 提交于
      exynos_dpi_remove() should receive a exynos_drm_display but when
      DRM_EXYNOS_DPI was disabled it was receiving a struct device resulting in
      ia compiler warning.
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      1c9ff4ab
    • I
      drm/exynos: vidi: add component support · 1d50aa9c
      Inki Dae 提交于
      This patch adds component support for vidi driver.
      
      vidi driver is a kms driver so it doesn't need to be registered
      to exynos_drm_subdrv_list. For this, it changes for the component
      framework to be used for vidi driver.
      
      This patch fixes below error also,
      
      # echo 1 > /sys/devices/platform/exynos-drm-vidi/connection
      [   55.618529] ------------[ cut here ]------------
      [   55.621960] WARNING: CPU: 0 PID: 1397 at drivers/gpu/drm/drm_irq.c:1203 exynos_drm_crtc_dpms+0x88/0x17c()
      [   55.631268] Modules linked in:
      [   55.634278] CPU: 0 PID: 1397 Comm: sh Not tainted 3.18.0-rc2-146253-g31449d7 #1154
      [   55.641885] [<c0014400>] (unwind_backtrace) from [<c0011570>] (show_stack+0x10/0x14)
      [   55.649597] [<c0011570>] (show_stack) from [<c04764f4>] (dump_stack+0x84/0xc4)
      [   55.656802] [<c04764f4>] (dump_stack) from [<c00218b8>] (warn_slowpath_common+0x6c/0x88)
      [   55.664866] [<c00218b8>] (warn_slowpath_common) from [<c0021970>] (warn_slowpath_null+0x1c/0x24)
      [   55.673632] [<c0021970>] (warn_slowpath_null) from [<c027a780>] (exynos_drm_crtc_dpms+0x88/0x17c)
      [   55.682482] [<c027a780>] (exynos_drm_crtc_dpms) from [<c027a910>] (exynos_drm_crtc_commit+0x14/0x44)
      [   55.691622] [<c027a910>] (exynos_drm_crtc_commit) from [<c025521c>] (drm_crtc_helper_set_mode+0x3d0/0x51c)
      [   55.701233] [<c025521c>] (drm_crtc_helper_set_mode) from [<c0255d68>] (drm_crtc_helper_set_config+0x87c/0x9dc)
      [   55.711230] [<c0255d68>] (drm_crtc_helper_set_config) from [<c026afa8>] (drm_mode_set_config_internal+0x58/0xd4)
      [   55.721380] [<c026afa8>] (drm_mode_set_config_internal) from [<c025c208>] (restore_fbdev_mode+0xcc/0xec)
      [   55.730834] [<c025c208>] (restore_fbdev_mode) from [<c025c244>] (drm_fb_helper_restore_fbdev_mode_unlocked+0x1c/0x30)
      [   55.741424] [<c025c244>] (drm_fb_helper_restore_fbdev_mode_unlocked) from [<c025e0a8>] (drm_fb_helper_set_par+0x1c/0x60)
      [   55.752271] [<c025e0a8>] (drm_fb_helper_set_par) from [<c025e174>] (drm_fb_helper_hotplug_event+0x88/0xc4)
      [   55.761906] [<c025e174>] (drm_fb_helper_hotplug_event) from [<c02571c4>] (drm_helper_hpd_irq_event+0xc8/0x134)
      [   55.771898] [<c02571c4>] (drm_helper_hpd_irq_event) from [<c028e27c>] (vidi_store_connection+0x90/0xc8)
      [   55.781268] [<c028e27c>] (vidi_store_connection) from [<c0125f80>] (kernfs_fop_write+0xc0/0x180)
      [   55.790045] [<c0125f80>] (kernfs_fop_write) from [<c00cdf60>] (vfs_write+0xa0/0x1ac)
      [   55.797757] [<c00cdf60>] (vfs_write) from [<c00ce468>] (SyS_write+0x44/0x9c)
      [   55.804790] [<c00ce468>] (SyS_write) from [<c000e6a0>] (ret_fast_syscall+0x0/0x30)
      [   55.812328] ---[ end trace 3c0fe4386702d4dd ]---
      
      This issue occurs when modeset to vidi is tried in case that drm_vblank_init
      is called prior to crtc creation of vidi driver. In this case, crtc number
      of vidi is invalid so any requests with the crtc number will fail.
      This patch guarantees drm_vblank_init to be called after all kms drivers
      are ready by using component framework.
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      1d50aa9c
    • 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
  6. 24 11月, 2014 12 次提交
    • J
      drm/exynos/ipp: fix error return code · be19d933
      Julia Lawall 提交于
      Propagate the returned error code on failure.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      identifier ret; expression e1,e2;
      @@
      (
      if (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      be19d933
    • 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
    • A
      drm/exynos/dpi: stop using display->ctx pointer · 5af3d9bb
      Andrzej Hajda 提交于
      The patch replaces accesses to display->ctx pointer by container_of
      construct. The field is removed as well as dpi was the last user of it.
      Signed-off-by: NAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      5af3d9bb
    • A
      drm/exynos/dpi: embed display into private context · 4cfde1f2
      Andrzej Hajda 提交于
      exynos_drm_display is used by internal Exynos DRM framework for
      representing encoder:connector pair. As it should be mapped 1:1 to dpi
      private context it seems more reasonable to embed it directly in that context.
      As a result further code simplification will be possible.
      Moreover it will be possible to handle multiple dpi devices in the system.
      Signed-off-by: NAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      4cfde1f2
    • A
      drm/exynos/dp: stop using display->ctx pointer · 63b3be32
      Andrzej Hajda 提交于
      The patch replaces accesses to display->ctx pointer by container_of
      construct. It will allow to remove ctx field in the future.
      Signed-off-by: NAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      63b3be32
    • A
      drm/exynos/dp: embed display into private context · 1df6e5fb
      Andrzej Hajda 提交于
      exynos_drm_display is used by internal Exynos DRM framework for
      representing encoder:connector pair. As it should be mapped 1:1 to dp
      private context it seems more reasonable to embed it directly in that context.
      As a result further code simplification will be possible.
      Moreover it will be possible to handle multiple dp devices in the system.
      Signed-off-by: NAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      1df6e5fb
    • A
      drm/exynos/vidi: stop using display->ctx pointer · 2f26bd72
      Andrzej Hajda 提交于
      The patch replaces accesses to display->ctx pointer by container_of
      construct. It will allow to remove ctx field in the future.
      Signed-off-by: NAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      2f26bd72
    • A
      drm/exynos/vidi: embed display into private context · 7340426a
      Andrzej Hajda 提交于
      exynos_drm_display is used by internal Exynos DRM framework for
      representing encoder:connector pair. As it should be mapped 1:1 to vidi
      private context it seems more reasonable to embed it directly in that context.
      As a result further code simplification will be possible.
      Moreover it will be possible to handle multiple vidi devices in the system.
      Signed-off-by: NAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      7340426a
    • A
      drm/exynos/hdmi: stop using display->ctx pointer · 0d8424f8
      Andrzej Hajda 提交于
      The patch replaces accesses to display->ctx pointer by container_of
      construct. It will allow to remove ctx field in the future.
      Signed-off-by: NAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      0d8424f8
    • A
      drm/exynos/hdmi: embed display into private context · 930865fb
      Andrzej Hajda 提交于
      exynos_drm_display is used by internal Exynos DRM framework for
      representing encoder:connector pair. As it should be mapped 1:1 to hdmi
      private context it seems more reasonable to embed it directly in that context.
      As a result further code simplification will be possible.
      Moreover it will be possible to handle multiple hdmi devices in the system.
      Signed-off-by: NAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      930865fb