diff options
| author | Dave Airlie <airlied@redhat.com> | 2026-11-11 16:00:05 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2026-11-12 07:17:02 +1000 |
| commit | ed7fb901fce31588bd12ab95adc36ebcb51bc8ea (patch) | |
| tree | c1df882285503dba7274f09afed953c953cd15c2 /drivers/gpu | |
| parent | 8bf8cda54c08ee3693f4dd1e2b7607fe5e466c79 (diff) | |
| download | linux-ed7fb901fce31588bd12ab95adc36ebcb51bc8ea.tar.gz linux-ed7fb901fce31588bd12ab95adc36ebcb51bc8ea.zip | |
drm/nouveau/disp: Set drm_mode_config_funcs.atomic_(check|commit) (attempt 2)
commit 604826acb3f5 attempted to add these flags but
commit 6c65db809796 reverted it due to it
failing on hw from pre-atomic times.
So use a second set of functions.
original commit msg from Lyude:
"Apparently we never actually filled these in, despite the fact that we do
in fact technically support atomic modesetting.
Since not having these filled in causes us to potentially forget to disable
fbdev and friends during suspend/resume, let's fix it."
Reported-by: Ruben Wauters <rubenru09@aol.com>
Closes: https://gitlab.freedesktop.org/drm/nouveau/-/work_items/517
Fixes: 6c65db809796 ("Revert "drm/nouveau/disp: Set drm_mode_config_funcs.atomic_(check|commit)"")
Cc: stable@vger.kernel.org
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patch.msgid.link/20261111-nouveau-atomic-fix-v1-1-118e65d3a2f5@redhat.com
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_display.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index d71dcfc6ee66..07882624a7f6 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -354,6 +354,11 @@ static const struct drm_mode_config_funcs nouveau_mode_config_funcs = { .fb_create = nouveau_user_framebuffer_create, }; +static const struct drm_mode_config_funcs nouveau_mode_config_funcs_atomic = { + .fb_create = nouveau_user_framebuffer_create, + .atomic_commit = drm_atomic_helper_commit, + .atomic_check = drm_atomic_helper_check, +}; struct nouveau_drm_prop_enum_list { u8 gen_mask; @@ -654,7 +659,11 @@ nouveau_display_create(struct drm_device *dev) drm_mode_create_scaling_mode_property(dev); drm_mode_create_dvi_i_properties(dev); - dev->mode_config.funcs = &nouveau_mode_config_funcs; + /* this only gets set if the driver has the ATOMIC flag */ + if (drm_drv_uses_atomic_modeset(dev)) + dev->mode_config.funcs = &nouveau_mode_config_funcs_atomic; + else + dev->mode_config.funcs = &nouveau_mode_config_funcs; dev->mode_config.min_width = 0; dev->mode_config.min_height = 0; |
