- Jul 16, 2023
-
-
[Why] Workaround to avoid accessing DMCUB state too early if the emulator is in use - we don't support any of the features the caps are querying with emulation anyway. [How] Guard the query if emulation is in use. Reviewed-by:
Charlene Liu <charlene.liu@amd.com> Acked-by:
Alan Liu <haoping.liu@amd.com> Signed-off-by:
Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Tested-by:
Daniel Wheeler <daniel.wheeler@amd.com>
-
[Why] Visual confirm color is not as expected for Autoa Color Management feature test. [How] Calculate scaler recout data when visual confirm enabled to update the visual confirm bar on the display. Reviewed-by:
Aric Cyr <aric.cyr@amd.com> Acked-by:
Alan Liu <haoping.liu@amd.com> Signed-off-by:
Leo Ma <hanghong.ma@amd.com> Tested-by:
Daniel Wheeler <daniel.wheeler@amd.com>
-
- Jul 14, 2023
-
-
[Why & How] If there is no TG allocation we can dereference a NULL pointer when checking if the TG is enabled. Cc: Mario Limonciello <mario.limonciello@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Reviewed-by:
Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Acked-by:
Alan Liu <haoping.liu@amd.com> Signed-off-by:
Taimur Hassan <syed.hassan@amd.com> Tested-by:
Daniel Wheeler <daniel.wheeler@amd.com>
-
[Why & How] Shouldn't be touching path for HW DMCUB when emulating. Reviewed-by:
Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Acked-by:
Alan Liu <haoping.liu@amd.com> Signed-off-by:
Taimur Hassan <syed.hassan@amd.com> Tested-by:
Daniel Wheeler <daniel.wheeler@amd.com>
-
Reduce stack size pointed by clang: amdgpu_dm/amdgpu_dm.c:8655:13: error: stack frame size (1048) exceeds limit (1024) in 'amdgpu_dm_atomic_commit_tail' [-Werror,-Wframe-larger-than] Reviewed-by:
Harry Wentland <harry.wentland@amd.com> Acked-by:
Alan Liu <haoping.liu@amd.com> Signed-off-by:
Rodrigo Siqueira <rodrigo.siqueira@amd.com> Tested-by:
Daniel Wheeler <daniel.wheeler@amd.com>
-
Alan Liu authored
There is no need to calculate the VCO frequency. In our internal branch we've hard-coded this for a while, so it's well-tested. This also allows us to remove the now unused code for calculating the VCO frequency. Reviewed-by:
Harry Wentland <harry.wentland@amd.com> Acked-by:
Alan Liu <haoping.liu@amd.com> Signed-off-by:
Alan Liu <haoping.liu@amd.com> Tested-by:
Daniel Wheeler <daniel.wheeler@amd.com>
-
After enable DRM_AMDGPU_WERROR, clang highlight multiple functions that need to have `static`, and this commit address those issues and also improve the indents. Reviewed-by:
Hamza Mahfooz <hamza.mahfooz@amd.com> Acked-by:
Alan Liu <haoping.liu@amd.com> Signed-off-by:
Rodrigo Siqueira <rodrigo.siqueira@amd.com> Tested-by:
Daniel Wheeler <daniel.wheeler@amd.com>
-
The get_engine_type is never used in the code, for this reason, this commit drops this function. Reviewed-by:
Hamza Mahfooz <hamza.mahfooz@amd.com> Acked-by:
Alan Liu <haoping.liu@amd.com> Signed-off-by:
Rodrigo Siqueira <rodrigo.siqueira@amd.com> Tested-by:
Daniel Wheeler <daniel.wheeler@amd.com>
-
This commit improves the include of some header files to make them align with other includes. Reviewed-by:
Hamza Mahfooz <hamza.mahfooz@amd.com> Acked-by:
Alan Liu <haoping.liu@amd.com> Signed-off-by:
Rodrigo Siqueira <rodrigo.siqueira@amd.com> Tested-by:
Daniel Wheeler <daniel.wheeler@amd.com>
-
[Why] Specific TBT4 dock doesn't send out short HPD to notify source that IRQ event DOWN_REP_MSG_RDY is set. Which violates the spec and cause source can't send out streams to mst sinks. [How] To cover this misbehavior, add an additional polling method to detect DOWN_REP_MSG_RDY is set. HPD driven handling method is still kept. Just hook up our handler to drm mgr->cbs->poll_hpd_irq(). Cc: Mario Limonciello <mario.limonciello@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Reviewed-by:
Jerry Zuo <jerry.zuo@amd.com> Acked-by:
Alan Liu <haoping.liu@amd.com> Signed-off-by:
Wayne Lin <wayne.lin@amd.com> Tested-by:
Daniel Wheeler <daniel.wheeler@amd.com>
-
[WHY] Issue not display generic, required for multiple 2+ LTTPR link configurations. [HOW] Revert monitor patch change and remove delay for single LTTPR case Reviewed-by:
George Shen <george.shen@amd.com> Acked-by:
Alan Liu <haoping.liu@amd.com> Signed-off-by:
Michael Strauss <michael.strauss@amd.com> Tested-by:
Daniel Wheeler <daniel.wheeler@amd.com>
-
[Why] This can differ depending on ASIC and we can end up skipping all transmitter control if we're relying on the wrong bit as a shortcut for whether link is on/off. [How] The ASIC table itself provides the correct DIG check, use that instead of the dcn10 hardcode. Reviewed-by:
Syed Hassan <syed.hassan@amd.com> Acked-by:
Alan Liu <haoping.liu@amd.com> Signed-off-by:
Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Tested-by:
Daniel Wheeler <daniel.wheeler@amd.com>
-
[Why] HDMI spec requires TMDS clock to be not more than 340MHz. Stream encoder ensure this requirement but driver enable stream encoder later than PHY. So PHY will output full speed TMDS clock first. [How] Enable stream encoder first in TMDS case. Reviewed-by:
Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Acked-by:
Alan Liu <haoping.liu@amd.com> Signed-off-by:
JinZe Xu <jinze.xu@amd.com> Tested-by:
Daniel Wheeler <daniel.wheeler@amd.com>
-
Shashank Sharma authored
This patch: - creates a new file for doorbell management. - moves doorbell code from amdgpu_device.c to this file. V2: - remove doc from function declaration (Christian) - remove 'device' from function names to make it consistent (Alex) - add SPDX license identifier (Luben) V3: - change license to MIT license(Christian) Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian Koenig <christian.koenig@amd.com> Reviewed-by:
Christian König <christian.koenig@amd.com> Signed-off-by:
Shashank Sharma <shashank.sharma@amd.com>
-
Stylon Wang authored
[Why & How] It's useful to be able to enable DPIA trace with dcdebugmask option, especially to debug DPIA issues involved in transition of system power states. This patch adds an option to amdgpu.dcdebugmask to be picked up by amdgpu DM to enable DPIA trace. Signed-off-by:
Stylon Wang <stylon.wang@amd.com> Reviewed-by:
Aurabindo Pillai <aurabindo.pillai@amd.com>
-
Candice Li authored
Allow the initramfs generator to automatically include psp_13_0_6_ta firmware to initramfs. Signed-off-by:
Candice Li <candice.li@amd.com> Reviewed-by:
Hawking Zhang <Hawking.Zhang@amd.com>
-
stanley yang authored
Disable RAS feature by default for aqua vanjaram on APU platform. Changed from V1: Splite Disable RAS by default on APU platform into a separated patch. Changed from V2: Avoid to modify global variable amdgpu_ras_enable. Signed-off-by:
Stanley.Yang <Stanley.Yang@amd.com> Reviewed-by:
Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by:
Tao Zhou <tao.zhou1@amd.com>
-
stanley yang authored
Enable RAS for aqua vanjaram. Changed from V1: Split the change in amdgpu_ras_asic_supported into a separated patch. Changed from V2: Avoid to modify global variable amdgpu_ras_enable. Change-Id: I690cd995e038e83425515c9aa1c74bb84d9a202f Signed-off-by:
Stanley.Yang <Stanley.Yang@amd.com> Reviewed-by:
Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by:
Tao Zhou <tao.zhou1@amd.com>
-
SRINIVASAN SHANMUGAM authored
If the function 'gmc_v8_0_ or gmc_v7_0_init_microcode()' fails, the driver will just fail to load, hence return -EINVAL rather having BUG(), fixes WARNING: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants 'Fixes: 1104113b ("drm/amdgpu: Fix error & warnings in gmc_v8_0.c")' 'Fixes: d68f1d64 ("drm/amdgpu: Fix errors & warnings in gmc_ v6_0, v7_0.c")' Suggested-by:
Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by:
Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by:
Alex Deucher <alexander.deucher@amd.com>
-
SRINIVASAN SHANMUGAM authored
Fix the following warnings reported by checkpatch: WARNING: Block comments use a trailing */ on a separate line WARNING: Prefer using '"%s...", __func__' to using 'execute_synaptics_rc_command', this function's name, in a string WARNING: Prefer using '"%s...", __func__' to using 'apply_synaptics_fifo_reset_wa', this function's name, in a string WARNING: braces {} are not necessary for single statement blocks Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Cc: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by:
Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by:
Aurabindo Pillai <aurabindo.pillai@amd.com>
-
SRINIVASAN SHANMUGAM authored
Conform to Linux kernel coding style. And promote sysfs entry for set/get srm to kdoc. Suggested-by:
Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Cc: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by:
Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by:
Aurabindo Pillai <aurabindo.pillai@amd.com>
-
Autumn Ashton authored
Despite certain GPUs supporting multiple overlay planes already in AMDGPU, the driver did not expose the zpos property which is required for userspace to take advantage of multiple overlay planes in any meaningful way. The driver was already hooked up to normalized_zpos, but was just missing the exposure of it. Cc: Harry Wentland <harry.wentland@amd.com> Cc: Melissa Wen <mwen@igalia.com> Cc: Simon Ser <contact@emersion.fr> Reviewed-by:
Harry Wentland <harry.wentland@amd.com> Signed-off-by:
Joshua Ashton <joshua@froggi.es> Signed-off-by:
Hamza Mahfooz <hamza.mahfooz@amd.com>
-
Saleemkhan Jamadar authored
VCN FW depncencies revert it to unblock others This reverts commit ce085b80. Signed-off-by:
Saleemkhan Jamadar <saleemkhan.jamadar@amd.com> Acked-by:
Veerabadhran Gopalakrishnan <Veerabadhran.Gopalakrishnan@amd.com>
-
- Jul 13, 2023
-
-
Alex Deucher authored
Use current uclk to be consistent with other dGPUs. Reviewed-by:
Kenneth Feng <kenneth.feng@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Alex Deucher authored
Use average gfxclock for consistency with other dGPUs. Reviewed-by:
Kenneth Feng <kenneth.feng@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Autumn Ashton authored
Steam Deck/Gamescope wants to take advantage of more planes which is possible on VanGogh but was not previously exposed. Cc: Harry Wentland <harry.wentland@amd.com> Cc: Melissa Wen <mwen@igalia.com> Cc: Simon Ser <contact@emersion.fr> Reviewed-by:
Harry Wentland <harry.wentland@amd.com> Signed-off-by:
Joshua Ashton <joshua@froggi.es> Signed-off-by:
Hamza Mahfooz <hamza.mahfooz@amd.com>
-
Autumn Ashton authored
DCN planes are universal and therefore overlay planes can use the same formats as primary planes, unlike DCE. Gamescope/Steam Deck would like to take advantage of this functionality for partial composition which in some cases in our pipeline, can contain negative values in some instances. Cc: Harry Wentland <harry.wentland@amd.com> Cc: Melissa Wen <mwen@igalia.com> Cc: Simon Ser <contact@emersion.fr> Reviewed-by:
Harry Wentland <harry.wentland@amd.com> Signed-off-by:
Joshua Ashton <joshua@froggi.es> Signed-off-by:
Hamza Mahfooz <hamza.mahfooz@amd.com>
-
Hamza Mahfooz authored
This reverts commit 57cc74b8. Signed-off-by:
Hamza Mahfooz <hamza.mahfooz@amd.com>
-
Saleemkhan Jamadar authored
VCN FW depncencies revert it to unlock others This reverts commit d0edfbe8. Signed-off-by:
Saleemkhan Jamadar <saleemkhan.jamadar@amd.com> Acked-by:
Veerabadhran Gopalakrishnan <Veerabadhran.Gopalakrishnan@amd.com>
-
Guchun Chen authored
In below thousands of screen rotation loop tests with virtual display enabled, a CPU hard lockup issue may happen, leading system to unresponsive and crash. do { xrandr --output Virtual --rotate inverted xrandr --output Virtual --rotate right xrandr --output Virtual --rotate left xrandr --output Virtual --rotate normal } while (1); NMI watchdog: Watchdog detected hard LOCKUP on cpu 1 ? hrtimer_run_softirq+0x140/0x140 ? store_vblank+0xe0/0xe0 [drm] hrtimer_cancel+0x15/0x30 amdgpu_vkms_disable_vblank+0x15/0x30 [amdgpu] drm_vblank_disable_and_save+0x185/0x1f0 [drm] drm_crtc_vblank_off+0x159/0x4c0 [drm] ? record_print_text.cold+0x11/0x11 ? wait_for_completion_timeout+0x232/0x280 ? drm_crtc_wait_one_vblank+0x40/0x40 [drm] ? bit_wait_io_timeout+0xe0/0xe0 ? wait_for_completion_interruptible+0x1d7/0x320 ? mutex_unlock+0x81/0xd0 amdgpu_vkms_crtc_atomic_disable It's caused by a stuck in lock dependency in such scenario on different CPUs. CPU1 CPU2 drm_crtc_vblank_off hrtimer_interrupt grab event_lock (irq disabled) __hrtimer_run_queues grab vbl_lock/vblank_time_block amdgpu_vkms_vblank_simulate amdgpu_vkms_disable_vblank drm_handle_vblank hrtimer_cancel grab dev->event_lock So CPU1 stucks in hrtimer_cancel as timer callback is running endless on current clock base, as that timer queue on CPU2 has no chance to finish it because of failing to hold the lock. So NMI watchdog will throw the errors after its threshold, and all later CPUs are impacted/blocked. So use hrtimer_try_to_cancel to fix this, as disable_vblank callback does not need to wait the handler to finish. And also it's not necessary to check the return value of hrtimer_try_to_cancel, because even if it's -1 which means current timer callback is running, it will be reprogrammed in hrtimer_start with calling enable_vblank to make it works. v2: only re-arm timer when vblank is enabled (Christian) and add a Fixes tag as well v3: drop warn printing (Christian) v4: drop superfluous check of blank->enabled in timer function, as it's guaranteed in drm_handle_vblank (Christian) Fixes: 84ec374b ("drm/amdgpu: create amdgpu_vkms (v4)") Cc: stable@vger.kernel.org Suggested-by:
Christian König <christian.koenig@amd.com> Signed-off-by:
Guchun Chen <guchun.chen@amd.com> Reviewed-by:
Christian König <christian.koenig@amd.com>
-
- Jul 12, 2023
-
-
Vitaly Prosyak authored
Introduce a new DRM_IOCTL_SYNCOBJ_EVENTFD IOCTL which signals an eventfd from a syncobj. This is useful for Wayland compositors to handle wait-before-submit. Wayland clients can send a timeline point to the compositor before the point has materialized yet, then compositors can wait for the point to materialize via this new IOCTL. The existing DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT IOCTL is not suitable because it blocks. Compositors want to integrate the wait with their poll(2)-based event loop. Requirements for new uAPI: - User-space patch: wlroots/wlroots!4262 - IGT: https://lists.freedesktop.org/archives/igt-dev/2023-July/057866.html v2: - Wait for fence when flags is zero - Improve documentation (Pekka) - Rename IOCTL (Christian) - Fix typo in drm_syncobj_add_eventfd() (Christian) v3: - Link user-space + IGT patches - Add reference from overview docs Signed-off-by:
Simon Ser <contact@emersion.fr> Reviewed-by:
Christian König <christian.koenig@amd.com> Acked-by:
Pekka Paalanen <pekka.paalanen@collabora.com> Cc: Jason Ekstrand <jason@jlekstrand.net> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: Daniel Stone <daniel@fooishbar.org> Cc: James Jones <jajones@nvidia.com> Cc: Austin Shafer <ashafer@nvidia.com> Change-Id: Iccc004bea90e624bce59f89b9adccf35f4ae074a
-
[Why&How] DCN301 does not have FAMS hence the workaround needed on other DCN3x variants related to OTG min/max selector programming is not applicable for it. Hence isolate it and have it use the old sequence without workaround. Fixes: 06c3a652 ("drm/amd/display: Program OTG vtotal min/max selectors unconditionally for DCN1+") Reviewed-by:
Swapnil Patel <swapnil.patel@amd.com> Signed-off-by:
Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by:
Guilherme G. Piccoli <gpiccoli@igalia.com>
-
Aurabindo Pillai authored
[Why&How] Make a few functions non static so that they can be reused for other asic. This is in preparation for separating out OTG programming sequence for DCN301 Fixes: 06c3a652 ("drm/amd/display: Program OTG vtotal min/max selectors unconditionally for DCN1+") Reviewed-by:
Swapnil Patel <swapnil.patel@amd.com> Signed-off-by:
Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by:
Guilherme G. Piccoli <gpiccoli@igalia.com>
-
Mario Limonciello authored
SMU7 does a check if the dGPU is inserted into a Rocket Lake system, to turn off DPM. Extend this check to all systems that have problems with dynamic switching by using the amdgpu_device_pcie_dynamic_switching_supported() helper. Signed-off-by:
Mario Limonciello <mario.limonciello@amd.com> Reviewed-by:
Evan Quan <evan.quan@amd.com>
-
Randy Dunlap authored
Quash 175 kernel-doc warnings in dc.h by unmarking 2 struct comments as containing kernel-doc notation and by spelling one struct field correctly in a kernel-doc comment. Fixes: 1682bd1a ("drm/amd/display: Expand kernel doc for DC") Fixes: ea76895f ("drm/amd/display: Document pipe split policy") Fixes: f6ae69f4 ("drm/amd/display: Include surface of unaffected streams") Reviewed-by:
Harry Wentland <harry.wentland@amd.com> Signed-off-by:
Randy Dunlap <rdunlap@infradead.org> Cc: Harry Wentland <harry.wentland@amd.com> Cc: Leo Li <sunpeng.li@amd.com> Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Cc: Aurabindo Pillai <aurabindo.pillai@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: amd-gfx@lists.freedesktop.org Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com> Cc: dri-devel@lists.freedesktop.org Signed-off-by:
Alex Deucher <alexander.deucher@amd.com>
-
Rajneesh Bhardwaj authored
Delay release TTM BOs when the kernel default setting is init_on_free. This offloads the overhead of clearing the system memory to the work item and potentially a different CPU. This could be very beneficial when the application does a lot of malloc/free style allocations of system memory. Reviewed-by:
Christian König <christian.koenig@amd.com>.> Signed-off-by:
Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>
-
SRINIVASAN SHANMUGAM authored
Fix below checkpatch error & warnings: ERROR: trailing statements should be on next line + default: BUG(); WARNING: braces {} are not necessary for single statement blocks WARNING: braces {} are not necessary for any arm of this statement WARNING: Block comments should align the * on each line Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by:
Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Acked-by:
Christian König <christian.koenig@amd.com>
-
Luben Tuikov authored
Rename struct amdgpu_vm_tlb_seq_cb {...} to struct amdgpu_vm_tlb_seq_struct {...}, so as to not conflict with documentation processing tools. Of course, C has no problem with this. Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Alex Deucher <Alexander.Deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Link: https://lore.kernel.org/r/b5ebc891-ee63-1638-0377-7b512d34b823@infradead.org Signed-off-by:
Luben Tuikov <luben.tuikov@amd.com> Reviewed-by:
Christian König <christian.koenig@amd.com>
-
SRINIVASAN SHANMUGAM authored
Dynamically allocate large local variable instead of putting it onto the stack to avoid exceeding the stack size: drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c: In function ‘amdgpu_amdkfd_unmap_hiq’: drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:868:1: warning: the frame size of 1280 bytes is larger than 1024 bytes [-Wframe-larger-than=] Reported-by:
kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202307080505.V12qS0oz-lkp@intel.com Suggested-by:
Guchun Chen <guchun.chen@amd.com> Cc: Felix Kuehling <Felix.Kuehling@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by:
Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Acked-by:
Guchun Chen <guchun.chen@amd.com> Reviewed-by:
Mukul Joshi <mukul.joshi@amd.com>
-
- Jul 11, 2023
-
-
jokim-amd authored
The feature to save the dispatch ID in trap temporaries 6 & 7 on context save is unconditionally enabled during MQD initialization. Now that TTMPs are always setup regardless of debug mode for GC 9.4.3, we should report that the dispatch ID is always available for debug/trap handling. Signed-off-by:
Jonathan Kim <jonathan.kim@amd.com> Reviewed-by:
Felix Kuehling <felix.kuehling@amd.com>
-