History

Merge branch 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-samsung into drm-intel-fixes

* 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-samsung: drm/exynos: fixed exynos broken ioctl drm/exynos: fix to pointer manager member of struct exynos_drm_subdrv drm/exynos: fix struct for operation callback functions to driver name drm/exynos: use define instead of default_win member in struct mixer_context drm/exynos: rename s/HDMI_OVERLAY_NUMBER/MIXER_WIN_NR drm/exynos: remove unused codes in hdmi and mixer drm/exynos: remove unnecessary type conversion of hdmi and mixer drm/exynos: add format list of plane drm/exynos: fixed duplicated page allocation bug. drm/exynos: fixed page align and code clean.

Dave Airlie committed 14 years ago

Commit 173fa4e2 parents 19e5c4e 490aa6013 files · +192 −187Browse files

Unified · Split

13 files
  1. drivers/gpu/drm/exynos/exynos_drm_buf.c +14 −33
  2. drivers/gpu/drm/exynos/exynos_drm_core.c +8 −6
  3. drivers/gpu/drm/exynos/exynos_drm_drv.h +5 −5
  4. drivers/gpu/drm/exynos/exynos_drm_fimd.c +12 −8
  5. drivers/gpu/drm/exynos/exynos_drm_gem.c +36 −9
  6. drivers/gpu/drm/exynos/exynos_drm_gem.h +2 −0
  7. drivers/gpu/drm/exynos/exynos_drm_hdmi.c +48 −59
  8. drivers/gpu/drm/exynos/exynos_drm_hdmi.h +9 −14
  9. drivers/gpu/drm/exynos/exynos_drm_plane.c +4 −0
  10. drivers/gpu/drm/exynos/exynos_drm_vidi.c +12 −8
  11. drivers/gpu/drm/exynos/exynos_hdmi.c +20 −22
  12. drivers/gpu/drm/exynos/exynos_mixer.c +19 −21
  13. include/drm/exynos_drm.h +3 −2
