Dave Airlie [Wed, 6 Aug 2014 06:26:21 +0000 (16:26 +1000)]
drm/mst: rework payload table allocation to conform better.
The old code has problems with the Dell MST monitors due to some
assumptions I made that weren't true.
I initially thought the Virtual Channel Payload IDs had to be in
the DPCD table in ascending order, however it appears that assumption
is bogus.
The old code also assumed it was possible to insert a member
into the table and it would move other members up, like it does
when you remove table entries, however reality has shown this
isn't true.
So the new code allocates VCPIs separate from entries in the payload
tracking table, and when we remove an entry from the DPCD table,
I shuffle the tracking payload entries around in the struct.
This appears to make VT switch more robust (still not perfect)
with an MST enabled Dell monitor.
The translation from the X driver to the KMS one typo'ed a couple
of array indices, causing the HW cursor to look weird (blocky with
leaking edge colors). This fixes it.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Tue, 7 Oct 2014 04:31:14 +0000 (14:31 +1000)]
Merge tag 'ipu-fixes-3.18' of git://git.pengutronix.de/git/pza/linux into drm-next
IPUv3 fixes for v3.18
* tag 'ipu-fixes-3.18' of git://git.pengutronix.de/git/pza/linux:
gpu: ipu-v3: Kconfig: Remove SOC_IMX6SL from IMX_IPUV3_CORE Kconfig
gpu: ipu-v3: ipu-smfc: Do not leave DEBUG defined
gpu: ipu-v3: Return proper error on ipu_add_client_devices error path
gpu: ipu-v3: Select GENERIC_IRQ_CHIP to fix build error
Dave Airlie [Tue, 7 Oct 2014 04:30:32 +0000 (14:30 +1000)]
Merge tag 'topic/core-stuff-2014-10-03' of git://anongit.freedesktop.org/drm-intel into drm-next
two core fixes
* tag 'topic/core-stuff-2014-10-03' of git://anongit.freedesktop.org/drm-intel:
drm/core: use helper to check driver features
drm/edid: Add missing interlaced flag to 576i@100 modes.
Dave Airlie [Tue, 7 Oct 2014 04:30:02 +0000 (14:30 +1000)]
Merge tag 'drm-intel-next-fixes-2014-10-03' of git://anongit.freedesktop.org/drm-intel into drm-next
Bunch of fixes for 3.18. Major parts:
- ppgtt fixes (but full ppgtt is for 3.19) from Chris, Michel, ...
- hdmi pixel replication fixes (Clint Taylor)
- leftover i830M patches from Ville
- small things all over
* tag 'drm-intel-next-fixes-2014-10-03' of git://anongit.freedesktop.org/drm-intel: (21 commits)
drm/i915: Enable pixel replicated modes on BDW and HSW.
drm/i915: Don't spam dmesg with rps messages on vlv/chv
drm/i915: Do not leak pages when freeing userptr objects
drm/i915: Do not store the error pointer for a failed userptr registration
Revert "drm/i915/bdw: BDW Software Turbo"
drm/i915/bdw: Cleanup pre prod workarounds
drm/i915: Use EIO instead of EAGAIN for sink CRC error.
drm/i915: Extend BIOS stolen mem handling to all platform
drm/i915: Match GTT space sanity checker with implementation
drm/i915: HSW always use GGTT selector for secure batches
drm/i915: add cherryview specfic forcewake in execlists_elsp_write
drm/i915: fix another use-after-free in i915_gem_evict_everything
drm/i915: Don't reinit hpd interrupts after gpu reset
drm/i915: Wrap -EIO send-vblank event for failed pageflip in spinlock
drm/i915: Drop any active reference before unbinding
drm/i915: Objects on the unbound list may still have an active reference
drm/i915/edp: use lane count and link rate from DPCD for eDP
drm/i915/dp: add missing \n in the TPS3 debug message
drm/i915/hdmi, dp: Do not dereference the encoder in the connector destroy
drm/i915: Limit the watermark to at least 8 entries on gen2/3
...
Dave Airlie [Tue, 7 Oct 2014 04:26:40 +0000 (14:26 +1000)]
Merge branch 'drm-next-3.18' of git://people.freedesktop.org/~agd5f/linux into drm-next
It looks like you missed my last 3.18 pull from 9/24. This one
includes those patches and a few more on top. The additional patches are:
- Maarten's radeon fence updates
- Some additional debugging output
From the previous pull request:
- Re-enable some dpm features that were previously disabled due
to a bug that was fixed in 3.16
- Make some arrays static
- re-arrange some audio code to properly reflect connected status
in the audio driver
* 'drm-next-3.18' of git://people.freedesktop.org/~agd5f/linux:
drm/radeon/kv: add uvd/vce info to dpm debugfs output
drm/radeon/ci: add uvd/vce info to dpm debugfs output
drm/radeon: export reservation_object from dmabuf to ttm
drm/radeon: cope with foreign fences inside the reservation object
drm/radeon: cope with foreign fences inside display
drm/radeon/cik: write gfx ucode version to ucode addr reg
drm/radeon/si: print full CS when we hit a packet 0
drm/radeon: remove unecessary includes
drm/radeon/combios: declare legacy_connector_convert as static
drm/radeon/atombios: declare connector convert tables as static
drm/radeon: drop btc_get_max_clock_from_voltage_dependency_table
drm/radeon/dpm: drop clk/voltage dependency filters for BTC
drm/radeon/dpm: drop clk/voltage dependency filters for CI
drm/radeon/dpm: drop clk/voltage dependency filters for SI
drm/radeon/dpm: drop clk/voltage dependency filters for NI
drm/radeon: disable audio when we disable hdmi (v2)
drm/radeon: split audio enable between eg and r600 (v2)
drm/radeon: consolidate r600_audio.c into r600_hdmi.c
drm/radeon: consolidate duplicate encode is digital function
drm/radeon: fix register name to match internal name
drm/radeon: export reservation_object from dmabuf to ttm
Adds an extra argument to radeon_bo_create, which is only used in radeon_prime.c.
Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/radeon: cope with foreign fences inside the reservation object
Not the whole world is a radeon! :-)
Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/radeon: cope with foreign fences inside display
Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Andrzej Hajda [Tue, 30 Sep 2014 14:49:56 +0000 (16:49 +0200)]
drm/core: use helper to check driver features
The patch replaces direct access to driver_features field
by calls to helper function.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drm/radeon/atombios: declare connector convert tables as static
The tables:
* supported_devices_connector_convert
* supported_devices_connector_object_id_convert
* object_connector_convert
are used in redeon_atombios.c only, so declare them as static.
Signed-off-by: Michele Curti <michele.curti@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Clint Taylor [Fri, 26 Sep 2014 16:55:24 +0000 (09:55 -0700)]
drm/edid: Add missing interlaced flag to 576i@100 modes.
CEA VICs 44 and 45 were missing DRM_MODE_FLAG_INTERLACE.
Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Dave Airlie [Wed, 1 Oct 2014 09:27:38 +0000 (19:27 +1000)]
Merge branch 'for-airlied-next' of git://people.freedesktop.org/~mlankhorst/linux into drm-next
fixups for nouveau and fencing
* 'for-airlied-next' of git://people.freedesktop.org/~mlankhorst/linux:
drm/nouveau: export reservation_object from dmabuf to ttm
drm/ttm: add reservation_object as argument to ttm_bo_init
drm: Pass dma-buf as argument to gem_prime_import_sg_table
drm/nouveau: assign fence_chan->name correctly
drm/nouveau: specify if interruptible wait is desired in nouveau_fence_sync
drm/nouveau: bump driver patchlevel to 1.2.1
Dave Airlie [Wed, 1 Oct 2014 09:27:01 +0000 (19:27 +1000)]
Merge tag 'topic/core-stuff-2014-09-29' of git://anongit.freedesktop.org/drm-intel into drm-next
Ok, here's the update core-stuff pull request with the locking fixup patch
fixed up with another patch.
* tag 'topic/core-stuff-2014-09-29' of git://anongit.freedesktop.org/drm-intel:
drm: Drop grab fpriv->fbs_lock in drm_fb_release
drm/udl: use container_of to resolve udl_fbdev from drm_fb_helper
drm/ast: use container_of to resolve ast_fbdev from drm_fb_helper
drm/gma500: use container_of to resolve psb_fbdev from drm_fb_helper
drm/qxl: use container_of to resolve qxl_fbdev from drm_fb_helper
drm/nouveau: use container_of to resolve nouveau_plane from drm_plane
drm/nouveau: use container_of to resolve nouveau_fbdev from drm_fb_helper
drm/radeon: use container_of to resolve radeon_fbdev from drm_fb_helper
drm/mgag200: use container_of to resolve mga_fbdev from drm_fb_helper
drm/cirrus: use container_of to resolve cirrus_fbdev from drm_fb_helper
drm: Improve debug output for drm_wait_one_vblank
drm: Fixup locking for universal cursor planes
drm: Don't update vblank timestamp when the counter didn't change
Clint Taylor [Tue, 30 Sep 2014 17:30:22 +0000 (10:30 -0700)]
drm/i915: Enable pixel replicated modes on BDW and HSW.
Haswell and later silicon has added a new pixel replication register
to the pipe timings for each transcoder. Now in addition to the
DPLL_A_MD register for the pixel clock double, we also need to write
to the TRANS_MULT_n (0x6002c) register to double the pixel data. Writing
to the DPLL only double the pixel clock.
ver2: Macro name change from MULTIPLY to PIPE_MULTI. (Daniel)
ver3: Do not set pixel multiplier if transcoder is eDP (Ville)
ver4: Macro name change to PIPE_MULT and default else pixel_multiplier
Cc: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= <ville.syrjala@linux.intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
[danvet: Appease checkpatch and move one hunk back into the right
place that git am misplace!?] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This fixes a regression introduced by "drm/nouveau: rework to new fence interface"
(commit 29ba89b2371d466).
The fence sequence should not be reset after creation, the old value is used instead.
On destruction the final value is written, to prevent another source of accidental
wraparound in case of a channel being destroyed after a hang, and unblocking any other
channel that may wait on the about-to-be-deleted channel to signal.
I'm nothing if not optimistic about any hope of recovery from that. ;-)
Reported-by: Ted Percival <ted@tedp.id.au> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Tested-by: Ted Percival <ted@tedp.id.au> Acked-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Ville Syrjälä [Tue, 2 Sep 2014 12:12:17 +0000 (15:12 +0300)]
drm/i915: Don't spam dmesg with rps messages on vlv/chv
If the GPU frequency isn't going to change don't spam dmesg with
debug messages about it.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
drm/i915: Do not leak pages when freeing userptr objects
sg_alloc_table_from_pages() can build us a table with coalesced ranges which
means we need to iterate over pages and not sg table entries when releasing
page references.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: "Barbalho, Rafael" <rafael.barbalho@intel.com> Tested-by: Rafael Barbalho <rafael.barbalho@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@vger.kernel.org
[danvet: Remove unused local variable sg.] Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Chris Wilson [Fri, 26 Sep 2014 09:31:02 +0000 (10:31 +0100)]
drm/i915: Do not store the error pointer for a failed userptr registration
If we fail to create our mmu notification, we report the error back and
currently store the error inside the i915_mm_struct. This not only causes
subsequent registerations of the same mm to fail (an issue if the first
was interrupted by a signal and needed to be restarted) but also causes
us to eventually try and free the error pointer.
It's apparently too broken so that Rodrigo submitted a patch to add a
config option for it. Given that the design is also ... suboptimal and
that I've only merged this to get lead engineers and managers off my
back for one second let's just revert this.
This here is actually one of the rare cases where lockdep hits a false
positive: The deadlock only happens in drm_fb_release, which cleans up
the file private structure when all the references are gone. So the
locking is the very last one and no one else can deadlock. It also
doesn't protect anything at all, since all ioctls are guaranteed to
have returned at this point - otherwise they'd still hold a reference
on the file.
So let's just drop it and replace it with a big comment.
Cc: David Herrmann <dh.herrmann@gmail.com> Cc: Matt Roper <matthew.d.roper@intel.com> Cc: Paulo Zanoni <przanoni@gmail.com> Reported-and-Tested-by: Paulo Zanoni <przanoni@gmail.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Daniel Vetter [Fri, 12 Sep 2014 15:07:32 +0000 (17:07 +0200)]
drm: Fixup locking for universal cursor planes
Bunch of things amiss:
- Updating crtc->cursor_x/y was done without any locking. Spotted by
David Herrmann.
- Dereferencing crtc->cursor->fb was using the wrong lock, should take
the crtc lock.
- Grabbing _all_ modeset locks torpedoes the reason why we added
fine-grained locks originally: Cursor updates shouldn't stall on
background stuff like probing outputs.
Best is to just grab the crtc lock around everything and drop all the
other locking. The only issue is that we can't switch planes between
crtcs with that, so make sure that never happens when someone uses
universal plane helpers. This shouldn't be a possible regression ever
since legacy ioctls also only grabbed the crtc lock, so switching
crtcs was never possible for the underlying plane object. And i915
(the only user of universal cursors thus far) has fixed cursor->crtc
links.
Cc: David Herrmann <dh.herrmann@gmail.com> Cc: Pallavi G<pallavi.g@intel.com> Cc: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Tested-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Mario Kleiner [Sat, 13 Sep 2014 16:25:54 +0000 (18:25 +0200)]
drm: Don't update vblank timestamp when the counter didn't change
If we already have a timestamp for the current vblank counter, don't
update it with a new timestmap. Small errors can creep in between two
timestamp queries for the same vblank count, which could be confusing to
userspace when it queries the timestamp for the same vblank sequence
number twice.
This problem gets exposed when the vblank disable timer is not used
(or is set to expire quickly) and thus we can get multiple vblank
disable<->enable transition during the same frame which would all
attempt to update the timestamp with the latest estimate.
Testcase: igt/kms_flip/flip-vs-expired-vblank Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
v2:Mario: Trivial rebase on top of current drm-next (13-Sep-2014) Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 23 Sep 2014 13:46:54 +0000 (15:46 +0200)]
drm/doc: Fixup drm_irq kerneldoc includes.
Only !P can be used together with a function list.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Daniel Vetter [Tue, 23 Sep 2014 13:46:53 +0000 (15:46 +0200)]
drm: Extract <drm/drm_gem.h>
v2: Don't forget git add, noticed by David.
Cc: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Acked-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Daniel Vetter [Tue, 23 Sep 2014 13:46:52 +0000 (15:46 +0200)]
drm: Move internal debugfs functions to drm_internal.h
In my header cleanup I've missed the debugfs functions completely.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Daniel Vetter [Tue, 23 Sep 2014 13:46:51 +0000 (15:46 +0200)]
drm: Move leftover ioctl declarations to drm_internal.h
Somehow I've missed these three, fix this up asap. Plus move
drm_master_create since while at it.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Daniel Vetter [Tue, 23 Sep 2014 13:46:50 +0000 (15:46 +0200)]
drm: Move drm_vm_open_locked into drm_internal.h
Leftover from my previous header cleanup.
This depends upon the patch to rework exynos mmap support, otherwise
it'll break exynos.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Daniel Vetter [Tue, 23 Sep 2014 13:46:49 +0000 (15:46 +0200)]
drm: move drm_mmap to <drm/drm_legacy.h>
Now that we've removed the copypasted users in gem/ttm we can
relegate the legacy buffer mapping support to where it belongs.
Also give it the proper drm_legacy_ prefix.
While at it statify drm_mmap_locked, somehow I've missed that in my
previous header rework.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Daniel Vetter [Tue, 23 Sep 2014 13:46:48 +0000 (15:46 +0200)]
drm/gem: Don't call drm_mmap from drm_gem_mmap
The only user I could dig out was i915 back when ums+gem was still a
thing. But we've just very much killed that, and even when someone
screams about that we should resurrect that with a special hack
(wrapping drm_gem_mmap) in i915, not in the core code.
So good riddance to another entry point of the legacy buffer mapping
code.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Daniel Vetter [Tue, 23 Sep 2014 13:46:47 +0000 (15:46 +0200)]
drm/<ttm-based-drivers>: Don't call drm_mmap
Really, the legacy buffer api should be dead, especially for all these
newfangled drivers. I suspect this is copypasta from the transitioning
days, which probably originated in radeon.
Cc: "Christian König" <christian.koenig@amd.com> Cc: David Herrmann <dh.herrmann@gmail.com> Cc: Rashika <rashika.kheria@gmail.com> Cc: Josh Triplett <josh@joshtriplett.org> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Fabian Frederick <fabf@skynet.be> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Alexandre Courbot <acourbot@nvidia.com> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Christian Engelmayer <cengelma@gmx.at> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Ben Skeggs <bskeggs@redhat.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
drm/ttm: Clean usage of ttm_io_prot() with TTM_PL_FLAG_CACHED
Today, most callers of ttm_io_prot() check TTM_PL_FLAG_CACHED before
calling it since on some archs it will unconditionally create non-cached
mappings.
But not all callers do which is incorrect as far as I can tell.
Instead, move that check inside ttm_io_port() itself for all archs
and make powerpc use the same implementation as ia64 and arm
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Mon, 22 Sep 2014 00:07:25 +0000 (10:07 +1000)]
Merge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next
Sorry for late. This pull request includes some enhancements
for Exynos drm, new feature supports, cleanups and fixups
like below,
- Consider low power transmission for drm mipi dsi module,
and also add non-continuous clock mode support for Exynos
mipi dsi driver.
- Add Exynos3250 SoC support.
- Enhance and clean up ipp framework and fimc driver.
- Update to use component match support and fix up
de-initialization order.
- Remove a direct mmap interface and relevant stuff specific to
Exynos drm, use drm generic mmap interface instead.
And we will remove the specific interface from userspace
library, libdrm soon.
- Use universal plane which allows to replace fake primary plane
with the real one.
- Some code cleanups and fixups.
* 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: (40 commits)
drm/exynos: switch to universal plane API
drm/exynos: use drm generic mmap interface
drm/exynos: remove DRM_EXYNOS_GEM_MAP_OFFSET ioctl
drm/exynos: factor out initial setting of each driver
drm/exynos/hdmi: unregister connector on removal
drm/exynos/dp: unregister connector on removal
drm/exynos/dpi: unregister connector and panel on removal
drm/exynos/dsi: unregister connector on removal
drm/exynos/fb: free exynos framebuffer on error
drm/exynos/fbdev: fix fbdev gem object cleanup
drm/exynos: fix drm driver de-initialization order
drm/exynos/ipp: traverse ipp drivers list safely
drm/exynos: update to use component match support
drm/exynos/ipp: add file checks for ioctls
drm/exynos/ipp: remove file argument from node related functions
drm/exynos/fimc: fix source buffer registers
drm/exynos/fimc: simplify buffer queuing
drm/exynos/fimc: do not enable fimc twice
drm/exynos/fimc: avoid clearing overflow bits
drm/exynos/ipp: remove events during command cleaning
...
Andrzej Hajda [Fri, 19 Sep 2014 12:58:53 +0000 (14:58 +0200)]
drm/exynos: switch to universal plane API
The patch replaces legacy functions
drm_plane_init() / drm_crtc_init() with
drm_universal_plane_init() and drm_crtc_init_with_planes().
It allows to replace fake primary plane with the real one.
Additionally the patch leaves cleanup of crtcs to core,
this way planes and crtcs are cleaned in correct order.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
This patch removes DRM_EXYNOS_GEM_MMAP ictrl feature specific
to Exynos drm and instead uses drm generic mmap.
We had used the interface specific to Exynos drm to do mmap directly,
not to use demand paging which maps each page with physical memory
at page fault handler. We don't need the specific mmap interface
because the drm generic mmap which uses vm offset manager stuff can
also do mmap directly.
This patch makes a userspace region to be mapped with whole physical
memory region allocated by userspace request when mmap system call is
requested.
Changelog v2:
- do not set VM_IO, VM_DONTEXPEND and VM_DONTDUMP. These flags were already
set by drm_gem_mmap
- do not include <linux/anon_inodes.h>, which isn't needed anymore.
drm/exynos: factor out initial setting of each driver
From fimd driver and vidi driver, dev->irq_enabled and
dev->vblank_disable_allowed are set and also mixer needs them even if
missed. It's duplicated so set them when loads drm driver.
Andrzej Hajda [Tue, 9 Sep 2014 13:16:07 +0000 (15:16 +0200)]
drm/exynos/fbdev: fix fbdev gem object cleanup
exynos_gem_obj is used by exynos_drm_fbdev_destroy so it cannot be destroyed
before calling the latter. exynos_gem_obj will be destroyed anyway by
exynos_drm_fbdev_destroy->...->exynos_drm_fb_destroy.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Tue, 9 Sep 2014 13:16:06 +0000 (15:16 +0200)]
drm/exynos: fix drm driver de-initialization order
Since components have their own cleanup routines calling
drm_mode_config_cleanup before component_unbind_all causes errors
due to double free of KMS objects. The patch fixes it by changing
de-initialization order. Now it is exactly opposite to init order.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Tue, 9 Sep 2014 13:16:05 +0000 (15:16 +0200)]
drm/exynos/ipp: traverse ipp drivers list safely
On ipp subsystem removal list of ipp drivers is traversed
and their members are deleted. To do it properly safe version
of list_for_each* should be used.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Thu, 28 Aug 2014 09:07:39 +0000 (11:07 +0200)]
drm/exynos/fimc: fix source buffer registers
FIMC in default mode of operation uses only one input buffer,
but the driver used also second buffer, as a result only the
first frame was processed correctly. The patch fixes it.
Andrzej Hajda [Thu, 28 Aug 2014 09:07:31 +0000 (11:07 +0200)]
drm/exynos/ipp: move nodes cleaning to separate function
The patch introduces ipp_clean_mem_nodes function which replaces
redundant code. Additionally memory node function definitions
are moved up to increase its visibility.