Hawking Zhang
2d2fbf685c
drm/amdgpu: use cached ih rb control reg offsets for navi10
...
all the ih rb control register offsets are cached
at the beginning of navi10 ih_sw_init.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-23 15:05:02 -05:00
Hawking Zhang
fc4aa19f55
drm/amdgpu: switch to ih_enable_ring for navi10
...
use navi10_ih_enable_ring to enable all the
available ring buffers for navi1x and onwards
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-23 15:04:56 -05:00
Hawking Zhang
6e7b7c7f3c
drm/amdgpu: switch to ih_toggle_interrupts for navi10
...
replace ih_enable_interrupts and ih_disable_interrupts
with ih_toggle_interrupts
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-23 15:04:50 -05:00
Hawking Zhang
a362976bf2
drm/amdgpu: switch to ih_init_register_offset for navi10
...
Initialize ih control registers offset through helper
function navi10_ih_init_register_offset.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-23 15:04:44 -05:00
Hawking Zhang
1ce6940e2a
drm/amdgpu: add helper to toggle ih ring interrupts for navi10
...
navi10_ih_toggle_ring_interrupts will be used to
enable/disable an ih ring interrupts for navi1x
and onwards
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-23 15:04:38 -05:00
Hawking Zhang
1514cb7d63
drm/amdgpu: add helper to enable an ih ring for navi10
...
navi10_ih_enable_ring will be used to enable an
ih ring for navi1x and onwards
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-23 15:04:32 -05:00
Hawking Zhang
5212d1630b
drm/amdgpu: add helper to init ih ring regs for navi10
...
navi10_ih_init_register_offset will be used to init
register offset for all the available ih rings
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-23 15:04:26 -05:00
Hawking Zhang
2601fa6464
drm/amdgpu: correct ih cg programming for vega10 ih block
...
vega10/12 and RAVEN don't support soft override
ih_buffer_mem_clk.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-23 15:04:20 -05:00
Hawking Zhang
554bdbf6de
drm/amdgpu: use cached ih rb control reg offsets for vega10
...
all the ih rb control register offsets are cached
at the beginning of ih_sw_init.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-23 15:04:14 -05:00
Hawking Zhang
21822b6a96
drm/amdgpu: switch to ih_enable_ring for vega10
...
use vega10_ih_enable_ring to enable all the
available ring buffers for vega10/12, RAVEN
series and RENOIR APUs
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-23 15:04:08 -05:00
Hawking Zhang
fd95e1b104
drm/amdgpu: switch to ih_toggle_interrupts for vega10
...
replace ih_enable_interrupts and ih_disable_interrupts
with ih_toggle_interrupts
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-23 15:04:02 -05:00
Hawking Zhang
f0594717f4
drm/amdgpu: switch to ih_init_register_offset for vega10
...
Initialize ih control registers offset through helper
function vega10_ih_init_register_offset.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-23 15:03:56 -05:00
Hawking Zhang
c73750322a
drm/amdgpu: add helper to toggle ih ring interrupts for vega10
...
vega10_ih_toggle_ring_interrupts will be used to
enable/disable an ih ring interrupts for vega10/12,
RAVEN series and RENOIR APUs
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-23 15:03:50 -05:00
Hawking Zhang
ffa02126e0
drm/amdgpu: add helper to enable an ih ring for vega10
...
vega10_ih_enable_ring will be used to enable an
ih ring for vega10/12, RAVEN series and RENOIR.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-23 15:03:45 -05:00
Hawking Zhang
1ebb4841f0
drm/amdgpu: add helper to init ih ring regs for vega10
...
vega10_ih_init_register_offset will be used to init
register offset for all the available ih rings
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-23 15:03:37 -05:00
Hawking Zhang
3c06aaffb0
drm/amdgpu: add amdgpu_ih_regs structure
...
amdgpu_ih_regs holds all the registers for
an ih ring
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Dennis Li <Dennis.Li@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-23 15:03:21 -05:00
Alex Deucher
505199a3b7
drm/amdgpu: Fix a copy-pasta comment
...
This is not a scsi driver.
Reviewed-by: Nirmoy Das <nirmoy.das@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-23 15:03:12 -05:00
Alex Deucher
05211e7fbb
drm/amdgpu: only set DP subconnector type on DP and eDP connectors
...
Fixes a crash in drm_object_property_set_value() because the property
is not set for internal DP ports that connect to a bridge chips
(e.g., DP to VGA or DP to LVDS).
Bug: https://bugzilla.kernel.org/show_bug.cgi?id=210739
Fixes: 65bf2cf95d ("drm/amdgpu: utilize subconnector property for DP through atombios")
Tested-By: Kris Karas <bugs-a17@moonlit-rail.com >
Cc: Oleg Vasilev <oleg.vasilev@intel.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org # 5.10.x
2020-12-23 15:03:08 -05:00
Hawking Zhang
462fbeb1fc
drm/amdgpu: check gfx pipe availability before toggling its interrupts
...
GUI_IDLE interrupts controlled by CP_INT_CNTL_RING0
are only applicable to me0 pipe0.
For ASICs that have gfx pipe removed, don't toggle
those bits.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-23 15:01:11 -05:00
Hawking Zhang
d0f2f634f5
drm/amdgpu: remove unnecessary asic type check
...
The number of crtc should be 0 for ASICs that don't
have display engine. Remove the unnecessary asic type
check then.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-23 15:01:05 -05:00
Hawking Zhang
35b1447525
drm/amdgpu: check number of gfx ring before init cp gfx
...
Check number of gfx ring, rather than asic type,
before cp gfx engine initialization so driver just
need to make sure number of gfx ring is initialized
correctly in gfx early_init phase. No need to add
additional asic type check everywhere when there is
new asic with gfx pipe removed.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-23 15:00:54 -05:00
Alex Deucher
088fb29b40
drm/amdgpu: fix vbios reservation handling on SR-IOV
...
There is no reserveration so set the size to 0. Fixes
a regression on SR-IOV.
Reviewed-by: Guchun Chen <guchun.chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-17 16:43:48 -05:00
Daniel Vetter
efd3043790
Merge tag 'amd-drm-fixes-5.11-2020-12-16' of git://people.freedesktop.org/~agd5f/linux into drm-next
...
amd-drm-fixes-5.11-2020-12-16:
amdgpu:
- Fix a eDP regression for DCE asics
- SMU fixes for sienna cichlid
- Misc W=1 fixes
- SDMA 5.2 reset fix
- Suspend/resume fix
- Misc display fixes
- Misc runtime PM fixes and cleanups
- Dimgrey Cavefish fixes
- printk cleanup
- Documentation warning fixes
amdkfd:
- Error logging fix
- Fix pipe offset calculation
radeon:
- printk cleanup
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
From: Alex Deucher <alexdeucher@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201216192421.18627-1-alexander.deucher@amd.com
2020-12-16 23:25:51 +01:00
Tao Zhou
05053c4b4f
drm/amdgpu: print mmhub client name for dimgrey_cavefish
...
This makes it easier to debug what block is causing the fault, same as
sienna_cichlid.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Jiansong Chen <Jiansong.Chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-16 13:27:17 -05:00
Tao Zhou
15ed44c0e7
drm/amdgpu: set mode1 reset as default for dimgrey_cavefish
...
Use mode1 reset for dimgrey_cavefish by default.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Jiansong Chen <Jiansong.Chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-16 13:27:17 -05:00
Tom Rix
0b437e64e0
drm/amdgpu: remove h from printk format specifier
...
See Documentation/core-api/printk-formats.rst.
h should no longer be used in the format specifier for printk.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Tom Rix <trix@redhat.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-15 11:35:56 -05:00
Alex Deucher
7eded018bf
drm/amdgpu: fix regression in vbios reservation handling on headless
...
We need to move the check under the non-headless case, otherwise
we always reserve the VGA save size.
Fixes: 157fe68d74 ("drm/amdgpu: fix size calculation with stolen vga memory")
Reviewed-by: Guchun Chen <guchun.chen@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-15 11:35:42 -05:00
Jiange Zhao
3aa883ac8e
drm/amdgpu/SRIOV: Extend VF reset request wait period
...
In Virtualization case, when one VF is sending too many
FLR requests, hypervisor would stop responding to this
VF's request for a long period of time. This is called
event guard. During this period of cooling time, guest
driver should wait instead of doing other things. After
this period of time, guest driver would resume reset
process and return to normal.
Currently, guest driver would wait 12 seconds and return fail
if it doesn't get response from host.
Solution: extend this waiting time in guest driver and poll
response periodically. Poll happens every 6 seconds and it will
last for 60 seconds.
v2: change the max repetition times from number to macro.
Signed-off-by: Jiange Zhao <Jiange.Zhao@amd.com >
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-15 11:35:35 -05:00
Yifan Zhang
325f4b59f6
drm/amdkfd: correct amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu log.
...
it could also be insufficient vram that makes
amdgpu_amdkfd_reserve_mem_limit fail.
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-15 11:35:29 -05:00
Alex Deucher
d00a88ab58
drm/amdgpu: print what method we are using for runtime pm
...
So we know when it's enabled and what method we are using.
Acked-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-15 11:35:23 -05:00
Alex Deucher
637bb036ce
drm/amdgpu: simplify logic in atpx resume handling
...
Simplify the logic in the runtime resume handling for
atpx
Acked-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-15 11:35:21 -05:00
Alex Deucher
ceb4de67c9
drm/amdgpu: no need to call pci_ignore_hotplug for _PR3
...
The platform knows it's doing d3cold.
Acked-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-15 11:35:19 -05:00
Alex Deucher
157e830603
drm/amdgpu: support runtime pm for GPUs that support BOCO
...
Enable runtime pm on non HG/PX BOCO capable boards.
Acked-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-15 11:35:17 -05:00
Alex Deucher
0330b84878
drm/amdgpu: update amdgpu_device_supports_boco()
...
Change it to check if the device has ACPI power resources.
Acked-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-15 11:35:15 -05:00
Alex Deucher
b10c1c5b3a
drm/amdgpu: add check for ACPI power resources
...
Check if the device has ACPI power resources so we can
enable runtime pm if so.
Acked-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-15 11:35:12 -05:00
Alex Deucher
fd496ca892
drm/amdgpu: split BOCO and ATPX handling
...
In preparation for systems that support d3cold on dGPUs
independent of PX/HG. No functional change intended.
Acked-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-15 11:35:08 -05:00
Stanley.Yang
86b6037f76
drm/amdgpu: skip load smu and sdma microcode on sriov for SIENNA_CICHLID
...
skip load smu and sdma fw on sriov due to sos,
ta and asd fw have been skipped for SIENNA_CICHLID.
V2:
move asic check into smu11
Signed-off-by: Stanley.Yang <Stanley.Yang@amd.com >
Reviewed-by: Kevin Wang <kevin1.wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-15 11:33:16 -05:00
Likun Gao
9ca5b8a170
drm/amdgpu: add judgement for suspend/resume sequence
...
S0ix only makes sense on APUs since they are part of the platform, so
only when the ASIC is APU should set amdgpu_acpi_is_s0ix_supported flag
to deal with the related situation.
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-15 11:32:46 -05:00
Xiaomeng Hou
a9c210c1e5
drm/amdgpu/sdma5.2: soft reset sdma blocks before setup and start sdma
...
Without doing the soft reset, register mmSDMA0_GFX_RB_WPTR's value could not be
reset to 0 when sdma block resumes. That would cause the ring buffer's read and
write pointers not equal and ring test fail. So add the soft reset step.
Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-15 11:31:28 -05:00
Christian König
3d1a88e105
drm/ttm: cleanup LRU handling further
...
We only completely delete the BO from the LRU on destruction.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Link: https://patchwork.freedesktop.org/patch/404618/
2020-12-15 17:01:55 +01:00
Maarten Lankhorst
ae75a0431f
Merge drm/drm-next into drm-misc-next
...
Required backmerge since we will be based on top of v5.11, and there
has been a request to backmerge already to upstream some features.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
2020-12-15 11:05:43 +01:00
Daniel Vetter
5fbd41d3bf
Merge tag 'drm-misc-next-2020-11-27-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
...
drm-misc-next for 5.11:
UAPI Changes:
Cross-subsystem Changes:
* char/agp: Disable frontend without CONFIG_DRM_LEGACY
* mm: Fix fput in mmap error path; Introduce vma_set_file() to change
vma->vm_file
Core Changes:
* dma-buf: Use sgtables in system heap; Move heap helpers to CMA-heap code;
Skip sync for unmapped buffers; Alloc higher order pages is available;
Respect num_fences when initializing shared fence list
* doc: Improvements around DRM modes and SCALING_FILTER
* Pass full state to connector atomic functions + callee updates
* Cleanups
* shmem: Map pages with caching by default; Cleanups
* ttm: Fix DMA32 for global page pool
* fbdev: Cleanups
* fb-helper: Update framebuffer after userspace writes; Unmap console buffer
during shutdown; Rework damage handling of shadow framebuffer
Driver Changes:
* amdgpu: Multi-hop fixes, Clenaups
* imx: Fix rotation for Vivante tiled formats; Support nearest-neighour
skaling; Cleanups
* mcde: Fix RGB formats; Support DPI output; Cleanups
* meson: HDMI clock fixes
* panel: Add driver and bindings for Innolux N125HCE-GN1
* panel/s6e63m0: More backlight levels; Fix init; Cleanups
* via: Clenunps
* virtio: Use fence ID for handling fences; Cleanups
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
From: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20201127083055.GA29139@linux-uq9g
2020-12-15 10:21:48 +01:00
Daniel Vetter
8c392cd5f1
drm/amdkfd: fix ttm size refactor fallout
...
I guess Christian didn't compile test amdkfd.
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Fixes: e11bfb99d6 ("drm/ttm: cleanup BO size handling v3")
Cc: Christian König <christian.koenig@amd.com >
Cc: Huang Rui <ray.huang@amd.com > (v1)
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Felix Kuehling <Felix.Kuehling@amd.com >
Cc: amd-gfx@lists.freedesktop.org
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201214191725.3899147-1-daniel.vetter@ffwll.ch
2020-12-14 20:54:50 +01:00
Christian König
e11bfb99d6
drm/ttm: cleanup BO size handling v3
...
Based on an idea from Dave, but cleaned up a bit.
We had multiple fields for essentially the same thing.
Now bo->base.size is the original size of the BO in
arbitrary units, usually bytes.
bo->mem.num_pages is the size in number of pages in the
resource domain of bo->mem.mem_type.
v2: use the GEM object size instead of the BO size
v3: fix printks in some places
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com > (v1)
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/406831/
2020-12-14 14:20:46 +01:00
Christian König
4932d37055
drm/amdgpu: limit the amdgpu_vm_update_ptes trace point
...
The text output should not be more than a page, so only print the first
32 page table entries.
If we need all of them we can still look into the binary trace.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Shashank Sharma <shashank.sharma@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-10 16:41:48 -05:00
Nirmoy Das
e18d9a2bb0
drm/amdgpu: clean up bo in vce and vcn test
...
BO created with amdgpu_bo_create_reserved() wasn't clean
properly before, which causes:
[ 21.056218] WARNING: CPU: 0 PID: 7 at drivers/gpu/drm/ttm/ttm_bo.c:518 ttm_bo_release+0x2bf/0x310 [ttm]
<snip>
[ 21.056430] Call Trace:
[ 21.056525] amdgpu_bo_unref+0x1a/0x30 [amdgpu]
[ 21.056635] amdgpu_vcn_dec_send_msg+0x1b2/0x270 [amdgpu]
[ 21.056740] amdgpu_vcn_dec_get_create_msg.constprop.0+0xd8/0x100 [amdgpu]
[ 21.056843] amdgpu_vcn_dec_ring_test_ib+0x27/0x180 [amdgpu]
[ 21.056936] amdgpu_ib_ring_tests+0xf1/0x150 [amdgpu]
[ 21.057024] amdgpu_device_delayed_init_work_handler+0x11/0x30 [amdgpu]
[ 21.057030] process_one_work+0x1df/0x370
[ 21.057033] worker_thread+0x46/0x340
[ 21.057034] ? process_one_work+0x370/0x370
[ 21.057037] kthread+0x11b/0x140
[ 21.057039] ? __kthread_bind_mask+0x60/0x60
[ 21.057043] ret_from_fork+0x22/0x30
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/406382/
Signed-off-by: Christian König <christian.koenig@amd.com >
2020-12-10 13:33:41 +01:00
Dave Airlie
b10733527b
Merge tag 'amd-drm-next-5.11-2020-12-09' of git://people.freedesktop.org/~agd5f/linux into drm-next
...
amd-drm-next-5.11-2020-12-09:
amdgpu:
- SR-IOV fixes
- Navy Flounder updates
- Sienna Cichlid updates
- Dimgrey Cavefish updates
- Vangogh updates
- Misc SMU fixes
- Misc display fixes
- Last big hunk of W=1 warning fixes
- Cursor validation fixes
- CI BACO updates
From: Alex Deucher <alexdeucher@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201210045344.21566-1-alexander.deucher@amd.com
Signed-off-by: Dave Airlie <airlied@redhat.com >
2020-12-10 16:55:53 +10:00
Andrey Grodzovsky
f8aab60422
drm/amdgpu: Initialise drm_gem_object_funcs for imported BOs
...
For BOs imported from outside of amdgpu, setting of amdgpu_gem_object_funcs
was missing in amdgpu_dma_buf_create_obj. Fix by refactoring BO creation
and amdgpu_gem_object_funcs setting into single function called
from both code paths.
Fixes: d693def4fd ("drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver")
v2: Use use amdgpu_gem_object_create() directly
v3: fix warning
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-09 23:17:03 -05:00
Alex Deucher
3001867952
drm/amdgpu: fix size calculation with stolen vga memory
...
If we need to keep the stolen vga memory, make sure it is
at least as big as the legacy vga size.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-08 23:06:37 -05:00
Alex Deucher
64f2c15892
drm/amdgpu: remove amdgpu_ttm_late_init and amdgpu_bo_late_init
...
No longer used.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2020-12-08 23:06:33 -05:00