diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2024-05-13 14:51:15 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2024-05-17 17:20:26 +0200 |
commit | 46c131986030d48c64a1df43b8512db168a8d8b0 (patch) | |
tree | fabbb737e5da1946fcfe20cc79e87491cee68d9c /drivers/gpu/drm/mgag200 | |
parent | 66d58ec0bc659fafcda962a5678dbb3f061d7359 (diff) | |
download | linux-46c131986030d48c64a1df43b8512db168a8d8b0.tar.gz linux-46c131986030d48c64a1df43b8512db168a8d8b0.tar.bz2 linux-46c131986030d48c64a1df43b8512db168a8d8b0.zip |
drm/mgag200: Use drm_connector_helper_get_modes()
Mgag200's .get_modes() function is identical to the common helper.
Use the latter.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-11-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/mgag200')
-rw-r--r-- | drivers/gpu/drm/mgag200/mgag200_drv.h | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/mgag200/mgag200_mode.c | 17 |
2 files changed, 1 insertions, 20 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu/drm/mgag200/mgag200_drv.h index 008fdd5af09c..20e3710e056b 100644 --- a/drivers/gpu/drm/mgag200/mgag200_drv.h +++ b/drivers/gpu/drm/mgag200/mgag200_drv.h @@ -420,10 +420,8 @@ void mgag200_crtc_atomic_destroy_state(struct drm_crtc *crtc, struct drm_crtc_st #define MGAG200_DAC_ENCODER_FUNCS \ .destroy = drm_encoder_cleanup -int mgag200_vga_connector_helper_get_modes(struct drm_connector *connector); - #define MGAG200_VGA_CONNECTOR_HELPER_FUNCS \ - .get_modes = mgag200_vga_connector_helper_get_modes + .get_modes = drm_connector_helper_get_modes #define MGAG200_VGA_CONNECTOR_FUNCS \ .reset = drm_atomic_helper_connector_reset, \ diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c index a04c2b550be0..d566e8476bf8 100644 --- a/drivers/gpu/drm/mgag200/mgag200_mode.c +++ b/drivers/gpu/drm/mgag200/mgag200_mode.c @@ -738,23 +738,6 @@ void mgag200_crtc_atomic_destroy_state(struct drm_crtc *crtc, struct drm_crtc_st } /* - * Connector - */ - -int mgag200_vga_connector_helper_get_modes(struct drm_connector *connector) -{ - const struct drm_edid *drm_edid; - int count; - - drm_edid = drm_edid_read(connector); - drm_edid_connector_update(connector, drm_edid); - count = drm_edid_connector_add_modes(connector); - drm_edid_free(drm_edid); - - return count; -} - -/* * Mode config */ |