diff mbox series

[01/21] drm/amdgpu: Don't set struct drm_driver.lastclose

Message ID 20221020103755.24058-2-tzimmermann@suse.de (mailing list archive)
State Superseded
Delegated to: Kieran Bingham
Headers show
Series drm/fb-helper: Untangle fbdev emulation and helpers | expand

Commit Message

Thomas Zimmermann Oct. 20, 2022, 10:37 a.m. UTC
Don't set struct drm_driver.lastclose. 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 call to drm_client_dev_restore() in drm_lastclose().

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(-)

Comments

Christian König Oct. 20, 2022, 11:48 a.m. UTC | #1
Am 20.10.22 um 12:37 schrieb Thomas Zimmermann:
> Don't set struct drm_driver.lastclose. 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 call to drm_client_dev_restore() in drm_lastclose().

???

The commit message doesn't match what the patch is doing. You are 
removing output_poll_changed instead of lastclose here.

Did something got mixed up?

Cheers,
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(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
> index 23998f727c7f9..fb7186c5ade2a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
> @@ -1224,7 +1224,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 f6a9e8fdd87d6..e9a28a5363b9a 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,
>   };
Thomas Zimmermann Oct. 20, 2022, noon UTC | #2
Hi

Am 20.10.22 um 13:48 schrieb Christian König:
> Am 20.10.22 um 12:37 schrieb Thomas Zimmermann:
>> Don't set struct drm_driver.lastclose. 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 call to drm_client_dev_restore() in drm_lastclose().
> 
> ???
> 
> The commit message doesn't match what the patch is doing. You are 
> removing output_poll_changed instead of lastclose here.
> 
> Did something got mixed up?

Arghh. There are patches for lastclose and output_poll_changed. The 
reason for removing them is the same, but thanks to copy and paste the 
names are wrong. So the patch is correct, but the description isn't. 
Will be fixed.

Best regards
Thomas

> 
> Cheers,
> 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(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c 
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
>> index 23998f727c7f9..fb7186c5ade2a 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
>> @@ -1224,7 +1224,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 f6a9e8fdd87d6..e9a28a5363b9a 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,
>>   };
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index 23998f727c7f9..fb7186c5ade2a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -1224,7 +1224,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 f6a9e8fdd87d6..e9a28a5363b9a 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,
 };