drm: mode_config_initialized cleanups.
Subsystems (3)
cover drm: mode_config_initialized cleanups.
Gerd Hoffmann (2):
drm/bochs: drop mode_config_initialized drm/cirrus: drop mode_info.mode_config_initialized
drivers/gpu/drm/bochs/bochs.h | 1 - drivers/gpu/drm/cirrus/cirrus_drv.h | 1 - drivers/gpu/drm/bochs/bochs_kms.c | 8 ++------ drivers/gpu/drm/cirrus/cirrus_mode.c | 9 ++------- 4 files changed, 4 insertions(+), 15 deletions(-)
Signature · 6 lines
2.18.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/2 drm/bochs: drop mode_config_initialized
Signed-off-by Gerd Hoffmann <[email protected]>
--- drivers/gpu/drm/bochs/bochs.h | 1 - drivers/gpu/drm/bochs/bochs_kms.c | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-)
drivers/gpu/drm/bochs/bochs.h +0 -1
@@ -73,7 +73,6 @@ struct bochs_device {struct drm_crtc crtc;struct drm_encoder encoder;struct drm_connector connector; -bool mode_config_initialized;/* ttm */ struct {
drivers/gpu/drm/bochs/bochs_kms.c +2 -6
@@ -267,7 +267,6 @@ const struct drm_mode_config_funcs bochs_mode_funcs = {int bochs_kms_init (struct bochs_device *bochs) {drm_mode_config_init (bochs->dev); - bochs->mode_config_initialized = true; bochs->dev->mode_config.max_width =8192 ; bochs->dev->mode_config.max_height =8192 ;
@@ -292,9 +291,6 @@ int bochs_kms_init(struct bochs_device *bochs)void bochs_kms_fini (struct bochs_device *bochs) { -if (bochs->mode_config_initialized) { -drm_atomic_helper_shutdown (bochs->dev); -drm_mode_config_cleanup (bochs->dev); - bochs->mode_config_initialized = false; - } +drm_atomic_helper_shutdown (bochs->dev); +drm_mode_config_cleanup (bochs->dev); }
Signature · 1 line
2.18.1
PATCH 1/2 drm/bochs: drop mode_config_initialized
In reply to Gerd HoffmannSigned-off-by Gerd Hoffmann <[email protected]>
--- drivers/gpu/drm/bochs/bochs.h | 1 - drivers/gpu/drm/bochs/bochs_kms.c | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-)
drivers/gpu/drm/bochs/bochs.h +0 -1
@@ -73,7 +73,6 @@ struct bochs_device {struct drm_crtc crtc;struct drm_encoder encoder;struct drm_connector connector; -bool mode_config_initialized;/* ttm */ struct {
drivers/gpu/drm/bochs/bochs_kms.c +2 -6
@@ -267,7 +267,6 @@ const struct drm_mode_config_funcs bochs_mode_funcs = {int bochs_kms_init (struct bochs_device *bochs) {drm_mode_config_init (bochs->dev); - bochs->mode_config_initialized = true; bochs->dev->mode_config.max_width =8192 ; bochs->dev->mode_config.max_height =8192 ;
@@ -292,9 +291,6 @@ int bochs_kms_init(struct bochs_device *bochs)void bochs_kms_fini (struct bochs_device *bochs) { -if (bochs->mode_config_initialized) { -drm_atomic_helper_shutdown (bochs->dev); -drm_mode_config_cleanup (bochs->dev); - bochs->mode_config_initialized = false; - } +drm_atomic_helper_shutdown (bochs->dev); +drm_mode_config_cleanup (bochs->dev); }
Signature · 1 line
2.18.1
PATCH 2/2 drm/cirrus: drop mode_info.mode_config_initialized
In reply to Gerd HoffmannSigned-off-by Gerd Hoffmann <[email protected]>
--- drivers/gpu/drm/cirrus/cirrus_drv.h | 1 - drivers/gpu/drm/cirrus/cirrus_mode.c | 9 ++------- 2 files changed, 2 insertions(+), 8 deletions(-)
drivers/gpu/drm/cirrus/cirrus_drv.h +0 -1
@@ -101,7 +101,6 @@ struct cirrus_crtc {struct cirrus_fbdev ;struct cirrus_mode_info { -bool mode_config_initialized;struct cirrus_crtc *crtc;/* pointer to fbdev info structure */ struct cirrus_fbdev *gfbdev;
drivers/gpu/drm/cirrus/cirrus_mode.c +2 -7
@@ -575,7 +575,6 @@ int cirrus_modeset_init(struct cirrus_device *cdev)int ret;drm_mode_config_init (cdev->dev); - cdev->mode_info.mode_config_initialized = true; cdev->dev->mode_config.max_width =CIRRUS_MAX_FB_WIDTH ; cdev->dev->mode_config.max_height =CIRRUS_MAX_FB_HEIGHT ;
@@ -613,10 +612,6 @@ int cirrus_modeset_init(struct cirrus_device *cdev)void cirrus_modeset_fini (struct cirrus_device *cdev) {cirrus_fbdev_fini (cdev); - -if (cdev->mode_info.mode_config_initialized) { -drm_helper_force_disable_all (cdev->dev); -drm_mode_config_cleanup (cdev->dev); - cdev->mode_info.mode_config_initialized = false; - } +drm_helper_force_disable_all (cdev->dev); +drm_mode_config_cleanup (cdev->dev); }
Signature · 1 line
2.18.1
PATCH 2/2 drm/cirrus: drop mode_info.mode_config_initialized
In reply to Gerd HoffmannSigned-off-by Gerd Hoffmann <[email protected]>
--- drivers/gpu/drm/cirrus/cirrus_drv.h | 1 - drivers/gpu/drm/cirrus/cirrus_mode.c | 9 ++------- 2 files changed, 2 insertions(+), 8 deletions(-)
drivers/gpu/drm/cirrus/cirrus_drv.h +0 -1
@@ -101,7 +101,6 @@ struct cirrus_crtc {struct cirrus_fbdev ;struct cirrus_mode_info { -bool mode_config_initialized;struct cirrus_crtc *crtc;/* pointer to fbdev info structure */ struct cirrus_fbdev *gfbdev;
drivers/gpu/drm/cirrus/cirrus_mode.c +2 -7
@@ -575,7 +575,6 @@ int cirrus_modeset_init(struct cirrus_device *cdev)int ret;drm_mode_config_init (cdev->dev); - cdev->mode_info.mode_config_initialized = true; cdev->dev->mode_config.max_width =CIRRUS_MAX_FB_WIDTH ; cdev->dev->mode_config.max_height =CIRRUS_MAX_FB_HEIGHT ;
@@ -613,10 +612,6 @@ int cirrus_modeset_init(struct cirrus_device *cdev)void cirrus_modeset_fini (struct cirrus_device *cdev) {cirrus_fbdev_fini (cdev); - -if (cdev->mode_info.mode_config_initialized) { -drm_helper_force_disable_all (cdev->dev); -drm_mode_config_cleanup (cdev->dev); - cdev->mode_info.mode_config_initialized = false; - } +drm_helper_force_disable_all (cdev->dev); +drm_mode_config_cleanup (cdev->dev); }
Signature · 1 line
2.18.1
Quoted 5 lines · Gerd Hoffmann
Gerd Hoffmann (2):
drm/bochs: dropmode_config_initializeddrm/cirrus: drop mode_info.mode_config_initialized
On both: Reviewed-by: Daniel Vetter <[email protected]>
Quoted 14 lines
drivers/gpu/drm/bochs/bochs.h | 1 - drivers/gpu/drm/cirrus/cirrus_drv.h | 1 - drivers/gpu/drm/bochs/bochs_kms.c | 8 ++------ drivers/gpu/drm/cirrus/cirrus_mode.c | 9 ++------- 4 files changed, 4 insertions(+), 15 deletions(-)Signature · 6 lines
2.18.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel