Deepak Rawat
ac3069e67f
drm/vmwgfx: Move the stdu vblank event to atomic function
...
Atomic ioctl can also send the same page flip flags as legacy ioctl.
In those cases also need to send the vblank event to userspace.
vmwgfx does not support flag DRM_MODE_PAGE_FLIP_ASYNC, so this flag is
never expected.
Signed-off-by: Deepak Rawat <drawat@vmware.com >
Reviewed-by: Sinclair Yeh <syeh@vmware.com >
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com >
2018-03-22 10:57:28 +01:00
Deepak Rawat
aa64b3f18a
drm/vmwgfx: Move screen object page flip to atomic function
...
The dmabuf_dirty/surface_dirty in case of screen object is moved to
plane atomic update, so that page flip in atomic ioctl also works.
vmwgfx does not support DRM_MODE_PAGE_FLIP_ASYNC, so this flag is never
expected.
Signed-off-by: Deepak Rawat <drawat@vmware.com >
Reviewed-by: Sinclair Yeh <syeh@vmware.com >
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com >
2018-03-22 10:57:04 +01:00
Deepak Rawat
3cbe87fcf0
drm/vmwgfx: Remove drm_crtc_arm_vblank_event from atomic flush
...
The function drm_crtc_arm_vblank_event should be used for the driver
which have vblank interrupt support. In case of vmwgfx we do not have
vblank interrupt.
Signed-off-by: Deepak Rawat <drawat@vmware.com >
Reviewed-by: Sinclair Yeh <syeh@vmware.com >
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com >
2018-03-22 10:56:32 +01:00
Deepak Rawat
4e2f9fa7ff
drm/vmwgfx: Move surface copy cmd to atomic function
...
When display surface is different than the framebuffer surface, atomic
path do not copy the surface data. This commit moved the code to copy
surface from legacy to atomic path.
Signed-off-by: Deepak Rawat <drawat@vmware.com >
Reviewed-by: Sinclair Yeh <syeh@vmware.com >
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com >
2018-03-22 10:55:56 +01:00
Deepak Rawat
91e9f352cd
drm/vmwgfx: Avoid iterating over display unit if crtc is available
...
In case of page flip there is no need to iterate over all display unit
in the function "vmw_kms_helper_dirty". If crtc is available then
dirty commands is performed on that crtc only.
Signed-off-by: Deepak Rawat <drawat@vmware.com >
Reviewed-by: Sinclair Yeh <syeh@vmware.com >
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com >
2018-03-22 10:55:28 +01:00
Greg Kroah-Hartman
3b82a4db8e
drm: udl: Properly check framebuffer mmap offsets
...
The memmap options sent to the udl framebuffer driver were not being
checked for all sets of possible crazy values. Fix this up by properly
bounding the allowed values.
Reported-by: Eyal Itkin <eyalit@checkpoint.com >
Cc: stable <stable@vger.kernel.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20180321154553.GA18454@kroah.com
2018-03-22 07:59:01 +01:00
Gerd Hoffmann
9f591ae60e
drm/i915/gvt: throw error on unhandled vfio ioctls
...
On unknown/unhandled ioctls the driver should return an error, so
userspace knows it tried to use something unsupported.
Cc: stable@vger.kernel.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
Reviewed-by: Alex Williamson <alex.williamson@redhat.com >
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com >
2018-03-22 10:20:12 +08:00
Dave Airlie
82269df3bb
Merge branch 'drm-fixes-4.16' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
...
A few more fixes for 4.16. Mostly for displays:
- A fix for DP handling on radeon
- Fix banding on eDP panels
- Fix HBR audio
- Fix for disabling VGA mode on Raven that leads to a corrupt or
blank display on some platforms
* 'drm-fixes-4.16' of git://people.freedesktop.org/~agd5f/linux:
drm/amd/display: Add one to EDID's audio channel count when passing to DC
drm/amd/display: We shouldn't set format_default on plane as atomic driver
drm/amd/display: Fix FMT truncation programming
drm/amd/display: Allow truncation to 10 bits
drm/amd/display: fix dereferencing possible ERR_PTR()
drm/amd/display: Refine disable VGA
drm/amdgpu: Use atomic function to disable crtcs with dc enabled
drm/radeon: Don't turn off DP sink when disconnected
2018-03-22 08:52:21 +10:00
Andrey Grodzovsky
b6356df3eb
drm/amdgpu: Fix NULL ptr on driver unload due to init failure.
...
Problem:
When unloading due to failure amdgpu_device_fini was called twice
which was leading to NULL ptr in amdgpu_irq_disable_all.
Fix:
Call amdgpu_device_fini only once from amdgpu_driver_unload_kms.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 15:04:42 -05:00
Christian König
2333bf9ad9
drm/amdgpu: fix "mitigate workaround for i915"
...
Mixed up exporter and importer here. E.g. while mapping the BO we need
to check the importer not the exporter.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=105633
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Tested-by: Mike Lothian <mike@fireburn.co.uk >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 15:04:03 -05:00
Rex Zhu
3296c4ae97
drm/amd/pp: Add smu irq handlers in sw_init instand of hw_init
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:59 -05:00
Rex Zhu
4d2003721c
drm/amd/pp: Refine register_thermal_interrupt function
...
v2: add Vega12 support
1. delete useless argument in function register_thermal_interrupt
2. rename function name register_thermal_interrupt to register_irq_handlers
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:58 -05:00
Rex Zhu
160b8e7593
drm/amdgpu: Remove wrapper layer of cgs irq handling
...
v2: add Vega12 support
1. remove struct cgs_os_ops
2. delete cgs_linux.h
3. refine the irq code for vega10, can fix set pp table
failed issue.
4. add common smu irq process function
Acked-by: Christian König <christian.koenig@amd.com >
Acked-by: Junwei Zhang <Jerry.Zhang@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:58 -05:00
Kenneth Feng
7436854ebd
drm/amd/powerplay: Return per DPM level clock
...
Add change to return per DPM level clock in DAL interface
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:58 -05:00
Kenneth Feng
7f3f106e44
drm/amd/powerplay: Remove the SOC floor voltage setting
...
Remove W/A carried over from VG10 to set VDDSOC Floor Voltage
prior to enabling DPM since the VBIOS covers the floor voltage
setting now
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:57 -05:00
Evan Quan
f0c2b16ba8
drm/amdgpu: no job timeout setting on compute queues
...
Under some heavy computing environment(e.g. dgemm test), it
takes the asic over 10+ seconds to finish the dispatched job
which will trigger the timeout.
It's quite confusing although it does not seem to bring any
real problems. As a quick workround, we choose to not enfoce
the timeout setting on compute queues.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Acked-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 >
2018-03-21 14:36:57 -05:00
Alex Deucher
dc53d543fc
drm/amdgpu: add vega12 pci ids (v2)
...
v2: add additional pci ids
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:57 -05:00
Evan Quan
2cac05dee6
drm/amd/powerplay: add the hw manager for vega12 (v4)
...
handles the driver power state setup
v2: squash in the following:
- handle negative temperature ranges
- add vega12 thermal ranges
- use ffs/fls
- remove ACG code
- resend NumOfDisplays message
- correct max dpm levels
- remove power containment settings
- fix warnings
- add sensors interface
- delete unused overdrive arbiter
- drop get_temperature callback
- smu table cleanup
- atomfirmware smu dpm table updates
v3: rebase
v4: rebase
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:56 -05:00
Evan Quan
fa969db4ad
drm/amd/powerplay: add the smu manager for vega12 (v4)
...
handles the driver interaction with the smu firmware
v2: squash in:
- s3 fix for firmware loading
- smu loading through the psp
- unecessary calls to is_smc_ram_running()
- smu table cleanups
v3: rebase
v4: rebase, smu bo allocation fixes, add dpm running callback
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:56 -05:00
Evan Quan
d33edb6428
drm/amd/powerplay: add new pp_psm infrastructure for vega12 (v2)
...
New psm infrastructure for vega12.
v2: rebase (Alex)
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Evan Quan <evan.quan@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:55 -05:00
Evan Quan
3503d588e7
drm/amd/powerplay: update ppatomfwctl (v2)
...
Add new get_smc_dpm_information api to fetch the smu dpm
info from the vbios.
v2: deal with updated table format.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:55 -05:00
Evan Quan
c042c9b434
drm/amd/powerplay: add vega12_pptable.h
...
Defines the power table format in the vbios.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:55 -05:00
Evan Quan
c4a4f4b6cb
drm/amd/powerplay: add vega12_ppsmc.h
...
Defines the smc message interface with the driver.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:54 -05:00
Evan Quan
97ea8ebe49
drm/amd/powerplay: add new smu9_driver_if.h for vega12 (v2)
...
Add driver firmware interface header.
v2: squash in interface updates.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:54 -05:00
Evan Quan
f3f8864db5
drm/amd/powerplay: update atomfirmware.h (v2)
...
Add new smu_info table.
v2: update table format.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:53 -05:00
Evan Quan
80be32b58e
drm/amd/powerplay: add vega12_inc.h
...
Used for the powerplay implementation.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:53 -05:00
Hawking Zhang
3084eb0011
drm/amdgpu/soc15: initialize reg base for vega12
...
Initialize the IP offsets for vega12.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:53 -05:00
Feifei Xu
f559fe2bc1
drm/amd/soc15: Add external_rev_id for vega12.
...
Add external_rev_id for vega12.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:52 -05:00
Evan Quan
e4a387558e
drm/amdgpu/soc15: update vega12 cg_flags
...
Add the appropriate clockgating flags for vega12
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Evan Quan <evan.quan@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:52 -05:00
Alex Deucher
692069a1a4
drm/amdgpu/soc15: add support for vega12
...
Add the IP blocks, clock and powergating flags, and
common clockgating support.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:36:51 -05:00
Hawking Zhang
62b35f9ad1
drm/amdgpu/gfx9: add golden setting for vega12 (v3)
...
Add gfx9_2_1 golden setting.
v2: switch to soc15_program_register_sequence for
golden setting programming
v3: squash in additional golden updates
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com >
Reviewed-by: Ken Wang <ken.wang@amd.com >
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:51 -05:00
Alex Deucher
23862464f8
drm/amdgpu/gfx9: add clockgating support for vega12
...
Same as vega10 and raven.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:36:51 -05:00
Alex Deucher
8b39947755
drm/amdgpu/gfx9: add support for vega12
...
Same as vega10 and raven.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:36:50 -05:00
Alex Deucher
e5c62eddd1
drm/amdgpu/gfx9: add gfx config for vega12
...
Just a place holder for now.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:36:50 -05:00
Alex Deucher
d5e8ef0648
drm/amdgpu/gfx9: Add placeholder for vega12 golden settings
...
Fill these in when we get them.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:36:49 -05:00
Alex Deucher
739ffd9b47
drm/amdgpu/gfx9: add support for vega12 firmware
...
Declare and fetch the appriopriate files.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:36:49 -05:00
Feifei Xu
f06a32e4d2
drm/amdgpu/sdma4: Update vega12 sdma golden setting.
...
Update vega12 sdma golden setting.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com >
Reviewed-by: Ken Wang <ken.wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:49 -05:00
Hawking Zhang
9acdc00c24
drm/amdgpu/sdma4: add sdma4_0_1 support for vega12 (v3)
...
Add sdma golden setting for vega12.
v2: switch to soc15_program_register_sequence for
golden register programming
v3: squash in unused declaration fix
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:36:48 -05:00
Alex Deucher
900bad3fe9
drm/amdgpu/sdma4: add clockgating support for vega12
...
Same as vega10 for now.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:36:48 -05:00
Alex Deucher
607c26a0ea
drm/amdgpu/sdma4: Add placeholder for vega12 golden settings
...
Fill these in when we get them.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:36:47 -05:00
Alex Deucher
2e24ada2fc
drm/amdgpu/sdma4: specify vega12 firmware
...
Declare the firmware and fetch the proper file.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:36:47 -05:00
Alex Deucher
f8d27677e1
drm/amdgpu/mmhub: add clockgating support for vega12
...
Treat it the same as vega10 for now.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:36:47 -05:00
Alex Deucher
273a14cd15
drm/amdgpu/gmc9: add vega12 support (v2)
...
Same as vega10.
v2: squash in golden regs fix from Feifei
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:36:46 -05:00
Alex Deucher
dca7b4015c
drm/amdgpu: add vega12 to dc support check
...
DC is used for modesetting on vega12.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:24:51 -05:00
Jerry (Fangzhi) Zuo
b6a8a2bc83
drm/amd/display: Add bios firmware info version for VG12
...
VG12 shows minor revision version of 2 which is not handled in
bios_parser_get_firmware_info() routine.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:24:45 -05:00
Alex Deucher
2325ff305e
drm/amd/display/dm: add vega12 support
...
Add support for vega12 to the display manager.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:24:40 -05:00
Alex Deucher
f79f3fc141
drm/amdgpu/virtual_dce: add vega12 support
...
Add virtual dce support for vega12.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:24:35 -05:00
Alex Deucher
9aa52bc487
drm/amdgpu: specify vega12 vce firmware
...
Declare firmware and add support for the file.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:24:30 -05:00
Alex Deucher
2327e6261a
drm/amdgpu: specify vega12 uvd firmware
...
Declare firmware and add support for the file.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:24:24 -05:00
Feifei Xu
6b9c6e1b15
drm/amdgpu: add vega12 ucode loading method
...
Same as vega10.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
2018-03-21 14:24:18 -05:00