Commit 3ac93840 authored by Thomas Zimmermann's avatar Thomas Zimmermann

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: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarJocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240711072415.11831-4-tzimmermann@suse.de
parent 7bb97cf9
...@@ -14,7 +14,7 @@ static struct mgag200_bmc_connector *to_mgag200_bmc_connector(struct drm_connect ...@@ -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); 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; u8 tmp;
int iter_max; int iter_max;
...@@ -73,7 +73,7 @@ void mgag200_bmc_disable_vidrst(struct mga_device *mdev) ...@@ -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; u8 tmp;
......
...@@ -216,8 +216,8 @@ struct mgag200_device_info { ...@@ -216,8 +216,8 @@ struct mgag200_device_info {
*/ */
unsigned long max_mem_bandwidth; unsigned long max_mem_bandwidth;
/* HW has external source (e.g., BMC) to synchronize with */ /* Synchronize scanout with BMC */
bool has_vidrst:1; bool sync_bmc:1;
struct { struct {
unsigned data_bit:3; unsigned data_bit:3;
...@@ -232,13 +232,13 @@ struct mgag200_device_info { ...@@ -232,13 +232,13 @@ struct mgag200_device_info {
}; };
#define MGAG200_DEVICE_INFO_INIT(_max_hdisplay, _max_vdisplay, _max_mem_bandwidth, \ #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) \ _bug_no_startadd) \
{ \ { \
.max_hdisplay = (_max_hdisplay), \ .max_hdisplay = (_max_hdisplay), \
.max_vdisplay = (_max_vdisplay), \ .max_vdisplay = (_max_vdisplay), \
.max_mem_bandwidth = (_max_mem_bandwidth), \ .max_mem_bandwidth = (_max_mem_bandwidth), \
.has_vidrst = (_has_vidrst), \ .sync_bmc = (_sync_bmc), \
.i2c = { \ .i2c = { \
.data_bit = (_i2c_data_bit), \ .data_bit = (_i2c_data_bit), \
.clock_bit = (_i2c_clock_bit), \ .clock_bit = (_i2c_clock_bit), \
...@@ -430,9 +430,9 @@ int mgag200_mode_config_init(struct mga_device *mdev, resource_size_t vram_avail ...@@ -430,9 +430,9 @@ int mgag200_mode_config_init(struct mga_device *mdev, resource_size_t vram_avail
/* mgag200_vga.c */ /* mgag200_vga.c */
int mgag200_vga_output_init(struct mga_device *mdev); int mgag200_vga_output_init(struct mga_device *mdev);
/* mgag200_bmc.c */ /* mgag200_bmc.c */
void mgag200_bmc_disable_vidrst(struct mga_device *mdev); void mgag200_bmc_stop_scanout(struct mga_device *mdev);
void mgag200_bmc_enable_vidrst(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); int mgag200_bmc_output_init(struct mga_device *mdev, struct drm_connector *physical_connector);
#endif /* __MGAG200_DRV_H__ */ #endif /* __MGAG200_DRV_H__ */
...@@ -206,8 +206,8 @@ static void mgag200_g200er_crtc_helper_atomic_enable(struct drm_crtc *crtc, ...@@ -206,8 +206,8 @@ static void mgag200_g200er_crtc_helper_atomic_enable(struct drm_crtc *crtc,
mgag200_enable_display(mdev); mgag200_enable_display(mdev);
if (mdev->info->has_vidrst) if (mdev->info->sync_bmc)
mgag200_bmc_enable_vidrst(mdev); mgag200_bmc_start_scanout(mdev);
} }
static const struct drm_crtc_helper_funcs mgag200_g200er_crtc_helper_funcs = { static const struct drm_crtc_helper_funcs mgag200_g200er_crtc_helper_funcs = {
......
...@@ -207,8 +207,8 @@ static void mgag200_g200ev_crtc_helper_atomic_enable(struct drm_crtc *crtc, ...@@ -207,8 +207,8 @@ static void mgag200_g200ev_crtc_helper_atomic_enable(struct drm_crtc *crtc,
mgag200_enable_display(mdev); mgag200_enable_display(mdev);
if (mdev->info->has_vidrst) if (mdev->info->sync_bmc)
mgag200_bmc_enable_vidrst(mdev); mgag200_bmc_start_scanout(mdev);
} }
static const struct drm_crtc_helper_funcs mgag200_g200ev_crtc_helper_funcs = { static const struct drm_crtc_helper_funcs mgag200_g200ev_crtc_helper_funcs = {
......
...@@ -338,8 +338,8 @@ static void mgag200_g200se_crtc_helper_atomic_enable(struct drm_crtc *crtc, ...@@ -338,8 +338,8 @@ static void mgag200_g200se_crtc_helper_atomic_enable(struct drm_crtc *crtc,
mgag200_enable_display(mdev); mgag200_enable_display(mdev);
if (mdev->info->has_vidrst) if (mdev->info->sync_bmc)
mgag200_bmc_enable_vidrst(mdev); mgag200_bmc_start_scanout(mdev);
} }
static const struct drm_crtc_helper_funcs mgag200_g200se_crtc_helper_funcs = { static const struct drm_crtc_helper_funcs mgag200_g200se_crtc_helper_funcs = {
......
...@@ -608,7 +608,7 @@ int mgag200_crtc_helper_atomic_check(struct drm_crtc *crtc, struct drm_atomic_st ...@@ -608,7 +608,7 @@ int mgag200_crtc_helper_atomic_check(struct drm_crtc *crtc, struct drm_atomic_st
if (ret) if (ret)
return 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 (new_crtc_state->mode_changed) {
if (funcs->pixpllc_atomic_check) { if (funcs->pixpllc_atomic_check) {
...@@ -668,16 +668,16 @@ void mgag200_crtc_helper_atomic_enable(struct drm_crtc *crtc, struct drm_atomic_ ...@@ -668,16 +668,16 @@ void mgag200_crtc_helper_atomic_enable(struct drm_crtc *crtc, struct drm_atomic_
mgag200_enable_display(mdev); mgag200_enable_display(mdev);
if (mdev->info->has_vidrst) if (mdev->info->sync_bmc)
mgag200_bmc_enable_vidrst(mdev); mgag200_bmc_start_scanout(mdev);
} }
void mgag200_crtc_helper_atomic_disable(struct drm_crtc *crtc, struct drm_atomic_state *old_state) 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); struct mga_device *mdev = to_mga_device(crtc->dev);
if (mdev->info->has_vidrst) if (mdev->info->sync_bmc)
mgag200_bmc_disable_vidrst(mdev); mgag200_bmc_stop_scanout(mdev);
mgag200_disable_display(mdev); mgag200_disable_display(mdev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment