diff options
| author | Joonyoung Shim <jy0922.shim@samsung.com> | 2015-02-05 02:11:36 -0500 |
|---|---|---|
| committer | Inki Dae <inki.dae@samsung.com> | 2015-02-09 09:56:34 -0500 |
| commit | f27829a184ed3bf44b952fa299f399513bdb0a18 (patch) | |
| tree | 1f2c257406781751fb18a2b63d133f4618a9206e | |
| parent | 30b39f0488eb114b3523de7a6579ef8ff2c40a6e (diff) | |
drm/exynos: remove mode property of exynos crtc
This was added by commit 3b8d1cf818c2 ("drm/exynos: add property for
crtc mode"). Currently we can control a plane used for crtc using
primary plane by universal plane feature. Stop to use non-standard
property to control primary plane.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
| -rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_crtc.c | 60 | ||||
| -rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_drv.h | 8 |
2 files changed, 0 insertions, 68 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index fff2e5545846..48ccab7fdf63 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c | |||
| @@ -232,70 +232,12 @@ static void exynos_drm_crtc_destroy(struct drm_crtc *crtc) | |||
| 232 | kfree(exynos_crtc); | 232 | kfree(exynos_crtc); |
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | static int exynos_drm_crtc_set_property(struct drm_crtc *crtc, | ||
| 236 | struct drm_property *property, | ||
| 237 | uint64_t val) | ||
| 238 | { | ||
| 239 | struct drm_device *dev = crtc->dev; | ||
| 240 | struct exynos_drm_private *dev_priv = dev->dev_private; | ||
| 241 | struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc); | ||
| 242 | |||
| 243 | if (property == dev_priv->crtc_mode_property) { | ||
| 244 | enum exynos_crtc_mode mode = val; | ||
| 245 | |||
| 246 | if (mode == exynos_crtc->mode) | ||
| 247 | return 0; | ||
| 248 | |||
| 249 | exynos_crtc->mode = mode; | ||
| 250 | |||
| 251 | switch (mode) { | ||
| 252 | case CRTC_MODE_NORMAL: | ||
| 253 | exynos_drm_crtc_commit(crtc); | ||
| 254 | break; | ||
| 255 | case CRTC_MODE_BLANK: | ||
| 256 | exynos_plane_dpms(crtc->primary, DRM_MODE_DPMS_OFF); | ||
| 257 | break; | ||
| 258 | default: | ||
| 259 | break; | ||
| 260 | } | ||
| 261 | |||
| 262 | return 0; | ||
| 263 | } | ||
| 264 | |||
| 265 | return -EINVAL; | ||
| 266 | } | ||
| 267 | |||
| 268 | static struct drm_crtc_funcs exynos_crtc_funcs = { | 235 | static struct drm_crtc_funcs exynos_crtc_funcs = { |
| 269 | .set_config = drm_crtc_helper_set_config, | 236 | .set_config = drm_crtc_helper_set_config, |
| 270 | .page_flip = exynos_drm_crtc_page_flip, | 237 | .page_flip = exynos_drm_crtc_page_flip, |
| 271 | .destroy = exynos_drm_crtc_destroy, | 238 | .destroy = exynos_drm_crtc_destroy, |
| 272 | .set_property = exynos_drm_crtc_set_property, | ||
| 273 | }; | ||
| 274 | |||
| 275 | static const struct drm_prop_enum_list mode_names[] = { | ||
| 276 | { CRTC_MODE_NORMAL, "normal" }, | ||
| 277 | { CRTC_MODE_BLANK, "blank" }, | ||
| 278 | }; | 239 | }; |
| 279 | 240 | ||
| 280 | static void exynos_drm_crtc_attach_mode_property(struct drm_crtc *crtc) | ||
| 281 | { | ||
| 282 | struct drm_device *dev = crtc->dev; | ||
| 283 | struct exynos_drm_private *dev_priv = dev->dev_private; | ||
| 284 | struct drm_property *prop; | ||
| 285 | |||
| 286 | prop = dev_priv->crtc_mode_property; | ||
| 287 | if (!prop) { | ||
| 288 | prop = drm_property_create_enum(dev, 0, "mode", mode_names, | ||
| 289 | ARRAY_SIZE(mode_names)); | ||
| 290 | if (!prop) | ||
| 291 | return; | ||
| 292 | |||
| 293 | dev_priv->crtc_mode_property = prop; | ||
| 294 | } | ||
| 295 | |||
| 296 | drm_object_attach_property(&crtc->base, prop, 0); | ||
| 297 | } | ||
| 298 | |||
| 299 | struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev, | 241 | struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev, |
| 300 | int pipe, | 242 | int pipe, |
| 301 | enum exynos_drm_output_type type, | 243 | enum exynos_drm_output_type type, |
| @@ -338,8 +280,6 @@ struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev, | |||
| 338 | 280 | ||
| 339 | drm_crtc_helper_add(crtc, &exynos_crtc_helper_funcs); | 281 | drm_crtc_helper_add(crtc, &exynos_crtc_helper_funcs); |
| 340 | 282 | ||
| 341 | exynos_drm_crtc_attach_mode_property(crtc); | ||
| 342 | |||
| 343 | return exynos_crtc; | 283 | return exynos_crtc; |
| 344 | 284 | ||
| 345 | err_crtc: | 285 | err_crtc: |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h index d490b49f71c9..1aceafce7bbf 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h | |||
| @@ -197,11 +197,6 @@ struct exynos_drm_crtc_ops { | |||
| 197 | void (*te_handler)(struct exynos_drm_crtc *crtc); | 197 | void (*te_handler)(struct exynos_drm_crtc *crtc); |
| 198 | }; | 198 | }; |
| 199 | 199 | ||
| 200 | enum exynos_crtc_mode { | ||
| 201 | CRTC_MODE_NORMAL, /* normal mode */ | ||
| 202 | CRTC_MODE_BLANK, /* The private plane of crtc is blank */ | ||
| 203 | }; | ||
| 204 | |||
| 205 | /* | 200 | /* |
| 206 | * Exynos specific crtc structure. | 201 | * Exynos specific crtc structure. |
| 207 | * | 202 | * |
| @@ -215,7 +210,6 @@ enum exynos_crtc_mode { | |||
| 215 | * we can refer to the crtc to current hardware interrupt occurred through | 210 | * we can refer to the crtc to current hardware interrupt occurred through |
| 216 | * this pipe value. | 211 | * this pipe value. |
| 217 | * @dpms: store the crtc dpms value | 212 | * @dpms: store the crtc dpms value |
| 218 | * @mode: store the crtc mode value | ||
| 219 | * @ops: pointer to callbacks for exynos drm specific functionality | 213 | * @ops: pointer to callbacks for exynos drm specific functionality |
| 220 | * @ctx: A pointer to the crtc's implementation specific context | 214 | * @ctx: A pointer to the crtc's implementation specific context |
| 221 | */ | 215 | */ |
| @@ -224,7 +218,6 @@ struct exynos_drm_crtc { | |||
| 224 | enum exynos_drm_output_type type; | 218 | enum exynos_drm_output_type type; |
| 225 | unsigned int pipe; | 219 | unsigned int pipe; |
| 226 | unsigned int dpms; | 220 | unsigned int dpms; |
| 227 | enum exynos_crtc_mode mode; | ||
| 228 | wait_queue_head_t pending_flip_queue; | 221 | wait_queue_head_t pending_flip_queue; |
| 229 | atomic_t pending_flip; | 222 | atomic_t pending_flip; |
| 230 | struct exynos_drm_crtc_ops *ops; | 223 | struct exynos_drm_crtc_ops *ops; |
| @@ -265,7 +258,6 @@ struct exynos_drm_private { | |||
| 265 | */ | 258 | */ |
| 266 | struct drm_crtc *crtc[MAX_CRTC]; | 259 | struct drm_crtc *crtc[MAX_CRTC]; |
| 267 | struct drm_property *plane_zpos_property; | 260 | struct drm_property *plane_zpos_property; |
| 268 | struct drm_property *crtc_mode_property; | ||
| 269 | 261 | ||
| 270 | unsigned long da_start; | 262 | unsigned long da_start; |
| 271 | unsigned long da_space_size; | 263 | unsigned long da_space_size; |
