drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
From: Lu Yao <yaolu@kylinos.cn>
When driver not support atomic, fb using plane->fb rather than
plane->state->fb.
Fixes: fe151ed7af54 ("drm/amdgpu: add generic display panic helper code")
Signed-off-by: Lu Yao <yaolu@kylinos.cn>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index b5d34797d606..52bc04452812 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -1880,7 +1880,12 @@ int amdgpu_display_get_scanout_buffer(struct drm_plane *plane,
struct drm_scanout_buffer *sb)
{
struct amdgpu_bo *abo;
- struct drm_framebuffer *fb = plane->state->fb;
+ struct drm_framebuffer *fb;
+
+ if (drm_drv_uses_atomic_modeset(plane->dev))
+ fb = plane->state->fb;
+ else
+ fb = plane->fb;
if (!fb)
return -EINVAL;
--
2.25.1
Applied. Thanks!
On Mon, Jan 5, 2026 at 9:37 PM <yaolu@kylinos.cn> wrote:
>
> From: Lu Yao <yaolu@kylinos.cn>
>
> When driver not support atomic, fb using plane->fb rather than
> plane->state->fb.
>
> Fixes: fe151ed7af54 ("drm/amdgpu: add generic display panic helper code")
> Signed-off-by: Lu Yao <yaolu@kylinos.cn>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
> index b5d34797d606..52bc04452812 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
> @@ -1880,7 +1880,12 @@ int amdgpu_display_get_scanout_buffer(struct drm_plane *plane,
> struct drm_scanout_buffer *sb)
> {
> struct amdgpu_bo *abo;
> - struct drm_framebuffer *fb = plane->state->fb;
> + struct drm_framebuffer *fb;
> +
> + if (drm_drv_uses_atomic_modeset(plane->dev))
> + fb = plane->state->fb;
> + else
> + fb = plane->fb;
>
> if (!fb)
> return -EINVAL;
> --
> 2.25.1
>
© 2016 - 2026 Red Hat, Inc.