summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/exynos
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2014-11-17 11:54:23 +0300
committerInki Dae <inki.dae@samsung.com>2014-11-24 12:02:56 +0300
commit2f26bd7227b80d002dfcd3f60e71bfad168e6517 (patch)
treea121b5ea484ea7fa30dbfaf1326dc6a17f7f34f4 /drivers/gpu/drm/exynos
parent7340426affacb4b5988f9cf1c3dbfc28e9679360 (diff)
downloadlinux-2f26bd7227b80d002dfcd3f60e71bfad168e6517.tar.xz
drm/exynos/vidi: stop using display->ctx pointer
The patch replaces accesses to display->ctx pointer by container_of construct. It will allow to remove ctx field in the future. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_vidi.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
index f58dd52f6d60..3b6fdd614584 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
@@ -72,6 +72,11 @@ static inline struct vidi_context *manager_to_vidi(struct exynos_drm_manager *m)
return container_of(m, struct vidi_context, manager);
}
+static inline struct vidi_context *display_to_vidi(struct exynos_drm_display *d)
+{
+ return container_of(d, struct vidi_context, display);
+}
+
static const char fake_edid_info[] = {
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x4c, 0x2d, 0x05, 0x05,
0x00, 0x00, 0x00, 0x00, 0x30, 0x12, 0x01, 0x03, 0x80, 0x10, 0x09, 0x78,
@@ -419,7 +424,7 @@ int vidi_connection_ioctl(struct drm_device *drm_dev, void *data,
display = exynos_drm_get_display(encoder);
if (display->type == EXYNOS_DISPLAY_TYPE_VIDI) {
- ctx = display->ctx;
+ ctx = display_to_vidi(display);
break;
}
}
@@ -529,7 +534,7 @@ static struct drm_connector_helper_funcs vidi_connector_helper_funcs = {
static int vidi_create_connector(struct exynos_drm_display *display,
struct drm_encoder *encoder)
{
- struct vidi_context *ctx = display->ctx;
+ struct vidi_context *ctx = display_to_vidi(display);
struct drm_connector *connector = &ctx->connector;
int ret;
@@ -597,8 +602,6 @@ static int vidi_probe(struct platform_device *pdev)
INIT_WORK(&ctx->work, vidi_fake_vblank_handler);
- ctx->display.ctx = ctx;
-
mutex_init(&ctx->lock);
platform_set_drvdata(pdev, ctx);