Rob Herring
4bf99144d2
drm: Convert to using %pOF instead of full_name
...
Now that we have a custom printf format specifier, convert users of
full_name to use %pOF instead. This is preparation to remove storing
of the full path string for each node.
Signed-off-by: Rob Herring <robh@kernel.org >
Cc: Russell King <linux@armlinux.org.uk >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel.vetter@intel.com >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: Sean Paul <seanpaul@chromium.org >
Cc: Inki Dae <inki.dae@samsung.com >
Cc: Joonyoung Shim <jy0922.shim@samsung.com >
Cc: Seung-Woo Kim <sw0312.kim@samsung.com >
Cc: Kyungmin Park <kyungmin.park@samsung.com >
Cc: Kukjin Kim <kgene@kernel.org >
Cc: Krzysztof Kozlowski <krzk@kernel.org >
Cc: Javier Martinez Canillas <javier@osg.samsung.com >
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com >
Cc: Rongrong Zou <zourongrong@gmail.com >
Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com >
Cc: Chen Feng <puck.chen@hisilicon.com >
Cc: CK Hu <ck.hu@mediatek.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Matthias Brugger <matthias.bgg@gmail.com >
Cc: Neil Armstrong <narmstrong@baylibre.com >
Cc: Carlo Caione <carlo@caione.org >
Cc: Kevin Hilman <khilman@baylibre.com >
Cc: Thierry Reding <thierry.reding@gmail.com >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: Mark Yao <mark.yao@rock-chips.com >
Cc: Heiko Stuebner <heiko@sntech.de >
Cc: Maxime Ripard <maxime.ripard@free-electrons.com >
Cc: Chen-Yu Tsai <wens@csie.org >
Cc: Jyri Sarha <jsarha@ti.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-renesas-soc@vger.kernel.org
Cc: linux-rockchip@lists.infradead.org
Partially-Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de >
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com >
[seanpaul changed subject prefix and fixed conflict in stm/ltdc.c]
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2017-07-26 13:45:06 +02:00
Daniel Vetter
af05559854
Merge airlied/drm-next into drm-misc-next
...
I need this to be able to apply the deferred fbdev setup patches, I
need the relevant prep work that landed through the drm-intel tree.
Also squash in conflict fixup from Laurent Pinchart.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2017-07-26 13:43:33 +02:00
Daniel Vetter
9f15a4ab19
drm/syncobj: Fix kerneldoc
...
make htmldocs helps with catching these.
Cc: Dave Airlie <airlied@gmail.com >
Acked-by: Dave Airlie <airlied@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20170718074113.5554-1-daniel.vetter@ffwll.ch
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2017-07-26 13:22:44 +02:00
Maarten Lankhorst
c4bbb73584
drm/atomic: Allow drm_atomic_helper_swap_state to fail
...
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170711143314.2148-13-maarten.lankhorst@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2017-07-26 13:22:43 +02:00
Maarten Lankhorst
d68bc0e75a
drm/vc4: Handle drm_atomic_helper_swap_state failure
...
drm_atomic_helper_swap_state() will be changed to interruptible waiting
in the next few commits, so all drivers have to be changed to handling
failure.
VC4 has its own nonblocking modeset tracking through the vc4->async_modeset
semaphore, so it doesn't need to stall in swap_state. Pass stall = false
and BUG_ON when it returns an error. This should never happen for !stall.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Eric Anholt <eric@anholt.net >
Link: http://patchwork.freedesktop.org/patch/msgid/20170711143314.2148-11-maarten.lankhorst@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2017-07-26 13:22:43 +02:00
Maarten Lankhorst
fad9e43a33
drm/tilcdc: Handle drm_atomic_helper_swap_state failure
...
drm_atomic_helper_swap_state() will be changed to interruptible waiting
in the next few commits, so all drivers have to be changed to handling
failure.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Jyri Sarha <jsarha@ti.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170711143314.2148-10-maarten.lankhorst@linux.intel.com
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2017-07-26 13:22:42 +02:00
Maarten Lankhorst
424624ea68
drm/tegra: Handle drm_atomic_helper_swap_state failure
...
drm_atomic_helper_swap_state() will be changed to interruptible waiting
in the next few commits, so all drivers have to be changed to handling
failure.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Thierry Reding <thierry.reding@gmail.com >
Cc: Jonathan Hunter <jonathanh@nvidia.com >
Cc: linux-tegra@vger.kernel.org
Link: http://patchwork.freedesktop.org/patch/msgid/20170711143314.2148-9-maarten.lankhorst@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2017-07-26 13:22:42 +02:00
Maarten Lankhorst
771f14c5cc
drm/msm: Handle drm_atomic_helper_swap_state failure
...
drm_atomic_helper_swap_state() will be changed to interruptible waiting
in the next few commits, so all drivers have to be changed to handling
failure.
MSM has its own busy tracking, which means the swap_state call can be
done with stall = false, in which case it should never return an error.
Handle failure with BUG_ON for this reason.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Rob Clark <robdclark@gmail.com >
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Link: http://patchwork.freedesktop.org/patch/msgid/20170711143314.2148-8-maarten.lankhorst@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Tested-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2017-07-26 13:22:42 +02:00
Maarten Lankhorst
76cc07189d
drm/mediatek: Handle drm_atomic_helper_swap_state failure
...
drm_atomic_helper_swap_state() will be changed to interruptible waiting
in the next few commits, so all drivers have to be changed to handling
failure.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: CK Hu <ck.hu@mediatek.com >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
Link: http://patchwork.freedesktop.org/patch/msgid/20170711143314.2148-7-maarten.lankhorst@linux.intel.com
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2017-07-26 13:22:42 +02:00
Maarten Lankhorst
0806f4ee06
drm/i915: Handle drm_atomic_helper_swap_state failure
...
drm_atomic_helper_swap_state() will be changed to interruptible waiting
in the next few commits, so all drivers have to be changed to handling
failure.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170711143314.2148-6-maarten.lankhorst@linux.intel.com
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2017-07-26 13:22:41 +02:00
Maarten Lankhorst
f4d41d930e
drm/atmel-hlcdc: Handle drm_atomic_helper_swap_state failure
...
drm_atomic_helper_swap_state() will be changed to interruptible waiting
in the next few commits, so all drivers have to be changed to handling
failure.
Atmel tracks pending commits through dc->commit.pending, so it can
ignore the changes by setting stall = false. We never return failure in
this case, so make failure a BUG_ON.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Boris Brezillon <boris.brezillon@free-electrons.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170711143314.2148-5-maarten.lankhorst@linux.intel.com
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2017-07-26 13:22:41 +02:00
Maarten Lankhorst
8572636e45
drm/nouveau: Handle drm_atomic_helper_swap_state failure
...
drm_atomic_helper_swap_state() will be changed to interruptible waiting
in the next few commits, so all drivers have to be changed to handling
failure.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Ben Skeggs <bskeggs@redhat.com >
Cc: nouveau@lists.freedesktop.org
Link: http://patchwork.freedesktop.org/patch/msgid/20170711143314.2148-4-maarten.lankhorst@linux.intel.com
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2017-07-26 13:22:41 +02:00
Maarten Lankhorst
c066d2310a
drm/atomic: Change drm_atomic_helper_swap_state to return an error.
...
We want to change swap_state to wait indefinitely, but to do this
swap_state should wait interruptibly. This requires propagating
the error to each driver.
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Cc: intel-gfx@lists.freedesktop.org
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170711143314.2148-3-maarten.lankhorst@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
[mlankhorst: Fix typos in swap_state documentation (seanpaul)]
Reviewed-by: Sean Paul <seanpaul@chromium.org >]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2017-07-26 13:22:40 +02:00
Maarten Lankhorst
813a7e1604
drm/nouveau: Fix error handling in nv50_disp_atomic_commit
...
Make it more clear that post commit return ret is really return 0,
and add a missing drm_atomic_helper_cleanup_planes when
drm_atomic_helper_wait_for_fences fails.
Fixes: 839ca903f1
("drm/nouveau/kms/nv50: transition to atomic interfaces internally")
Cc: Ben Skeggs <bskeggs@redhat.com >
Cc: dri-devel@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Cc: <stable@vger.kernel.org > # v4.10+
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170711143314.2148-2-maarten.lankhorst@linux.intel.com
Reviewed-by: Sean Paul <seanpaul@chromium.org >
[mlankhorst: Use if (ret) to remove the goto in success case.]
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2017-07-26 13:22:40 +02:00
Daniel Vetter
e1923ab3d0
drm/<drivers>: Drop fbdev info flags
...
- FBINFO_CAN_FORCE_OUTPUT has been a lie ever since we nerfed&removed
the entire panic handling code in our fbdev emulation. We might
restore kms panic output, but not through the bazillion of legacy
code layers called fbdev/fbcon, there's just no way to make that
work safely.
- With the module check change FBINFO_DEFAULT is always 0, so can be
removed too.
That removes another change to cargo-cult stuff in kms drivers, yay!
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170706125735.28299-5-daniel.vetter@ffwll.ch
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2017-07-26 13:22:40 +02:00
Daniel Vetter
060f33b717
drm/qxl: Drop fbdev hwaccel flags
...
It's not accelarated, just system memory. Note we don't even need to
set the default flag since that's now always 0.
Note that originally qxl had acceleration support, but that was all
ripped out in
commit c0fe07aa50
Author: Gerd Hoffmann <kraxel@redhat.com >
Date: Tue May 5 13:52:49 2015 +0200
drm/qxl: rewrite framebuffer support
v2: Amend commit message a bit after irc chat with Dave.
Cc: Dave Airlie <airlied@redhat.com >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Cc: virtualization@lists.linux-foundation.org
Acked-by: Dave Airlie <airlied@redhat.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170706125735.28299-4-daniel.vetter@ffwll.ch
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2017-07-26 13:22:39 +02:00
Daniel Vetter
47f3980067
drm: Update docs around gem_free_object
...
Not all places correctly stated that gem_free_object_unlocked is the
one to use.
Reported-by: Eric Anholt <eric@anholt.net
Cc: Eric Anholt <eric@anholt.net
Reviewed-by: Eric Anholt <eric@anholt.net >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20170718063337.31942-1-daniel.vetter@ffwll.ch
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2017-07-26 13:22:39 +02:00
Eric Huang
41ebafc0b8
drm/amd/powerplay: fix AVFS voltage offset for Vega10
...
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:38:31 -04:00
Nicolai Hähnle
4d48708c5e
drm/amdgpu/gfx9: simplify and fix GRBM index selection
...
Copy the approach taken by gfx8, which simplifies the code, and set the
instance index properly. The latter is required for debugging, e.g. for
reading wave status by UMR.
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:38:15 -04:00
Xiangliang Yu
f31c94d1de
drm/amdgpu: reduce the time of reading VBIOS
...
VRAM is usually marked write combined, so change ioremap mode from
noncache to write combine for reading vbios from VRAM.
This will reduce cost time of reading vbios from 188ms to 8ms.
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:37:39 -04:00
Emily Deng
89a6c2ed65
drm/amdgpu/virtual_dce: Remove the rmmod error message
...
Remove the error message "[drm:amdgpu_irq_disable_all
[amdgpu]] *ERROR* error disabling interrupt (-22)".
For virtual dce, it only use AMDGPU_CRTC_IRQ_VBLANK1 -
AMDGPU_CRTC_IRQ_VBLANK6, and don't use AMDGPU_CRTC_IRQ_VLINE1
- AMDGPU_CRTC_IRQ_VLINE6. And when rmmod amdgpu, it will disable
all interrupts, it will return error when the type of crtc irq
interrupt is AMDGPU_CRTC_IRQ_VLINE1 - AMDGPU_CRTC_IRQ_VLINE6.
BUG: SWDEV-121607
Signed-off-by: Emily Deng <Emily.Deng@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:37:28 -04:00
Alex Deucher
edca2d0529
drm/amdgpu/gmc9: disable legacy vga features in gmc init
...
Needs to be done when the MC is set up.
Acked-by: Christian König <christian.koenig@amd.com >
Acked-by: Harry Wentland <harry.wentland@amd.com >
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com >
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:37:25 -04:00
Alex Deucher
2e2bfd90fa
drm/amdgpu/gmc8: disable legacy vga features in gmc init
...
Needs to be done when the MC is set up.
Acked-by: Christian König <christian.koenig@amd.com >
Acked-by: Harry Wentland <harry.wentland@amd.com >
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com >
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:37:20 -04:00
Alex Deucher
96d78e3734
drm/amdgpu/gmc7: disable legacy vga features in gmc init
...
Needs to be done when the MC is set up.
Acked-by: Christian König <christian.koenig@amd.com >
Acked-by: Harry Wentland <harry.wentland@amd.com >
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com >
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:37:16 -04:00
Alex Deucher
03ba88cfdc
drm/amdgpu/gmc6: disable legacy vga features in gmc init (v2)
...
Needs to be done when the MC is set up.
v2: make consistent with other asics
Acked-by: Christian König <christian.koenig@amd.com >
Acked-by: Harry Wentland <harry.wentland@amd.com >
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com >
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:37:12 -04:00
Egbert Eich
7b8bd6bb42
drm/radeon: Set depth on low mem to 16 bpp instead of 8 bpp
...
The radeon driver reduces the framebuffer resolution to 8bpp if a
device with less than 32MB VRAM is found. This causes the framebuffer
to run in 8 bit paletted mode. For a text console this is not an
issue as 256 different colors is more than one gets on a VGA text
console. However this leads to a poor 8bit pseudo-color visual when
running X on fbdev, too, which is quite ugly.
In this patch, we try to give some moderate compromise: limit the
framebuffer bpp to 8 only when VRAM is 8MB or less, and use 16 bpp
otherwise for 32MB or less VRAM.
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Egbert Eich <eich@suse.de >
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:37:06 -04:00
Huang Rui
c5c3579082
drm/amdgpu: fix the incorrect scratch reg number on gfx v6
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:37:00 -04:00
Huang Rui
ae4d71e59f
drm/amdgpu: fix the incorrect scratch reg number on gfx v7
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:36:53 -04:00
Huang Rui
6a41f981cd
drm/amdgpu: fix the incorrect scratch reg number on gfx v8
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:36:47 -04:00
Huang Rui
6a05148f48
drm/amdgpu: fix the incorrect scratch reg number on gfx v9
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:36:39 -04:00
Rex Zhu
e2b2175e35
drm/amd/powerplay: add support for 3DP 4K@120Hz on vega10.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:36:25 -04:00
Alex Deucher
cf2f0a3720
drm/amdgpu: enable huge page handling in the VM v5
...
The hardware can use huge pages to map 2MB of address space with only one PDE.
v2: few cleanups and rebased
v3: skip PT updates if we are using the PDE
v4: rebased, added support for CPU based updates
v5: fix CPU based updates once more
v6: fix ndw estimation
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-and-tested-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:35:38 -04:00
Christian König
6be7adb37d
drm/amdgpu: increase fragmentation size for Vega10 v2
...
The fragment bits work differently for Vega10 compared to previous generations.
Increase the fragment size to 2MB for now to better handle that.
v2: handle the hardware setup as well
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-and-tested-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:30:16 -04:00
Chunming Zhou
07306b4f5f
drm/amdgpu: ttm_bind only when user needs gpu_addr in bo pin
...
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:30:03 -04:00
Xiangliang Yu
2014bc3feb
drm/amdgpu: correct clock info for SRIOV
...
Currently, get clock info from default clk of pm if dpm is disable.
Buf SRIOV doesn't support dpm and pm, can't get anything from pm.
Only get clock info only from default clk of amdgpu for SRIOV.
And driver get pm default clk also from amdgpu default clk and never
be changed by others. So use amdgpu default clk value for SRIOV
and non-dpm cases.
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:29:52 -04:00
Emily Deng
e72b991281
drm/amdgpu/gmc8: SRIOV need to program fb location
...
SRIOV won't do vbios post in guest OS, and the mmMC_VM_FB_LOCATION
is pf and vf copy, so still need to program fb location for SRIOV.
v2: No need to stop mc, and update gmc_v8_0_vram_gtt_location as well.
v3: New line after the stack variables
BUG: SWDEV-126629
Signed-off-by: Emily Deng <Emily.Deng@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:29:43 -04:00
Junwei Zhang
16a53a02fa
drm/amdgpu: disable firmware loading for psp v10
...
Now asd firmware is not ready for psp v10, will enable it when it's available
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:29:33 -04:00
Monk Liu
0915fdbc69
drm/amdgpu:fix gfx fence allocate size
...
1, for sriov, we need 8dw for the gfx fence due to CP
behaviour
2, cleanup wrong logic in wptr/rptr wb alloc and free
Change-Id: Ifbfed17a4621dae57244942ffac7de1743de0294
Signed-off-by: Monk Liu <Monk.Liu@amd.com >
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:29:26 -04:00
Felix Kuehling
e342610c9a
drm/amdgpu: Implement ttm_bo_driver.access_memory callback v2
...
Allows gdb to access contents of user mode mapped VRAM BOs.
v2: return error for non-VRAM pools
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:29:18 -04:00
Felix Kuehling
09ac4fcb3f
drm/ttm: Implement vm_operations_struct.access v2
...
Allows gdb to access contents of user mode mapped BOs. System memory
is handled by TTM using kmap. Other memory pools require a new driver
callback in ttm_bo_driver.
v2:
* kmap only one page at a time
* swap in BO if needed
* make driver callback more generic to handle private memory pools
* document callback return value
* WARN_ON -> WARN_ON_ONCE
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:29:02 -04:00
Eric Huang
16d6e96227
drm/amd/powerplay: fix AVFS voltage offset for Vega10
...
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:28:23 -04:00
Zhang, Jerry
2890decfd9
drm/amdgpu: read reg in each iterator of psp_wait_for loop
...
v2: fix the SOS loading failure for PSP v3.1
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com >
Cc: stable@vger.kernel.org
Acked-by: Alex Deucher <alexander.deucher@amd.com > (v1)
Acked-by: Huang Rui <ray.huang@amd.com > (v1)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:28:02 -04:00
Nicolai Hähnle
be448a4dd4
drm/amdgpu/gfx9: simplify and fix GRBM index selection
...
Copy the approach taken by gfx8, which simplifies the code, and set the
instance index properly. The latter is required for debugging, e.g. for
reading wave status by UMR.
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:26:22 -04:00
Junwei Zhang
a4f478bc88
drm/amdgpu: add ring_destroy for psp v10
...
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:26:14 -04:00
Junwei Zhang
ccce055210
drm/amdgpu: add ring_create function for psp v10
...
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:26:05 -04:00
Junwei Zhang
6ab7711374
drm/amdgpu: add init microcode function for psp v10
...
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:25:57 -04:00
Junwei Zhang
f04f56919c
drm/amdgpu: remove unncessary code in psp v10 ring init func
...
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:25:47 -04:00
Alex Xie
564f04586d
drm/amdgpu: Fix blocking in RCU critical section(v2)
...
In RCU read-side critical sections, blocking or sleeping is prohibited.
v2: Unlock RCU for the code path where result==NULL. (David Zhou)
Update subject
Tested-by and reported by: Dave Airlie <airlied@redhat.com >
[ 141.965723] =============================
[ 141.965724] WARNING: suspicious RCU usage
[ 141.965726] 4.12.0-rc7 #221 Not tainted
[ 141.965727] -----------------------------
[ 141.965728] /home/airlied/devel/kernel/linux-2.6/include/linux/rcupdate.h:531
Illegal context switch in RCU read-side critical section!
[ 141.965730]
other info that might help us debug this:
[ 141.965731]
rcu_scheduler_active = 2, debug_locks = 0
[ 141.965732] 1 lock held by amdgpu_cs:0/1332:
[ 141.965733] #0 : (rcu_read_lock){......}, at: [<ffffffffa01a0d07>]
amdgpu_bo_list_get+0x0/0x109 [amdgpu]
[ 141.965774]
stack backtrace:
[ 141.965776] CPU: 6 PID: 1332 Comm: amdgpu_cs:0 Not tainted 4.12.0-rc7 #221
[ 141.965777] Hardware name: To be filled by O.E.M. To be filled by
O.E.M./M5A97 R2.0, BIOS 2603 06/26/2015
[ 141.965778] Call Trace:
[ 141.965782] dump_stack+0x68/0x92
[ 141.965785] lockdep_rcu_suspicious+0xf7/0x100
[ 141.965788] ___might_sleep+0x56/0x1fc
[ 141.965790] __might_sleep+0x68/0x6f
[ 141.965793] __mutex_lock+0x4e/0x7b5
[ 141.965817] ? amdgpu_bo_list_get+0xa4/0x109 [amdgpu]
[ 141.965820] ? lock_acquire+0x125/0x1b9
[ 141.965844] ? amdgpu_bo_list_set+0x464/0x464 [amdgpu]
[ 141.965846] mutex_lock_nested+0x16/0x18
[ 141.965848] ? mutex_lock_nested+0x16/0x18
[ 141.965872] amdgpu_bo_list_get+0xa4/0x109 [amdgpu]
[ 141.965895] amdgpu_cs_ioctl+0x4a0/0x17dd [amdgpu]
[ 141.965898] ? radix_tree_node_alloc.constprop.11+0x77/0xab
[ 141.965916] drm_ioctl+0x264/0x393 [drm]
[ 141.965939] ? amdgpu_cs_find_mapping+0x83/0x83 [amdgpu]
[ 141.965942] ? trace_hardirqs_on_caller+0x16a/0x186
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:25:17 -04:00
Alex Xie
b7ae412c6f
drm/amdgpu: Fix blocking in RCU critical section(v2)
...
In RCU read-side critical sections, blocking or sleeping is prohibited.
v2: Unlock RCU for the code path where result==NULL. (David Zhou)
Update subject
Tested-by and reported by: Dave Airlie <airlied@redhat.com >
[ 141.965723] =============================
[ 141.965724] WARNING: suspicious RCU usage
[ 141.965726] 4.12.0-rc7 #221 Not tainted
[ 141.965727] -----------------------------
[ 141.965728] /home/airlied/devel/kernel/linux-2.6/include/linux/rcupdate.h:531
Illegal context switch in RCU read-side critical section!
[ 141.965730]
other info that might help us debug this:
[ 141.965731]
rcu_scheduler_active = 2, debug_locks = 0
[ 141.965732] 1 lock held by amdgpu_cs:0/1332:
[ 141.965733] #0 : (rcu_read_lock){......}, at: [<ffffffffa01a0d07>]
amdgpu_bo_list_get+0x0/0x109 [amdgpu]
[ 141.965774]
stack backtrace:
[ 141.965776] CPU: 6 PID: 1332 Comm: amdgpu_cs:0 Not tainted 4.12.0-rc7 #221
[ 141.965777] Hardware name: To be filled by O.E.M. To be filled by
O.E.M./M5A97 R2.0, BIOS 2603 06/26/2015
[ 141.965778] Call Trace:
[ 141.965782] dump_stack+0x68/0x92
[ 141.965785] lockdep_rcu_suspicious+0xf7/0x100
[ 141.965788] ___might_sleep+0x56/0x1fc
[ 141.965790] __might_sleep+0x68/0x6f
[ 141.965793] __mutex_lock+0x4e/0x7b5
[ 141.965817] ? amdgpu_bo_list_get+0xa4/0x109 [amdgpu]
[ 141.965820] ? lock_acquire+0x125/0x1b9
[ 141.965844] ? amdgpu_bo_list_set+0x464/0x464 [amdgpu]
[ 141.965846] mutex_lock_nested+0x16/0x18
[ 141.965848] ? mutex_lock_nested+0x16/0x18
[ 141.965872] amdgpu_bo_list_get+0xa4/0x109 [amdgpu]
[ 141.965895] amdgpu_cs_ioctl+0x4a0/0x17dd [amdgpu]
[ 141.965898] ? radix_tree_node_alloc.constprop.11+0x77/0xab
[ 141.965916] drm_ioctl+0x264/0x393 [drm]
[ 141.965939] ? amdgpu_cs_find_mapping+0x83/0x83 [amdgpu]
[ 141.965942] ? trace_hardirqs_on_caller+0x16a/0x186
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-07-25 16:15:46 -04:00
Dave Airlie
cfd1081108
Merge branch 'linux-4.13' of git://github.com/skeggsb/linux into drm-fixes
...
two more fixes for issues nouveau found in fedora 26.
* 'linux-4.13' of git://github.com/skeggsb/linux:
drm/nouveau/bar/gf100: fix access to upper half of BAR2
drm/nouveau/disp/nv50-: bump max chans to 21
2017-07-25 15:41:39 +10:00