Skip to content

Commit 904347f

Browse files
author
Thomas Zimmermann
committed
drm/mgag200: Rename G200WB prepare/commit function
The prepare and commit helpers for G200WB devices control the BMC. Rename them accordingly. While at it, also change the passed value's type to struct mga_device and remove some type upcasting. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 70c3881 commit 904347f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

drivers/gpu/drm/mgag200/mgag200_mode.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -745,9 +745,8 @@ static int mgag200_crtc_set_plls(struct mga_device *mdev, long clock)
745745
return 0;
746746
}
747747

748-
static void mga_g200wb_prepare(struct drm_crtc *crtc)
748+
static void mgag200_g200wb_hold_bmc(struct mga_device *mdev)
749749
{
750-
struct mga_device *mdev = to_mga_device(crtc->dev);
751750
u8 tmp;
752751
int iter_max;
753752

@@ -799,10 +798,9 @@ static void mga_g200wb_prepare(struct drm_crtc *crtc)
799798
}
800799
}
801800

802-
static void mga_g200wb_commit(struct drm_crtc *crtc)
801+
static void mgag200_g200wb_release_bmc(struct mga_device *mdev)
803802
{
804803
u8 tmp;
805-
struct mga_device *mdev = to_mga_device(crtc->dev);
806804

807805
/* 1- The first step is to ensure that the vrsten and hrsten are set */
808806
WREG8(MGAREG_CRTCEXT_INDEX, 1);
@@ -1348,7 +1346,7 @@ static void mga_crtc_prepare(struct drm_crtc *crtc)
13481346
struct mga_device *mdev = to_mga_device(dev);
13491347

13501348
if (mdev->type == G200_WB || mdev->type == G200_EW3)
1351-
mga_g200wb_prepare(crtc);
1349+
mgag200_g200wb_hold_bmc(mdev);
13521350
}
13531351

13541352
/*
@@ -1361,7 +1359,7 @@ static void mga_crtc_commit(struct drm_crtc *crtc)
13611359
struct mga_device *mdev = to_mga_device(dev);
13621360

13631361
if (mdev->type == G200_WB || mdev->type == G200_EW3)
1364-
mga_g200wb_commit(crtc);
1362+
mgag200_g200wb_release_bmc(mdev);
13651363

13661364
mga_crtc_load_lut(crtc);
13671365
mgag200_enable_display(mdev);

0 commit comments

Comments
 (0)