diff options
author | Jagan Teki | 2024-01-17 13:21:43 +0530 |
---|---|---|
committer | Anatolij Gustschin | 2024-04-21 09:07:00 +0200 |
commit | 3c0f45c632bb5240208a07b104e279d0f8f5eb9a (patch) | |
tree | 9cfa4ecfac675dc1627c697ba92e89e3c392bd78 /drivers | |
parent | 25353b5b8b2be4402ec449946235b07670217666 (diff) |
video: rockchip: vop: Simplify rkvop_enable
Get the regs from priv pointer instead of passing it an argument.
This would simplify the code and better readability.
Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/rockchip/rk_vop.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/rockchip/rk_vop.c b/drivers/video/rockchip/rk_vop.c index c514e2a0e44..158ba7cbf69 100644 --- a/drivers/video/rockchip/rk_vop.c +++ b/drivers/video/rockchip/rk_vop.c @@ -39,11 +39,13 @@ enum vop_pol { DCLK_INVERT = 3 }; -static void rkvop_enable(struct udevice *dev, struct rk3288_vop *regs, ulong fbbase, +static void rkvop_enable(struct udevice *dev, ulong fbbase, int fb_bits_per_pixel, const struct display_timing *edid, struct reset_ctl *dclk_rst) { + struct rk_vop_priv *priv = dev_get_priv(dev); + struct rk3288_vop *regs = priv->regs; u32 lb_mode; u32 rgb_mode; u32 hactive = edid->hactive.typ; @@ -243,9 +245,7 @@ static void rkvop_mode_set(struct udevice *dev, static int rk_display_init(struct udevice *dev, ulong fbbase, ofnode ep_node) { struct video_priv *uc_priv = dev_get_uclass_priv(dev); - struct rk_vop_priv *priv = dev_get_priv(dev); int vop_id, remote_vop_id; - struct rk3288_vop *regs = priv->regs; struct display_timing timing; struct udevice *disp; int ret; @@ -380,7 +380,7 @@ static int rk_display_init(struct udevice *dev, ulong fbbase, ofnode ep_node) return ret; } - rkvop_enable(dev, regs, fbbase, 1 << l2bpp, &timing, &dclk_rst); + rkvop_enable(dev, fbbase, 1 << l2bpp, &timing, &dclk_rst); ret = display_enable(disp, 1 << l2bpp, &timing); if (ret) |