Commit e902027a authored by Dave Airlie's avatar Dave Airlie

Merge branch 'exynos-drm-fixes' of...

Merge branch 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes

This pull request includes below fixups,

- Remove duplicated machine checking.
  . It seems that this code was added when you merged 'v3.18-rc7' into
    drm-next. commit id : e8115e79
- Fix hdmiphy reset.
  . Exynos hdmi has two interfaces to control hdmyphy, one is I2C, other
    is APB bus - memory mapped I/O. So this patch makes hdmiphy reset
    to be done according to interfaces, I2C or APB bus.
- And add some exception codes.

* 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
  drm/exynos: fix warning of vblank reference count
  drm/exynos: remove unnecessary runtime pm operations
  drm/exynos: fix reset codes for memory mapped hdmi phy
  drm/exynos: remove the redundant machine checking code
parents b46ce98d 7c4c5584
...@@ -645,18 +645,6 @@ static int exynos_drm_init(void) ...@@ -645,18 +645,6 @@ static int exynos_drm_init(void)
if (!is_exynos) if (!is_exynos)
return -ENODEV; return -ENODEV;
/*
* Register device object only in case of Exynos SoC.
*
* Below codes resolves temporarily infinite loop issue incurred
* by Exynos drm driver when using multi-platform kernel.
* So these codes will be replaced with more generic way later.
*/
if (!of_machine_is_compatible("samsung,exynos3") &&
!of_machine_is_compatible("samsung,exynos4") &&
!of_machine_is_compatible("samsung,exynos5"))
return -ENODEV;
exynos_drm_pdev = platform_device_register_simple("exynos-drm", -1, exynos_drm_pdev = platform_device_register_simple("exynos-drm", -1,
NULL, 0); NULL, 0);
if (IS_ERR(exynos_drm_pdev)) if (IS_ERR(exynos_drm_pdev))
......
...@@ -1669,7 +1669,6 @@ static void hdmi_mode_apply(struct hdmi_context *hdata) ...@@ -1669,7 +1669,6 @@ static void hdmi_mode_apply(struct hdmi_context *hdata)
static void hdmiphy_conf_reset(struct hdmi_context *hdata) static void hdmiphy_conf_reset(struct hdmi_context *hdata)
{ {
u8 buffer[2];
u32 reg; u32 reg;
clk_disable_unprepare(hdata->res.sclk_hdmi); clk_disable_unprepare(hdata->res.sclk_hdmi);
...@@ -1677,11 +1676,8 @@ static void hdmiphy_conf_reset(struct hdmi_context *hdata) ...@@ -1677,11 +1676,8 @@ static void hdmiphy_conf_reset(struct hdmi_context *hdata)
clk_prepare_enable(hdata->res.sclk_hdmi); clk_prepare_enable(hdata->res.sclk_hdmi);
/* operation mode */ /* operation mode */
buffer[0] = 0x1f; hdmiphy_reg_writeb(hdata, HDMIPHY_MODE_SET_DONE,
buffer[1] = 0x00; HDMI_PHY_ENABLE_MODE_SET);
if (hdata->hdmiphy_port)
i2c_master_send(hdata->hdmiphy_port, buffer, 2);
if (hdata->type == HDMI_TYPE13) if (hdata->type == HDMI_TYPE13)
reg = HDMI_V13_PHY_RSTOUT; reg = HDMI_V13_PHY_RSTOUT;
......
...@@ -1026,6 +1026,7 @@ static void mixer_win_disable(struct exynos_drm_manager *mgr, int zpos) ...@@ -1026,6 +1026,7 @@ static void mixer_win_disable(struct exynos_drm_manager *mgr, int zpos)
static void mixer_wait_for_vblank(struct exynos_drm_manager *mgr) static void mixer_wait_for_vblank(struct exynos_drm_manager *mgr)
{ {
struct mixer_context *mixer_ctx = mgr_to_mixer(mgr); struct mixer_context *mixer_ctx = mgr_to_mixer(mgr);
int err;
mutex_lock(&mixer_ctx->mixer_mutex); mutex_lock(&mixer_ctx->mixer_mutex);
if (!mixer_ctx->powered) { if (!mixer_ctx->powered) {
...@@ -1034,7 +1035,11 @@ static void mixer_wait_for_vblank(struct exynos_drm_manager *mgr) ...@@ -1034,7 +1035,11 @@ static void mixer_wait_for_vblank(struct exynos_drm_manager *mgr)
} }
mutex_unlock(&mixer_ctx->mixer_mutex); mutex_unlock(&mixer_ctx->mixer_mutex);
drm_vblank_get(mgr->crtc->dev, mixer_ctx->pipe); err = drm_vblank_get(mgr->crtc->dev, mixer_ctx->pipe);
if (err < 0) {
DRM_DEBUG_KMS("failed to acquire vblank counter\n");
return;
}
atomic_set(&mixer_ctx->wait_vsync_event, 1); atomic_set(&mixer_ctx->wait_vsync_event, 1);
...@@ -1262,8 +1267,6 @@ static int mixer_bind(struct device *dev, struct device *manager, void *data) ...@@ -1262,8 +1267,6 @@ static int mixer_bind(struct device *dev, struct device *manager, void *data)
return ret; return ret;
} }
pm_runtime_enable(dev);
return 0; return 0;
} }
...@@ -1272,8 +1275,6 @@ static void mixer_unbind(struct device *dev, struct device *master, void *data) ...@@ -1272,8 +1275,6 @@ static void mixer_unbind(struct device *dev, struct device *master, void *data)
struct mixer_context *ctx = dev_get_drvdata(dev); struct mixer_context *ctx = dev_get_drvdata(dev);
mixer_mgr_remove(&ctx->manager); mixer_mgr_remove(&ctx->manager);
pm_runtime_disable(dev);
} }
static const struct component_ops mixer_component_ops = { static const struct component_ops mixer_component_ops = {
......
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