All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: jfalempe@redhat.com, airlied@redhat.com,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	airlied@gmail.com, jani.nikula@linux.intel.com
Cc: dri-devel@lists.freedesktop.org, Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH 10/10] drm/mgag200: Use drm_connector_helper_get_modes()
Date: Mon, 13 May 2024 14:51:15 +0200	[thread overview]
Message-ID: <20240513125620.6337-11-tzimmermann@suse.de> (raw)
In-Reply-To: <20240513125620.6337-1-tzimmermann@suse.de>

Mgag200's .get_modes() function is identical to the common helper.
Use the latter.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/mgag200/mgag200_drv.h  |  4 +---
 drivers/gpu/drm/mgag200/mgag200_mode.c | 17 -----------------
 2 files changed, 1 insertion(+), 20 deletions(-)

diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu/drm/mgag200/mgag200_drv.h
index 008fdd5af09c8..20e3710e056b3 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 a04c2b550be02..d566e8476bf81 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
@@ -737,23 +737,6 @@ void mgag200_crtc_atomic_destroy_state(struct drm_crtc *crtc, struct drm_crtc_st
 	kfree(mgag200_crtc_state);
 }
 
-/*
- * 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
  */
-- 
2.45.0


  parent reply	other threads:[~2024-05-13 12:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-13 12:51 [PATCH 00/10] drm/mgag200: Refactor DDC code Thomas Zimmermann
2024-05-13 12:51 ` [PATCH 01/10] drm/mgag200: Set DDC timeout in milliseconds Thomas Zimmermann
2024-05-13 12:51 ` [PATCH 02/10] drm/mgag200: Bind I2C lifetime to DRM device Thomas Zimmermann
2024-05-13 12:51 ` [PATCH 03/10] drm/mgag200: Store pointer to struct mga_device in struct mga_i2c_chan Thomas Zimmermann
2024-05-13 12:51 ` [PATCH 04/10] drm/mgag200: Allocate instance of struct mga_i2c_chan dynamically Thomas Zimmermann
2024-05-13 12:51 ` [PATCH 05/10] drm/mgag200: Inline mgag200_i2c_init() Thomas Zimmermann
2024-05-13 12:51 ` [PATCH 06/10] drm/mgag200: Replace struct mga_i2c_chan with struct mgag200_ddc Thomas Zimmermann
2024-05-13 12:51 ` [PATCH 07/10] drm/mgag200: Rename mgag200_i2c.c to mgag200_ddc.c Thomas Zimmermann
2024-05-13 12:51 ` [PATCH 08/10] drm/mgag200: Rename struct i2c_algo_bit_data callbacks Thomas Zimmermann
2024-05-13 12:51 ` [PATCH 09/10] drm/mgag200: Acquire I/O-register lock in DDC code Thomas Zimmermann
2024-05-13 12:51 ` Thomas Zimmermann [this message]
2024-05-16  9:14 ` [PATCH 00/10] drm/mgag200: Refactor " Jocelyn Falempe
2024-05-16 10:50   ` Thomas Zimmermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240513125620.6337-11-tzimmermann@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=jfalempe@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.