[PATCH v2 3/3] drm/mgag200: Rename BMC vidrst names

Jocelyn Falempe jfalempe at redhat.com
Wed Jul 10 14:27:01 UTC 2024



On 10/07/2024 10:42, Thomas Zimmermann wrote:
> The BMC's scanout synchronization is only indirectly related to the
> VIDRST functionality. Do some renaming.

Thanks, it looks good to me.

Reviewed-by: Jocelyn Falempe <jfalempe at redhat.com>

> 
> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
> ---
>   drivers/gpu/drm/mgag200/mgag200_bmc.c    |  4 ++--
>   drivers/gpu/drm/mgag200/mgag200_drv.h    | 14 +++++++-------
>   drivers/gpu/drm/mgag200/mgag200_g200er.c |  4 ++--
>   drivers/gpu/drm/mgag200/mgag200_g200ev.c |  4 ++--
>   drivers/gpu/drm/mgag200/mgag200_g200se.c |  4 ++--
>   drivers/gpu/drm/mgag200/mgag200_mode.c   | 10 +++++-----
>   6 files changed, 20 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/gpu/drm/mgag200/mgag200_bmc.c b/drivers/gpu/drm/mgag200/mgag200_bmc.c
> index 1c7aa4f36787..45e35dffb3ea 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);
>   }
>   
> -void mgag200_bmc_disable_vidrst(struct mga_device *mdev)
> +void mgag200_bmc_stop_scanout(struct mga_device *mdev)
>   {
>   	u8 tmp;
>   	int iter_max;
> @@ -73,7 +73,7 @@ void mgag200_bmc_disable_vidrst(struct mga_device *mdev)
>   	}
>   }
>   
> -void mgag200_bmc_enable_vidrst(struct mga_device *mdev)
> +void mgag200_bmc_start_scanout(struct mga_device *mdev)
>   {
>   	u8 tmp;
>   
> diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu/drm/mgag200/mgag200_drv.h
> index 4a46c8c006c8..f97eaa49b089 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), \
> @@ -430,9 +430,9 @@ int mgag200_mode_config_init(struct mga_device *mdev, resource_size_t vram_avail
>   /* mgag200_vga.c */
>   int mgag200_vga_output_init(struct mga_device *mdev);
>   
> -				/* mgag200_bmc.c */
> -void mgag200_bmc_disable_vidrst(struct mga_device *mdev);
> -void mgag200_bmc_enable_vidrst(struct mga_device *mdev);
> +/* mgag200_bmc.c */
> +void mgag200_bmc_stop_scanout(struct mga_device *mdev);
> +void mgag200_bmc_start_scanout(struct mga_device *mdev);
>   int mgag200_bmc_output_init(struct mga_device *mdev, struct drm_connector *physical_connector);
>   
>   #endif				/* __MGAG200_DRV_H__ */
> diff --git a/drivers/gpu/drm/mgag200/mgag200_g200er.c b/drivers/gpu/drm/mgag200/mgag200_g200er.c
> index b3bb3e9fb0d1..737a48aa9160 100644
> --- a/drivers/gpu/drm/mgag200/mgag200_g200er.c
> +++ b/drivers/gpu/drm/mgag200/mgag200_g200er.c
> @@ -206,8 +206,8 @@ static void mgag200_g200er_crtc_helper_atomic_enable(struct drm_crtc *crtc,
>   
>   	mgag200_enable_display(mdev);
>   
> -	if (mdev->info->has_vidrst)
> -		mgag200_bmc_enable_vidrst(mdev);
> +	if (mdev->info->sync_bmc)
> +		mgag200_bmc_start_scanout(mdev);
>   }
>   
>   static const struct drm_crtc_helper_funcs mgag200_g200er_crtc_helper_funcs = {
> diff --git a/drivers/gpu/drm/mgag200/mgag200_g200ev.c b/drivers/gpu/drm/mgag200/mgag200_g200ev.c
> index 3ac0a508e2c5..8d1ccc2ad94a 100644
> --- a/drivers/gpu/drm/mgag200/mgag200_g200ev.c
> +++ b/drivers/gpu/drm/mgag200/mgag200_g200ev.c
> @@ -207,8 +207,8 @@ static void mgag200_g200ev_crtc_helper_atomic_enable(struct drm_crtc *crtc,
>   
>   	mgag200_enable_display(mdev);
>   
> -	if (mdev->info->has_vidrst)
> -		mgag200_bmc_enable_vidrst(mdev);
> +	if (mdev->info->sync_bmc)
> +		mgag200_bmc_start_scanout(mdev);
>   }
>   
>   static const struct drm_crtc_helper_funcs mgag200_g200ev_crtc_helper_funcs = {
> diff --git a/drivers/gpu/drm/mgag200/mgag200_g200se.c b/drivers/gpu/drm/mgag200/mgag200_g200se.c
> index 7a8099eb100c..cf7f6897838f 100644
> --- a/drivers/gpu/drm/mgag200/mgag200_g200se.c
> +++ b/drivers/gpu/drm/mgag200/mgag200_g200se.c
> @@ -338,8 +338,8 @@ static void mgag200_g200se_crtc_helper_atomic_enable(struct drm_crtc *crtc,
>   
>   	mgag200_enable_display(mdev);
>   
> -	if (mdev->info->has_vidrst)
> -		mgag200_bmc_enable_vidrst(mdev);
> +	if (mdev->info->sync_bmc)
> +		mgag200_bmc_start_scanout(mdev);
>   }
>   
>   static const struct drm_crtc_helper_funcs mgag200_g200se_crtc_helper_funcs = {
> diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
> index fcc10723d385..735eb5906892 100644
> --- a/drivers/gpu/drm/mgag200/mgag200_mode.c
> +++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
> @@ -610,7 +610,7 @@ int mgag200_crtc_helper_atomic_check(struct drm_crtc *crtc, struct drm_atomic_st
>   	if (ret)
>   		return ret;
>   
> -	new_mgag200_crtc_state->set_vidrst = mdev->info->has_vidrst;
> +	new_mgag200_crtc_state->set_vidrst = mdev->info->sync_bmc;
>   
>   	if (new_crtc_state->mode_changed) {
>   		if (funcs->pixpllc_atomic_check) {
> @@ -670,16 +670,16 @@ void mgag200_crtc_helper_atomic_enable(struct drm_crtc *crtc, struct drm_atomic_
>   
>   	mgag200_enable_display(mdev);
>   
> -	if (mdev->info->has_vidrst)
> -		mgag200_bmc_enable_vidrst(mdev);
> +	if (mdev->info->sync_bmc)
> +		mgag200_bmc_start_scanout(mdev);
>   }
>   
>   void mgag200_crtc_helper_atomic_disable(struct drm_crtc *crtc, struct drm_atomic_state *old_state)
>   {
>   	struct mga_device *mdev = to_mga_device(crtc->dev);
>   
> -	if (mdev->info->has_vidrst)
> -		mgag200_bmc_disable_vidrst(mdev);
> +	if (mdev->info->sync_bmc)
> +		mgag200_bmc_stop_scanout(mdev);
>   
>   	mgag200_disable_display(mdev);
>   }



More information about the dri-devel mailing list