[PATCH 4/4] drm/mgag200: Rename BMC vidrst names

Thomas Zimmermann tzimmermann at suse.de
Wed Jul 3 13:40:06 UTC 2024


The BMC's scanout synchronization is only indirectly related to the
VIDRST functionality. Do some renaming.

Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
---
 drivers/gpu/drm/mgag200/mgag200_bmc.c | 14 +++++++-------
 drivers/gpu/drm/mgag200/mgag200_drv.h |  8 ++++----
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/mgag200/mgag200_bmc.c b/drivers/gpu/drm/mgag200/mgag200_bmc.c
index 74feb6d8db45..a590f564573f 100644
--- a/drivers/gpu/drm/mgag200/mgag200_bmc.c
+++ b/drivers/gpu/drm/mgag200/mgag200_bmc.c
@@ -14,7 +14,7 @@ static struct mgag200_bmc_connector *to_mgag200_bmc_connector(struct drm_connect
 	return container_of(connector, struct mgag200_bmc_connector, base);
 }
 
-static void mgag200_bmc_disable_vidrst(struct mga_device *mdev)
+static void mgag200_bmc_stop_scanout(struct mga_device *mdev)
 {
 	u8 tmp;
 	int iter_max;
@@ -78,11 +78,11 @@ static void mgag200_bmc_encoder_helper_atomic_disable(struct drm_encoder *encode
 {
 	struct mga_device *mdev = to_mga_device(encoder->dev);
 
-	if (mdev->info->has_vidrst)
-		mgag200_bmc_disable_vidrst(mdev);
+	if (mdev->info->sync_bmc)
+		mgag200_bmc_stop_scanout(mdev);
 }
 
-static void mgag200_bmc_enable_vidrst(struct mga_device *mdev)
+static void mgag200_bmc_start_scanout(struct mga_device *mdev)
 {
 	u8 tmp;
 
@@ -117,8 +117,8 @@ static void mgag200_bmc_encoder_helper_atomic_enable(struct drm_encoder *encoder
 {
 	struct mga_device *mdev = to_mga_device(encoder->dev);
 
-	if (mdev->info->has_vidrst)
-		mgag200_bmc_enable_vidrst(mdev);
+	if (mdev->info->sync_bmc)
+		mgag200_bmc_start_scanout(mdev);
 }
 
 static int mgag200_bmc_encoder_helper_atomic_check(struct drm_encoder *encoder,
@@ -128,7 +128,7 @@ static int mgag200_bmc_encoder_helper_atomic_check(struct drm_encoder *encoder,
 	struct mga_device *mdev = to_mga_device(encoder->dev);
 	struct mgag200_crtc_state *mgag200_crtc_state = to_mgag200_crtc_state(crtc_state);
 
-	if (mdev->info->has_vidrst)
+	if (mdev->info->sync_bmc)
 		mgag200_crtc_state->set_vidrst = true;
 	else
 		mgag200_crtc_state->set_vidrst = false;
diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu/drm/mgag200/mgag200_drv.h
index 64ba8a7118dc..cc7bd5f2ed6f 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.h
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.h
@@ -216,8 +216,8 @@ struct mgag200_device_info {
 	 */
 	unsigned long max_mem_bandwidth;
 
-	/* HW has external source (e.g., BMC) to synchronize with */
-	bool has_vidrst:1;
+	/* Synchronize scanout with BMC */
+	bool sync_bmc:1;
 
 	struct {
 		unsigned data_bit:3;
@@ -232,13 +232,13 @@ struct mgag200_device_info {
 };
 
 #define MGAG200_DEVICE_INFO_INIT(_max_hdisplay, _max_vdisplay, _max_mem_bandwidth, \
-				 _has_vidrst, _i2c_data_bit, _i2c_clock_bit, \
+				 _sync_bmc, _i2c_data_bit, _i2c_clock_bit, \
 				 _bug_no_startadd) \
 	{ \
 		.max_hdisplay = (_max_hdisplay), \
 		.max_vdisplay = (_max_vdisplay), \
 		.max_mem_bandwidth = (_max_mem_bandwidth), \
-		.has_vidrst = (_has_vidrst), \
+		.sync_bmc = (_sync_bmc), \
 		.i2c = { \
 			.data_bit = (_i2c_data_bit), \
 			.clock_bit = (_i2c_clock_bit), \
-- 
2.45.2



More information about the dri-devel mailing list