Ville Syrjälä [Wed, 26 Aug 2015 19:55:05 +0000 (22:55 +0300)]
drm/dp: Define AUX_RETRY_INTERVAL as 500 us
Currently we react to native and i2c defers by waiting either 400-500 us
or 500-600 us, depending on which code path we take. Consolidate them
all to one define AUX_RETRY_INTERVAL which defines the minimum interval.
Since we've been using two different intervals pick the longer of them
and define AUX_RETRY_INTERVAL as 500 us. For the maximum just use
AUX_RETRY_INTERVAL+100 us.
I want to have a define for this so that I can use it when calculating
the estimated duration of i2c-over-aux transfers. Without a define it
would be very easy to change the sleep duration and neglect to update
the i2c-over-aux estimates.
Cc: Simon Farnsworth <simon.farnsworth@onelan.com> Cc: moosotc@gmail.com Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Simon Farnsworth <simon.farnsworth@onelan.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Commit ec9f932ed41622d120de52a5b525e4d77b9ef17e
"drm/atomic: Cleanup on error properly in the atomic ioctl."
cleaned up some error paths, but didn't fix the TEST_ONLY path.
In the check only case plane->fb shouldn't be updated, and
the vblank events should be cleared as on failure.
Changes since v1:
- Fix -EDEADLK handling of vblank events too.
- Free state last with CHECK_ONLY.
Changes since v2:
- Add comment about freeing crtc_state->event with TEST_ONLY.
(Daniel Stone)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Dave Airlie [Mon, 31 Aug 2015 00:25:45 +0000 (10:25 +1000)]
Merge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next
This is a second pull-request which adds last part of
atomic modeset/pageflip support, render node support,
clean-up, and fix-up.
* 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
drm/exynos: fix build warning to exynos_drm_gem.c
drm/exynos: Properly report supported formats for each device
drm/exynos: add render node support
drm/exynos: implement atomic_{begin/flush} of DECON
drm/exynos: remove legacy ->suspend()/resume()
drm/exynos: Enable atomic modesetting feature
drm/exynos: remove wait queue for pending page flip
drm/exynos: wait all planes updates to finish
drm/exynos: add atomic asynchronous commit
drm/exynos: fimd: only finish update if START == START_S
drm/exynos: add macro to get the address of START_S reg
drm/exynos: check for pending fb before finish update
drm/exynos: fimd: move window protect code to prepare/cleanup_plane
drm/exynos: add prepare and cleanup phases for planes
drm/exynos: fimd: unify call to exynos_drm_crtc_finish_pageflip()
drm/exynos: don't track enabled state at exynos_crtc
Dave Airlie [Mon, 31 Aug 2015 00:05:37 +0000 (10:05 +1000)]
Merge tag 'drm-amdkfd-next-fixes-2015-08-30' of git://people.freedesktop.org/~gabbayo/linux into drm-next
Just one small fix before 4.3 merge window:
- Use linux/mman.h instead of uapi's mman-common.h inside the driver.
* tag 'drm-amdkfd-next-fixes-2015-08-30' of git://people.freedesktop.org/~gabbayo/linux:
amdkfd: use <linux/mman.h> instead of <uapi/asm-generic/mman-common.h>
Marek Szyprowski [Sun, 30 Aug 2015 15:53:57 +0000 (00:53 +0900)]
drm/exynos: Properly report supported formats for each device
Exynos DRM reported that all planes for all supported sub-devices supports
only three pixel formats: XRGB24, ARGB24 and NV12. This patch lets each
Exynos DRM sub-drivers to provide the list of supported pixel formats
and registers this list to DRM core.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Hyungwon Hwang [Thu, 27 Aug 2015 09:21:14 +0000 (18:21 +0900)]
drm/exynos: implement atomic_{begin/flush} of DECON
Each CRTC's atomic_{begin/flush} must stop/start the update of shadow
registers to active register in the functions. This patch achieves these
purpose by moving the setting of protection bits to those functions from
decon_update_plane.
v2: rebased to the branch exynos-drm-next
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Gustavo Padovan [Sun, 30 Aug 2015 15:33:57 +0000 (00:33 +0900)]
drm/exynos: remove legacy ->suspend()/resume()
These legacy helpers should only be used by shadow-attaching drivers.
KMS drivers has its own way to handle suspend/resume and don't need to
use these two helpers.
Gustavo Padovan [Sat, 15 Aug 2015 16:26:19 +0000 (13:26 -0300)]
drm/exynos: remove wait queue for pending page flip
Exynos atomic commit procedures already does this job of waiting for
pending updates to finish, that means using pending_flip_queue is
pointless now because the disable CRTC procedure will never happen
during a page_flip.
Gustavo Padovan [Sat, 15 Aug 2015 16:26:18 +0000 (13:26 -0300)]
drm/exynos: wait all planes updates to finish
Add infrastructure to wait for all planes updates to finish by using
an atomic_t variable to track how many pending updates we are waiting
plus a wait_queue for the wait part.
It also changes vblank behaviour and keeps it enabled for all types
of updates
Gustavo Padovan [Sat, 15 Aug 2015 16:26:17 +0000 (13:26 -0300)]
drm/exynos: add atomic asynchronous commit
The atomic modesetting interfaces supports async commits that should be
implemented by the drivers. If drm core requests an async commit
exynos_atomic_commit() will now schedule a work task to run the update later.
It also serializes commits that needs to run on the same crtc, putting the
following commit to wait until the current one is finished.
Gustavo Padovan [Sat, 15 Aug 2015 16:26:16 +0000 (13:26 -0300)]
drm/exynos: fimd: only finish update if START == START_S
fimd_update_plane() programs BUF_START[win] and during the update
BUF_START[win] is copied to BUF_START_S[win] (its shadow register)
and starts scanning out, then it raises a irq.
The fimd_irq_handler, in the case we have a pending_fb, will check
the fb value was copied to START_S register and finish the update
in case of success.
Based on patch from Daniel Kurtz <djkurtz@chromium.org>
Gustavo Padovan [Sat, 15 Aug 2015 16:26:14 +0000 (13:26 -0300)]
drm/exynos: check for pending fb before finish update
The current code was ignoring the end of update for all overlay planes,
caring only for the primary plane update in case of pageflip.
This change adds a change to start to check for pending updates for all
planes through exynos_plane->pending_fb. At the start of plane update the
pending_fb is set with the fb to be shown on the screen. Then only when to
fb is already presented in the screen we set pending_fb to NULL to
signal that the update was finished.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
fixup! drm/exynos: check for pending fb before finish update
.prepare_plane() and .cleanup_plane() allows to perform extra operations
before and after the update of planes. For FIMD for example this will
be used to enable disable the shadow protection bit.
Gustavo Padovan [Sat, 15 Aug 2015 16:26:11 +0000 (13:26 -0300)]
drm/exynos: fimd: unify call to exynos_drm_crtc_finish_pageflip()
Unify handling of finished plane update to prepare for a following patch
that will check for the START and START_S regs to really make sure that
the plane was updated.
Dave Airlie [Fri, 28 Aug 2015 03:20:09 +0000 (13:20 +1000)]
Merge branch 'linux-4.3' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next
Rather large pull request this time around, due to the long-pending
cleanup of the kernel driver being here. There's a stupidly large
number of commits for that, as I wanted to have the series be
bisectable at a fairly fine-grained level. That said, a very large
portion of the churn in the rework was automated, and a very large
number of boards from right across the whole range we support have
been tested. I'm fairly confident there shouldn't be (too many)
issues from this.
Beyond correcting some not-so-great design decisions and making the
code a lot easier to work with, there's not much exciting (lower
memory usage, GPU VM should be a lot faster, etc) to be gained by the
end-user as a result of the cleanup, it mostly lays the groundwork for
future improvements.
A big thanks goes to Alexandre Courbot for testing/debugging the GK20A
codepaths for me :)
Highlights:
- A heap of perfmon work, providing a more useful userspace interface
and specifying counters for a bunch of boards
- Support for GT200 reclocking + other misc pm improvements
- Initial patches towards supporting GM20B (Tegra X1)
- Maxwell DisplayPort fixes
- Cleanup of the kernel driver
- The usual collection of random fixes
* 'linux-4.3' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (312 commits)
drm/nouveau: bump driver version for release
drm/nouveau/tegra: merge platform setup from nouveau drm
drm/nouveau/pci: merge agp handling from nouveau drm
drm/nouveau/device: remove pci/platform_device from common struct
drm/nouveau/device: import pciid list and integrate quirks with it
drm/nouveau/device: cleaner abstraction for device resource functions
drm/nouveau/mc: move device irq handling to platform-specific code
drm/nouveau/mc/gf100-: handle second interrupt tree
drm/nouveau/mc: abstract interface to master intr registers
drm/nouveau/pci: new subdev
drm/nouveau/object: merge with handle
drm/nouveau/core: remove the remainder of the previous style
drm/nouveau/mpeg: convert to new-style nvkm_engine
drm/nouveau/sw: convert to new-style nvkm_engine
drm/nouveau/pm: convert to new-style nvkm_engine
drm/nouveau/gr: convert to new-style nvkm_engine
drm/nouveau/fifo: convert to new-style nvkm_engine
drm/nouveau/disp: convert to new-style nvkm_engine
drm/nouveau/dma: convert to new-style nvkm_engine
drm/nouveau/cipher: convert to new-style nvkm_engine
...
Ben Skeggs [Thu, 20 Aug 2015 04:54:23 +0000 (14:54 +1000)]
drm/nouveau/tegra: merge platform setup from nouveau drm
The copyright header in nvkm/engine/device/platform.c has been replaced
with the NVIDIA one from drm/nouveau_platform.c, as most of the actual
code is now theirs.
Ben Skeggs [Thu, 20 Aug 2015 04:54:20 +0000 (14:54 +1000)]
drm/nouveau/devinit: run devinit scripts right after preinit
This ensures we have a valid mask of disabled engines before we start
trying to execute fini()/init() on the subdevs, potentially touching
devices that don't exist.