1. 31 12月, 2015 1 次提交
  2. 16 10月, 2015 1 次提交
  3. 07 10月, 2015 1 次提交
  4. 25 9月, 2015 1 次提交
  5. 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
  6. 13 6月, 2015 12 次提交
  7. 24 3月, 2015 6 次提交
    • G
      drm/omap: add hibernation callbacks · 8450c8d0
      Grygorii Strashko 提交于
      Setting a dev_pm_ops suspend/resume pair but not a set of hibernation
      functions means those pm functions will not be called upon hibernation.
      
      Fix this by using SIMPLE_DEV_PM_OPS, which appropriately assigns the
      suspend and hibernation handlers and move
      omap_drm_suspend/omap_drm_resume under CONFIG_PM_SLEEP to avoid build
      warnings.
      Signed-off-by: NGrygorii Strashko <Grygorii.Strashko@linaro.org>
      [tomi.valkeinen@ti.com: fix conflict, clean up description]
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      8450c8d0
    • T
      drm/omap: fix race condition with dev->obj_list · 76c4055f
      Tomi Valkeinen 提交于
      omap_gem_objects are added to dev->obj_list in omap_gem_new, and removed
      in omap_gem_free_object. Unfortunately there's no locking for
      dev->obj_list, which eventually leads to a crash:
      
      WARNING: CPU: 1 PID: 1123 at lib/list_debug.c:59 __list_del_entry+0xa4/0xe0()
      list_del corruption. prev->next should be e9281344, but was ea722b84
      
      Add a spinlock to protect dev->obj_list.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      76c4055f
    • T
      drm/omap: stop connector polling during suspend · ccd7b5ed
      Tomi Valkeinen 提交于
      When not using proper hotplug detection, DRM polls periodically the
      connectors to find out if a cable is connected. This polling can happen
      at any time, even very late in the suspend process.
      
      This causes a problem with omapdrm, when the poll happens during the
      suspend process after GPIOs have been disabled, leading to a crash in
      gpio_get().
      
      This patch fixes the issue by adding suspend and resume hooks to
      omapdrm, in which we disable and enable, respectively, the polling.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      ccd7b5ed
    • T
      drm/omap: remove dummy PM functions · f5a1d317
      Tomi Valkeinen 提交于
      omapdrm has dummy functions for platform_device's
      suspend/resume/shutdown. The functions don't do anything, and those
      platform device functions are deprecated, so remove them from omapdrm.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      f5a1d317
    • T
      drm/omap: fix operation without fbdev · c7c1aecd
      Tomi Valkeinen 提交于
      omapdrm should work fine even if fbdev is missing. The current driver
      crashes in that case, though, as it is missing checks for the fbdev.
      
      Add the checks so that we don't free fbdev or restore fbdev mode when
      there's no fbdev.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      c7c1aecd
    • T
      drm/omap: fix encoder-crtc mapping · 17337297
      Tomi Valkeinen 提交于
      OMAP DSS hardware supports changing the output port to which an overlay
      manager's video stream goes. For example, DPI video stream can come from
      any of the four overlay managers on OMAP5.
      
      However, as it's difficult to manage the change in the driver, the
      omapdss driver does not support that at the moment, and has a hardcoded
      overlay manager per output.
      
      omapdrm, on the other hand, uses the hardware features to find out which
      overlay manager to use for an output, which causes problems. For
      example, on OMAP5, omapdrm tries to use DIGIT overlay manager for DPI
      output, instead of the LCD3 required by the omapdss driver.
      
      This patch changes the omapdrm to use the omapdss driver's hardcoded
      overlay managers, which fixes the issue.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      17337297
  8. 20 3月, 2015 3 次提交
  9. 20 10月, 2014 1 次提交
  10. 10 9月, 2014 1 次提交
  11. 05 6月, 2014 1 次提交
  12. 14 4月, 2014 3 次提交
    • T
      drm/omap: fix race issue when unloading omapdrm · e2f8fd74
      Tomi Valkeinen 提交于
      At module unload, omap_fbdev_free() gets called which releases the
      framebuffers. However, the framebuffers are still used by crtcs, and
      will be released only later at vsync. The driver doesn't wait for this,
      and goes on to release the rest of the resources, which often
      causes a crash.
      
      This patchs adds a omap_crtc_flush() function which waits until the crtc
      has finished with its apply queue and page flips.
      
      The function utilizes a simple polling while-loop, as the performance is
      not an issue here.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      e2f8fd74
    • T
      drm/omap: fix DMM driver (un)registration · ea7e3a66
      Tomi Valkeinen 提交于
      At the moment the DMM driver is never unregistered, even if it's
      registered in the omapdrm module's init function. This means we'll get
      errors when reloading the omapdrm module.
      
      Fix this by unregistering the DMM driver properly, and also change the
      module init to fail if DMM driver cannot be registered, simplifying the
      unregister path as we don't need to keep the state whether we registered
      the DMM driver or not.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      ea7e3a66
    • T
      drm/omap: fix uninit order in pdev_remove() · 707cf58a
      Tomi Valkeinen 提交于
      When unloading omapdrm driver, the omapdrm platform device is
      uninitialized last, after the displays have been disconnected omap_crtc
      callbacks have been removed. As the omapdrm pdev uninitialization needs
      the features uninitialized in earlier steps, a crash is guaranteed.
      
      This patch fixes the uninitialize order so that the omapdrm pdev is
      removed first.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      707cf58a
  13. 09 1月, 2014 3 次提交
    • A
      drm/omap: fix: change dev_unload order · 80e4ed54
      Archit Taneja 提交于
      The current dev_unload order uninits the irqs too early.
      
      In the current sequence, it's possible that a crtc queues work(apply_worker)
      to display a buffer, which registers to omap_crtc_apply_irq to notfiy the
      completion of the configuration we applied.
      
      Calling drm_vblank_cleanup and omap_drm_irq_uninstall here causes the crtc's
      apply handler to never get called, which results in an incorrect state of the
      apply_irq.registered parameter.
      
      This condition occurs where there is no mode set via omapdrm, and dev_lastclose
      tries to set a default fb mode via drm_fb_helper_restore_fbdev_mode. The apply
      work scheduled by restore_fbdev_mode is very close in time to the disabling of
      the irq handler, and hence leads to a race condition. We move the irq cleanup
      at the end of the unload sequence to prevent this.
      
      Also, the call to flush_workqueue is removed since it's called internally by
      destroy_workqueue.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      80e4ed54
    • A
      drm/omap: fix: disconnect devices when omapdrm module is removed · cc823bdc
      Archit Taneja 提交于
      At omapdrm probe, we install manager ops and connect omapdss devices. This
      needs to be undone when omapdrm module is removed so that omapdss is in a
      clean state. This ensures that we can re-insert omapdrm module, or some other
      module which uses omapdss(like omapfb/omap_vout).
      
      Currently, omapdrm's remove neither uninstalls manager ops, or disconnects
      omapdss devices. We make sure that this is done in pdev_remove.
      
      omapdrm establishes connections for omap_dss_device devices when probed. It
      should also be responsible to disconnect the devices. Keeping the devices
      connected can prevent the panel driver modules from unloading, it also causes
      issues when we try to remove or re-insert omapdrm module.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      cc823bdc
    • A
      drm/omap: fix: Defer probe if an omapdss device requests for it at connect · 3a01ab25
      Archit Taneja 提交于
      With the omapdss device model changes. omapdrm is required to call dssdriver's
      connect() op to register a panel. This is currently done in omap_modeset_init()
      
      A call to connect() can fail if the omapdss panels or the encoders(HDMI/DPI)
      they connect to have some resource(like regulators, I2C adapter) missing. If
      this happens, the correct approach is to defer omapdrm's probe.
      
      omapdrm currently ignores those panels which return a non zero value when
      connected. This could result in omapdrm ignoring all panels on an omap board.
      
      The right approach would be for omapdrm to request for probe deferral when a
      panel's connect op returns -EPROBE_DEFER.
      
      In order to do this, we need to call connect() much earlier during omapdrm's
      probe to prevent too many things are already done by then. We now connect the
      panels during pdev_probe(), before anything else is initialized, so that we
      don't need to undo too many things if a defer was requested.
      
      Now when we enter omap_modeset_init(), we have a set of panels that have been
      connected. We now proceed with registering only those panels that are already
      connected.
      
      A special case has to be considered when no panels are available to connect when
      omapdrm probes. In this case too, we defer probe and expect that a panel will be
      available to connect the next time.
      
      Checking whether the panel has a driver or whether it has get_timing/read_edid
      ops in omap_modeset_init() are redundant with the new display model. These can
      be removed since a dssdev device will always have a driver associated with it,
      and all dssdev drivers have a get_timings op.
      
      This will mainly fix cases when omapdrm is built-in the kernel, since that's
      generally where resources like regulators or I2C are unavailable because of
      probe order dependencies.
      
      In particular this fixes boot with omapdrm built-in on an omap4 panda ES board.
      The regulators used by HDMI(provided by I2C based TWL regulators) aren't
      initialized because I2C isn't initialized, I2C isn't initialized as it's pins
      are not configured because pinctrl is yet to probe.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      3a01ab25
  14. 18 12月, 2013 1 次提交
  15. 09 10月, 2013 1 次提交
    • D
      drm: kill ->gem_init_object() and friends · 16eb5f43
      David Herrmann 提交于
      All drivers embed gem-objects into their own buffer objects. There is no
      reason to keep drm_gem_object_alloc(), gem->driver_private and
      ->gem_init_object() anymore.
      
      New drivers are highly encouraged to do the same. There is no benefit in
      allocating gem-objects separately.
      
      Cc: Dave Airlie <airlied@gmail.com>
      Cc: Alex Deucher <alexdeucher@gmail.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Jerome Glisse <jglisse@redhat.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Inki Dae <inki.dae@samsung.com>
      Cc: Ben Skeggs <skeggsb@gmail.com>
      Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Acked-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      16eb5f43
  16. 19 8月, 2013 2 次提交
    • 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
    • D
      drm/omap: kill firstopen callback · 161695bf
      Daniel Vetter 提交于
      KMS drivers really shouldn't need to do anything on firstopen, so kill
      empty callbacks.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Acked-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      161695bf
  17. 07 8月, 2013 1 次提交