Jesse Zhang
78d0a27ae0
drm/amdgpu: Add user queue instance count in HW IP info
...
This change exposes the number of available user queue instances
for each hardware IP type (GFX, COMPUTE, SDMA) through the
drm_amdgpu_info_hw_ip interface.
Key changes:
1. Added userq_num_instance field to drm_amdgpu_info_hw_ip structure
2. Implemented counting of available HQD slots using:
- mes.gfx_hqd_mask for GFX queues
- mes.compute_hqd_mask for COMPUTE queues
- mes.sdma_hqd_mask for SDMA queues
3. Only counts available instances when user queues are enabled
(!disable_uq)
v2: using the adev->mes.gfx_hqd_mask[]/compute_hqd_mask[]/sdma_hqd_mask[] masks
to determine the number of queue slots available for each engine type (Alex)
v3: rename userq_num_instance to userq_num_hqds (Alex)
Suggested-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:17:35 -04:00
Pratap Nirujogi
55d42f6169
drm/amd/amdgpu: Add helper functions for isp buffers
...
Accessing amdgpu internal data structures "struct amdgpu_device"
and "struct amdgpu_bo" in ISP V4L2 driver to alloc/free GART
buffers is not recommended.
Add new amdgpu_isp helper functions that takes opaque params
from ISP V4L2 driver and calls the amdgpu internal functions
amdgpu_bo_create_isp_user() and amdgpu_bo_create_kernel() to
alloc/free GART buffers.
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:17:35 -04:00
Pratap Nirujogi
e36519f5c8
drm/amd/amdgpu: Initialize swnode for ISP MFD device
...
Create amd_isp_capture MFD device with swnode initialized to
isp specific software_node part of fwnode graph in amd_isp4
x86/platform driver. The isp driver use this swnode handle
to retrieve the critical properties (data-lanes, mipi phyid,
link-frequencies etc.) required for camera to work on AMD ISP4
based targets.
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:17:35 -04:00
Eeli Haapalainen
2becafc319
drm/amdgpu/gfx8: reset compute ring wptr on the GPU on resume
...
Commit 42cdf6f687 ("drm/amdgpu/gfx8: always restore kcq MQDs") made the
ring pointer always to be reset on resume from suspend. This caused compute
rings to fail since the reset was done without also resetting it for the
firmware. Reset wptr on the GPU to avoid a disconnect between the driver
and firmware wptr.
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3911
Fixes: 42cdf6f687 ("drm/amdgpu/gfx8: always restore kcq MQDs")
Signed-off-by: Eeli Haapalainen <eeli.haapalainen@protonmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:17:28 -04:00
Alex Deucher
82a7c94fce
drm/amdgpu/jpeg: clean up reset type handling
...
Make the handling consistent with other IPs and across
JPEG versions.
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:17:16 -04:00
Christian König
084300fef5
drm/amdgpu: rework gmc_v9_0_get_coherence_flags v2
...
Avoid using the mapping here.
v2: use amdgpu_xgmi_same_hive() as suggested by Felix
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:17:10 -04:00
Alex Deucher
d7767a1fd4
drm/amdgpu/vcn3: implement ring reset
...
Use the new helpers to handle engine resets for VCN.
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Tested-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:17:07 -04:00
Alex Deucher
63b8c9fdfb
drm/amdgpu/vcn2.5: implement ring reset
...
Use the new helpers to handle engine resets for VCN.
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Tested-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:17:04 -04:00
Alex Deucher
64ac009747
drm/amdgpu/vcn2: implement ring reset
...
Use the new helpers to handle engine resets for VCN.
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Tested-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:17:01 -04:00
Alex Deucher
7b6cde7f4e
drm/amdgpu/vcn: add a helper framework for engine resets
...
With engine resets we reset all queues on the engine rather
than just a single queue. Add a framework to handle this
similar to SDMA.
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Tested-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:16:58 -04:00
Alex Deucher
3871149081
drm/amdgpu/vcn5: re-emit unprocessed state on ring reset
...
Re-emit the unprocessed state after resetting the queue.
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Tested-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:16:55 -04:00
Alex Deucher
6166e37afd
drm/amdgpu/vcn4.0.5: re-emit unprocessed state on ring reset
...
Re-emit the unprocessed state after resetting the queue.
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Tested-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:16:47 -04:00
Alex Deucher
64c54f0aa2
drm/amdgpu/vcn4.0.3: re-emit unprocessed state on ring reset
...
Re-emit the unprocessed state after resetting the queue.
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:16:44 -04:00
Alex Deucher
d156ba3970
drm/amdgpu/vcn4: re-emit unprocessed state on ring reset
...
Re-emit the unprocessed state after resetting the queue.
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Tested-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:16:41 -04:00
Alex Deucher
8bea669e67
drm/amdgpu/jpeg5.0.1: re-emit unprocessed state on ring reset
...
Re-emit the unprocessed state after resetting the queue.
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:16:36 -04:00
Alex Deucher
e708f2cb56
drm/amdgpu/jpeg5: add queue reset
...
Add queue reset support for jpeg 5.0.0.
Use the new helpers to re-emit the unprocessed state
after resetting the queue.
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Tested-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:16:33 -04:00
Alex Deucher
cf07ece3a8
drm/amdgpu/jpeg4.0.5: add queue reset
...
Add queue reset support for jpeg 4.0.5.
Use the new helpers to re-emit the unprocessed state
after resetting the queue.
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Tested-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:16:25 -04:00
Alex Deucher
98f16636a2
drm/amdgpu/jpeg4.0.3: re-emit unprocessed state on ring reset
...
Re-emit the unprocessed state after resetting the queue.
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:16:08 -04:00
Alex Deucher
429ccbf6f4
drm/amdgpu/jpeg4: re-emit unprocessed state on ring reset
...
Re-emit the unprocessed state after resetting the queue.
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Tested-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:16:03 -04:00
Alex Deucher
b81891589b
drm/amdgpu/jpeg3: re-emit unprocessed state on ring reset
...
Re-emit the unprocessed state after resetting the queue.
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Tested-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:15:22 -04:00
Alex Deucher
bb7928f9fc
drm/amdgpu/jpeg2.5: re-emit unprocessed state on ring reset
...
Re-emit the unprocessed state after resetting the queue.
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Tested-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:15:19 -04:00
Alex Deucher
3c9e205f32
drm/amdgpu/jpeg2: re-emit unprocessed state on ring reset
...
Re-emit the unprocessed state after resetting the queue.
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Tested-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:15:12 -04:00
Lijo Lazar
25c314aa3e
drm/amdgpu: Increase reset counter only on success
...
Increment the reset counter only if soft recovery succeeded. This is
consistent with a ring hard reset behaviour where counter gets
incremented only if hard reset succeeded.
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:14:44 -04:00
Alex Deucher
ec8fbb44b5
drm/amdgpu: make compute timeouts consistent
...
For kernel compute queues, align the timeout with
other kernel queues (10 sec). This had previously
been set higher for OpenCL when it used kernel
queues, but now OpenCL uses KFD user queues which
don't have a timeout limitation. This also aligns
with SR-IOV which already used a shorter timeout.
Additionally the longer timeout negatively impacts
the user experience with kernel queues for interactive
applications.
Reviewed-by: Kent Russell <kent.russell@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:14:29 -04:00
Tony Yi
991f2e0c63
drm/amdgpu: Check SQ_CONFIG register support on SRIOV
...
On SRIOV environments, check if RLCG supports
SQ_CONFIG register programming.
Signed-off-by: Tony Yi <Tony.Yi@amd.com >
Reviewed-by: Zhigang Luo <zhigang.luo@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:14:21 -04:00
Alex Deucher
77cc0da39c
drm/amdgpu: track ring state associated with a fence
...
We need to know the wptr and sequence number associated
with a fence so that we can re-emit the unprocessed state
after a ring reset. Pre-allocate storage space for
the ring buffer contents and add helpers to save off
and re-emit the unprocessed state so that it can be
re-emitted after the queue is reset.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:14:11 -04:00
Alex Deucher
bc29c03b28
drm/amdgpu: clean up GC reset functions
...
Make them consistent and use the reset flags.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:10:10 -04:00
Alex Deucher
e3f15cfd8b
drm/amdgpu: clean up jpeg reset functions
...
Make them consistent and use the reset flags.
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:10:01 -04:00
Alex Deucher
290ccae52d
drm/amdgpu/vcn: don't enable per queue resets on SR-IOV
...
Power control is only available in bare metal. SR-IOV
will need a different method.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:09:48 -04:00
Alex Deucher
94ee19ea14
drm/amdgpu/jpeg4: add additional ring reset error checking
...
Start and stop can fail, so add checks.
Fixes: 74894ffc7d ("drm/amdgpu: Add ring reset callback for JPEG4_0_0")
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: Sathishkumar S <sathishkumar.sundararaju@amd.com >
2025-07-16 16:09:25 -04:00
Alex Deucher
2918487455
drm/amdgpu/jpeg3: add additional ring reset error checking
...
Start and stop can fail, so add checks.
Fixes: 03399d0bff ("drm/amdgpu: Add ring reset callback for JPEG3_0_0")
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: Sathishkumar S <sathishkumar.sundararaju@amd.com >
2025-07-16 16:08:59 -04:00
Alex Deucher
c9bfafc1a6
drm/amdgpu/jpeg2: add additional ring reset error checking
...
Start and stop can fail, so add checks.
Fixes: 500c04d2a7 ("drm/amdgpu: Add ring reset callback for JPEG2_0_0")
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: Sathishkumar S <sathishkumar.sundararaju@amd.com >
2025-07-16 16:08:17 -04:00
Alex Deucher
d18e1faef6
drm/amdgpu: clean up sdma reset functions
...
Make them consistent and drop unneeded extra variables.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 16:08:05 -04:00
Christophe JAILLET
28c5c48638
drm/amdgpu: Fix missing unlocking in an error path in amdgpu_userq_create()
...
If kasprintf() fails, some mutex still need to be released to avoid locking
issue, as already done in all other error handling path.
Fixes: c03ea34cbf ("drm/amdgpu: add support of debugfs for mqd information")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Link: https://lore.kernel.org/all/366557fa7ca8173fd78c58336986ca56953369b9.1752087753.git.christophe.jaillet@wanadoo.fr/
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-16 15:46:04 -04:00
Ville Syrjälä
b4d360701b
drm/amdgpu: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_struct()
...
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: amd-gfx@lists.freedesktop.org
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-10-ville.syrjala@linux.intel.com
2025-07-16 20:07:03 +03:00
Ville Syrjälä
a34cc7bf10
drm: Allow the caller to pass in the format info to drm_helper_mode_fill_fb_struct()
...
Soon all drivers should have the format info already available in the
places where they call drm_helper_mode_fill_fb_struct(). Allow it to
be passed along into drm_helper_mode_fill_fb_struct() instead of doing
yet another redundant lookup.
Start by always passing in NULL and still doing the extra lookup.
The actual changes to avoid the lookup will follow.
Done with cocci (with some manual fixups):
@@
identifier dev, fb, mode_cmd;
expression get_format_info;
@@
void drm_helper_mode_fill_fb_struct(struct drm_device *dev,
struct drm_framebuffer *fb,
+ const struct drm_format_info *info,
const struct drm_mode_fb_cmd2 *mode_cmd)
{
...
- fb->format = get_format_info;
+ fb->format = info ?: get_format_info;
...
}
@@
identifier dev, fb, mode_cmd;
@@
void drm_helper_mode_fill_fb_struct(struct drm_device *dev,
struct drm_framebuffer *fb,
+ const struct drm_format_info *info,
const struct drm_mode_fb_cmd2 *mode_cmd);
@@
expression dev, fb, mode_cmd;
@@
drm_helper_mode_fill_fb_struct(dev, fb
+ ,NULL
,mode_cmd);
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: Liviu Dudau <liviu.dudau@arm.com >
Cc: Russell King <linux@armlinux.org.uk >
Cc: Inki Dae <inki.dae@samsung.com >
Cc: Seung-Woo Kim <sw0312.kim@samsung.com >
Cc: Kyungmin Park <kyungmin.park@samsung.com >
Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com >
Cc: Rob Clark <robdclark@gmail.com >
Cc: Abhinav Kumar <quic_abhinavk@quicinc.com >
Cc: Dmitry Baryshkov <lumag@kernel.org >
Cc: Sean Paul <sean@poorly.run >
Cc: Marijn Suijten <marijn.suijten@somainline.org >
Cc: Lyude Paul <lyude@redhat.com >
Cc: Danilo Krummrich <dakr@kernel.org >
Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Cc: Thierry Reding <thierry.reding@gmail.com >
Cc: Mikko Perttunen <mperttunen@nvidia.com >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com >
Cc: Gurchetan Singh <gurchetansingh@chromium.org >
Cc: Chia-I Wu <olvaffe@gmail.com >
Cc: Zack Rusin <zack.rusin@broadcom.com >
Cc: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com >
Cc: amd-gfx@lists.freedesktop.org
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Cc: linux-tegra@vger.kernel.org
Cc: virtualization@lists.linux.dev
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-6-ville.syrjala@linux.intel.com
2025-07-16 20:04:45 +03:00
Ville Syrjälä
81112eaac5
drm: Pass the format info to .fb_create()
...
Pass along the format information from the top to .fb_create()
so that we can avoid redundant (and somewhat expensive) lookups
in the drivers.
Done with cocci (with some manual fixups):
@@
identifier func =~ ".*create.*";
identifier dev, file, mode_cmd;
@@
struct drm_framebuffer *func(
struct drm_device *dev,
struct drm_file *file,
+ const struct drm_format_info *info,
const struct drm_mode_fb_cmd2 *mode_cmd)
{
...
(
- const struct drm_format_info *info = drm_get_format_info(...);
|
- const struct drm_format_info *info;
...
- info = drm_get_format_info(...);
)
<...
- if (!info)
- return ...;
...>
}
@@
identifier func =~ ".*create.*";
identifier dev, file, mode_cmd;
@@
struct drm_framebuffer *func(
struct drm_device *dev,
struct drm_file *file,
+ const struct drm_format_info *info,
const struct drm_mode_fb_cmd2 *mode_cmd)
{
...
}
@find@
identifier fb_create_func =~ ".*create.*";
identifier dev, file, mode_cmd;
@@
struct drm_framebuffer *fb_create_func(
struct drm_device *dev,
struct drm_file *file,
+ const struct drm_format_info *info,
const struct drm_mode_fb_cmd2 *mode_cmd);
@@
identifier find.fb_create_func;
expression dev, file, mode_cmd;
@@
fb_create_func(dev, file
+ ,info
,mode_cmd)
@@
expression dev, file, mode_cmd;
@@
drm_gem_fb_create(dev, file
+ ,info
,mode_cmd)
@@
expression dev, file, mode_cmd;
@@
drm_gem_fb_create_with_dirty(dev, file
+ ,info
,mode_cmd)
@@
expression dev, file_priv, mode_cmd;
identifier info, fb;
@@
info = drm_get_format_info(...);
...
fb = dev->mode_config.funcs->fb_create(dev, file_priv
+ ,info
,mode_cmd);
@@
identifier dev, file_priv, mode_cmd;
@@
struct drm_mode_config_funcs {
...
struct drm_framebuffer *(*fb_create)(struct drm_device *dev,
struct drm_file *file_priv,
+ const struct drm_format_info *info,
const struct drm_mode_fb_cmd2 *mode_cmd);
...
};
v2: Fix kernel docs (Laurent)
Fix commit msg (Geert)
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: Liviu Dudau <liviu.dudau@arm.com >
Cc: Maxime Ripard <mripard@kernel.org >
Cc: Russell King <linux@armlinux.org.uk >
Cc: Inki Dae <inki.dae@samsung.com >
Cc: Seung-Woo Kim <sw0312.kim@samsung.com >
Cc: Kyungmin Park <kyungmin.park@samsung.com >
Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com >
Cc: Chun-Kuang Hu <chunkuang.hu@kernel.org >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Rob Clark <robdclark@gmail.com >
Cc: Abhinav Kumar <quic_abhinavk@quicinc.com >
Cc: Dmitry Baryshkov <lumag@kernel.org >
Cc: Sean Paul <sean@poorly.run >
Cc: Marijn Suijten <marijn.suijten@somainline.org >
Cc: Marek Vasut <marex@denx.de >
Cc: Stefan Agner <stefan@agner.ch >
Cc: Lyude Paul <lyude@redhat.com >
Cc: Danilo Krummrich <dakr@kernel.org >
Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Cc: Dave Airlie <airlied@redhat.com >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Cc: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com >
Cc: Biju Das <biju.das.jz@bp.renesas.com >
Cc: Sandy Huang <hjc@rock-chips.com >
Cc: "Heiko Stübner" <heiko@sntech.de >
Cc: Andy Yan <andy.yan@rock-chips.com >
Cc: Thierry Reding <thierry.reding@gmail.com >
Cc: Mikko Perttunen <mperttunen@nvidia.com >
Cc: Dave Stevenson <dave.stevenson@raspberrypi.com >
Cc: "Maíra Canal" <mcanal@igalia.com >
Cc: Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com >
Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com >
Cc: Gurchetan Singh <gurchetansingh@chromium.org >
Cc: Chia-I Wu <olvaffe@gmail.com >
Cc: Zack Rusin <zack.rusin@broadcom.com >
Cc: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com >
Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com >
Cc: amd-gfx@lists.freedesktop.org
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Cc: virtualization@lists.linux.dev
Cc: spice-devel@lists.freedesktop.org
Cc: linux-renesas-soc@vger.kernel.org
Cc: linux-tegra@vger.kernel.org
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Acked-by: Liviu Dudau <liviu.dudau@arm.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-5-ville.syrjala@linux.intel.com
2025-07-16 20:03:14 +03:00
Arunpravin Paneer Selvam
95a16160ca
drm/amdgpu: Reset the clear flag in buddy during resume
...
- Added a handler in DRM buddy manager to reset the cleared
flag for the blocks in the freelist.
- This is necessary because, upon resuming, the VRAM becomes
cluttered with BIOS data, yet the VRAM backend manager
believes that everything has been cleared.
v2:
- Add lock before accessing drm_buddy_clear_reset_blocks()(Matthew Auld)
- Force merge the two dirty blocks.(Matthew Auld)
- Add a new unit test case for this issue.(Matthew Auld)
- Having this function being able to flip the state either way would be
good. (Matthew Brost)
v3(Matthew Auld):
- Do merge step first to avoid the use of extra reset flag.
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com >
Suggested-by: Christian König <christian.koenig@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
Cc: stable@vger.kernel.org
Fixes: a68c7eaa7a ("drm/amdgpu: Enable clear page functionality")
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3812
Signed-off-by: Christian König <christian.koenig@amd.com >
Link: https://lore.kernel.org/r/20250716075125.240637-2-Arunpravin.PaneerSelvam@amd.com
2025-07-16 12:50:32 +02:00
ganglxie
48ee3d8e5e
drm/amdgpu: refine bad page loading when in the same nps mode
...
when loading bad page in the same nps mode, need to set the other fields
fields in eeprom records manually besides retired_page
Signed-off-by: ganglxie <ganglxie@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-15 14:07:53 -04:00
ganglxie
660261df61
drm/amdgpu: refine eeprom data check
...
add eeprom data checksum check before driver unload. reset eeprom
and save correct data to eeprom when check failed
Signed-off-by: ganglxie <ganglxie@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-15 14:07:53 -04:00
Ce Sun
48cb9c3b21
drm/amdgpu: The interrupt source was not released
...
When the driver is unloaded, the interrupt source of
the rma device is not released, resulting in the failure
of hw_init when loading again using bad_page_threshold.
Signed-off-by: Ce Sun <cesun102@amd.com >
Reviewed-by: Tao Zhou <tao.zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-15 14:07:51 -04:00
Alex Deucher
7a5b69d60e
drm/amdgpu/vcn5: add additional ring reset error checking
...
Start and stop can fail, so add checks.
Fixes: b54695dae9 ("drm/amd: Add per-ring reset for vcn v5.0.0 use")
Reviewed-by: Mario Limonciello <mari.limonciello@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: Mario Limonciello <mario.limonciello@amd.com >
2025-07-15 14:07:43 -04:00
Alex Deucher
1b556bcc38
drm/amdgpu/vcn4.0.5: add additional ring reset error checking
...
Start and stop can fail, so add checks.
Fixes: d1a46cdd00 ("drm/amd: Add per-ring reset for vcn v4.0.5 use")
Reviewed-by: Mario Limonciello <mari.limonciello@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: Mario Limonciello <mario.limonciello@amd.com >
2025-07-15 14:07:39 -04:00
Alex Deucher
d115a63f81
drm/amdgpu/vcn4: add additional ring reset error checking
...
Start and stop can fail, so add checks.
Fixes: b8b6e6f165 ("drm/amd: Add per-ring reset for vcn v4.0.0 use")
Reviewed-by: Mario Limonciello <mari.limonciello@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: Mario Limonciello <mario.limonciello@amd.com >
2025-07-15 14:07:34 -04:00
Alex Deucher
a4b2ba8f63
drm/amdgpu/gfx10: fix kiq locking in KCQ reset
...
The ring test needs to be inside the lock.
Fixes: 097af47d3c ("drm/amdgpu/gfx10: wait for reset done before remap")
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: Jiadong Zhu <Jiadong.Zhu@amd.com >
2025-07-15 14:07:28 -04:00
Alex Deucher
08f116c593
drm/amdgpu/gfx9.4.3: fix kiq locking in KCQ reset
...
The ring test needs to be inside the lock.
Fixes: 4c953e53cc ("drm/amdgpu/gfx_9.4.3: wait for reset done before remap")
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: Jiadong Zhu <Jiadong.Zhu@amd.com >
2025-07-15 14:07:23 -04:00
Alex Deucher
730ea5074d
drm/amdgpu/gfx9: fix kiq locking in KCQ reset
...
The ring test needs to be inside the lock.
Fixes: fdbd69486b ("drm/amdgpu/gfx9: wait for reset done before remap")
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: Jiadong Zhu <Jiadong.Zhu@amd.com >
2025-07-15 14:07:17 -04:00
Lijo Lazar
8ff4a4b98d
drm/amdgpu: Use cached partition mode, if valid
...
For current partition mode queries, return the mode cached in partition
manager whenever it's valid.
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2025-07-15 14:07:17 -04:00
Maíra Canal
0a5dc1b67e
drm/sched: Rename DRM_GPU_SCHED_STAT_NOMINAL to DRM_GPU_SCHED_STAT_RESET
...
Among the scheduler's statuses, the only one that indicates an error is
DRM_GPU_SCHED_STAT_ENODEV. Any status other than DRM_GPU_SCHED_STAT_ENODEV
signifies that the operation succeeded and the GPU is in a nominal state.
However, to provide more information about the GPU's status, it is needed
to convey more information than just "OK".
Therefore, rename DRM_GPU_SCHED_STAT_NOMINAL to
DRM_GPU_SCHED_STAT_RESET, which better communicates the meaning of this
status. The status DRM_GPU_SCHED_STAT_RESET indicates that the GPU has
hung, but it has been successfully reset and is now in a nominal state
again.
Reviewed-by: Philipp Stanner <phasta@kernel.org >
Link: https://lore.kernel.org/r/20250714-sched-skip-reset-v6-1-5c5ba4f55039@igalia.com
Signed-off-by: Maíra Canal <mcanal@igalia.com >
2025-07-15 08:27:00 -03:00
Simona Vetter
7e11e01d1f
Merge tag 'amd-drm-next-6.17-2025-07-11' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
...
amd-drm-next-6.17-2025-07-11:
amdgpu:
- Clean up function signatures
- GC 10 KGQ reset fix
- SDMA reset cleanups
- Misc fixes
- LVDS fixes
- UserQ fix
amdkfd:
- Reset fix
Signed-off-by: Simona Vetter <simona.vetter@ffwll.ch >
From: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250711205548.21052-1-alexander.deucher@amd.com
2025-07-11 23:55:40 +02:00