Skip to content

Commit

Permalink
Merge tag 'ti-4.4-pull' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/tomba/linux into audio-display-ti-linux-4.4.y

(Hopefully) the final DSS changes for 2016.02...

* tag 'ti-4.4-pull' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux:
  ti_fragments: audio_display: be explicit about DSS interfaces
  ti_fragments: audio_display: enable DSS debugfs
  drm/omap: cleanup omap_plane_atomic_check()
  drm/omap: fix plane check when crtc is disabled
  drm/omapdrm: don't call drm_helper_disable_unused_functions
  drm/omap: use print instead of WARN when plane setup fails
  • Loading branch information
Jyri Sarha committed Jun 17, 2016
2 parents 05b6d0e + d89b54b commit 4ca087c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 13 deletions.
3 changes: 0 additions & 3 deletions drivers/gpu/drm/omapdrm/omap_fbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,6 @@ struct drm_fb_helper *omap_fbdev_init(struct drm_device *dev)
if (ret)
goto fini;

/* disable all the possible outputs/crtcs before entering KMS mode */
drm_helper_disable_unused_functions(dev);

ret = drm_fb_helper_initial_config(helper, 32);
if (ret)
goto fini;
Expand Down
28 changes: 18 additions & 10 deletions drivers/gpu/drm/omapdrm/omap_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,10 @@ static void omap_plane_atomic_update(struct drm_plane *plane,
/* and finally, update omapdss: */
ret = priv->dispc_ops->ovl_setup(omap_plane->id, &info, false,
omap_crtc_timings(state->crtc), false);
if (WARN_ON(ret)) {
if (ret) {
priv->dispc_ops->ovl_enable(omap_plane->id, false);
dev_err(plane->dev->dev, "Failed to setup plane %s\n",
omap_plane->name);
return;
}

Expand Down Expand Up @@ -172,12 +174,20 @@ static int omap_plane_atomic_check(struct drm_plane *plane,
if (omap_plane->reserved_wb)
return -EBUSY;

if (!state->crtc)
if (!state->fb)
return 0;

crtc_state = drm_atomic_get_crtc_state(state->state, state->crtc);
if (IS_ERR(crtc_state))
return PTR_ERR(crtc_state);
/* crtc should only be NULL when disabling (i.e., !state->fb) */
if (WARN_ON(!state->crtc))
return 0;

crtc_state = drm_atomic_get_existing_crtc_state(state->state, state->crtc);
/* we should have a crtc state if the plane is attached to a crtc */
if (WARN_ON(!crtc_state))
return 0;

if (!crtc_state->enable)
return 0;

if (state->src_w == 0 || state->src_h == 0)
return -EINVAL;
Expand All @@ -194,11 +204,9 @@ static int omap_plane_atomic_check(struct drm_plane *plane,
if (state->crtc_y + state->crtc_h > crtc_state->adjusted_mode.vdisplay)
return -EINVAL;

if (state->fb) {
if (state->rotation != BIT(DRM_ROTATE_0) &&
!omap_framebuffer_supports_rotation(state->fb))
return -EINVAL;
}
if (state->rotation != BIT(DRM_ROTATE_0) &&
!omap_framebuffer_supports_rotation(state->fb))
return -EINVAL;

return 0;
}
Expand Down
6 changes: 6 additions & 0 deletions ti_config_fragments/audio_display.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ CONFIG_DRM_OMAP_NUM_CRTCS=2
CONFIG_DRM_OMAP_WB=y

CONFIG_OMAP2_DSS=y
CONFIG_OMAP2_DSS_DEBUGFS=y
CONFIG_OMAP2_DSS_DPI=y
CONFIG_OMAP2_DSS_VENC=n
CONFIG_OMAP4_DSS_HDMI=y
CONFIG_OMAP5_DSS_HDMI=y
CONFIG_OMAP2_DSS_SDI=n
CONFIG_OMAP2_DSS_DSI=n

CONFIG_TI_DSS6=y

Expand Down

0 comments on commit 4ca087c

Please sign in to comment.