diff options
Diffstat (limited to 'drivers/gpu/drm/meson')
| -rw-r--r-- | drivers/gpu/drm/meson/meson_drv.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/meson/meson_dw_hdmi.c | 23 | ||||
| -rw-r--r-- | drivers/gpu/drm/meson/meson_encoder_cvbs.c | 7 | ||||
| -rw-r--r-- | drivers/gpu/drm/meson/meson_viu.c | 5 | 
4 files changed, 10 insertions, 27 deletions
diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c index 3b24a924b7b9..79bfe3938d3c 100644 --- a/drivers/gpu/drm/meson/meson_drv.c +++ b/drivers/gpu/drm/meson/meson_drv.c @@ -18,7 +18,7 @@  #include <drm/drm_aperture.h>  #include <drm/drm_atomic_helper.h>  #include <drm/drm_drv.h> -#include <drm/drm_fb_helper.h> +#include <drm/drm_fbdev_generic.h>  #include <drm/drm_gem_dma_helper.h>  #include <drm/drm_gem_framebuffer_helper.h>  #include <drm/drm_modeset_helper_vtables.h> diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c index 5cd2b2ebbbd3..534621a13a34 100644 --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c @@ -140,7 +140,6 @@ struct meson_dw_hdmi {  	struct reset_control *hdmitx_apb;  	struct reset_control *hdmitx_ctrl;  	struct reset_control *hdmitx_phy; -	struct regulator *hdmi_supply;  	u32 irq_stat;  	struct dw_hdmi *hdmi;  	struct drm_bridge *bridge; @@ -665,11 +664,6 @@ static void meson_dw_hdmi_init(struct meson_dw_hdmi *meson_dw_hdmi)  } -static void meson_disable_regulator(void *data) -{ -	regulator_disable(data); -} -  static void meson_disable_clk(void *data)  {  	clk_disable_unprepare(data); @@ -723,20 +717,9 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master,  	meson_dw_hdmi->data = match;  	dw_plat_data = &meson_dw_hdmi->dw_plat_data; -	meson_dw_hdmi->hdmi_supply = devm_regulator_get_optional(dev, "hdmi"); -	if (IS_ERR(meson_dw_hdmi->hdmi_supply)) { -		if (PTR_ERR(meson_dw_hdmi->hdmi_supply) == -EPROBE_DEFER) -			return -EPROBE_DEFER; -		meson_dw_hdmi->hdmi_supply = NULL; -	} else { -		ret = regulator_enable(meson_dw_hdmi->hdmi_supply); -		if (ret) -			return ret; -		ret = devm_add_action_or_reset(dev, meson_disable_regulator, -					       meson_dw_hdmi->hdmi_supply); -		if (ret) -			return ret; -	} +	ret = devm_regulator_get_enable_optional(dev, "hdmi"); +	if (ret < 0) +		return ret;  	meson_dw_hdmi->hdmitx_apb = devm_reset_control_get_exclusive(dev,  						"hdmitx_apb"); diff --git a/drivers/gpu/drm/meson/meson_encoder_cvbs.c b/drivers/gpu/drm/meson/meson_encoder_cvbs.c index 5675bc2a92cf..3f73b211fa8e 100644 --- a/drivers/gpu/drm/meson/meson_encoder_cvbs.c +++ b/drivers/gpu/drm/meson/meson_encoder_cvbs.c @@ -116,9 +116,10 @@ static int meson_encoder_cvbs_get_modes(struct drm_bridge *bridge,  	return i;  } -static int meson_encoder_cvbs_mode_valid(struct drm_bridge *bridge, -					const struct drm_display_info *display_info, -					const struct drm_display_mode *mode) +static enum drm_mode_status +meson_encoder_cvbs_mode_valid(struct drm_bridge *bridge, +			      const struct drm_display_info *display_info, +			      const struct drm_display_mode *mode)  {  	if (meson_cvbs_get_mode(mode))  		return MODE_OK; diff --git a/drivers/gpu/drm/meson/meson_viu.c b/drivers/gpu/drm/meson/meson_viu.c index d4b907889a21..cd399b0b7181 100644 --- a/drivers/gpu/drm/meson/meson_viu.c +++ b/drivers/gpu/drm/meson/meson_viu.c @@ -436,15 +436,14 @@ void meson_viu_init(struct meson_drm *priv)  	/* Initialize OSD1 fifo control register */  	reg = VIU_OSD_DDR_PRIORITY_URGENT | -		VIU_OSD_HOLD_FIFO_LINES(31) |  		VIU_OSD_FIFO_DEPTH_VAL(32) | /* fifo_depth_val: 32*8=256 */  		VIU_OSD_WORDS_PER_BURST(4) | /* 4 words in 1 burst */  		VIU_OSD_FIFO_LIMITS(2);      /* fifo_lim: 2*16=32 */  	if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A)) -		reg |= VIU_OSD_BURST_LENGTH_32; +		reg |= (VIU_OSD_BURST_LENGTH_32 | VIU_OSD_HOLD_FIFO_LINES(31));  	else -		reg |= VIU_OSD_BURST_LENGTH_64; +		reg |= (VIU_OSD_BURST_LENGTH_64 | VIU_OSD_HOLD_FIFO_LINES(4));  	writel_relaxed(reg, priv->io_base + _REG(VIU_OSD1_FIFO_CTRL_STAT));  	writel_relaxed(reg, priv->io_base + _REG(VIU_OSD2_FIFO_CTRL_STAT));  |