drivers/gpu/drm/exynos/exynos_drm_buf.c+14−33
@@ -34,14 +34,14 @@ · 33 unmodified lines
3434 static int lowlevel_buffer_allocate(struct drm_device *dev,
3535 unsigned int flags, struct exynos_drm_gem_buf *buf)
3636 {
37− dma_addr_t start_addr, end_addr;
37+ dma_addr_t start_addr;
3838 unsigned int npages, page_size, i = 0;
3939 struct scatterlist *sgl;
4040 int ret = 0;
4141
4242 DRM_DEBUG_KMS("%s\n", __FILE__);
4343
44− if (flags & EXYNOS_BO_NONCONTIG) {
44+ if (IS_NONCONTIG_BUFFER(flags)) {
4545 DRM_DEBUG_KMS("not support allocation type.\n");
4646 return -EINVAL;
4747 }
@@ -52,13 +52,13 @@ static int lowlevel_buffer_allocate(struct drm_device *dev, · 4 unmodified lines
5252 }
5353
5454 if (buf->size >= SZ_1M) {
55− npages = (buf->size >> SECTION_SHIFT) + 1;
55+ npages = buf->size >> SECTION_SHIFT;
5656 page_size = SECTION_SIZE;
5757 } else if (buf->size >= SZ_64K) {
58− npages = (buf->size >> 16) + 1;
58+ npages = buf->size >> 16;
5959 page_size = SZ_64K;
6060 } else {
61− npages = (buf->size >> PAGE_SHIFT) + 1;
61+ npages = buf->size >> PAGE_SHIFT;
6262 page_size = PAGE_SIZE;
6363 }
6464
@@ -76,26 +76,13 @@ static int lowlevel_buffer_allocate(struct drm_device *dev, · 11 unmodified lines
7676 return -ENOMEM;
7777 }
7878
79− buf->kvaddr = dma_alloc_writecombine(dev->dev, buf->size,
80− &buf->dma_addr, GFP_KERNEL);
81− if (!buf->kvaddr) {
82− DRM_ERROR("failed to allocate buffer.\n");
83− ret = -ENOMEM;
84− goto err1;
85− }
86−
87− start_addr = buf->dma_addr;
88− end_addr = buf->dma_addr + buf->size;
89−
90− buf->pages = kzalloc(sizeof(struct page) * npages, GFP_KERNEL);
91− if (!buf->pages) {
92− DRM_ERROR("failed to allocate pages.\n");
93− ret = -ENOMEM;
94− goto err2;
95− }
96−
97− start_addr = buf->dma_addr;
98− end_addr = buf->dma_addr + buf->size;
79+ buf->kvaddr = dma_alloc_writecombine(dev->dev, buf->size,
80+ &buf->dma_addr, GFP_KERNEL);
81+ if (!buf->kvaddr) {
82+ DRM_ERROR("failed to allocate buffer.\n");
83+ ret = -ENOMEM;
84+ goto err1;
85+ }
9986
10087 buf->pages = kzalloc(sizeof(struct page) * npages, GFP_KERNEL);
10188 if (!buf->pages) {
@@ -105,23 +92,17 @@ static int lowlevel_buffer_allocate(struct drm_device *dev, · 3 unmodified lines
10592 }
10693
10794 sgl = buf->sgt->sgl;
95+ start_addr = buf->dma_addr;
10896
10997 while (i < npages) {
11098 buf->pages[i] = phys_to_page(start_addr);
11199 sg_set_page(sgl, buf->pages[i], page_size, 0);
112100 sg_dma_address(sgl) = start_addr;
113101 start_addr += page_size;
114− if (end_addr - start_addr < page_size)
115− break;
116102 sgl = sg_next(sgl);
117103 i++;
118104 }
119105
120− buf->pages[i] = phys_to_page(start_addr);
121−
122− sgl = sg_next(sgl);
123− sg_set_page(sgl, buf->pages[i+1], end_addr - start_addr, 0);
124−
125106 DRM_DEBUG_KMS("vaddr(0x%lx), dma_addr(0x%lx), size(0x%lx)\n",
126107 (unsigned long)buf->kvaddr,
127108 (unsigned long)buf->dma_addr,
@@ -150,7 +131,7 @@ static void lowlevel_buffer_deallocate(struct drm_device *dev, · 22 unmodified lines
150131 * non-continuous memory would be released by exynos
151132 * gem framework.
152133 */
153− if (flags & EXYNOS_BO_NONCONTIG) {
134+ if (IS_NONCONTIG_BUFFER(flags)) {
154135 DRM_DEBUG_KMS("not support allocation type.\n");
155136 return;
156137 }
drivers/gpu/drm/exynos/exynos_drm_core.c+8−6
@@ -54,16 +54,18 @@ static int exynos_drm_subdrv_probe(struct drm_device *dev, · 53 unmodified lines
5454 *
5555 * P.S. note that this driver is considered for modularization.
5656 */
57− ret = subdrv->probe(dev, subdrv->manager.dev);
57+ ret = subdrv->probe(dev, subdrv->dev);
5858 if (ret)
5959 return ret;
6060 }
6161
62− if (subdrv->is_local)
62+ if (!subdrv->manager)
6363 return 0;
6464
65+ subdrv->manager->dev = subdrv->dev;
66+
6567 /* create and initialize a encoder for this sub driver. */
66− encoder = exynos_drm_encoder_create(dev, &subdrv->manager,
68+ encoder = exynos_drm_encoder_create(dev, subdrv->manager,
6769 (1 << MAX_CRTC) - 1);
6870 if (!encoder) {
6971 DRM_ERROR("failed to create encoder\n");
@@ -186,7 +188,7 @@ int exynos_drm_subdrv_open(struct drm_device *dev, struct drm_file *file) · 116 unmodified lines
186188
187189 list_for_each_entry(subdrv, &exynos_drm_subdrv_list, list) {
188190 if (subdrv->open) {
189− ret = subdrv->open(dev, subdrv->manager.dev, file);
191+ ret = subdrv->open(dev, subdrv->dev, file);
190192 if (ret)
191193 goto err;
192194 }
@@ -197,7 +199,7 @@ int exynos_drm_subdrv_open(struct drm_device *dev, struct drm_file *file) · 4 unmodified lines
197199 err:
198200 list_for_each_entry_reverse(subdrv, &subdrv->list, list) {
199201 if (subdrv->close)
200− subdrv->close(dev, subdrv->manager.dev, file);
202+ subdrv->close(dev, subdrv->dev, file);
201203 }
202204 return ret;
203205 }
@@ -209,7 +211,7 @@ void exynos_drm_subdrv_close(struct drm_device *dev, struct drm_file *file) · 5 unmodified lines
209211
210212 list_for_each_entry(subdrv, &exynos_drm_subdrv_list, list) {
211213 if (subdrv->close)
212− subdrv->close(dev, subdrv->manager.dev, file);
214+ subdrv->close(dev, subdrv->dev, file);
213215 }
214216 }
215217 EXPORT_SYMBOL_GPL(exynos_drm_subdrv_close);
drivers/gpu/drm/exynos/exynos_drm_drv.h+5−5
@@ -225,24 +225,25 @@ struct exynos_drm_private { · 224 unmodified lines
225225 * Exynos drm sub driver structure.
226226 *
227227 * @list: sub driver has its own list object to register to exynos drm driver.
228+ * @dev: pointer to device object for subdrv device driver.
228229 * @drm_dev: pointer to drm_device and this pointer would be set
229230 * when sub driver calls exynos_drm_subdrv_register().
230− * @is_local: appear encoder and connector disrelated device.
231+ * @manager: subdrv has its own manager to control a hardware appropriately
232+ * and we can access a hardware drawing on this manager.
231233 * @probe: this callback would be called by exynos drm driver after
232234 * subdrv is registered to it.
233235 * @remove: this callback is used to release resources created
234236 * by probe callback.
235237 * @open: this would be called with drm device file open.
236238 * @close: this would be called with drm device file close.
237− * @manager: subdrv has its own manager to control a hardware appropriately
238− * and we can access a hardware drawing on this manager.
239239 * @encoder: encoder object owned by this sub driver.
240240 * @connector: connector object owned by this sub driver.
241241 */
242242 struct exynos_drm_subdrv {
243243 struct list_head list;
244+ struct device *dev;
244245 struct drm_device *drm_dev;
245− bool is_local;
246+ struct exynos_drm_manager *manager;
246247
247248 int (*probe)(struct drm_device *drm_dev, struct device *dev);
248249 void (*remove)(struct drm_device *dev);
@@ -251,7 +252,6 @@ struct exynos_drm_subdrv { · 2 unmodified lines
251252 void (*close)(struct drm_device *drm_dev, struct device *dev,
252253 struct drm_file *file);
253254
254− struct exynos_drm_manager manager;
255255 struct drm_encoder *encoder;
256256 struct drm_connector *connector;
257257 };
drivers/gpu/drm/exynos/exynos_drm_fimd.c+12−8
@@ -172,7 +172,7 @@ static void fimd_dpms(struct device *subdrv_dev, int mode) · 171 unmodified lines
172172 static void fimd_apply(struct device *subdrv_dev)
173173 {
174174 struct fimd_context *ctx = get_fimd_context(subdrv_dev);
175− struct exynos_drm_manager *mgr = &ctx->subdrv.manager;
175+ struct exynos_drm_manager *mgr = ctx->subdrv.manager;
176176 struct exynos_drm_manager_ops *mgr_ops = mgr->ops;
177177 struct exynos_drm_overlay_ops *ovl_ops = mgr->overlay_ops;
178178 struct fimd_win_data *win_data;
@@ -577,6 +577,13 @@ static struct exynos_drm_overlay_ops fimd_overlay_ops = { · 398 unmodified lines
577577 .disable = fimd_win_disable,
578578 };
579579
580+static struct exynos_drm_manager fimd_manager = {
581+ .pipe = -1,
582+ .ops = &fimd_manager_ops,
583+ .overlay_ops = &fimd_overlay_ops,
584+ .display_ops = &fimd_display_ops,
585+};
586+
580587 static void fimd_finish_pageflip(struct drm_device *drm_dev, int crtc)
581588 {
582589 struct exynos_drm_private *dev_priv = drm_dev->dev_private;
@@ -628,7 +635,7 @@ static irqreturn_t fimd_irq_handler(int irq, void *dev_id) · 45 unmodified lines
628635 struct fimd_context *ctx = (struct fimd_context *)dev_id;
629636 struct exynos_drm_subdrv *subdrv = &ctx->subdrv;
630637 struct drm_device *drm_dev = subdrv->drm_dev;
631− struct exynos_drm_manager *manager = &subdrv->manager;
638+ struct exynos_drm_manager *manager = subdrv->manager;
632639 u32 val;
633640
634641 val = readl(ctx->regs + VIDINTCON1);
@@ -744,7 +751,7 @@ static void fimd_clear_win(struct fimd_context *ctx, int win) · 109 unmodified lines
744751 static int fimd_power_on(struct fimd_context *ctx, bool enable)
745752 {
746753 struct exynos_drm_subdrv *subdrv = &ctx->subdrv;
747− struct device *dev = subdrv->manager.dev;
754+ struct device *dev = subdrv->dev;
748755
749756 DRM_DEBUG_KMS("%s\n", __FILE__);
750757
@@ -867,13 +874,10 @@ static int __devinit fimd_probe(struct platform_device *pdev) · 116 unmodified lines
867874
868875 subdrv = &ctx->subdrv;
869876
877+ subdrv->dev = dev;
878+ subdrv->manager = &fimd_manager;
870879 subdrv->probe = fimd_subdrv_probe;
871880 subdrv->remove = fimd_subdrv_remove;
872− subdrv->manager.pipe = -1;
873− subdrv->manager.ops = &fimd_manager_ops;
874− subdrv->manager.overlay_ops = &fimd_overlay_ops;
875− subdrv->manager.display_ops = &fimd_display_ops;
876− subdrv->manager.dev = dev;
877881
878882 mutex_init(&ctx->lock);
879883
drivers/gpu/drm/exynos/exynos_drm_gem.c+36−9
@@ -56,9 +56,28 @@ static unsigned int convert_to_vm_err_msg(int msg) · 55 unmodified lines
5656 return out_msg;
5757 }
5858
59−static unsigned int mask_gem_flags(unsigned int flags)
59+static int check_gem_flags(unsigned int flags)
6060 {
61− return flags &= EXYNOS_BO_NONCONTIG;
61+ if (flags & ~(EXYNOS_BO_MASK)) {
62+ DRM_ERROR("invalid flags.\n");
63+ return -EINVAL;
64+ }
65+
66+ return 0;
67+}
68+
69+static unsigned long roundup_gem_size(unsigned long size, unsigned int flags)
70+{
71+ if (!IS_NONCONTIG_BUFFER(flags)) {
72+ if (size >= SZ_1M)
73+ return roundup(size, SECTION_SIZE);
74+ else if (size >= SZ_64K)
75+ return roundup(size, SZ_64K);
76+ else
77+ goto out;
78+ }
79+out:
80+ return roundup(size, PAGE_SIZE);
6281 }
6382
6483 static struct page **exynos_gem_get_pages(struct drm_gem_object *obj,
@@ -319,10 +338,17 @@ struct exynos_drm_gem_obj *exynos_drm_gem_create(struct drm_device *dev, · 254 unmodified lines
319338 struct exynos_drm_gem_buf *buf;
320339 int ret;
321340
322− size = roundup(size, PAGE_SIZE);
323− DRM_DEBUG_KMS("%s: size = 0x%lx\n", __FILE__, size);
341+ if (!size) {
342+ DRM_ERROR("invalid size.\n");
343+ return ERR_PTR(-EINVAL);
344+ }
324345
325− flags = mask_gem_flags(flags);
346+ size = roundup_gem_size(size, flags);
347+ DRM_DEBUG_KMS("%s\n", __FILE__);
348+
349+ ret = check_gem_flags(flags);
350+ if (ret)
351+ return ERR_PTR(ret);
326352
327353 buf = exynos_drm_init_buf(dev, size);
328354 if (!buf)
@@ -331,7 +357,7 @@ struct exynos_drm_gem_obj *exynos_drm_gem_create(struct drm_device *dev, · 2 unmodified lines
331357 exynos_gem_obj = exynos_drm_gem_init(dev, size);
332358 if (!exynos_gem_obj) {
333359 ret = -ENOMEM;
334− goto err;
360+ goto err_fini_buf;
335361 }
336362
337363 exynos_gem_obj->buffer = buf;
@@ -347,18 +373,19 @@ struct exynos_drm_gem_obj *exynos_drm_gem_create(struct drm_device *dev, · 9 unmodified lines
347373 ret = exynos_drm_gem_get_pages(&exynos_gem_obj->base);
348374 if (ret < 0) {
349375 drm_gem_object_release(&exynos_gem_obj->base);
350− goto err;
376+ goto err_fini_buf;
351377 }
352378 } else {
353379 ret = exynos_drm_alloc_buf(dev, buf, flags);
354380 if (ret < 0) {
355381 drm_gem_object_release(&exynos_gem_obj->base);
356− goto err;
382+ goto err_fini_buf;
357383 }
358384 }
359385
360386 return exynos_gem_obj;
361−err:
387+
388+err_fini_buf:
362389 exynos_drm_fini_buf(dev, buf);
363390 return ERR_PTR(ret);
364391 }
drivers/gpu/drm/exynos/exynos_drm_gem.h+2−0
@@ -29,6 +29,8 @@ · 28 unmodified lines
2929 #define to_exynos_gem_obj(x) container_of(x,\
3030 struct exynos_drm_gem_obj, base)
3131
32+#define IS_NONCONTIG_BUFFER(f) (f & EXYNOS_BO_NONCONTIG)
33+
3234 /*
3335 * exynos drm gem buffer structure.
3436 *
drivers/gpu/drm/exynos/exynos_drm_hdmi.c+48−59
@@ -30,9 +30,8 @@ · 29 unmodified lines
3030 struct drm_hdmi_context, subdrv);
3131
3232 /* these callback points shoud be set by specific drivers. */
33−static struct exynos_hdmi_display_ops *hdmi_display_ops;
34−static struct exynos_hdmi_manager_ops *hdmi_manager_ops;
35−static struct exynos_hdmi_overlay_ops *hdmi_overlay_ops;
33+static struct exynos_hdmi_ops *hdmi_ops;
34+static struct exynos_mixer_ops *mixer_ops;
3635
3736 struct drm_hdmi_context {
3837 struct exynos_drm_subdrv subdrv;
@@ -40,31 +39,20 @@ struct drm_hdmi_context { · 1 unmodified line
4039 struct exynos_drm_hdmi_context *mixer_ctx;
4140 };
4241
43−void exynos_drm_display_ops_register(struct exynos_hdmi_display_ops
44− *display_ops)
42+void exynos_hdmi_ops_register(struct exynos_hdmi_ops *ops)
4543 {
4644 DRM_DEBUG_KMS("%s\n", __FILE__);
4745
48− if (display_ops)
49− hdmi_display_ops = display_ops;
46+ if (ops)
47+ hdmi_ops = ops;
5048 }
5149
52−void exynos_drm_manager_ops_register(struct exynos_hdmi_manager_ops
53− *manager_ops)
50+void exynos_mixer_ops_register(struct exynos_mixer_ops *ops)
5451 {
5552 DRM_DEBUG_KMS("%s\n", __FILE__);
5653
57− if (manager_ops)
58− hdmi_manager_ops = manager_ops;
59−}
60−
61−void exynos_drm_overlay_ops_register(struct exynos_hdmi_overlay_ops
62− *overlay_ops)
63−{
64− DRM_DEBUG_KMS("%s\n", __FILE__);
65−
66− if (overlay_ops)
67− hdmi_overlay_ops = overlay_ops;
54+ if (ops)
55+ mixer_ops = ops;
6856 }
6957
7058 static bool drm_hdmi_is_connected(struct device *dev)
@@ -73,8 +61,8 @@ static bool drm_hdmi_is_connected(struct device *dev) · 2 unmodified lines
7361
7462 DRM_DEBUG_KMS("%s\n", __FILE__);
7563
76− if (hdmi_display_ops && hdmi_display_ops->is_connected)
77− return hdmi_display_ops->is_connected(ctx->hdmi_ctx->ctx);
64+ if (hdmi_ops && hdmi_ops->is_connected)
65+ return hdmi_ops->is_connected(ctx->hdmi_ctx->ctx);
7866
7967 return false;
8068 }
@@ -86,9 +74,9 @@ static int drm_hdmi_get_edid(struct device *dev, · 5 unmodified lines
8674
8775 DRM_DEBUG_KMS("%s\n", __FILE__);
8876
89− if (hdmi_display_ops && hdmi_display_ops->get_edid)
90− return hdmi_display_ops->get_edid(ctx->hdmi_ctx->ctx,
91− connector, edid, len);
77+ if (hdmi_ops && hdmi_ops->get_edid)
78+ return hdmi_ops->get_edid(ctx->hdmi_ctx->ctx, connector, edid,
79+ len);
9280
9381 return 0;
9482 }
@@ -99,9 +87,8 @@ static int drm_hdmi_check_timing(struct device *dev, void *timing) · 4 unmodified lines
9987
10088 DRM_DEBUG_KMS("%s\n", __FILE__);
10189
102− if (hdmi_display_ops && hdmi_display_ops->check_timing)
103− return hdmi_display_ops->check_timing(ctx->hdmi_ctx->ctx,
104− timing);
90+ if (hdmi_ops && hdmi_ops->check_timing)
91+ return hdmi_ops->check_timing(ctx->hdmi_ctx->ctx, timing);
10592
10693 return 0;
10794 }
@@ -112,8 +99,8 @@ static int drm_hdmi_power_on(struct device *dev, int mode) · 4 unmodified lines
11299
113100 DRM_DEBUG_KMS("%s\n", __FILE__);
114101
115− if (hdmi_display_ops && hdmi_display_ops->power_on)
116− return hdmi_display_ops->power_on(ctx->hdmi_ctx->ctx, mode);
102+ if (hdmi_ops && hdmi_ops->power_on)
103+ return hdmi_ops->power_on(ctx->hdmi_ctx->ctx, mode);
117104
118105 return 0;
119106 }
@@ -130,13 +117,13 @@ static int drm_hdmi_enable_vblank(struct device *subdrv_dev) · 10 unmodified lines
130117 {
131118 struct drm_hdmi_context *ctx = to_context(subdrv_dev);
132119 struct exynos_drm_subdrv *subdrv = &ctx->subdrv;
133− struct exynos_drm_manager *manager = &subdrv->manager;
120+ struct exynos_drm_manager *manager = subdrv->manager;
134121
135122 DRM_DEBUG_KMS("%s\n", __FILE__);
136123
137− if (hdmi_overlay_ops && hdmi_overlay_ops->enable_vblank)
138− return hdmi_overlay_ops->enable_vblank(ctx->mixer_ctx->ctx,
139− manager->pipe);
124+ if (mixer_ops && mixer_ops->enable_vblank)
125+ return mixer_ops->enable_vblank(ctx->mixer_ctx->ctx,
126+ manager->pipe);
140127
141128 return 0;
142129 }
@@ -147,8 +134,8 @@ static void drm_hdmi_disable_vblank(struct device *subdrv_dev) · 4 unmodified lines
147134
148135 DRM_DEBUG_KMS("%s\n", __FILE__);
149136
150− if (hdmi_overlay_ops && hdmi_overlay_ops->disable_vblank)
151− return hdmi_overlay_ops->disable_vblank(ctx->mixer_ctx->ctx);
137+ if (mixer_ops && mixer_ops->disable_vblank)
138+ return mixer_ops->disable_vblank(ctx->mixer_ctx->ctx);
152139 }
153140
154141 static void drm_hdmi_mode_fixup(struct device *subdrv_dev,
@@ -160,9 +147,9 @@ static void drm_hdmi_mode_fixup(struct device *subdrv_dev, · 5 unmodified lines
160147
161148 DRM_DEBUG_KMS("%s\n", __FILE__);
162149
163− if (hdmi_manager_ops && hdmi_manager_ops->mode_fixup)
164− hdmi_manager_ops->mode_fixup(ctx->hdmi_ctx->ctx, connector,
165− mode, adjusted_mode);
150+ if (hdmi_ops && hdmi_ops->mode_fixup)
151+ hdmi_ops->mode_fixup(ctx->hdmi_ctx->ctx, connector, mode,
152+ adjusted_mode);
166153 }
167154
168155 static void drm_hdmi_mode_set(struct device *subdrv_dev, void *mode)
@@ -171,8 +158,8 @@ static void drm_hdmi_mode_set(struct device *subdrv_dev, void *mode) · 2 unmodified lines
171158
172159 DRM_DEBUG_KMS("%s\n", __FILE__);
173160
174− if (hdmi_manager_ops && hdmi_manager_ops->mode_set)
175− hdmi_manager_ops->mode_set(ctx->hdmi_ctx->ctx, mode);
161+ if (hdmi_ops && hdmi_ops->mode_set)
162+ hdmi_ops->mode_set(ctx->hdmi_ctx->ctx, mode);
176163 }
177164
178165 static void drm_hdmi_get_max_resol(struct device *subdrv_dev,
@@ -182,9 +169,8 @@ static void drm_hdmi_get_max_resol(struct device *subdrv_dev, · 3 unmodified lines
182169
183170 DRM_DEBUG_KMS("%s\n", __FILE__);
184171
185− if (hdmi_manager_ops && hdmi_manager_ops->get_max_resol)
186− hdmi_manager_ops->get_max_resol(ctx->hdmi_ctx->ctx, width,
187− height);
172+ if (hdmi_ops && hdmi_ops->get_max_resol)
173+ hdmi_ops->get_max_resol(ctx->hdmi_ctx->ctx, width, height);
188174 }
189175
190176 static void drm_hdmi_commit(struct device *subdrv_dev)
@@ -193,8 +179,8 @@ static void drm_hdmi_commit(struct device *subdrv_dev) · 2 unmodified lines
193179
194180 DRM_DEBUG_KMS("%s\n", __FILE__);
195181
196− if (hdmi_manager_ops && hdmi_manager_ops->commit)
197− hdmi_manager_ops->commit(ctx->hdmi_ctx->ctx);
182+ if (hdmi_ops && hdmi_ops->commit)
183+ hdmi_ops->commit(ctx->hdmi_ctx->ctx);
198184 }
199185
200186 static void drm_hdmi_dpms(struct device *subdrv_dev, int mode)
@@ -209,8 +195,8 @@ static void drm_hdmi_dpms(struct device *subdrv_dev, int mode) · 8 unmodified lines
209195 case DRM_MODE_DPMS_STANDBY:
210196 case DRM_MODE_DPMS_SUSPEND:
211197 case DRM_MODE_DPMS_OFF:
212− if (hdmi_manager_ops && hdmi_manager_ops->disable)
213− hdmi_manager_ops->disable(ctx->hdmi_ctx->ctx);
198+ if (hdmi_ops && hdmi_ops->disable)
199+ hdmi_ops->disable(ctx->hdmi_ctx->ctx);
214200 break;
215201 default:
216202 DRM_DEBUG_KMS("unkown dps mode: %d\n", mode);
@@ -235,8 +221,8 @@ static void drm_mixer_mode_set(struct device *subdrv_dev, · 18 unmodified lines
235221
236222 DRM_DEBUG_KMS("%s\n", __FILE__);
237223
238− if (hdmi_overlay_ops && hdmi_overlay_ops->win_mode_set)
239− hdmi_overlay_ops->win_mode_set(ctx->mixer_ctx->ctx, overlay);
224+ if (mixer_ops && mixer_ops->win_mode_set)
225+ mixer_ops->win_mode_set(ctx->mixer_ctx->ctx, overlay);
240226 }
241227
242228 static void drm_mixer_commit(struct device *subdrv_dev, int zpos)
@@ -245,8 +231,8 @@ static void drm_mixer_commit(struct device *subdrv_dev, int zpos) · 2 unmodified lines
245231
246232 DRM_DEBUG_KMS("%s\n", __FILE__);
247233
248− if (hdmi_overlay_ops && hdmi_overlay_ops->win_commit)
249− hdmi_overlay_ops->win_commit(ctx->mixer_ctx->ctx, zpos);
234+ if (mixer_ops && mixer_ops->win_commit)
235+ mixer_ops->win_commit(ctx->mixer_ctx->ctx, zpos);
250236 }
251237
252238 static void drm_mixer_disable(struct device *subdrv_dev, int zpos)
@@ -255,8 +241,8 @@ static void drm_mixer_disable(struct device *subdrv_dev, int zpos) · 2 unmodified lines
255241
256242 DRM_DEBUG_KMS("%s\n", __FILE__);
257243
258− if (hdmi_overlay_ops && hdmi_overlay_ops->win_disable)
259− hdmi_overlay_ops->win_disable(ctx->mixer_ctx->ctx, zpos);
244+ if (mixer_ops && mixer_ops->win_disable)
245+ mixer_ops->win_disable(ctx->mixer_ctx->ctx, zpos);
260246 }
261247
262248 static struct exynos_drm_overlay_ops drm_hdmi_overlay_ops = {
@@ -265,6 +251,12 @@ static struct exynos_drm_overlay_ops drm_hdmi_overlay_ops = { · 2 unmodified lines
265251 .disable = drm_mixer_disable,
266252 };
267253
254+static struct exynos_drm_manager hdmi_manager = {
255+ .pipe = -1,
256+ .ops = &drm_hdmi_manager_ops,
257+ .overlay_ops = &drm_hdmi_overlay_ops,
258+ .display_ops = &drm_hdmi_display_ops,
259+};
268260
269261 static int hdmi_subdrv_probe(struct drm_device *drm_dev,
270262 struct device *dev)
@@ -332,12 +324,9 @@ static int __devinit exynos_drm_hdmi_probe(struct platform_device *pdev) · 61 unmodified lines
332324
333325 subdrv = &ctx->subdrv;
334326
327+ subdrv->dev = dev;
328+ subdrv->manager = &hdmi_manager;
335329 subdrv->probe = hdmi_subdrv_probe;
336− subdrv->manager.pipe = -1;
337− subdrv->manager.ops = &drm_hdmi_manager_ops;
338− subdrv->manager.overlay_ops = &drm_hdmi_overlay_ops;
339− subdrv->manager.display_ops = &drm_hdmi_display_ops;
340− subdrv->manager.dev = dev;
341330
342331 platform_set_drvdata(pdev, subdrv);
343332
drivers/gpu/drm/exynos/exynos_drm_hdmi.h+9−14
@@ -38,15 +38,15 @@ struct exynos_drm_hdmi_context { · 37 unmodified lines
3838 void *ctx;
3939 };
4040
41−struct exynos_hdmi_display_ops {
41+struct exynos_hdmi_ops {
42+ /* display */
4243 bool (*is_connected)(void *ctx);
4344 int (*get_edid)(void *ctx, struct drm_connector *connector,
4445 u8 *edid, int len);
4546 int (*check_timing)(void *ctx, void *timing);
4647 int (*power_on)(void *ctx, int mode);
47−};
4848
49−struct exynos_hdmi_manager_ops {
49+ /* manager */
5050 void (*mode_fixup)(void *ctx, struct drm_connector *connector,
5151 struct drm_display_mode *mode,
5252 struct drm_display_mode *adjusted_mode);
@@ -57,22 +57,17 @@ struct exynos_hdmi_manager_ops { · 4 unmodified lines
5757 void (*disable)(void *ctx);
5858 };
5959
60−struct exynos_hdmi_overlay_ops {
60+struct exynos_mixer_ops {
61+ /* manager */
6162 int (*enable_vblank)(void *ctx, int pipe);
6263 void (*disable_vblank)(void *ctx);
64+
65+ /* overlay */
6366 void (*win_mode_set)(void *ctx, struct exynos_drm_overlay *overlay);
6467 void (*win_commit)(void *ctx, int zpos);
6568 void (*win_disable)(void *ctx, int zpos);
6669 };
6770
68−extern struct platform_driver hdmi_driver;
69−extern struct platform_driver mixer_driver;
70−
71−void exynos_drm_display_ops_register(struct exynos_hdmi_display_ops
72− *display_ops);
73−void exynos_drm_manager_ops_register(struct exynos_hdmi_manager_ops
74− *manager_ops);
75−void exynos_drm_overlay_ops_register(struct exynos_hdmi_overlay_ops
76− *overlay_ops);
77−
71+void exynos_hdmi_ops_register(struct exynos_hdmi_ops *ops);
72+void exynos_mixer_ops_register(struct exynos_mixer_ops *ops);
7873 #endif
drivers/gpu/drm/exynos/exynos_drm_plane.c+4−0
@@ -24,6 +24,10 @@ struct exynos_plane { · 23 unmodified lines
2424
2525 static const uint32_t formats[] = {
2626 DRM_FORMAT_XRGB8888,
27+ DRM_FORMAT_ARGB8888,
28+ DRM_FORMAT_NV12,
29+ DRM_FORMAT_NV12M,
30+ DRM_FORMAT_NV12MT,
2731 };
2832
2933 static int
drivers/gpu/drm/exynos/exynos_drm_vidi.c+12−8
@@ -199,7 +199,7 @@ static void vidi_dpms(struct device *subdrv_dev, int mode) · 198 unmodified lines
199199 static void vidi_apply(struct device *subdrv_dev)
200200 {
201201 struct vidi_context *ctx = get_vidi_context(subdrv_dev);
202− struct exynos_drm_manager *mgr = &ctx->subdrv.manager;
202+ struct exynos_drm_manager *mgr = ctx->subdrv.manager;
203203 struct exynos_drm_manager_ops *mgr_ops = mgr->ops;
204204 struct exynos_drm_overlay_ops *ovl_ops = mgr->overlay_ops;
205205 struct vidi_win_data *win_data;
@@ -374,6 +374,13 @@ static struct exynos_drm_overlay_ops vidi_overlay_ops = { · 168 unmodified lines
374374 .disable = vidi_win_disable,
375375 };
376376
377+static struct exynos_drm_manager vidi_manager = {
378+ .pipe = -1,
379+ .ops = &vidi_manager_ops,
380+ .overlay_ops = &vidi_overlay_ops,
381+ .display_ops = &vidi_display_ops,
382+};
383+
377384 static void vidi_finish_pageflip(struct drm_device *drm_dev, int crtc)
378385 {
379386 struct exynos_drm_private *dev_priv = drm_dev->dev_private;
@@ -425,7 +432,7 @@ static void vidi_fake_vblank_handler(struct work_struct *work) · 45 unmodified lines
425432 struct vidi_context *ctx = container_of(work, struct vidi_context,
426433 work);
427434 struct exynos_drm_subdrv *subdrv = &ctx->subdrv;
428− struct exynos_drm_manager *manager = &subdrv->manager;
435+ struct exynos_drm_manager *manager = subdrv->manager;
429436
430437 if (manager->pipe < 0)
431438 return;
@@ -471,7 +478,7 @@ static void vidi_subdrv_remove(struct drm_device *drm_dev) · 39 unmodified lines
471478 static int vidi_power_on(struct vidi_context *ctx, bool enable)
472479 {
473480 struct exynos_drm_subdrv *subdrv = &ctx->subdrv;
474− struct device *dev = subdrv->manager.dev;
481+ struct device *dev = subdrv->dev;
475482
476483 DRM_DEBUG_KMS("%s\n", __FILE__);
477484
@@ -611,13 +618,10 @@ static int __devinit vidi_probe(struct platform_device *pdev) · 133 unmodified lines
611618 ctx->raw_edid = (struct edid *)fake_edid_info;
612619
613620 subdrv = &ctx->subdrv;
621+ subdrv->dev = dev;
622+ subdrv->manager = &vidi_manager;
614623 subdrv->probe = vidi_subdrv_probe;
615624 subdrv->remove = vidi_subdrv_remove;
616− subdrv->manager.pipe = -1;
617− subdrv->manager.ops = &vidi_manager_ops;
618− subdrv->manager.overlay_ops = &vidi_overlay_ops;
619− subdrv->manager.display_ops = &vidi_display_ops;
620− subdrv->manager.dev = dev;
621625
622626 mutex_init(&ctx->lock);
623627
drivers/gpu/drm/exynos/exynos_hdmi.c+20−22
@@ -40,7 +40,6 @@ · 39 unmodified lines
4040
4141 #include "exynos_hdmi.h"
4242
43−#define HDMI_OVERLAY_NUMBER 3
4443 #define MAX_WIDTH 1920
4544 #define MAX_HEIGHT 1080
4645 #define get_hdmi_context(dev) platform_get_drvdata(to_platform_device(dev))
@@ -1194,7 +1193,7 @@ static int hdmi_conf_index(struct hdmi_context *hdata, · 1147 unmodified lines
11941193
11951194 static bool hdmi_is_connected(void *ctx)
11961195 {
1197− struct hdmi_context *hdata = (struct hdmi_context *)ctx;
1196+ struct hdmi_context *hdata = ctx;
11981197 u32 val = hdmi_reg_read(hdata, HDMI_HPD_STATUS);
11991198
12001199 if (val)
@@ -1207,7 +1206,7 @@ static int hdmi_get_edid(void *ctx, struct drm_connector *connector, · 6 unmodified lines
12071206 u8 *edid, int len)
12081207 {
12091208 struct edid *raw_edid;
1210− struct hdmi_context *hdata = (struct hdmi_context *)ctx;
1209+ struct hdmi_context *hdata = ctx;
12111210
12121211 DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
12131212
@@ -1275,7 +1274,7 @@ static int hdmi_v14_check_timing(struct fb_videomode *check_timing) · 61 unmodified lines
12751274
12761275 static int hdmi_check_timing(void *ctx, void *timing)
12771276 {
1278− struct hdmi_context *hdata = (struct hdmi_context *)ctx;
1277+ struct hdmi_context *hdata = ctx;
12791278 struct fb_videomode *check_timing = timing;
12801279
12811280 DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
@@ -1312,13 +1311,6 @@ static int hdmi_display_power_on(void *ctx, int mode) · 30 unmodified lines
13121311 return 0;
13131312 }
13141313
1315−static struct exynos_hdmi_display_ops display_ops = {
1316− .is_connected = hdmi_is_connected,
1317− .get_edid = hdmi_get_edid,
1318− .check_timing = hdmi_check_timing,
1319− .power_on = hdmi_display_power_on,
1320−};
1321−
13221314 static void hdmi_set_acr(u32 freq, u8 *acr)
13231315 {
13241316 u32 n, cts;
@@ -1914,7 +1906,7 @@ static void hdmi_mode_fixup(void *ctx, struct drm_connector *connector, · 589 unmodified lines
19141906 struct drm_display_mode *adjusted_mode)
19151907 {
19161908 struct drm_display_mode *m;
1917− struct hdmi_context *hdata = (struct hdmi_context *)ctx;
1909+ struct hdmi_context *hdata = ctx;
19181910 int index;
19191911
19201912 DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
@@ -1951,7 +1943,7 @@ static void hdmi_mode_fixup(void *ctx, struct drm_connector *connector, · 30 unmodified lines
19511943
19521944 static void hdmi_mode_set(void *ctx, void *mode)
19531945 {
1954− struct hdmi_context *hdata = (struct hdmi_context *)ctx;
1946+ struct hdmi_context *hdata = ctx;
19551947 int conf_idx;
19561948
19571949 DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
@@ -1974,7 +1966,7 @@ static void hdmi_get_max_resol(void *ctx, unsigned int *width, · 16 unmodified lines
19741966
19751967 static void hdmi_commit(void *ctx)
19761968 {
1977− struct hdmi_context *hdata = (struct hdmi_context *)ctx;
1969+ struct hdmi_context *hdata = ctx;
19781970
19791971 DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
19801972
@@ -1985,7 +1977,7 @@ static void hdmi_commit(void *ctx) · 4 unmodified lines
19851977
19861978 static void hdmi_disable(void *ctx)
19871979 {
1988− struct hdmi_context *hdata = (struct hdmi_context *)ctx;
1980+ struct hdmi_context *hdata = ctx;
19891981
19901982 DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
19911983
@@ -1996,7 +1988,14 @@ static void hdmi_disable(void *ctx) · 4 unmodified lines
19961988 }
19971989 }
19981990
1999−static struct exynos_hdmi_manager_ops manager_ops = {
1991+static struct exynos_hdmi_ops hdmi_ops = {
1992+ /* display */
1993+ .is_connected = hdmi_is_connected,
1994+ .get_edid = hdmi_get_edid,
1995+ .check_timing = hdmi_check_timing,
1996+ .power_on = hdmi_display_power_on,
1997+
1998+ /* manager */
20001999 .mode_fixup = hdmi_mode_fixup,
20012000 .mode_set = hdmi_mode_set,
20022001 .get_max_resol = hdmi_get_max_resol,
@@ -2020,7 +2019,7 @@ static void hdmi_hotplug_func(struct work_struct *work) · 17 unmodified lines
20202019 static irqreturn_t hdmi_irq_handler(int irq, void *arg)
20212020 {
20222021 struct exynos_drm_hdmi_context *ctx = arg;
2023− struct hdmi_context *hdata = (struct hdmi_context *)ctx->ctx;
2022+ struct hdmi_context *hdata = ctx->ctx;
20242023 u32 intc_flag;
20252024
20262025 intc_flag = hdmi_reg_read(hdata, HDMI_INTC_FLAG);
@@ -2173,7 +2172,7 @@ static int hdmi_runtime_suspend(struct device *dev) · 146 unmodified lines
21732172
21742173 DRM_DEBUG_KMS("%s\n", __func__);
21752174
2176− hdmi_resource_poweroff((struct hdmi_context *)ctx->ctx);
2175+ hdmi_resource_poweroff(ctx->ctx);
21772176
21782177 return 0;
21792178 }
@@ -2184,7 +2183,7 @@ static int hdmi_runtime_resume(struct device *dev) · 4 unmodified lines
21842183
21852184 DRM_DEBUG_KMS("%s\n", __func__);
21862185
2187− hdmi_resource_poweron((struct hdmi_context *)ctx->ctx);
2186+ hdmi_resource_poweron(ctx->ctx);
21882187
21892188 return 0;
21902189 }
@@ -2322,8 +2321,7 @@ static int __devinit hdmi_probe(struct platform_device *pdev) · 131 unmodified lines
23222321 hdata->irq = res->start;
23232322
23242323 /* register specific callbacks to common hdmi. */
2325− exynos_drm_display_ops_register(&display_ops);
2326− exynos_drm_manager_ops_register(&manager_ops);
2324+ exynos_hdmi_ops_register(&hdmi_ops);
23272325
23282326 hdmi_resource_poweron(hdata);
23292327
@@ -2351,7 +2349,7 @@ err_data: · 21 unmodified lines
23512349 static int __devexit hdmi_remove(struct platform_device *pdev)
23522350 {
23532351 struct exynos_drm_hdmi_context *ctx = platform_get_drvdata(pdev);
2354− struct hdmi_context *hdata = (struct hdmi_context *)ctx->ctx;
2352+ struct hdmi_context *hdata = ctx->ctx;
23552353
23562354 DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
23572355
drivers/gpu/drm/exynos/exynos_mixer.c+19−21
@@ -37,7 +37,8 @@ · 36 unmodified lines
3737 #include "exynos_drm_drv.h"
3838 #include "exynos_drm_hdmi.h"
3939
40−#define HDMI_OVERLAY_NUMBER 3
40+#define MIXER_WIN_NR 3
41+#define MIXER_DEFAULT_WIN 0
4142
4243 #define get_mixer_context(dev) platform_get_drvdata(to_platform_device(dev))
4344
@@ -75,16 +76,12 @@ struct mixer_resources { · 31 unmodified lines
7576 };
7677
7778 struct mixer_context {
78− struct fb_videomode *default_timing;
79− unsigned int default_win;
80− unsigned int default_bpp;
8179 unsigned int irq;
8280 int pipe;
8381 bool interlace;
84− bool vp_enabled;
8582
8683 struct mixer_resources mixer_res;
87− struct hdmi_win_data win_data[HDMI_OVERLAY_NUMBER];
84+ struct hdmi_win_data win_data[MIXER_WIN_NR];
8885 };
8986
9087 static const u8 filter_y_horiz_tap8[] = {
@@ -643,9 +640,9 @@ static void mixer_win_mode_set(void *ctx, · 552 unmodified lines
643640
644641 win = overlay->zpos;
645642 if (win == DEFAULT_ZPOS)
646− win = mixer_ctx->default_win;
643+ win = MIXER_DEFAULT_WIN;
647644
648− if (win < 0 || win > HDMI_OVERLAY_NUMBER) {
645+ if (win < 0 || win > MIXER_WIN_NR) {
649646 DRM_ERROR("overlay plane[%d] is wrong\n", win);
650647 return;
651648 }
@@ -683,9 +680,9 @@ static void mixer_win_commit(void *ctx, int zpos) · 31 unmodified lines
683680 DRM_DEBUG_KMS("[%d] %s, win: %d\n", __LINE__, __func__, win);
684681
685682 if (win == DEFAULT_ZPOS)
686− win = mixer_ctx->default_win;
683+ win = MIXER_DEFAULT_WIN;
687684
688− if (win < 0 || win > HDMI_OVERLAY_NUMBER) {
685+ if (win < 0 || win > MIXER_WIN_NR) {
689686 DRM_ERROR("overlay plane[%d] is wrong\n", win);
690687 return;
691688 }
@@ -706,9 +703,9 @@ static void mixer_win_disable(void *ctx, int zpos) · 14 unmodified lines
706703 DRM_DEBUG_KMS("[%d] %s, win: %d\n", __LINE__, __func__, win);
707704
708705 if (win == DEFAULT_ZPOS)
709− win = mixer_ctx->default_win;
706+ win = MIXER_DEFAULT_WIN;
710707
711− if (win < 0 || win > HDMI_OVERLAY_NUMBER) {
708+ if (win < 0 || win > MIXER_WIN_NR) {
712709 DRM_ERROR("overlay plane[%d] is wrong\n", win);
713710 return;
714711 }
@@ -722,9 +719,12 @@ static void mixer_win_disable(void *ctx, int zpos) · 7 unmodified lines
722719 spin_unlock_irqrestore(&res->reg_slock, flags);
723720 }
724721
725−static struct exynos_hdmi_overlay_ops overlay_ops = {
722+static struct exynos_mixer_ops mixer_ops = {
723+ /* manager */
726724 .enable_vblank = mixer_enable_vblank,
727725 .disable_vblank = mixer_disable_vblank,
726+
727+ /* overlay */
728728 .win_mode_set = mixer_win_mode_set,
729729 .win_commit = mixer_win_commit,
730730 .win_disable = mixer_win_disable,
@@ -771,8 +771,7 @@ static void mixer_finish_pageflip(struct drm_device *drm_dev, int crtc) · 40 unmodified lines
771771 static irqreturn_t mixer_irq_handler(int irq, void *arg)
772772 {
773773 struct exynos_drm_hdmi_context *drm_hdmi_ctx = arg;
774− struct mixer_context *ctx =
775− (struct mixer_context *)drm_hdmi_ctx->ctx;
774+ struct mixer_context *ctx = drm_hdmi_ctx->ctx;
776775 struct mixer_resources *res = &ctx->mixer_res;
777776 u32 val, val_base;
778777
@@ -902,7 +901,7 @@ static int mixer_runtime_resume(struct device *dev) · 123 unmodified lines
902901
903902 DRM_DEBUG_KMS("resume - start\n");
904903
905− mixer_resource_poweron((struct mixer_context *)ctx->ctx);
904+ mixer_resource_poweron(ctx->ctx);
906905
907906 return 0;
908907 }
@@ -913,7 +912,7 @@ static int mixer_runtime_suspend(struct device *dev) · 4 unmodified lines
913912
914913 DRM_DEBUG_KMS("suspend - start\n");
915914
916− mixer_resource_poweroff((struct mixer_context *)ctx->ctx);
915+ mixer_resource_poweroff(ctx->ctx);
917916
918917 return 0;
919918 }
@@ -926,8 +925,7 @@ static const struct dev_pm_ops mixer_pm_ops = { · 6 unmodified lines
926925 static int __devinit mixer_resources_init(struct exynos_drm_hdmi_context *ctx,
927926 struct platform_device *pdev)
928927 {
929− struct mixer_context *mixer_ctx =
930− (struct mixer_context *)ctx->ctx;
928+ struct mixer_context *mixer_ctx = ctx->ctx;
931929 struct device *dev = &pdev->dev;
932930 struct mixer_resources *mixer_res = &mixer_ctx->mixer_res;
933931 struct resource *res;
@@ -1076,7 +1074,7 @@ static int __devinit mixer_probe(struct platform_device *pdev) · 142 unmodified lines
10761074 goto fail;
10771075
10781076 /* register specific callback point to common hdmi. */
1079− exynos_drm_overlay_ops_register(&overlay_ops);
1077+ exynos_mixer_ops_register(&mixer_ops);
10801078
10811079 mixer_resource_poweron(ctx);
10821080
@@ -1093,7 +1091,7 @@ static int mixer_remove(struct platform_device *pdev) · 10 unmodified lines
10931091 struct device *dev = &pdev->dev;
10941092 struct exynos_drm_hdmi_context *drm_hdmi_ctx =
10951093 platform_get_drvdata(pdev);
1096− struct mixer_context *ctx = (struct mixer_context *)drm_hdmi_ctx->ctx;
1094+ struct mixer_context *ctx = drm_hdmi_ctx->ctx;
10971095
10981096 dev_info(dev, "remove successful\n");
10991097
include/drm/exynos_drm.h+3−2
@@ -85,7 +85,7 @@ struct drm_exynos_gem_mmap { · 84 unmodified lines
8585 struct drm_exynos_vidi_connection {
8686 unsigned int connection;
8787 unsigned int extensions;
88− uint64_t *edid;
88+ uint64_t edid;
8989 };
9090
9191 struct drm_exynos_plane_set_zpos {
@@ -96,7 +96,8 @@ struct drm_exynos_plane_set_zpos { · 4 unmodified lines
9696 /* memory type definitions. */
9797 enum e_drm_exynos_gem_mem_type {
9898 /* Physically Non-Continuous memory. */
99− EXYNOS_BO_NONCONTIG = 1 << 0
99+ EXYNOS_BO_NONCONTIG = 1 << 0,
100+ EXYNOS_BO_MASK = EXYNOS_BO_NONCONTIG
100101 };
101102
102103 #define DRM_EXYNOS_GEM_CREATE 0x00