sun4i-drm fixes for 4.9

A few patches to fix our error handling and our panel / bridge calls.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJYK3s3AAoJEBx+YmzsjxAgOzIQAIu19/sacB72ubwUwknN51+i
 SP5+qinuvMd81cW0AMAGYvt2T6JSAXFvFGSnHFL5WEhKgOW6JhZWBvghIeZbkAse
 FPauKDfpbXJwnZyPBB9wUyYzLwIaFiOSfmapQN1BGlKCkJEmBGJ9KHXPlvO4ICPt
 2WHvid3+CUPTIKAAwoGclDxnaKM7UupnEgnqzgvf518zsmLQdsDcuv2LCZGizKJC
 wtMI8+szvcuvbTQDI8Jzpsai9cG96FuSh3zt28Po++ZgqFp7+hSh9ua6fwLAQtQX
 bHz+IzKLzjMv92vpZ559uM3L42pa+skJofV0JSLYYyxsB/QLJYsfoEMhrPyu5nTE
 qj3HeWp1d7DewRkJsvVmJIVoW+XEpx4fnjADGOqI9kO67rjlPqi7bE6/HaWV1JHl
 z3YnhOYjAKoJx3csCTxJw1bShMBpaxXnCB5omsDB8T5mp850OyIXHlFL11a9wvkZ
 Iep+tPEsFpq31uGNrwFBf1v9F22UQJMOSHWRa9yS255V/IyRD6EjXH6se2E6wyu5
 H+yHk5UZAP6HnNkGLoqux89MYf9yiC/d7a7mCoOipYyP1ddhY/tbNgo49ZisZIwd
 Fk2sWLocDEWFy9aMIrqQs8hHnLZQaorWCnmMkd/6RQiUDbIP+4tJMkaobF65paRH
 1CUY9Okj6T7naqurhwJh
 =27Zt
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-drm-fixes-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into drm-fixes

sun4i-drm fixes for 4.9

A few patches to fix our error handling and our panel / bridge calls.

* tag 'sunxi-drm-fixes-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux:
  drm/sun4i: Propagate error to the caller
  drm/sun4i: Fix error handling
  drm/sun4i: rgb: Remove the bridge enable/disable functions
  drm/sun4i: rgb: Enable panel after controller
This commit is contained in:
Dave Airlie 2016-11-16 09:41:08 +10:00
commit 94ea29b116
2 changed files with 10 additions and 14 deletions

View File

@ -142,9 +142,9 @@ static int sun4i_drv_bind(struct device *dev)
/* Create our layers */
drv->layers = sun4i_layers_init(drm);
if (!drv->layers) {
if (IS_ERR(drv->layers)) {
dev_err(drm->dev, "Couldn't create the planes\n");
ret = -EINVAL;
ret = PTR_ERR(drv->layers);
goto free_drm;
}

View File

@ -152,15 +152,13 @@ static void sun4i_rgb_encoder_enable(struct drm_encoder *encoder)
DRM_DEBUG_DRIVER("Enabling RGB output\n");
if (!IS_ERR(tcon->panel)) {
if (!IS_ERR(tcon->panel))
drm_panel_prepare(tcon->panel);
drm_panel_enable(tcon->panel);
}
/* encoder->bridge can be NULL; drm_bridge_enable checks for it */
drm_bridge_enable(encoder->bridge);
sun4i_tcon_channel_enable(tcon, 0);
if (!IS_ERR(tcon->panel))
drm_panel_enable(tcon->panel);
}
static void sun4i_rgb_encoder_disable(struct drm_encoder *encoder)
@ -171,15 +169,13 @@ static void sun4i_rgb_encoder_disable(struct drm_encoder *encoder)
DRM_DEBUG_DRIVER("Disabling RGB output\n");
if (!IS_ERR(tcon->panel))
drm_panel_disable(tcon->panel);
sun4i_tcon_channel_disable(tcon, 0);
/* encoder->bridge can be NULL; drm_bridge_disable checks for it */
drm_bridge_disable(encoder->bridge);
if (!IS_ERR(tcon->panel)) {
drm_panel_disable(tcon->panel);
if (!IS_ERR(tcon->panel))
drm_panel_unprepare(tcon->panel);
}
}
static void sun4i_rgb_encoder_mode_set(struct drm_encoder *encoder,