Commit 2b60e11d authored by Sean Paul's avatar Sean Paul

drm/rockchip: Use vop_win in vop_win_disable instead of vop_win_data

Change the argument to vop_win_disable to vop_win to accomodate future
changes to the function.

Changes in v4:
- Added to the patchset
Changes in v5:
- None

Link to v4: https://patchwork.freedesktop.org/patch/msgid/20190508160920.144739-10-sean@poorly.runTested-by: default avatarHeiko Stuebner <heiko@sntech.de>
Reviewed-by: default avatarHeiko Stuebner <heiko@sntech.de>
Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190611160844.257498-10-sean@poorly.run
parent 6c836d96
...@@ -531,8 +531,10 @@ static void vop_core_clks_disable(struct vop *vop) ...@@ -531,8 +531,10 @@ static void vop_core_clks_disable(struct vop *vop)
clk_disable(vop->hclk); clk_disable(vop->hclk);
} }
static void vop_win_disable(struct vop *vop, const struct vop_win_data *win) static void vop_win_disable(struct vop *vop, const struct vop_win *vop_win)
{ {
const struct vop_win_data *win = vop_win->data;
if (win->phy->scl && win->phy->scl->ext) { if (win->phy->scl && win->phy->scl->ext) {
VOP_SCL_SET_EXT(vop, win, yrgb_hor_scl_mode, SCALE_NONE); VOP_SCL_SET_EXT(vop, win, yrgb_hor_scl_mode, SCALE_NONE);
VOP_SCL_SET_EXT(vop, win, yrgb_ver_scl_mode, SCALE_NONE); VOP_SCL_SET_EXT(vop, win, yrgb_ver_scl_mode, SCALE_NONE);
...@@ -591,9 +593,8 @@ static int vop_enable(struct drm_crtc *crtc, struct drm_crtc_state *old_state) ...@@ -591,9 +593,8 @@ static int vop_enable(struct drm_crtc *crtc, struct drm_crtc_state *old_state)
if (!old_state || !old_state->self_refresh_active) { if (!old_state || !old_state->self_refresh_active) {
for (i = 0; i < vop->data->win_size; i++) { for (i = 0; i < vop->data->win_size; i++) {
struct vop_win *vop_win = &vop->win[i]; struct vop_win *vop_win = &vop->win[i];
const struct vop_win_data *win = vop_win->data;
vop_win_disable(vop, win); vop_win_disable(vop, vop_win);
} }
} }
spin_unlock(&vop->reg_lock); spin_unlock(&vop->reg_lock);
...@@ -741,7 +742,6 @@ static void vop_plane_atomic_disable(struct drm_plane *plane, ...@@ -741,7 +742,6 @@ static void vop_plane_atomic_disable(struct drm_plane *plane,
struct drm_plane_state *old_state) struct drm_plane_state *old_state)
{ {
struct vop_win *vop_win = to_vop_win(plane); struct vop_win *vop_win = to_vop_win(plane);
const struct vop_win_data *win = vop_win->data;
struct vop *vop = to_vop(old_state->crtc); struct vop *vop = to_vop(old_state->crtc);
if (!old_state->crtc) if (!old_state->crtc)
...@@ -749,7 +749,7 @@ static void vop_plane_atomic_disable(struct drm_plane *plane, ...@@ -749,7 +749,7 @@ static void vop_plane_atomic_disable(struct drm_plane *plane,
spin_lock(&vop->reg_lock); spin_lock(&vop->reg_lock);
vop_win_disable(vop, win); vop_win_disable(vop, vop_win);
spin_unlock(&vop->reg_lock); spin_unlock(&vop->reg_lock);
} }
...@@ -1582,7 +1582,6 @@ static void vop_destroy_crtc(struct vop *vop) ...@@ -1582,7 +1582,6 @@ static void vop_destroy_crtc(struct vop *vop)
static int vop_initial(struct vop *vop) static int vop_initial(struct vop *vop)
{ {
const struct vop_data *vop_data = vop->data;
struct reset_control *ahb_rst; struct reset_control *ahb_rst;
int i, ret; int i, ret;
...@@ -1649,12 +1648,13 @@ static int vop_initial(struct vop *vop) ...@@ -1649,12 +1648,13 @@ static int vop_initial(struct vop *vop)
VOP_REG_SET(vop, misc, global_regdone_en, 1); VOP_REG_SET(vop, misc, global_regdone_en, 1);
VOP_REG_SET(vop, common, dsp_blank, 0); VOP_REG_SET(vop, common, dsp_blank, 0);
for (i = 0; i < vop_data->win_size; i++) { for (i = 0; i < vop->data->win_size; i++) {
const struct vop_win_data *win = &vop_data->win[i]; struct vop_win *vop_win = &vop->win[i];
const struct vop_win_data *win = vop_win->data;
int channel = i * 2 + 1; int channel = i * 2 + 1;
VOP_WIN_SET(vop, win, channel, (channel + 1) << 4 | channel); VOP_WIN_SET(vop, win, channel, (channel + 1) << 4 | channel);
vop_win_disable(vop, win); vop_win_disable(vop, vop_win);
VOP_WIN_SET(vop, win, gate, 1); VOP_WIN_SET(vop, win, gate, 1);
} }
......
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