aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-07-29 14:49:36 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-07-29 14:49:36 -0400
commit4dac3edfe68e5e1b3c2216b84ba160572420fa40 (patch)
tree924c0d117dbcc6d374eea603ed64e627b35b043b /drivers/gpu/drm/omapdrm
parent487777673e355ab9f0b7cac4ad1207be9d36156f (diff)
parente05444be705b5c7c7f85d7722b6f97f3a6732d54 (diff)
Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next
Pull in drm-next with Dave's DP MST support so that I can merge some conflicting patches which also touch the driver load sequencing around interrupt handling. Conflicts: drivers/gpu/drm/i915/intel_display.c drivers/gpu/drm/i915/intel_dp.c Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/omapdrm')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_connector.c4
-rw-r--r--drivers/gpu/drm/omapdrm/omap_dmm_tiler.c6
-rw-r--r--drivers/gpu/drm/omapdrm/omap_fbdev.c4
-rw-r--r--drivers/gpu/drm/omapdrm/omap_gem.c33
-rw-r--r--drivers/gpu/drm/omapdrm/omap_plane.c4
5 files changed, 25 insertions, 26 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c
index 86f4ead0441d..36bc5cc80816 100644
--- a/drivers/gpu/drm/omapdrm/omap_connector.c
+++ b/drivers/gpu/drm/omapdrm/omap_connector.c
@@ -130,7 +130,7 @@ static void omap_connector_destroy(struct drm_connector *connector)
130 struct omap_dss_device *dssdev = omap_connector->dssdev; 130 struct omap_dss_device *dssdev = omap_connector->dssdev;
131 131
132 DBG("%s", omap_connector->dssdev->name); 132 DBG("%s", omap_connector->dssdev->name);
133 drm_sysfs_connector_remove(connector); 133 drm_connector_unregister(connector);
134 drm_connector_cleanup(connector); 134 drm_connector_cleanup(connector);
135 kfree(omap_connector); 135 kfree(omap_connector);
136 136
@@ -307,7 +307,7 @@ struct drm_connector *omap_connector_init(struct drm_device *dev,
307 connector->interlace_allowed = 1; 307 connector->interlace_allowed = 1;
308 connector->doublescan_allowed = 0; 308 connector->doublescan_allowed = 0;
309 309
310 drm_sysfs_connector_add(connector); 310 drm_connector_register(connector);
311 311
312 return connector; 312 return connector;
313 313
diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
index f926b4caf449..56c60552abba 100644
--- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
+++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
@@ -199,7 +199,7 @@ static struct dmm_txn *dmm_txn_init(struct dmm *dmm, struct tcm *tcm)
199static void dmm_txn_append(struct dmm_txn *txn, struct pat_area *area, 199static void dmm_txn_append(struct dmm_txn *txn, struct pat_area *area,
200 struct page **pages, uint32_t npages, uint32_t roll) 200 struct page **pages, uint32_t npages, uint32_t roll)
201{ 201{
202 dma_addr_t pat_pa = 0; 202 dma_addr_t pat_pa = 0, data_pa = 0;
203 uint32_t *data; 203 uint32_t *data;
204 struct pat *pat; 204 struct pat *pat;
205 struct refill_engine *engine = txn->engine_handle; 205 struct refill_engine *engine = txn->engine_handle;
@@ -223,7 +223,9 @@ static void dmm_txn_append(struct dmm_txn *txn, struct pat_area *area,
223 .lut_id = engine->tcm->lut_id, 223 .lut_id = engine->tcm->lut_id,
224 }; 224 };
225 225
226 data = alloc_dma(txn, 4*i, &pat->data_pa); 226 data = alloc_dma(txn, 4*i, &data_pa);
227 /* FIXME: what if data_pa is more than 32-bit ? */
228 pat->data_pa = data_pa;
227 229
228 while (i--) { 230 while (i--) {
229 int n = i + roll; 231 int n = i + roll;
diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
index 1388ca7f87e8..8436c6857cda 100644
--- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
+++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
@@ -281,7 +281,7 @@ fail:
281 return ret; 281 return ret;
282} 282}
283 283
284static struct drm_fb_helper_funcs omap_fb_helper_funcs = { 284static const struct drm_fb_helper_funcs omap_fb_helper_funcs = {
285 .fb_probe = omap_fbdev_create, 285 .fb_probe = omap_fbdev_create,
286}; 286};
287 287
@@ -325,7 +325,7 @@ struct drm_fb_helper *omap_fbdev_init(struct drm_device *dev)
325 325
326 helper = &fbdev->base; 326 helper = &fbdev->base;
327 327
328 helper->funcs = &omap_fb_helper_funcs; 328 drm_fb_helper_prepare(dev, helper, &omap_fb_helper_funcs);
329 329
330 ret = drm_fb_helper_init(dev, helper, 330 ret = drm_fb_helper_init(dev, helper,
331 priv->num_crtcs, priv->num_connectors); 331 priv->num_crtcs, priv->num_connectors);
diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c
index 95dbce286a41..e4849413ee80 100644
--- a/drivers/gpu/drm/omapdrm/omap_gem.c
+++ b/drivers/gpu/drm/omapdrm/omap_gem.c
@@ -233,11 +233,7 @@ static int omap_gem_attach_pages(struct drm_gem_object *obj)
233 233
234 WARN_ON(omap_obj->pages); 234 WARN_ON(omap_obj->pages);
235 235
236 /* TODO: __GFP_DMA32 .. but somehow GFP_HIGHMEM is coming from the 236 pages = drm_gem_get_pages(obj);
237 * mapping_gfp_mask(mapping) which conflicts w/ GFP_DMA32.. probably
238 * we actually want CMA memory for it all anyways..
239 */
240 pages = drm_gem_get_pages(obj, GFP_KERNEL);
241 if (IS_ERR(pages)) { 237 if (IS_ERR(pages)) {
242 dev_err(obj->dev->dev, "could not get pages: %ld\n", PTR_ERR(pages)); 238 dev_err(obj->dev->dev, "could not get pages: %ld\n", PTR_ERR(pages));
243 return PTR_ERR(pages); 239 return PTR_ERR(pages);
@@ -791,7 +787,7 @@ int omap_gem_get_paddr(struct drm_gem_object *obj,
791 omap_obj->paddr = tiler_ssptr(block); 787 omap_obj->paddr = tiler_ssptr(block);
792 omap_obj->block = block; 788 omap_obj->block = block;
793 789
794 DBG("got paddr: %08x", omap_obj->paddr); 790 DBG("got paddr: %pad", &omap_obj->paddr);
795 } 791 }
796 792
797 omap_obj->paddr_cnt++; 793 omap_obj->paddr_cnt++;
@@ -985,9 +981,9 @@ void omap_gem_describe(struct drm_gem_object *obj, struct seq_file *m)
985 981
986 off = drm_vma_node_start(&obj->vma_node); 982 off = drm_vma_node_start(&obj->vma_node);
987 983
988 seq_printf(m, "%08x: %2d (%2d) %08llx %08Zx (%2d) %p %4d", 984 seq_printf(m, "%08x: %2d (%2d) %08llx %pad (%2d) %p %4d",
989 omap_obj->flags, obj->name, obj->refcount.refcount.counter, 985 omap_obj->flags, obj->name, obj->refcount.refcount.counter,
990 off, omap_obj->paddr, omap_obj->paddr_cnt, 986 off, &omap_obj->paddr, omap_obj->paddr_cnt,
991 omap_obj->vaddr, omap_obj->roll); 987 omap_obj->vaddr, omap_obj->roll);
992 988
993 if (omap_obj->flags & OMAP_BO_TILED) { 989 if (omap_obj->flags & OMAP_BO_TILED) {
@@ -1183,9 +1179,7 @@ int omap_gem_op_sync(struct drm_gem_object *obj, enum omap_gem_op op)
1183 } 1179 }
1184 } 1180 }
1185 spin_unlock(&sync_lock); 1181 spin_unlock(&sync_lock);
1186 1182 kfree(waiter);
1187 if (waiter)
1188 kfree(waiter);
1189 } 1183 }
1190 return ret; 1184 return ret;
1191} 1185}
@@ -1347,6 +1341,7 @@ struct drm_gem_object *omap_gem_new(struct drm_device *dev,
1347 struct omap_drm_private *priv = dev->dev_private; 1341 struct omap_drm_private *priv = dev->dev_private;
1348 struct omap_gem_object *omap_obj; 1342 struct omap_gem_object *omap_obj;
1349 struct drm_gem_object *obj = NULL; 1343 struct drm_gem_object *obj = NULL;
1344 struct address_space *mapping;
1350 size_t size; 1345 size_t size;
1351 int ret; 1346 int ret;
1352 1347
@@ -1404,14 +1399,16 @@ struct drm_gem_object *omap_gem_new(struct drm_device *dev,
1404 omap_obj->height = gsize.tiled.height; 1399 omap_obj->height = gsize.tiled.height;
1405 } 1400 }
1406 1401
1407 ret = 0; 1402 if (flags & (OMAP_BO_DMA|OMAP_BO_EXT_MEM)) {
1408 if (flags & (OMAP_BO_DMA|OMAP_BO_EXT_MEM))
1409 drm_gem_private_object_init(dev, obj, size); 1403 drm_gem_private_object_init(dev, obj, size);
1410 else 1404 } else {
1411 ret = drm_gem_object_init(dev, obj, size); 1405 ret = drm_gem_object_init(dev, obj, size);
1406 if (ret)
1407 goto fail;
1412 1408
1413 if (ret) 1409 mapping = file_inode(obj->filp)->i_mapping;
1414 goto fail; 1410 mapping_set_gfp_mask(mapping, GFP_USER | __GFP_DMA32);
1411 }
1415 1412
1416 return obj; 1413 return obj;
1417 1414
@@ -1467,8 +1464,8 @@ void omap_gem_init(struct drm_device *dev)
1467 entry->paddr = tiler_ssptr(block); 1464 entry->paddr = tiler_ssptr(block);
1468 entry->block = block; 1465 entry->block = block;
1469 1466
1470 DBG("%d:%d: %dx%d: paddr=%08x stride=%d", i, j, w, h, 1467 DBG("%d:%d: %dx%d: paddr=%pad stride=%d", i, j, w, h,
1471 entry->paddr, 1468 &entry->paddr,
1472 usergart[i].stride_pfn << PAGE_SHIFT); 1469 usergart[i].stride_pfn << PAGE_SHIFT);
1473 } 1470 }
1474 } 1471 }
diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c
index da9d15d214cf..891a4dc608af 100644
--- a/drivers/gpu/drm/omapdrm/omap_plane.c
+++ b/drivers/gpu/drm/omapdrm/omap_plane.c
@@ -142,8 +142,8 @@ static void omap_plane_pre_apply(struct omap_drm_apply *apply)
142 DBG("%dx%d -> %dx%d (%d)", info->width, info->height, 142 DBG("%dx%d -> %dx%d (%d)", info->width, info->height,
143 info->out_width, info->out_height, 143 info->out_width, info->out_height,
144 info->screen_width); 144 info->screen_width);
145 DBG("%d,%d %08x %08x", info->pos_x, info->pos_y, 145 DBG("%d,%d %pad %pad", info->pos_x, info->pos_y,
146 info->paddr, info->p_uv_addr); 146 &info->paddr, &info->p_uv_addr);
147 147
148 /* TODO: */ 148 /* TODO: */
149 ilace = false; 149 ilace = false;