drm/mgag200: Rename BMC vidrst names

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

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240711072415.11831-4-tzimmermann@suse.de
This commit is contained in:
Thomas Zimmermann 2024-07-11 09:23:06 +02:00
parent 7bb97cf915
commit 3ac9384061
6 changed files with 20 additions and 20 deletions

View File

@ -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;

View File

@ -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__ */

View File

@ -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 = {

View File

@ -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 = {

View File

@ -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 = {

View File

@ -608,7 +608,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) {
@ -668,16 +668,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);
}