1. 24 3月, 2015 16 次提交
    • T
      drm/omap: only ignore DIGIT SYNC LOST for TV output · ef422283
      Tomi Valkeinen 提交于
      We need to ignore DIGIT SYNC LOST error when enabling/disabling TV
      output. The code does that, but it ignores the DIGI SYNC LOST when
      enabling any output. Normally this does no harm, but it could make us
      miss DIGIT SYNC LOST on some rare occasions.
      
      Fix the code to only ignore DIGIT SYNC LOST when enabling/disabling TV.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      ef422283
    • T
      drm/omap: fix race with error_irq · a36af73f
      Tomi Valkeinen 提交于
      omapdrm tries to avoid error floods by unregistering the error irq when
      an error happens, and then registering the error irq again later.
      However, the code is racy, as it sometimes tries to unregister the error
      irq when it's already unregistered, leading to WARN().
      
      Also, the code only registers the error irq again when something is done
      on that particular output, i.e. if only TV is used to flip the buffers,
      and LCD is showing a same buffer, an error on LCD will cause the LCD
      error irq to be unregistered and never registered again.
      
      To fix this, let's keep the error irqs always enabled and trust the
      DRM_ERROR_RATELIMITED to limit the flood.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      a36af73f
    • T
      drm/omap: use DRM_ERROR_RATELIMITED() for error irqs · 3b143fc8
      Tomi Valkeinen 提交于
      omapdrm uses normal DRM_ERROR() print when the HW reports an error. As
      we sometimes may get a flood of errors, let's rather use
      DRM_ERROR_RATELIMITED().
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      3b143fc8
    • 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: tiler: fix race condition with engine->async · e7e24df4
      Tomi Valkeinen 提交于
      The tiler irq handler uses engine->async value, but the code that sets
      engine->async and enables the interrupt does not have a barrier. This
      may cause the irq handler to see the old value of engine->async, causing
      memory corruption.
      Reported-by: NHarinarayan Bhatta <harinarayan@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      e7e24df4
    • T
      drm/omap: fix plane's channel selection · 2dd3887b
      Tomi Valkeinen 提交于
      omap_plane_pre_apply() sets the plane's output channel too late, only
      after the plane has already been otherwise configured and enabled. This
      causes problems, as at the configuration stage we need to make decisions
      based on the output channel.
      
      This may lead to bad plane settings or failing to setup the plane.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      2dd3887b
    • T
      drm/omap: fix TILER on OMAP5 · 7cb0d6c1
      Tomi Valkeinen 提交于
      On OMAP5 it is not possible to use TILER buffer with CPU when caching or
      write-combining is used. Doing so leads to errors from the memory
      manager.
      
      However, on OMAP4, write-combining works fine.
      
      This patch adds platform specific data for the TILER, and a function
      tiler_get_cpu_cache_flags() which can be used to get the caching mode to
      be used.
      
      Note that without write-combining the use of the TILER buffer with CPU
      is unusably slow. It's still good to have it operational for testing
      purposes.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      7cb0d6c1
    • T
      drm/omap: handle incompatible buffer stride and pixel size · 2dab0bab
      Tomi Valkeinen 提交于
      omapdrm doesn't check if the pitch of the framebuffer and the color
      format's bits-per-pixel are compatible. omapdss requires that the stride
      of a buffer is an integer number of pixels
      
      For example, when using modetest with a display that has x resolution of
      1280, and using packed 24 RGB mode (3 bytes per pixel), modetest
      allocates a buffer with a byte stride of 4 * 1280 = 5120. But 5120 / 3 =
      1706.666... pixels, which causes wrong colors and a tilt on the screen.
      
      Add a check into omapdrm to return an error if the user tries to use
      such a combination.
      
      Note: this is not a HW requirement at least for non-rotation use cases,
      but a SW driver requirement. In the future we should study if also
      rotation use cases are fine with any stride size, and if so, change the
      driver to allow these strides.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      2dab0bab
    • T
      drm/omap: fix error handling in omap_framebuffer_create() · 925e4940
      Tomi Valkeinen 提交于
      When an error happens in omap_framebuffer_create(),
      omap_framebuffer_create() calls omap_framebuffer_destroy() if the fb
      struct has been allocated. However, that crashes, as
      omap_framebuffer_destroy(), which calls drm_framebuffer_cleanup(),
      should only be called after drm_framebuffer_init()
      
      Fix this by just calling kfree() for the allocated fb when an error
      happens.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      925e4940
    • 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: add a comment why locking is missing · f7c5f5d9
      Tomi Valkeinen 提交于
      unpin_worker() calls omap_framebuffer_unpin() without any locks, which
      looks very suspicious. However, both pin and unpin are always called via
      the driver's private workqueue, so the access is synchronized that way.
      
      Add a comment to make this clear.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      f7c5f5d9
    • T
      drm/omap: add pin refcounting to omap_framebuffer · f36eb5a8
      Tomi Valkeinen 提交于
      omap_framebuffer_pin() and omap_framebuffer_unpin() are currently
      broken, as they cannot be called multiple times (i.e. pin, pin, unpin,
      unpin), which is what happens in certain cases. This issue causes the
      driver to possibly use 0 as an address for a displayed buffer, leading
      to OCP error from DSS.
      
      This patch fixes the issue by adding a simple pin_count, used to track
      the number of pins.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      f36eb5a8
    • T
      drm/omap: clear omap_obj->paddr in omap_gem_put_paddr() · 3f4d17c4
      Tomi Valkeinen 提交于
      Clear omap_obj's paddr when unmapping the memory, so that it's easier to
      catch bad use of the paddr.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      3f4d17c4
    • T
      drm/omap: page_flip: return -EBUSY if flip pending · 549a7549
      Tomi Valkeinen 提交于
      The DRM documentation says:
      
      "If a page flip is already pending, the page_flip operation must return
      -EBUSY."
      
      Currently omapdrm returns -EINVAL instead. Fix omapdrm by returning
      -EBUSY.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      549a7549
    • 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
  2. 20 3月, 2015 14 次提交
  3. 17 3月, 2015 3 次提交
  4. 16 3月, 2015 5 次提交
  5. 14 3月, 2015 1 次提交
    • V
      drm: Silence sparse warnings · 43fc884e
      Ville Syrjälä 提交于
      ../drivers/gpu/drm/drm_vm.c:405:6: warning: symbol 'drm_vm_open_locked' was not declared. Should it be static?
      ../drivers/gpu/drm/drm_vm.c:431:6: warning: symbol 'drm_vm_close_locked' was not declared. Should it be static?
      ../drivers/gpu/drm/drm_vm.c:681:5: warning: symbol 'drm_vma_info' was not declared. Should it be static?
      
      ../drivers/gpu/drm/drm_pci.c:146:5: warning: symbol 'drm_pci_set_unique' was not declared. Should it be static?
      ../drivers/gpu/drm/drm_pci.c:216:5: warning: symbol 'drm_irq_by_busid' was not declared. Should it be static?
      
      ../drivers/gpu/drm/drm_info.c:47:5: warning: symbol 'drm_name_info' was not declared. Should it be static?
      ../drivers/gpu/drm/drm_info.c:72:5: warning: symbol 'drm_vm_info' was not declared. Should it be static?
      ../drivers/gpu/drm/drm_info.c:116:5: warning: symbol 'drm_bufs_info' was not declared. Should it be static?
      ../drivers/gpu/drm/drm_info.c:159:5: warning: symbol 'drm_clients_info' was not declared. Should it be static?
      ../drivers/gpu/drm/drm_info.c:209:5: warning: symbol 'drm_gem_name_info' was not declared. Should it be static?
      
      ../drivers/gpu/drm/drm_ioc32.c:1019:20: warning: symbol 'drm_compat_ioctls' was not declared. Should it be static?
      
      ../drivers/gpu/drm/drm_bridge.c:52:12: warning: function 'drm_bridge_attach' with external linkage has definition
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      43fc884e
  6. 13 3月, 2015 1 次提交