- Mar 17, 2021
-
-
Alex Deucher authored
ACPI_LPS0_ENTRY_AMD/ACPI_LPS0_EXIT_AMD are supposedly not required for AMD platforms, and on some platforms they are not even listed in the function mask but at least some HP laptops seem to require it to properly support s0ix. Based on a patch from Marcin Bachry <hegel666@gmail.com>. Bug: drm/amd#1230 Signed-off-by:
Alex Deucher <alexander.deucher@amd.com> Cc: Marcin Bachry <hegel666@gmail.com>
-
Alex Deucher authored
These are supposedly not required for AMD platforms, but at least some HP laptops seem to require it to properly turn off the keyboard backlight. Based on a patch from Marcin Bachry <hegel666@gmail.com>. Bug: drm/amd#1230 Reviewed-by:
Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com> Cc: Marcin Bachry <hegel666@gmail.com>
-
Marcin Bachry authored
Renoir needs a similar delay. Signed-off-by:
Marcin Bachry <hegel666@gmail.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
prike Liang authored
The XHCI Renoir USB 3.1 resume failed caused by CNR bit not cleared during s2idle resume. This issue can be workaround by disable the D3cold support on Renoir USB 3.1. Signed-off-by:
Prike Liang <Prike.Liang@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Shyam Sundar S K authored
It appears like the regular IRQ based suspend resume is broken for NVMe drives atleast the samsung ones causing the system not to respond after s2idle resume. Mostly it ends up timing out on the controller reset which never succeeeds. As a workaround, use a SIMPLE susped/resume pattern for the devices whose pm capabilities are broken. [ 154.173886] nvme nvme0: I/O 832 QID 1 timeout, aborting [ 154.173889] nvme nvme0: I/O 20 QID 0 timeout, reset controller [ 154.173903] nvme nvme0: I/O 833 QID 1 timeout, aborting [ 154.173909] nvme nvme0: I/O 834 QID 1 timeout, aborting [ 154.173919] nvme nvme0: I/O 835 QID 1 timeout, aborting [ 154.173924] nvme nvme0: I/O 836 QID 1 timeout, aborting [ 154.173928] nvme nvme0: I/O 837 QID 1 timeout, aborting [ 154.173933] nvme nvme0: I/O 838 QID 1 timeout, aborting [ 154.173937] nvme nvme0: I/O 839 QID 1 timeout, aborting ... [ 154.174844] nvme nvme0: Abort status: 0x371 [ 154.174878] PM: dpm_run_callback(): pci_pm_resume+0x0/0x90 returns -16 [ 154.175239] PM: Device 0000:03:00.0 failed to resume async: error -16 Signed-off-by:
Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
prike Liang authored
Generally the C-state latency get by _CST method but some OEM platform set the C2 latency no less than C3's and that will block the core enter PC6. This issue can be workaround by override and update C-state latency. Signed-off-by:
Prike.Liang <Prike.Liang@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Alex Deucher authored
GFX is in gfxoff mode during s0ix so we shouldn't need to actually tear anything down and restore it. Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
- Mar 16, 2021
-
-
Alex Deucher authored
We handle it properly within the CG/PG functions directly now. Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Alex Deucher authored
Not needed as the device is in gfxoff state so the CG/PG state is handled just like it would be for gfxoff during runtime gfxoff. This should also prevent delays on resume. Signed-off-by:
Alex Deucher <alexander.deucher@amd.com> Cc: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>
-
Alex Deucher authored
Provide and explanation as to why we skip GFX and PSP for S0ix. GFX goes into gfxoff, same as runtime, so no need to tear down and re-init. PSP is part of the always on state, so no need to touch it. Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Alex Deucher authored
The SMU expects CGPG to be enabled when entering S0ix. with this we can re-enable SMU suspend. Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Alex Deucher authored
This really needs to be done to properly tear down the device. SMC, PSP, and GFX are still problematic, need to dig deeper into what aspect of them that is problematic. Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Alex Deucher authored
No functional change. v2: use correct dev v3: rework Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Alex Deucher authored
Move the non-DC specific code into the DCE IP blocks similar to how we handle DC. This cleans up the common suspend and resume pathes. Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Alex Deucher authored
Vram is system memory, so no need to evict. v2: use PM_EVENT messages v3: use correct dev v4: use driver flags Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Alex Deucher authored
Set flags at the top level pmops callbacks to track state. This cleans up the current set of flags and properly handles S4 on S0ix capable systems. Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Alex Deucher authored
We set the same variable a few lines above. Drop the duplicate setting. Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
- Mar 10, 2021
-
-
Alex Deucher authored
Need to check the module variant as well. Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
- Mar 03, 2021
-
-
Lee Jones authored
Fixes the following W=1 kernel build warning(s): In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dce112/dce112_resource.c:59: drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_11_2_sh_mask.h:10014:58: warning: initialized field overwritten [-Woverride-init] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:214:16: note: in expansion of macro ‘AUX_SW_DATA__AUX_SW_AUTOINCREMENT_DISABLE__SHIFT’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:127:2: note: in expansion of macro ‘AUX_SF’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce112/dce112_resource.c:177:2: note: in expansion of macro ‘DCE_AUX_MASK_SH_LIST’ drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_11_2_sh_mask.h:10014:58: note: (near initialization for ‘aux_shift.AUX_SW_AUTOINCREMENT_DISABLE’) drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:214:16: note: in expansion of macro ‘AUX_SW_DATA__AUX_SW_AUTOINCREMENT_DISABLE__SHIFT’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:127:2: note: in expansion of macro ‘AUX_SF’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce112/dce112_resource.c:177:2: note: in expansion of macro ‘DCE_AUX_MASK_SH_LIST’ drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_11_2_sh_mask.h:10013:56: warning: initialized field overwritten [-Woverride-init] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:214:16: note: in expansion of macro ‘AUX_SW_DATA__AUX_SW_AUTOINCREMENT_DISABLE_MASK’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:127:2: note: in expansion of macro ‘AUX_SF’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce112/dce112_resource.c:181:2: note: in expansion of macro ‘DCE_AUX_MASK_SH_LIST’ drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_11_2_sh_mask.h:10013:56: note: (near initialization for ‘aux_mask.AUX_SW_AUTOINCREMENT_DISABLE’) drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:214:16: note: in expansion of macro ‘AUX_SW_DATA__AUX_SW_AUTOINCREMENT_DISABLE_MASK’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:127:2: note: in expansion of macro ‘AUX_SF’ Cc: Harry Wentland <harry.wentland@amd.com> Cc: Leo Li <sunpeng.li@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by:
Lee Jones <lee.jones@linaro.org> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Dan Carpenter authored
The hdcp_i2c_offsets[] array did not have an entry for HDCP_MESSAGE_ID_WRITE_CONTENT_STREAM_TYPE so it led to an off by one read overflow. I added an entry and copied the 0x0 value for the offset from similar code in drivers/gpu/drm/amd/display/modules/hdcp/hdcp_ddc.c. I also declared several of these arrays as having HDCP_MESSAGE_ID_MAX entries. This doesn't change the code, but it's just a belt and suspenders approach to try future proof the code. Fixes: 4c283fda ("drm/amd/display: Add HDCP module") Reviewed-by:
Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Colin Ian King authored
Currently the ioctl command RADEON_INFO_SI_BACKEND_ENABLED_MASK can copy back uninitialised data in value_tmp that pointer *value points to. This can occur when rdev->family is less than CHIP_BONAIRE and less than CHIP_TAHITI. Fix this by adding in a missing -EINVAL so that no invalid value is copied back to userspace. Addresses-Coverity: ("Uninitialized scalar variable) Cc: stable@vger.kernel.org # 3.13+ Fixes: 439a1cff ("drm/radeon: expose render backend mask to the userspace") Reviewed-by:
Christian König <christian.koenig@amd.com> Signed-off-by:
Colin Ian King <colin.king@canonical.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Chen Li authored
This may avoid debug confusion. Reviewed-by:
Christian König <christian.koenig@amd.com> Signed-off-by:
Chen Li <chenli@uniontech.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Chen Li authored
The number of chunks/chunks_array may be passed in by userspace and can be large. Reviewed-by:
Christian König <christian.koenig@amd.com> Signed-off-by:
Chen Li <chenli@uniontech.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Jiapeng Chong authored
Fix the following coccicheck warnings: ./drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:2252:40-45: WARNING: conversion to bool not needed here. Reported-by:
Abaci Robot <abaci@linux.alibaba.com> Signed-off-by:
Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Kevin Wang authored
the register offset isn't needed division by 4 to pass RREG32_PCIE() Signed-off-by:
Kevin Wang <kevin1.wang@amd.com> Reviewed-by:
Lijo Lazar <lijo.lazar@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Kevin Wang authored
add SECUREDISPLAY TA firmware info in amdgpu_fimrware_info() Signed-off-by:
Kevin Wang <kevin1.wang@amd.com> Reviewed-by:
Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Kevin Wang authored
refine PSP TA firmware info print in amdgpu_firmware_info(). Signed-off-by:
Kevin Wang <kevin1.wang@amd.com> Reviewed-by:
Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Xiaojian Du authored
This patch is to correct the name of one function for vangogh. This function is used to print the clock levels of all kinds of IP components. Signed-off-by:
Xiaojian Du <Xiaojian.Du@amd.com> Reviewed-by:
Kevin Wang <kevin1.wang@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Jiapeng Chong authored
Fix the following coccicheck warnings: ./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c:298:33-38: WARNING: conversion to bool not needed here. Reported-by:
Abaci Robot <abaci@linux.alibaba.com> Signed-off-by:
Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
- Mar 02, 2021
-
-
Chen Li authored
The number of chunks/chunks_array may be passed in by userspace and can be large. It has been observed to cause kcalloc failures from trinity fuzzy test: WARNING: CPU: 0 PID: 5487 at mm/page_alloc.c:4385 __alloc_pages_nodemask+0x2d8/0x14d0 Obviously, the required order in this case is larger than MAX_ORDER. So, just use kvmalloc instead. Reviewed-by:
Christian König <christian.koenig@amd.com> Signed-off-by:
Chen Li <chenli@uniontech.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Arnd Bergmann authored
clang points out that the new logic uses an always-uninitialized array index: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9810:38: warning: variable 'i' is uninitialized when used here [-Wuninitialized] timing = &edid->detailed_timings[i]; ^ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9720:7: note: initialize the variable 'i' to silence this warning My best guess is that the index should have been returned by the parse_hdmi_amd_vsdb() function that walks an array here, so do that. Fixes: f9b4f20c ("drm/amd/display: Add Freesync HDMI support to DM") Reviewed-by:
Nick Desaulniers <ndesaulniers@google.com> Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Colin Ian King authored
Currently if stream->signal is neither SIGNAL_TYPE_DISPLAY_PORT_MST or SIGNAL_TYPE_DISPLAY_PORT then variable ret is uninitialized and this is checked for > 0 at the end of the function. Ret should be initialized, I believe setting it to zero is a correct default. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: bd0c064c ("drm/amd/display: Add return code instead of boolean for future use") Reviewed-by:
Harry Wentland <harry.wentland@amd.com> Signed-off-by:
Colin Ian King <colin.king@canonical.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Alex Deucher authored
It works fine and was only disabled because primary GPUs don't enter runpm if there is a console bound to the fbdev due to the kmap. This will at least allow runpm on secondary cards. Reviewed-by:
Evan Quan <evan.quan@amd.com> Reviewed-by:
Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Alex Deucher authored
The S0ix check only makes sense if the AMD PMC driver is present. We need to use the legacy S3 pathes when the PMC driver is not present. Reviewed-by:
Prike Liang <Prike.Liang@amd.com> Reviewed-by:
Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Xiaogang Chen authored
amdgpu DM handles INTERRUPT_LOW_IRQ_CONTEXT interrupt(hpd, hpd_rx) by using work queue and uses single work_struct. If new interrupt is recevied before the previous handler finished, new interrupts(same type) will be discarded and driver just sends "amdgpu_dm_irq_schedule_work FAILED" message out. If some important hpd, hpd_rx related interrupts are missed by driver the hot (un)plug devices may cause system hang or instability, such as issues with system resume from S3 sleep with mst device connected. This patch dynamically allocates new amdgpu_dm_irq_handler_data for new interrupts if previous INTERRUPT_LOW_IRQ_CONTEXT interrupt work has not been handled. So the new interrupt works can be queued to the same workqueue_struct, instead of discard the new interrupts. All allocated amdgpu_dm_irq_handler_data are put into a single linked list and will be reused after. Signed-off-by:
Xiaogang Chen <xiaogang.chen@amd.com> Reviewed-by:
Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Vladimir Stempen authored
[why] Synchronization displays with different timings feature uses reminder of 64 bit division (modulus operator) , which is not supported by 32 bit platforms [how] Use div64 API for 64 bit modulus Signed-off-by:
Vladimir Stempen <vladimir.stempen@amd.com> Tested-by:
Bindu <Ramamurthy<bindu.r@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Vladimir Stempen authored
[why] Synchronization displays with different timings feature uses division operator for 64 bit division, which is not supported by 32 bit platforms [how] Use div64 API for 64 bit division Signed-off-by:
Vladimir Stempen <vladimir.stempen@amd.com> Tested-by:
Bindu <Ramamurthy<bindu.r@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
jokim-amd authored
Request to stop DF performance counters is missing the actual write to the controller register. Reported-by:
Chris Freehill <chris.freehill@amd.com> Signed-off-by:
Jonathan Kim <jonathan.kim@amd.com> Acked-by:
Alex Deucher <alexander.deucher@amd.com> Reviewed-by:
Harish Kasiviswanathan <harish.kasiviswanathan@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Dillon Varone authored
[Why?] HSplit should not affect DSC slice count. Can cause improper timings to be applied for certain modes. [How?] No longer change DSC Slice count based on HSplit. Tested-by:
Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by:
Dillon Varone <dillon.varone@amd.com> Reviewed-by:
Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> Acked-by:
Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Hugo Hu authored
[Why] 1. Driver use umachannelnumber to calculate watermarks for stutter. In asymmetric memory config, the actual bandwidth is less than dual-channel. The bandwidth should be the same as single-channel. 2. We found single rank dimm need additional delay time for stutter. [How] Get information from each DIMM. Treat memory config as a single-channel for asymmetric memory in bandwidth calculating. Add additional delay time for single rank dimm. Tested-by:
Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by:
Hugo Hu <hugo.hu@amd.com> Reviewed-by:
Tony Cheng <Tony.Cheng@amd.com> Acked-by:
Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-