Message ID | 20221024111953.24307-5-tzimmermann@suse.de |
---|---|
State | Superseded |
Headers | show |
Series | drm/fb-helper: Untangle fbdev emulation and helpers | expand |
On 10/24/22 13:19, Thomas Zimmermann wrote: > Don't set struct drm_driver.output_poll_changed. It's used to restore > the fbdev console. But as amdgpu uses generic fbdev emulation, the > console is being restored by the DRM client helpers already. See the > functions drm_kms_helper_hotplug_event() and > drm_kms_helper_connector_hotplug_event() in drm_probe_helper.c. > > v2: > * fix commit description (Christian) > > Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> > --- Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Do you think that the fbdev helpers kernel doc has to be updated to mention that drm_fb_helper_lastclose() and drm_fb_helper_output_poll_changed() are not needed when generic fbdev emulation is used? Because by reading that is not clear that's the case: https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/drm_fb_helper.c#L86
On 10/24/22 13:19, Thomas Zimmermann wrote: > Don't set struct drm_driver.output_poll_changed. It's used to restore > the fbdev console. But as amdgpu uses generic fbdev emulation, the > console is being restored by the DRM client helpers already. See the > functions drm_kms_helper_hotplug_event() and > drm_kms_helper_connector_hotplug_event() in drm_probe_helper.c. > > v2: > * fix commit description (Christian) > > Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> > --- Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c index 1a06b8d724f39..dd6f9ae6fbe9f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c @@ -1214,7 +1214,6 @@ amdgpu_display_user_framebuffer_create(struct drm_device *dev, const struct drm_mode_config_funcs amdgpu_mode_funcs = { .fb_create = amdgpu_display_user_framebuffer_create, - .output_poll_changed = drm_fb_helper_output_poll_changed, }; static const struct drm_prop_enum_list amdgpu_underscan_enum_list[] = diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 0db2a88cd4d7b..528b8be516ff6 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -82,7 +82,6 @@ #include <drm/drm_atomic_uapi.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_blend.h> -#include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_edid.h> #include <drm/drm_vblank.h> @@ -2810,7 +2809,6 @@ const struct amdgpu_ip_block_version dm_ip_block = static const struct drm_mode_config_funcs amdgpu_dm_mode_funcs = { .fb_create = amdgpu_display_user_framebuffer_create, .get_format_info = amd_get_format_info, - .output_poll_changed = drm_fb_helper_output_poll_changed, .atomic_check = amdgpu_dm_atomic_check, .atomic_commit = drm_atomic_helper_commit, };
Don't set struct drm_driver.output_poll_changed. It's used to restore the fbdev console. But as amdgpu uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the functions drm_kms_helper_hotplug_event() and drm_kms_helper_connector_hotplug_event() in drm_probe_helper.c. v2: * fix commit description (Christian) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 1 - drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 -- 2 files changed, 3 deletions(-)