Re: [AMDGPU][CIK] PRIME with DRI3 + stalls rendering
Alternatively you can switch to the modesetting driver - it works well here On Wed, 16 Nov 2016 at 01:33 Mario Kleiner wrote: > On 11/15/2016 09:25 AM, Shawn Starr wrote: > > On Monday, November 14, 2016 3:40:17 PM EST Shawn Starr wrote: > >> On Monday, November 14, 2016 10:40:17 AM EST Michel Dänzer wrote: > >>> On 13/11/16 06:59 AM, Shawn Starr wrote: > I'm currently trying the new fence patches that prevent tearing in > PRIME > on > Bonaire CIK, it works with no tearing with latest patches from Mario, > but > there is significant frame stalls, even though the performance is > higher > than running the AMDGPU as dedicated. > >>> > >>> Please elaborate on what "frame stalls" means exactly. > >> > >> It looks like vsync issues, even though if I try vblank_mode=# it still > >> shows stalling. > >> > >> I'll have to make a video to show the results and post link here. > >> > >> Thanks, > >> Shawn > > > > So, It turns out to be KDE (Kwin) fault, if I start a GNOME session, and > run > > Valley, no such stalls. Even though I told KWIN to disable Vsync > completely > > and disable composite on full screen windows. Seems it doesn't work > right. > > > > Consider the PRIME patches working for me. > > > > Thanks, > > Shawn > > > > > > Glad it works for you with GNOME. > > Wrt. Kwin, KWin doesn't unredirect fullscreen windows if the display > iGPU is Intel, apparently because sometime in the past there were bugs > in the intel ddx related to switching between redirected and > unredirected mode. That might explain the problem under KDE. > > You'd need to disable the compositor manually (SHIFT + ALT + F12 to > toggle at runtime) while running a fullscreen app/game that way, or the > application needs to set some NetWM hints on its window to ask for no > composition, or some KWin rule needs to be set for the app. I tested the > patches under KDE Plasma 5 (KUbuntu 16.04 LTS) with composition disabled > this way and at least my tests worked fine then. > > -mario > ___ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
RE: [PATCH] Revert "drm/amdgpu: use the kernel zone memory size as the max remote memory in amdgpu"
> -Original Message- > From: Russell Currey [mailto:rus...@russell.cc] > Sent: Tuesday, November 15, 2016 9:48 PM > To: Alex Deucher; amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: Re: [PATCH] Revert "drm/amdgpu: use the kernel zone memory size > as the max remote memory in amdgpu" > > On Tue, 2016-11-15 at 17:05 -0500, Alex Deucher wrote: > > This reverts commit a693e050edfe794fea81d7cfe72429a406aa380b. > > > > This breaks on systems with huge amounts of system memory as we do > not have > > enough vram to store the page tables. Additionally, this is less of an > > issue > > with the recent gtt manager changes. > > Why revert it instead of limit the amount of vram it can use (as per the patch > I > sent the other day)? > > If there's no benefit to scaling the GTT size why was the change made in the > first place? It doesn't make a whole lot of sense to waste large amounts of fast vram for page tables to access slower system memory. The original patch was basically a workaround to enable some larger workloads by default t until we reworked the gtt and vram managers in the driver. Now that that is largely complete, we don't really need as large a gart anymore. Alex > > - Russell > > > > > Signed-off-by: Alex Deucher > > --- > > drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 -- > > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 12 +--- > > drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 7 +-- > > drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 7 +-- > > drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 7 +-- > > 5 files changed, 8 insertions(+), 27 deletions(-) > > > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h > > b/drivers/gpu/drm/amd/amdgpu/amdgpu.h > > index 496f72b..303989b 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h > > @@ -2434,8 +2434,6 @@ uint32_t amdgpu_ttm_tt_pte_flags(struct > amdgpu_device > > *adev, struct ttm_tt *ttm, > > void amdgpu_vram_location(struct amdgpu_device *adev, struct > amdgpu_mc *mc, > > u64 base); > > void amdgpu_gtt_location(struct amdgpu_device *adev, struct > amdgpu_mc *mc); > > void amdgpu_ttm_set_active_vram_size(struct amdgpu_device *adev, > u64 size); > > -u64 amdgpu_ttm_get_gtt_mem_size(struct amdgpu_device *adev); > > -int amdgpu_ttm_global_init(struct amdgpu_device *adev); > > int amdgpu_ttm_init(struct amdgpu_device *adev); > > void amdgpu_ttm_fini(struct amdgpu_device *adev); > > void amdgpu_program_register_sequence(struct amdgpu_device *adev, > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c > > b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c > > index dcaf691..afada2f 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c > > @@ -34,7 +34,6 @@ > > #include > > #include > > #include > > -#include > > #include > > #include > > #include > > @@ -75,7 +74,7 @@ static void amdgpu_ttm_mem_global_release(struct > > drm_global_reference *ref) > > ttm_mem_global_release(ref->object); > > } > > > > -int amdgpu_ttm_global_init(struct amdgpu_device *adev) > > +static int amdgpu_ttm_global_init(struct amdgpu_device *adev) > > { > > struct drm_global_reference *global_ref; > > struct amdgpu_ring *ring; > > @@ -1083,6 +1082,10 @@ int amdgpu_ttm_init(struct amdgpu_device > *adev) > > unsigned i, j; > > int r; > > > > + r = amdgpu_ttm_global_init(adev); > > + if (r) { > > + return r; > > + } > > /* No others user of address space so set it to 0 */ > > r = ttm_bo_device_init(&adev->mman.bdev, > > adev->mman.bo_global_ref.ref.object, > > @@ -1554,8 +1557,3 @@ static void amdgpu_ttm_debugfs_fini(struct > amdgpu_device > > *adev) > > > > #endif > > } > > - > > -u64 amdgpu_ttm_get_gtt_mem_size(struct amdgpu_device *adev) > > -{ > > - return ttm_get_kernel_zone_memory_size(adev- > > >mman.mem_global_ref.object); > > -} > > diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c > > b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c > > index b13c8aa..ca7a77b 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c > > +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c > > @@ -317,7 +317,7 @@ static int gmc_v6_0_mc_init(struct amdgpu_device > *adev) > > * size equal to the 1024 or vram, whichever is larger. > > */ > > if (amdgpu_gart_size == -1) > > - adev->mc.gtt_size = > amdgpu_ttm_get_gtt_mem_size(adev); > > + adev->mc.gtt_size = max((1024ULL << 20), adev- > > >mc.mc_vram_size); > > else > > adev->mc.gtt_size = (uint64_t)amdgpu_gart_size << 20; > > > > @@ -766,11 +766,6 @@ static int gmc_v6_0_sw_init(void *handle) > > return r; > > } > > > > - r = amdgpu_ttm_global_init(adev); > > - if (r) { > > - return r; > > - } > > - > > r = gmc_v6_0_mc_init(adev); > > if (r) > > return r; > > diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c > > b/drivers/gpu/drm/amd/a
[pull] amdgpu drm-fixes-4.9
Hi Dave, Just a few bug fixes for 4.9. The big one is Mario's prime fencing fix. The following changes since commit e2384535a623ed51151d1bbed5263b9f8a87a74d: Merge branch 'topic-arcpgu-fixes' of https://github.com/foss-for-synopsys-dwc-arc-processors/linux into drm-fixes (2016-11-11 11:55:11 +1000) are available in the git repository at: git://people.freedesktop.org/~agd5f/linux drm-fixes-4.9 for you to fetch changes up to 1da2c326e43b0834105993d13610647337bbad67: drm/amdgpu:fix vpost_needed routine (2016-11-15 14:06:07 -0500) Alex Deucher (1): drm/amdgpu/powerplay: drop a redundant NULL check Mario Kleiner (1): drm/amdgpu: Attach exclusive fence to prime exported bo's. (v5) Monk Liu (1): drm/amdgpu:fix vpost_needed routine drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 27 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c| 20 +- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 -- 5 files changed, 28 insertions(+), 24 deletions(-) ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: gnome-shell is frozen upon wakeup from DPMS (bisected)
On 15/11/16 06:41 PM, Max Staudt wrote: > On 11/15/2016 10:23 AM, Michel Dänzer wrote: >> Does it still happen with DRI2? You can either disable DRI3 completely with >> >> Option "DRI" "2" > > > Yup, still happens with this option. Feel free to file a bug report, but given that it doesn't happen with DRI3 or newer kernels, I'm afraid it's not high priority as far as I'm concerned. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[ANNOUNCE] xf86-video-ati 7.8.0
I'm pleased to announce the 7.8.0 release of xf86-video-ati, the Xorg driver for ATI/AMD Radeon GPUs supported by the radeon kernel driver. This release supports xserver versions 1.10-1.19. Highlights: * Significant 2D compositing performance increase, in particular with glamor enabled. * Option "TearFree" can now prevent tearing in all possible display configurations (with current versions of Xorg). Specifically, it's now also effective with arbitrary RandR transforms and with RandR 1.4 slave output. * DRI3 is now enabled by default if the Xorg version is >= 1.18.3 and glamor is enabled. * DRI3/Present asynchronous page flips are now supported (requires corresponding kernel driver support, available in current versions of the Linux kernel). This can increase performance of fullscreen applications with sync-to-vblank disabled. * The HW cursor can now be used with RandR 1.4 slave output or with TearFree & rotation. * Performance improvements with RandR 1.4 slave output. * The list of supported GPUs in the Xorg log file has been slightly tidied up. * RandR 1.4 provider capabilities are now advertised more accurately. Plus many other improvements and fixes. Thanks to everybody who contributed to this release in any way! Adam Jackson (1): Adapt Block/WakeupHandler signature for ABI 23 Hans de Goede (3): Remove unnecessary fb addition from drmmode_xf86crtc_resize Only add main fb if necessary PRIME: Fix swapping of provider sink / source capabilities Keith Packard (1): Adapt to video API 22 Michel Dänzer (65): Post 7.7.0 release version bump Add support for async flips to radeon_do_pageflip present: Support async flips Handle Zaphod mode correctly in radeon_mode_hotplug Enable DRI3 by default when building for Xorg >= 1.18.3 Explicitly set the fbcon pixmap pitch again Add .editorconfig file Adapt to XF86_CRTC_VERSION 7 Only use RandR APIs if RandR is enabled Add explicit RADEON_DRM_QUEUE_ERROR define Don't enable micro-tiling for scanout buffers on pre-R600 Don't enable DRI3 by default with EXA Use EventCallback to avoid flushing every time in the FlushCallback Wait for pending flips to complete before turning off an output or CRTC Keep track of damage event related flushes per-client v2 Use drmmode_crtc_scanout_* helpers for RandR 1.4 scanout pixmaps Handle RandR 1.4 slave dirty updates via radeon_drm_queue Track damage accurately for RandR 1.4 slave scanout Also call drmmode_clear_pending_flip from radeon_scanout_flip_abort Don't override crtc parameter value in drmmode_flip_handler/abort Also handle disabled CRTCs in drmmode_clear_pending_flip Fix build against xserver < 1.13 Only copy from screen pixmap to shared pixmap on demand for slave scanout Factor out transform_region helper Move up radeon_scanout_extents_intersect Synchronize scanout pixmaps for TearFree Make TearFree effective with PRIME slave scanout glamor: Fix radeon_glamor_share_pixmap_backing for priv->bo == NULL Consolidate get_drawable_pixmap helper Move DRI2's local fixup_glamor helper to radeon_glamor_set_pixmap_bo glamor: Reallocate linear pixmap BO if necessary for DRI2 PRIME Destroy all dedicated scanout buffers during CloseScreen DRI2: Add interpolated_vblanks in radeon_dri2_get_crtc_msc Use local implementation of RegionDuplicate for older xserver Only define transform_region function for XF86_CRTC_VERSION >= 4 Add support for ScreenPtr::SyncSharedPixmap Propagate failure from radeon_set_pixmap_bo glamor: Fix leak of pixmap private when replacing BO Free priv in amdgpu_set_pixmap_bo also if priv->bo == NULL Simplify drmmode_set_mode_major error handling Make sure drmmode_crtc->scanout[] are destroyed when not needed present: Don't allow flipping when using a dedicated scanout buffer dri2: Don't allow flipping when using a dedicated scanout buffer present: Separate checks for flips vs unflips Remove drmmode_load_palette Make the dedicated scanout mechanism work with arbitrary transforms Remove w/h parameters from radeon_scanout_extents_intersect Clear damage in radeon_scanout_update if it doesn't intersect the CRTC Only list each unique chipset family once in the log file Rotate and reflect cursor hotspot position for drmModeSetCursor2 Restore location of radeon_set_pixmap_bo call in drmmode_create_bo_pixmap Enable HW cursor support with PRIME slave output & Xorg > 1.18.99.901 Order unique chipsets according to first appearance in ati_pciids.csv Remove PCI IDs and bus type from ati_pciids.csv Sayōnara, AM_MAINTAINER_MODE! Don't rely on randr_crtc->scanout_pixmap in drmmode_set_scanout_pixmap Always call PixmapStopDirtyTracking in drmmode_set_
[PATCH v2] drm/amdgpu: Disable DPM in virtualization
This patch is used for virtualization support. In virtualization, only SMU manager is needed, DPM should be disabled. This is a use case for commit 2f9346b6f984 ("drm/amdgpu/powerplay: pp module only enable smu when dpm disabled.") Change in V2, according to Christian's suggestion, This patch will not mess with module parameters amdgpu_dpm, but make that a dependency for when amdgpu_dpm is evaluated. Signed-off-by: Trigger Huang --- drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 2 +- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 9 ++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c index e2f0507..fc592c2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c @@ -184,7 +184,7 @@ static int amdgpu_pp_hw_init(void *handle) ret = adev->powerplay.ip_funcs->hw_init( adev->powerplay.pp_handle); - if (amdgpu_dpm != 0) + if ((amdgpu_dpm != 0) && !amdgpu_sriov_vf(adev)) adev->pm.dpm_enabled = true; return ret; diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c index 4a4f97b..51a3607 100644 --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c @@ -911,7 +911,8 @@ static int amd_pp_instance_init(struct amd_pp_init *pp_init, amd_pp->pp_handle = handle; - if (amdgpu_dpm == 0) + if ((amdgpu_dpm == 0) + || cgs_is_virtualization_enabled(pp_init->device)) return 0; ret = hwmgr_init(pp_init, handle); @@ -940,7 +941,8 @@ static int amd_pp_instance_fini(void *handle) if (instance == NULL) return -EINVAL; - if (amdgpu_dpm != 0) { + if ((amdgpu_dpm != 0) + && !cgs_is_virtualization_enabled(instance->smu_mgr->device)) { eventmgr_fini(instance->eventmgr); hwmgr_fini(instance->hwmgr); } @@ -1004,7 +1006,8 @@ int amd_powerplay_reset(void *handle) hw_init_power_state_table(instance->hwmgr); - if (amdgpu_dpm == 0) + if ((amdgpu_dpm == 0) + || cgs_is_virtualization_enabled(instance->smu_mgr->device)) return 0; if (eventmgr == NULL || eventmgr->pp_eventmgr_init == NULL) -- 2.7.4 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[ANNOUNCE] xf86-video-amdgpu 1.2.0
I'm pleased to announce the 1.2.0 release of xf86-video-amdgpu, the Xorg driver for AMD Radeon GPUs supported by the amdgpu kernel driver. This release supports xserver versions 1.10-1.19. Highlights: * Significant 2D compositing performance increase. * Option "TearFree" can now prevent tearing in all possible display configurations (with current versions of Xorg). Specifically, it's now also effective with arbitrary RandR transforms and with RandR 1.4 slave output. * DRI3 is now enabled by default if the Xorg version is >= 1.18.3 and glamor is enabled. * DRI3/Present asynchronous page flips are now supported (requires corresponding kernel driver support, available in current versions of the Linux kernel). This can increase performance of fullscreen applications with sync-to-vblank disabled. * The HW cursor can now be used with RandR 1.4 slave output or with TearFree & rotation. * Performance improvements with RandR 1.4 slave output. * The list of supported GPUs in the Xorg log file has been tidied up. * RandR 1.4 provider capabilities are now advertised more accurately. * Support for SI family GPUs. Plus many other improvements and fixes. Thanks to everybody who contributed to this release in any way! Adam Jackson (1): Adapt Block/WakeupHandler signature for ABI 23 Alex Deucher (1): add missing bonaire pci id Flora Cui (3): add strato pci id Add more Polaris 10 PCI IDs Add more Polaris 11 PCI IDs Hans de Goede (3): Remove unnecessary fb addition from drmmode_xf86crtc_resize Only add main fb if necessary PRIME: Fix swapping of provider sink / source capabilities Keith Packard (1): Use NotifyFd for drm fd Marek Olšák (1): Fix cursor size for SI Michel Dänzer (65): Post 1.1.0 release version bump Add support for async flips to radeon_do_pageflip present: Support async flips Enable DRI3 by default when building for Xorg >= 1.18.3 Handle Zaphod mode correctly in amdgpu_mode_hotplug glamor: Fix amdgpu_glamor_share_pixmap_backing for priv->bo == NULL Remove amdgpu_share_pixmap_backing Add amdgpu_pixmap_get_tiling_info Consolidate get_drawable_pixmap helper Move DRI2's local fixup_glamor helper to amdgpu_glamor_set_pixmap_bo v2 glamor: Reallocate linear pixmap BO if necessary for DRI2 PRIME glamor: Make amdgpu_glamor_create_textured_pixmap take amdgpu_buffer* Propagate failure from amdgpu_set_pixmap_bo Use amdgpu_set_pixmap_bo in amdgpu_set_shared_pixmap_backing glamor: Fix leak of pixmap private when replacing BO Free priv in amdgpu_set_pixmap_bo also if priv->bo == NULL Adapt to XF86_CRTC_VERSION 7 Call amdgpu_glamor_create_screen_resources after ModifyPixmapHeader Simplify drmmode_set_mode_major error handling Make sure drmmode_crtc->scanout[] are destroyed when not needed present: Don't allow flipping when using a dedicated scanout buffer dri2: Don't allow flipping when using a dedicated scanout buffer present: Separate checks for flips vs unflips v2 Remove drmmode_load_palette Destroy all dedicated scanout buffers during CloseScreen Make the dedicated scanout mechanism work with arbitrary transforms v2 Remove w/h parameters from amdgpu_scanout_extents_intersect Clear damage in amdgpu_scanout_update if it doesn't intersect the CRTC Add .editorconfig file Only use RandR APIs if RandR is enabled DRI2: Add interpolated_vblanks in amdgpu_dri2_get_crtc_msc Remove unused lut_r/g/b arrays from drmmode_crtc_private_rec Add Mullins PCI IDs Add missing Kaveri PCI ID (1318) Only list each unique chipset family once in the log file Add explicit AMDGPU_DRM_QUEUE_ERROR define Use EventCallback to avoid flushing every time in the FlushCallback Keep track of damage event related flushes per-client Wait for pending flips to complete before turning off an output or CRTC Use drmmode_crtc_scanout_* helpers for RandR 1.4 scanout pixmaps Handle RandR 1.4 slave dirty updates via amdgpu_drm_queue Track damage accurately for RandR 1.4 slave scanout Only copy from screen pixmap to shared pixmap on demand for slave scanout Factor out transform_region helper Move up amdgpu_scanout_extents_intersect Synchronize scanout pixmaps for TearFree Make TearFree effective with PRIME slave scanout Use --with-xorg-conf-dir=$prefix/share/X11/xorg.conf.d by default Fix handling of configure option --with-xorg-conf-dir Untangle HAS_XORG_CONF_DIR / --with-xorg-conf-dir lines in configure.ac Add support for ScreenPtr::SyncSharedPixmap Rotate and reflect cursor hotspot position for drmModeSetCursor2 Enable HW cursor support with PRIME slave output & Xorg > 1.18.99.901 Order unique chipsets according to first appearance in ati_pciids.csv Sayōnar
Re: [PATCH v2] drm/amdgpu: Disable DPM in virtualization
Am 17.11.2016 um 06:59 schrieb Trigger Huang: This patch is used for virtualization support. In virtualization, only SMU manager is needed, DPM should be disabled. This is a use case for commit 2f9346b6f984 ("drm/amdgpu/powerplay: pp module only enable smu when dpm disabled.") Change in V2, according to Christian's suggestion, This patch will not mess with module parameters amdgpu_dpm, but make that a dependency for when amdgpu_dpm is evaluated. Signed-off-by: Trigger Huang Reviewed-by: Christian König . --- drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 2 +- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 9 ++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c index e2f0507..fc592c2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c @@ -184,7 +184,7 @@ static int amdgpu_pp_hw_init(void *handle) ret = adev->powerplay.ip_funcs->hw_init( adev->powerplay.pp_handle); - if (amdgpu_dpm != 0) + if ((amdgpu_dpm != 0) && !amdgpu_sriov_vf(adev)) adev->pm.dpm_enabled = true; return ret; diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c index 4a4f97b..51a3607 100644 --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c @@ -911,7 +911,8 @@ static int amd_pp_instance_init(struct amd_pp_init *pp_init, amd_pp->pp_handle = handle; - if (amdgpu_dpm == 0) + if ((amdgpu_dpm == 0) + || cgs_is_virtualization_enabled(pp_init->device)) return 0; ret = hwmgr_init(pp_init, handle); @@ -940,7 +941,8 @@ static int amd_pp_instance_fini(void *handle) if (instance == NULL) return -EINVAL; - if (amdgpu_dpm != 0) { + if ((amdgpu_dpm != 0) + && !cgs_is_virtualization_enabled(instance->smu_mgr->device)) { eventmgr_fini(instance->eventmgr); hwmgr_fini(instance->hwmgr); } @@ -1004,7 +1006,8 @@ int amd_powerplay_reset(void *handle) hw_init_power_state_table(instance->hwmgr); - if (amdgpu_dpm == 0) + if ((amdgpu_dpm == 0) + || cgs_is_virtualization_enabled(instance->smu_mgr->device)) return 0; if (eventmgr == NULL || eventmgr->pp_eventmgr_init == NULL) ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx