Andrzej Hajda [Thu, 28 Aug 2014 09:07:35 +0000 (11:07 +0200)]
drm/exynos/ipp: remove events during command cleaning
Events were removed only during stop command, as a result
there were memory leaks if program prematurely exited.
This patch fixes it.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Thu, 28 Aug 2014 09:07:34 +0000 (11:07 +0200)]
drm/exynos/ipp: stop hardware before freeing memory
Memory shouldn't be freed when hardware is still running.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Thu, 28 Aug 2014 09:07:33 +0000 (11:07 +0200)]
drm/exynos/ipp: replace work_struct casting with better constructs
Type casting should be avoided if possible. In case of
work_struct it can be simply replaced by reference to member field.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Thu, 28 Aug 2014 09:07:32 +0000 (11:07 +0200)]
drm/exynos/ipp: clean memory nodes on command node cleaning
The nodes should be removed before removing command node.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
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.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Thu, 28 Aug 2014 09:07:30 +0000 (11:07 +0200)]
drm/exynos/ipp: free partially allocated resources on error
In case of allocation errors some already allocated buffers
were not freed. The patch fixes it.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Thu, 28 Aug 2014 09:07:29 +0000 (11:07 +0200)]
drm/exynos/ipp: remove unused field in command node
Since command node have file pointer dev field became useless.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Thu, 28 Aug 2014 09:07:28 +0000 (11:07 +0200)]
drm/exynos/ipp: remove only related commands on file close
On file close driver should remove only command nodes created
via this file.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Thu, 28 Aug 2014 09:07:27 +0000 (11:07 +0200)]
drm/exynos/ipp: move file reference from memory to command node
Command node should contain file reference to distinguish commands
created by different processes.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Thu, 28 Aug 2014 09:07:26 +0000 (11:07 +0200)]
drm/exynos/ipp: cancel works before command node clean
All pending works should be canceled prior to its removal.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Thu, 28 Aug 2014 09:07:25 +0000 (11:07 +0200)]
drm/exynos/ipp: remove fake pm callbacks
PM callbacks in ipp core do nothing, so the patch removes it.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Marek Szyprowski [Mon, 1 Sep 2014 13:27:10 +0000 (22:27 +0900)]
drm/exynos: fimd: fix window clear code
To correctly disable hardware window during driver init, both enable bits
(WINCONx_ENWIN in WINCON and SHADOWCON_CHx_ENABLE in SHADOWCON) must be
cleared, otherwise hardware fails to re-enable such window later.
While touching this function, also temporarily disable ctx->suspended flag
to let fimd_wait_for_vblank function really to do its job.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Daniel Kurtz [Mon, 1 Sep 2014 12:28:00 +0000 (21:28 +0900)]
drm/exynos/fbdev: set smem_len for fbdev
Commit [0] stopped setting fix.smem_start and fix.smem_len when creating
the fbdev.
[0]
2f1eab8d8ab59e799f7d51d62410b398607a7bc3
drm/exynos/fbdev: don't set fix.smem/mmio_{start,len}
However, smem_len is used by some userland applications to calculate the
size for mmap. In particular, it is used by xf86-video-fbdev:
http://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/fbdevhw/fbdevhw.c?id=xorg-server-1.15.99.903#n571
So, let's restore setting the smem_len to unbreak things for these users.
Note: we are still leaving smem_start set to 0.
Reported-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Reported-by: Gunther Noack <me@guenthernoack.de>
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Wed, 13 Aug 2014 11:53:47 +0000 (20:53 +0900)]
ARM: dts: add mipi dsi device node to exynos3250.dtsi
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Inki Dae [Wed, 13 Aug 2014 11:46:12 +0000 (20:46 +0900)]
ARM: dts: add mipi_phy device node to exynos3250.dtsi
This patch adds mipi_phy device node to reset, disable and enable
DSIM and CSIS PHY.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Inki Dae [Wed, 13 Aug 2014 11:37:53 +0000 (20:37 +0900)]
ARM: dts: add fimd device node to exynos3250.dsti
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Inki Dae [Mon, 18 Aug 2014 07:53:19 +0000 (16:53 +0900)]
drm/exynos: fimd: add Exynos3 SoC support
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Inki Dae [Wed, 13 Aug 2014 08:09:12 +0000 (17:09 +0900)]
drm/exynos: mipi-dsi: add Exynos3 SoC support
This patch adds Exynos3250/3472 SoCs support.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Inki Dae [Wed, 13 Aug 2014 08:03:12 +0000 (17:03 +0900)]
drm/exynos: mipi-dsi: consider non-continuous clock mode
This patch adds non-continuous clock mode support
Clock mode on Clock Lane is continuous clock by default.
So if we want to transmit data in non-continuous clock mode
to reduce power consumption, then host driver should set
DSIM_CLKLANE_STOP bit. In this case, host controller turns off
HS clock between high speed transmissions.
For this, this patch adds a new bit, DSIM_CLKLANE_STOP, and makes
the host driver sets this bit only in case that dsi->mode_flags has
MIPI_DSI_CLOCK_NON_CONTINUOUS flag.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Inki Dae [Wed, 13 Aug 2014 07:38:23 +0000 (16:38 +0900)]
drm/mipi-dsi: consider low power transmission
This patch adds a new flag, MIPI_DSI-MODE_LPM, to transmit data
in low power. With this flag, msg.flags has MIPI_DSI_MSG_USE_LPM
so that host driver of each SoC can clear or set relevant register
bit for low power transmission.
All host drivers shall support continuous clock behavior on the
Clock Lane, and optionally may support non-continuous clock behavior.
Both of them can transmit data in high speed of low power.
With each clock behavior, non-continuous or continuous clock mode,
host controller will transmit data in high speed by default so if
peripheral wants to receive data in low power, the peripheral driver
should set MIPI_DSI_MODE_LPM flag.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
YoungJun Cho [Thu, 14 Aug 2014 02:22:36 +0000 (11:22 +0900)]
drm/exynos: dsi: fix exynos_dsi_set_pll() wrong return value
The type of this function is unsigned long, and it is expected
to return proper fout value or zero if something is wrong.
So this patch fixes wrong return value for error cases.
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Dave Airlie [Wed, 17 Sep 2014 09:55:19 +0000 (19:55 +1000)]
Merge branch 'drm/next/du' of git://linuxtv.org/pinchartl/fbdev into drm-next
Commit "drm/rcar-du: Use struct videomode in platform data" touches board code
in arch/arm/mach-shmobile. There is, to the best of my knowledge, no risk of
conflict for v3.18. Simon, are you fine with getting those changes merged
through Dave's tree (and could you confirm that no conflict should occur) ?
Simon acked the merge:
Acked-by: Simon Horman <horms+renesas@verge.net.au>
* 'drm/next/du' of git://linuxtv.org/pinchartl/fbdev:
drm/rcar-du: Add OF support
drm/rcar-du: Use struct videomode in platform data
video: Add DT bindings for the R-Car Display Unit
video: Add THC63LVDM83D DT bindings documentation
video: Add ADV7123 DT bindings documentation
video: Add DT binding documentation for VGA connector
devicetree: Add vendor prefix "thine" to vendor-prefixes.txt
devicetree: Add vendor prefix "mitsubishi" to vendor-prefixes.txt
drm/shmob: Update copyright notice
drm/rcar-du: Update copyright notice
Kees Cook [Thu, 11 Sep 2014 20:53:54 +0000 (13:53 -0700)]
drm/ttm: make sure format string cannot leak in
While zone->name is currently hard coded, the call to kobject_init_and_add()
should follow the more defensive argument list usage (as already done in
other places in ttm_memory.c) where "%s" is used instead of directly passing
in a variable as a format string.
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:22 +0000 (09:51 -0300)]
drm/tilcdc: panel: Add support for enable GPIO
In order to support the "enable GPIO" available in many panel devices,
this commit adds a proper devicetree binding.
By providing an enable GPIO in the devicetree, the driver can now turn
off and on the panel device, and/or the backlight device. Both the
backlight and the GPIO are optional properties.
Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:21 +0000 (09:51 -0300)]
drm/tilcdc: panel: Set return value explicitly
Instead of setting an initial value for the return code, set it explicitly
on each error path. This is just a cosmetic cleanup, as preparation for the
enable GPIO support.
Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:20 +0000 (09:51 -0300)]
drm/tilcdc: panel: Fix backlight devicetree support
The current backlight support is broken; the driver expects a backlight-class
in the panel devicetree node. Fix this by implementing it properly, getting
an optional backlight from a phandle.
This shouldn't cause any backward-compatibility DT issue because the current
implementation doesn't work and is not even documented.
Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:19 +0000 (09:51 -0300)]
drm/tilcdc: panel: Use devm_kzalloc to simplify the error path
Using the managed variant to allocate the resource makes the code simpler
and less error-prone.
Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:18 +0000 (09:51 -0300)]
drm/tilcdc: panel: Spurious whitespace removal
Just a cosmetic cleanup.
Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:17 +0000 (09:51 -0300)]
drm/tilcdc: panel: Remove unused variable
Just a trivial cleanup to remove the variable.
Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:16 +0000 (09:51 -0300)]
drm/tilcdc: panel: Add missing of_node_put
This commit adds the missing calls to of_node_put to release the node
that's currently held by the of_get_child_by_name() call in the panel
info parsing code.
Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:15 +0000 (09:51 -0300)]
drm/tilcdc: Fix the error path in tilcdc_load()
The current error path calls tilcdc_unload() in case of an error to release
the resources. However, this is wrong because not all resources have been
allocated by the time an error occurs in tilcdc_load().
To fix it, this commit adds proper labels to bail out at the different
stages in the load function, and release only the resources actually allocated.
Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Tue, 16 Sep 2014 06:02:09 +0000 (16:02 +1000)]
Merge tag 'drm-intel-next-2014-09-05' of git://anongit.freedesktop.org/drm-intel into drm-next
- final bits (again) for the rotation support (Sonika Jindal)
- support bl_power in the intel backlight (Jani)
- vdd handling improvements from Ville
- i830M fixes from Ville
- piles of prep work all over to make skl enabling just plug in (Damien, Sonika)
- rename DP training defines to reflect latest edp standards, this touches all
drm drivers supporting DP (Sonika Jindal)
- cache edids during single detect cycle to avoid re-reading it for e.g. audio,
from Chris
- move w/a for registers which are stored in the hw context to the context init
code (Arun&Damien)
- edp panel power sequencer fixes, helps chv a lot (Ville)
- piles of other chv fixes all over
- much more paranoid pageflip handling with stall detection and better recovery
from Chris
- small things all over, as usual
* tag 'drm-intel-next-2014-09-05' of git://anongit.freedesktop.org/drm-intel: (114 commits)
drm/i915: Update DRIVER_DATE to
20140905
drm/i915: Decouple the stuck pageflip on modeset
drm/i915: Check for a stalled page flip after each vblank
drm/i915: Introduce a for_each_plane() macro
drm/i915: Rewrite ABS_DIFF() in a safer manner
drm/i915: Add comments explaining the vdd on/off functions
drm/i915: Move DP port disable to post_disable for pch platforms
drm/i915: Enable DP port earlier
drm/i915: Turn on panel power before doing aux transfers
drm/i915: Be more careful when picking the initial power sequencer pipe
drm/i915: Reset power sequencer pipe tracking when disp2d is off
drm/i915: Track which port is using which pipe's power sequencer
drm/i915: Fix edp vdd locking
drm/i915: Reset the HEAD pointer for the ring after writing START
drm/i915: Fix unsafe vma iteration in i915_drop_caches
drm/i915: init sprites with univeral plane init function
drm/i915: Check of !HAS_PCH_SPLIT() in PCH transcoder funcs
drm/i915: Use HAS_GMCH_DISPLAY un underrun reporting code
drm/i915: Use IS_BROADWELL() instead of IS_GEN8() in forcewake code
drm/i915: Don't call gen8_fbc_sw_flush() on chv
...
Dave Airlie [Tue, 16 Sep 2014 04:59:16 +0000 (14:59 +1000)]
Merge branch 'drm-next-ast-fixes' of ssh://people.freedesktop.org/~/linux into drm-next
Pull in first set of changes from Ben for ast on ppc.
I've done a quick boot test on x86 and it still seems to boot.
* 'drm-next-ast-fixes' of ssh://people.freedesktop.org/~/linux:
drm/ast: Cleanup analog init code path
drm/ast: Don't assume DVO enabled means SIL164 on uninitialized chips
drm/ast: Properly initialize P2A base before using it in ast_init_3rdtx()
drm/ast: POST chip at probe time if VGA not enabled
drm/ast: Try to use MMIO registers when PIO isn't supported
Y.C. Chen [Thu, 28 Aug 2014 09:11:04 +0000 (17:11 +0800)]
drm/ast: Add reduced blanking modes for wide screen mode
Signed-off-by: Egbert Eich <eich@suse.com>
Tested-by: Steven You2 Liang <liangyou2@lenovo.com>
Signed-off-by: Y.C. Chen <yc_chen@aspeedtech.com>
v3: based on [PATCH 1/2] drm/ast: Add missing entry to dclk_table[].
Add reduced blanking modes, improve mode matching to
identify these modes by thier sync polarities.
[airlied: argh whitespace damage]
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Tue, 16 Sep 2014 01:28:52 +0000 (11:28 +1000)]
drm: backmerge tag 'v3.17-rc5' into drm-next
This is requested to get the fixes for intel and radeon into the
same tree for future development work.
i915_display.c: fix missing dev_priv conflict.
Dave Airlie [Mon, 15 Sep 2014 20:20:53 +0000 (06:20 +1000)]
Merge branch 'linux-3.18' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next
This is the main merge request for Nouveau 3.18, overview:
- various bits of roy's gt21x clock work
- various bits of kepler memory clock work (don't get too excited, there's at least one more major bit left that's busting higher freqs)
- misc fan control improvements
- kepler hdmi infoframe fixes
- dp audio
- l2 cache + cbc improvements
* 'linux-3.18' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (68 commits)
drm/gt214-/disp: enable dp audio
drm/gt214-/kms: fix hda eld regression
drm/g94-/disp: calculate some dp audio constants
drm/gt214-/kms: perform hda codec setup on displayport too
drm/gk104-/disp: infoframe registers moved yet again on kepler
drm/nouveau/bios: parse older ramcfg/timing data like we do newer ones
drm/nva3/fb/ram: Per-partition regs
drm/nouveau/fb/ram: Support strided regs
drm/nv50/fb/ram: Store the number of partitions in the designated fields
drm/nv50/kms: Set VBLANK time in modeset script
drm/nouveau/bios: Add rammap support for version 1.0
drm/gf100-/pwr/memx: block host and fifo around reclock
drm/nouveau/pwr/memx: fix command ordering around block/unblock
drm/nouveau/pwr/memx: rename fb off/on to block/unblock
drm/nva3/clk: Pause the GPU before reclocking
drm/nouveau/gpio: rename g92 class to g94
drm/gk104-/fb/ram: move fb enable/disable to same place as nvidia
drm/gk104/fb/ram: twiddle some more bits when reclocking
drm/nouveau/bios: parse another large chunk of random memory config data
drm/gk104-/fb/ram: perform certain steps only when bios data differs
...
Ben Skeggs [Mon, 15 Sep 2014 11:29:05 +0000 (21:29 +1000)]
drm/gt214-/disp: enable dp audio
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 15 Sep 2014 11:11:51 +0000 (21:11 +1000)]
drm/gt214-/kms: fix hda eld regression
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 15 Sep 2014 05:55:56 +0000 (15:55 +1000)]
drm/g94-/disp: calculate some dp audio constants
NVIDIA appear to have tweaked the algorithm from GF110, this implements
the previous algorithm for them still.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 15 Sep 2014 05:20:47 +0000 (15:20 +1000)]
drm/gt214-/kms: perform hda codec setup on displayport too
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 15 Sep 2014 05:15:09 +0000 (15:15 +1000)]
drm/gk104-/disp: infoframe registers moved yet again on kepler
Thanks to Vincent Pelletier for pointing this out and providing a proof of
concept patch on the list.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 15 Sep 2014 02:30:08 +0000 (12:30 +1000)]
drm/nouveau/bios: parse older ramcfg/timing data like we do newer ones
Done after discussion with Roy.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Fri, 12 Sep 2014 16:00:16 +0000 (18:00 +0200)]
drm/nva3/fb/ram: Per-partition regs
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Fri, 12 Sep 2014 16:00:15 +0000 (18:00 +0200)]
drm/nouveau/fb/ram: Support strided regs
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Fri, 12 Sep 2014 16:00:14 +0000 (18:00 +0200)]
drm/nv50/fb/ram: Store the number of partitions in the designated fields
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Fri, 12 Sep 2014 16:00:13 +0000 (18:00 +0200)]
drm/nv50/kms: Set VBLANK time in modeset script
Solves blinking on reclocking memory. The value set is an underestimate, but
with non-reduced vblanking this should give us plenty of time
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Fri, 12 Sep 2014 16:00:12 +0000 (18:00 +0200)]
drm/nouveau/bios: Add rammap support for version 1.0
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 11 Sep 2014 13:32:20 +0000 (23:32 +1000)]
drm/gf100-/pwr/memx: block host and fifo around reclock
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 11 Sep 2014 13:04:22 +0000 (23:04 +1000)]
drm/nouveau/pwr/memx: fix command ordering around block/unblock
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 11 Sep 2014 12:59:13 +0000 (22:59 +1000)]
drm/nouveau/pwr/memx: rename fb off/on to block/unblock
More accurate as to the function of the opcodes. Not only is FB disabled,
but the host is prevented from touching the GPU. An upcoming patch for
Kepler will also halt PFIFO (as NVIDIA does).
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Fri, 29 Aug 2014 10:27:42 +0000 (12:27 +0200)]
drm/nva3/clk: Pause the GPU before reclocking
V2: always call post correctly even if pre fails
V3: move function prototype to nva3.h
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Emil Velikov [Mon, 8 Sep 2014 19:27:57 +0000 (20:27 +0100)]
drm/nouveau/gpio: rename g92 class to g94
nv92 hardware has only 16 interrupt lines, while nv94 and later
has 32. Accessing 0xe0c{0,4} registers on nv92 can lead to incorrect
PDISP setup. This is a regression introduced with
commit
9d0f5ec9ee0fd5dc5fc1cc2cf559286431e406e3
Author: Ben Skeggs <bskeggs@redhat.com>
Date: Mon May 12 15:22:42 2014 +1000
gpio: split g92 class from nv50
Reported-by: estece on #nouveau
Cc: stable@vger.kernel.org # 3.16+
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 8 Sep 2014 05:21:48 +0000 (15:21 +1000)]
drm/gk104-/fb/ram: move fb enable/disable to same place as nvidia
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 3 Sep 2014 06:26:20 +0000 (16:26 +1000)]
drm/gk104/fb/ram: twiddle some more bits when reclocking
*when* this is done is only a rough approximation of what the binary driver
does.. need to investigate more to see if it matters
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 3 Sep 2014 06:25:47 +0000 (16:25 +1000)]
drm/nouveau/bios: parse another large chunk of random memory config data
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 8 Sep 2014 04:41:26 +0000 (14:41 +1000)]
drm/gk104-/fb/ram: perform certain steps only when bios data differs
Awful, awful. But, on the GK106 I have, some upcoming patches show
that this is actually necessary after all.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 8 Sep 2014 03:29:04 +0000 (13:29 +1000)]
drm/gk104-/fb/ram: parse ramcfg data for all frequencies up-front
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 8 Sep 2014 03:38:02 +0000 (13:38 +1000)]
drm/gk104-/fb/ram: use parsed timing data in mr routines
All the other chipsets should be moved over to this too. It's not needed
yet for the upcoming commits, so left this step as it'll conflict badly
with Roy's GT21x reclocking work.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 8 Sep 2014 02:48:31 +0000 (12:48 +1000)]
drm/nouveau/bios: parse freq ranges and timing id into ramcfg struct
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 8 Sep 2014 00:33:32 +0000 (10:33 +1000)]
drm/nouveau/bios: memset dcb struct to zero before parsing
Fixes type/mask calculation being based on uninitialised data for VGA
outputs.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 3 Sep 2014 02:40:04 +0000 (12:40 +1000)]
drm/gk104/fb/ram: make use of training data provided by vbios
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 1 Sep 2014 05:42:45 +0000 (15:42 +1000)]
drm/nouveau/bios: add support for parsing table at BIT 'M' v2 + 0x09
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 1 Sep 2014 05:33:14 +0000 (15:33 +1000)]
drm/nouveau/bios: add support for parsing table at BIT 'M' v2 + 0x05
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 1 Sep 2014 01:15:21 +0000 (11:15 +1000)]
drm/gk104/fb/ram: fix register for second set of training data
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 1 Sep 2014 00:48:39 +0000 (10:48 +1000)]
drm/gk104/fb/ram: more random magic in fb init
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 1 Sep 2014 00:44:57 +0000 (10:44 +1000)]
drm/gk104/fb/ram: skip table entry for mode we're already in
NVIDIA binary driver appears to, not sure if it's for a good reason, but
grasping at straws for some GDDR5 reclocking issues here.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Fri, 5 Sep 2014 00:41:46 +0000 (02:41 +0200)]
drm/nouveau/fb/sddr2: Generate MR values
V2: Always disable DLL reset
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Thu, 4 Sep 2014 14:58:54 +0000 (16:58 +0200)]
drm/nouveau/fb/sddr3: Expand MR generation
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Thu, 4 Sep 2014 14:58:53 +0000 (16:58 +0200)]
drm/nva3/pwr/memx: Match blob's fb access behaviour
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Thu, 4 Sep 2014 14:58:52 +0000 (16:58 +0200)]
drm/nouveau/pwr/memx: Return debugging information
Time measured from disabling FB to re-enabling, PPWR_IN reveals status of
heads at the end of script. Helps debug various issues (like flicker).
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Thu, 4 Sep 2014 14:58:50 +0000 (16:58 +0200)]
drm/nouveau/pwr/memx: Make FB disable and enable explicit
Needs to be done after wait-for-VBLANK, and NVA3 requires register writes
in between.
Rather than hard-coding register writes, just split out fb_disable and
fb_enable.
v2. Squashed "fb/ramnve0: disable fb before reclocking"
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Thu, 4 Sep 2014 14:58:49 +0000 (16:58 +0200)]
drm/nva3/pwr/memx: Implement "wait for VBLANK"
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Martin Peres [Sun, 24 Aug 2014 21:15:11 +0000 (23:15 +0200)]
drm/nouveau/therm/nv84+: do not expose non-calibrated internal temp sensor
Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Martin Peres [Sun, 24 Aug 2014 21:15:10 +0000 (23:15 +0200)]
drm/nouveau/therm: make sure the temperature settings are sane on nv84+
One of my nv92 has a calibrated internal sensor but it displays 0°C
as the default values use sw calibration values to force the temperature
to 0.
Since we cannot read the temperature from the adt7473 present on this board,
let's re-enable the internal reading!
Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Martin Peres [Mon, 25 Aug 2014 22:26:38 +0000 (00:26 +0200)]
drm/nouveau/subdev: add a pfuse subdev v2
We will use this subdev to disable temperature reading on cards that did not
get a sensor calibration in the factory.
v2:
- rename "nouveau_fuse_rd32" to "gxXXX_fuse_rd32" as adviced by Christian Costa
- fold the code a little as adviced by Emil Velikov
Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Thu, 21 Aug 2014 11:45:17 +0000 (13:45 +0200)]
drm/nva3/clk: Set intermediate core clock on reclocking
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Thu, 21 Aug 2014 11:45:16 +0000 (13:45 +0200)]
drm/nva3/clk: For PLL clocks always make sure the PLL is not in use
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Thu, 21 Aug 2014 11:45:15 +0000 (13:45 +0200)]
drm/nva3/clk: Abort when PLL doesn't lock
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Thu, 21 Aug 2014 11:45:14 +0000 (13:45 +0200)]
drm/nva3/clk: HOST clock
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Thu, 21 Aug 2014 11:45:13 +0000 (13:45 +0200)]
drm/nva3/clk: Set PLL refclk
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Thu, 21 Aug 2014 11:45:12 +0000 (13:45 +0200)]
drm/nva3/clk: Parse clock control registers more accurately
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Pierre Moreau [Mon, 18 Aug 2014 20:32:53 +0000 (22:32 +0200)]
drm/nouveau: Fix duplicate definition of NV04_PFB_BOOT_0_*
Signed-off-by: Pierre Moreau <pierre.morrow@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Pierre Moreau [Mon, 18 Aug 2014 20:43:24 +0000 (22:43 +0200)]
drm/nouveau: Display Nouveau boot options at launch
It can help to remove any ambiguity about which options were passed to Nouveau,
especially in case the user had some options set in /etc/modprobe.d/*.conf that
he forgot about, as they won't appear in a dmesg.
Signed-off-by: Pierre Moreau <pierre.morrow@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 18 Aug 2014 02:41:57 +0000 (12:41 +1000)]
drm/nouveau/pwr: wait for scrubbers to finish before uploading new ucode
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Martin Peres [Sun, 17 Aug 2014 15:33:14 +0000 (17:33 +0200)]
drm/nouveau/pwr/fuc: make $r1-$r10 registers callee-saved in kernel.fuc
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Martin Peres [Sun, 17 Aug 2014 15:33:13 +0000 (17:33 +0200)]
drm/nouveau/pwr/fuc: add ld/st macros
Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Martin Peres [Sun, 17 Aug 2014 15:33:12 +0000 (17:33 +0200)]
drm/nouveau/pwr: add helpers for delay-to-ticks and ticks-to-delay
Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Martin Peres [Sun, 17 Aug 2014 15:33:11 +0000 (17:33 +0200)]
drm/nouveau/pwr: add some arith functions (mul32_32_64, subu64 and addu64)
Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Martin Peres [Sun, 17 Aug 2014 15:33:10 +0000 (17:33 +0200)]
drm/nouveau/pwr: fix the timers implementation with concurent processes
The problem with the current implementation is that adding a timer improperly
checked which process would time up first by not taking into account how much
time elapsed since their timer got scheduled. Rework the re-scheduling
decision t fix this.
The catch with this fix is that we are limited to scheduling timers of up to
2^31 ticks to avoid any potential overflow. Since we are unlikely to need to
wait for more than a second, this won't be a problem :)
Another possible fix would be to decrement the timeouts of all processes but
it would duplicate a lot of code and dealing with edge cases wasn't pretty
last time I checked.
Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Martin Peres [Sun, 17 Aug 2014 15:33:09 +0000 (17:33 +0200)]
drm/nouveau/ppwr: enable ppwr on gm107
For some reason, it is now required to wait a 20 µs after the 0x200 reset of
the engine.
Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Martin Peres [Sun, 17 Aug 2014 15:33:08 +0000 (17:33 +0200)]
drm/gm107/therm: add PWM fan support v2
v2: change the copyright ownership from "Nouveau Community" to myself, as per
Illia's recommendation.
Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Martin Peres [Sun, 17 Aug 2014 15:33:07 +0000 (17:33 +0200)]
drm/nouveau/therm/fan: do not use the pwm mode when the vbios tells us to use toggle
Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Martin Peres [Sun, 17 Aug 2014 15:33:06 +0000 (17:33 +0200)]
drm/nouveau/bios/fan: add support for maxwell's fan management table v2
Re-use the therm-exported fan structure with only two minor modifications:
- pwm_freq: u16 -> u32;
- add fan_type (toggle or PWM)
v2:
- Do not memset the table to 0 as it erases the pre-set default values
Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Tue, 12 Aug 2014 05:16:16 +0000 (15:16 +1000)]
drm/nouveau/ltc: allocate tagram from memory that spans all partitions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Tue, 12 Aug 2014 04:30:52 +0000 (14:30 +1000)]
drm/nouveau/core/mm: allow allocation to be confined to a specific slice of heap
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Tue, 12 Aug 2014 03:54:37 +0000 (13:54 +1000)]
drm/nouveau/core/mm: fill in holes with "allocated" nodes
The allocation algorithm doesn't expect there to be holes in the mm, which
causes its alignment/cutoff calculations to choke (and go negative) when
encountering the last chunk of a block before a hole.
The least expensive solution is to simply fill in any holes with nodes
that are pre-marked as being allocated.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Tue, 12 Aug 2014 04:48:28 +0000 (14:48 +1000)]
drm/nouveau/core/mm: dump mm when trying to tear one down that still has allocations
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Tue, 12 Aug 2014 03:40:42 +0000 (13:40 +1000)]
drm/nouveau/core/mm: modify test for if building a mm with holes in it
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Tue, 12 Aug 2014 01:16:58 +0000 (11:16 +1000)]
drm/nouveau/core/mm: make it clearer what (type == 0) means
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Tue, 12 Aug 2014 00:22:31 +0000 (10:22 +1000)]
drm/gf100/ltc: translate interrupt status into more meaningful names
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>