aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-07 20:36:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-07 20:36:12 -0400
commita7d7a143d0b4cb1914705884ca5c25e322dba693 (patch)
tree0ee5e9e43f0863b38a29e8abc293e80eab177d74 /drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
parent43c40df2c7fedce640a6c39fcdf58764f6bbac5c (diff)
parent7963e9db1b1f842fdc53309baa8714d38e9f5681 (diff)
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull DRM updates from Dave Airlie: "Like all good pull reqs this ends with a revert, so it must mean we tested it, [ Ed. That's _one_ way of looking at it ] This pull is missing nouveau, Ben has been stuck trying to track down a very longstanding bug that revealed itself due to some other changes. I've asked him to send you a direct pull request for nouveau once he cleans things up. I'm away until Monday so don't want to delay things, you can make a decision on that when he sends it, I have my phone so I can ack things just not really merge much. It has one trivial conflict with your tree in armada_drv.c, and also the pull request contains some component changes that are already in your tree, the base tree from Russell went via Greg's tree already, but some stuff still shows up in here that doesn't when I merge my tree into yours. Otherwise all pretty standard graphics fare, one new driver and changes all over the place. New drivers: - sti kms driver for STMicroelectronics chipsets stih416 and stih407. core: - lots of cleanups to the drm core - DP MST helper code merged - universal cursor planes. - render nodes enabled by default panel: - better panel interfaces - new panel support - non-continuous cock advertising ability ttm: - shrinker fixes i915: - hopefully ditched UMS support - runtime pm fixes - psr tracking and locking - now enabled by default - userptr fixes - backlight brightness fixes - MST support merged - runtime PM for dpms - primary planes locking fixes - gen8 hw semaphore support - fbc fixes - runtime PM on SOix sleep state hw. - mmio base page flipping - lots of vlv/chv fixes. - universal cursor planes radeon: - Hawaii fixes - display scalar support for non-fixed mode displays - new firmware format support - dpm on more asics by default - GPUVM improvements - uncached and wc GTT buffers - BOs > visible VRAM exynos: - i80 interface support - module auto-loading - ipp driver consolidated. armada: - irq handling in crtc layer only - crtc renumbering - add component support - DT interaction changes. tegra: - load as module fixes - eDP bpp and sync polarity fixed - DSI non-continuous clock mode support - better support for importing buffers from nouveau msm: - mdp5/adq8084 v1.3 hw enablement - devicetree clk changse - ifc6410 board working tda998x: - component support - DT documentation update vmwgfx: - fix compat shader namespace" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (551 commits) Revert "drm: drop redundant drm_file->is_master" drm/panel: simple: Use devm_gpiod_get_optional() drm/dsi: Replace upcasting macro by function drm/panel: ld9040: Replace upcasting macro by function drm/exynos: dp: Modify driver to support drm_panel drm/exynos: Move DP setup into commit() drm/panel: simple: Add AUO B133HTN01 panel support drm/panel: simple: Support delays in panel functions drm/panel: simple: Add proper definition for prepare and unprepare drm/panel: s6e8aa0: Add proper definition for prepare and unprepare drm/panel: ld9040: Add proper definition for prepare and unprepare drm/tegra: Add support for panel prepare and unprepare routines drm/exynos: dsi: Add support for panel prepare and unprepare routines drm/exynos: dpi: Add support for panel prepare and unprepare routines drm/panel: simple: Add dummy prepare and unprepare routines drm/panel: s6e8aa0: Add dummy prepare and unprepare routines drm/panel: ld9040: Add dummy prepare and unprepare routines drm/panel: Provide convenience wrapper for .get_modes() drm/panel: add .prepare() and .unprepare() functions drm/panel: simple: Remove simple-panel compatible ...
Diffstat (limited to 'drivers/gpu/drm/tilcdc/tilcdc_tfp410.c')
-rw-r--r--drivers/gpu/drm/tilcdc/tilcdc_tfp410.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
index c38b56b268ac..354c47ca6374 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
@@ -167,6 +167,7 @@ struct tfp410_connector {
167static void tfp410_connector_destroy(struct drm_connector *connector) 167static void tfp410_connector_destroy(struct drm_connector *connector)
168{ 168{
169 struct tfp410_connector *tfp410_connector = to_tfp410_connector(connector); 169 struct tfp410_connector *tfp410_connector = to_tfp410_connector(connector);
170 drm_connector_unregister(connector);
170 drm_connector_cleanup(connector); 171 drm_connector_cleanup(connector);
171 kfree(tfp410_connector); 172 kfree(tfp410_connector);
172} 173}
@@ -261,7 +262,7 @@ static struct drm_connector *tfp410_connector_create(struct drm_device *dev,
261 if (ret) 262 if (ret)
262 goto fail; 263 goto fail;
263 264
264 drm_sysfs_connector_add(connector); 265 drm_connector_register(connector);
265 266
266 return connector; 267 return connector;
267 268
@@ -295,23 +296,8 @@ static int tfp410_modeset_init(struct tilcdc_module *mod, struct drm_device *dev
295 return 0; 296 return 0;
296} 297}
297 298
298static void tfp410_destroy(struct tilcdc_module *mod)
299{
300 struct tfp410_module *tfp410_mod = to_tfp410_module(mod);
301
302 if (tfp410_mod->i2c)
303 i2c_put_adapter(tfp410_mod->i2c);
304
305 if (!IS_ERR_VALUE(tfp410_mod->gpio))
306 gpio_free(tfp410_mod->gpio);
307
308 tilcdc_module_cleanup(mod);
309 kfree(tfp410_mod);
310}
311
312static const struct tilcdc_module_ops tfp410_module_ops = { 299static const struct tilcdc_module_ops tfp410_module_ops = {
313 .modeset_init = tfp410_modeset_init, 300 .modeset_init = tfp410_modeset_init,
314 .destroy = tfp410_destroy,
315}; 301};
316 302
317/* 303/*
@@ -341,6 +327,7 @@ static int tfp410_probe(struct platform_device *pdev)
341 return -ENOMEM; 327 return -ENOMEM;
342 328
343 mod = &tfp410_mod->base; 329 mod = &tfp410_mod->base;
330 pdev->dev.platform_data = mod;
344 331
345 tilcdc_module_init(mod, "tfp410", &tfp410_module_ops); 332 tilcdc_module_init(mod, "tfp410", &tfp410_module_ops);
346 333
@@ -364,6 +351,7 @@ static int tfp410_probe(struct platform_device *pdev)
364 tfp410_mod->i2c = of_find_i2c_adapter_by_node(i2c_node); 351 tfp410_mod->i2c = of_find_i2c_adapter_by_node(i2c_node);
365 if (!tfp410_mod->i2c) { 352 if (!tfp410_mod->i2c) {
366 dev_err(&pdev->dev, "could not get i2c\n"); 353 dev_err(&pdev->dev, "could not get i2c\n");
354 of_node_put(i2c_node);
367 goto fail; 355 goto fail;
368 } 356 }
369 357
@@ -377,19 +365,32 @@ static int tfp410_probe(struct platform_device *pdev)
377 ret = gpio_request(tfp410_mod->gpio, "DVI_PDn"); 365 ret = gpio_request(tfp410_mod->gpio, "DVI_PDn");
378 if (ret) { 366 if (ret) {
379 dev_err(&pdev->dev, "could not get DVI_PDn gpio\n"); 367 dev_err(&pdev->dev, "could not get DVI_PDn gpio\n");
380 goto fail; 368 goto fail_adapter;
381 } 369 }
382 } 370 }
383 371
384 return 0; 372 return 0;
385 373
374fail_adapter:
375 i2c_put_adapter(tfp410_mod->i2c);
376
386fail: 377fail:
387 tfp410_destroy(mod); 378 kfree(tfp410_mod);
379 tilcdc_module_cleanup(mod);
388 return ret; 380 return ret;
389} 381}
390 382
391static int tfp410_remove(struct platform_device *pdev) 383static int tfp410_remove(struct platform_device *pdev)
392{ 384{
385 struct tilcdc_module *mod = dev_get_platdata(&pdev->dev);
386 struct tfp410_module *tfp410_mod = to_tfp410_module(mod);
387
388 i2c_put_adapter(tfp410_mod->i2c);
389 gpio_free(tfp410_mod->gpio);
390
391 tilcdc_module_cleanup(mod);
392 kfree(tfp410_mod);
393
393 return 0; 394 return 0;
394} 395}
395 396