diff options
| -rw-r--r-- | drivers/gpu/drm/omapdrm/omap_crtc.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c index 9742d9f49a7c..5a56c8e02179 100644 --- a/drivers/gpu/drm/omapdrm/omap_crtc.c +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c | |||
| @@ -41,6 +41,7 @@ struct omap_crtc { | |||
| 41 | struct drm_crtc base; | 41 | struct drm_crtc base; |
| 42 | 42 | ||
| 43 | const char *name; | 43 | const char *name; |
| 44 | struct omap_drm_pipeline *pipe; | ||
| 44 | enum omap_channel channel; | 45 | enum omap_channel channel; |
| 45 | 46 | ||
| 46 | struct videomode vm; | 47 | struct videomode vm; |
| @@ -108,9 +109,6 @@ int omap_crtc_wait_pending(struct drm_crtc *crtc) | |||
| 108 | * job of sequencing the setup of the video pipe in the proper order | 109 | * job of sequencing the setup of the video pipe in the proper order |
| 109 | */ | 110 | */ |
| 110 | 111 | ||
| 111 | /* ovl-mgr-id -> crtc */ | ||
| 112 | static struct omap_dss_device *omap_crtc_output[8]; | ||
| 113 | |||
| 114 | /* we can probably ignore these until we support command-mode panels: */ | 112 | /* we can probably ignore these until we support command-mode panels: */ |
| 115 | static int omap_crtc_dss_connect(struct omap_drm_private *priv, | 113 | static int omap_crtc_dss_connect(struct omap_drm_private *priv, |
| 116 | enum omap_channel channel, | 114 | enum omap_channel channel, |
| @@ -119,13 +117,9 @@ static int omap_crtc_dss_connect(struct omap_drm_private *priv, | |||
| 119 | const struct dispc_ops *dispc_ops = priv->dispc_ops; | 117 | const struct dispc_ops *dispc_ops = priv->dispc_ops; |
| 120 | struct dispc_device *dispc = priv->dispc; | 118 | struct dispc_device *dispc = priv->dispc; |
| 121 | 119 | ||
| 122 | if (omap_crtc_output[channel]) | ||
| 123 | return -EINVAL; | ||
| 124 | |||
| 125 | if (!(dispc_ops->mgr_get_supported_outputs(dispc, channel) & dst->id)) | 120 | if (!(dispc_ops->mgr_get_supported_outputs(dispc, channel) & dst->id)) |
| 126 | return -EINVAL; | 121 | return -EINVAL; |
| 127 | 122 | ||
| 128 | omap_crtc_output[channel] = dst; | ||
| 129 | dst->dispc_channel_connected = true; | 123 | dst->dispc_channel_connected = true; |
| 130 | 124 | ||
| 131 | return 0; | 125 | return 0; |
| @@ -135,7 +129,6 @@ static void omap_crtc_dss_disconnect(struct omap_drm_private *priv, | |||
| 135 | enum omap_channel channel, | 129 | enum omap_channel channel, |
| 136 | struct omap_dss_device *dst) | 130 | struct omap_dss_device *dst) |
| 137 | { | 131 | { |
| 138 | omap_crtc_output[channel] = NULL; | ||
| 139 | dst->dispc_channel_connected = false; | 132 | dst->dispc_channel_connected = false; |
| 140 | } | 133 | } |
| 141 | 134 | ||
| @@ -158,7 +151,7 @@ static void omap_crtc_set_enabled(struct drm_crtc *crtc, bool enable) | |||
| 158 | if (WARN_ON(omap_crtc->enabled == enable)) | 151 | if (WARN_ON(omap_crtc->enabled == enable)) |
| 159 | return; | 152 | return; |
| 160 | 153 | ||
| 161 | if (omap_crtc_output[channel]->output_type == OMAP_DISPLAY_TYPE_HDMI) { | 154 | if (omap_crtc->pipe->output->output_type == OMAP_DISPLAY_TYPE_HDMI) { |
| 162 | priv->dispc_ops->mgr_enable(priv->dispc, channel, enable); | 155 | priv->dispc_ops->mgr_enable(priv->dispc, channel, enable); |
| 163 | omap_crtc->enabled = enable; | 156 | omap_crtc->enabled = enable; |
| 164 | return; | 157 | return; |
| @@ -716,6 +709,7 @@ struct drm_crtc *omap_crtc_init(struct drm_device *dev, | |||
| 716 | 709 | ||
| 717 | init_waitqueue_head(&omap_crtc->pending_wait); | 710 | init_waitqueue_head(&omap_crtc->pending_wait); |
| 718 | 711 | ||
| 712 | omap_crtc->pipe = pipe; | ||
| 719 | omap_crtc->channel = channel; | 713 | omap_crtc->channel = channel; |
| 720 | omap_crtc->name = channel_names[channel]; | 714 | omap_crtc->name = channel_names[channel]; |
| 721 | 715 | ||
