aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tilcdc/tilcdc_panel.c
AgeCommit message (Collapse)AuthorFilesLines
2020-05-19drm/tilcdc: add missing static for panel_driverTomi Valkeinen1-1/+1
struct platform_driver panel_driver is only used from tilcdc_panel.c, so it can be static. Signed-off-by: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jyri Sarha <[email protected]> Acked-by: Sam Ravnborg <[email protected]>
2020-05-19drm/tilcdc: fix leak & null ref in panel_connector_get_modesTomi Valkeinen1-1/+5
If videomode_from_timings() returns true, the mode allocated with drm_mode_create will be leaked. Also, the return value of drm_mode_create() is never checked, and thus could cause NULL deref. Fix these two issues. Signed-off-by: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jyri Sarha <[email protected]> Acked-by: Sam Ravnborg <[email protected]>
2020-05-17drm/tilcdc: use devm_of_find_backlightSam Ravnborg1-11/+6
Look up backlight device using devm_of_find_backlight(). This simplifies the code and prevents us from hardcoding the node name in the driver. Signed-off-by: Sam Ravnborg <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Cc: Jyri Sarha <[email protected]> Cc: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-04-02drm/tilcdc: Use simple encoderThomas Zimmermann1-6/+2
The tilcdc driver uses empty implementations for its encoders. Replace the code with the generic simple encoder. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Acked-by: Daniel Vetter <[email protected]> Acked-by: Jyri Sarha <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-02drm/tilcdc: Remove obsolete crtc_mode_valid() hackJyri Sarha1-9/+0
Earlier there were no mode_valid() helper for crtc and tilcdc had a hack to over come this limitation. But now the mode_valid() helper is there (has been since v4.13), so it is about time to get rid of that hack. Signed-off-by: Jyri Sarha <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/ <5c4dcb5b1e7975bd2b7ca86f7addf219cd0f9a06.1564750248.git.jsarha@ti.com
2019-07-22Merge v5.3-rc1 into drm-misc-nextMaxime Ripard1-12/+1
Noralf needs some SPI patches in 5.3 to merge some work on tinydrm. Signed-off-by: Maxime Ripard <[email protected]>
2019-07-17drm/tilcdc: drop use of drmP.hSam Ravnborg1-4/+7
Dropped drmP.h and all other header files not used by tilcdc_drv.h. Added the minimal includes and forwards to make the header file self-contained. Then dropped the remaining uses of drmP.h and fixed all fall-out. Signed-off-by: Sam Ravnborg <[email protected]> Acked-by: Emil Velikov <[email protected]> Cc: Jyri Sarha <[email protected]> Cc: Tomi Valkeinen <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234Thomas Gleixner1-12/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not see http www gnu org licenses extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 503 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Alexios Zavras <[email protected]> Reviewed-by: Allison Randal <[email protected]> Reviewed-by: Enrico Weigelt <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-01-24drm: Split out drm_probe_helper.hDaniel Vetter1-0/+1
Having the probe helper stuff (which pretty much everyone needs) in the drm_crtc_helper.h file (which atomic drivers should never need) is confusing. Split them out. To make sure I actually achieved the goal here I went through all drivers. And indeed, all atomic drivers are now free of drm_crtc_helper.h includes. v2: Make it compile. There was so much compile fail on arm drivers that I figured I'll better not include any of the acks on v1. v3: Massive rebase because i915 has lost a lot of drmP.h includes, but not all: Through drm_crtc_helper.h > drm_modeset_helper.h -> drmP.h there was still one, which this patch largely removes. Which means rolling out lots more includes all over. This will also conflict with ongoing drmP.h cleanup by others I expect. v3: Rebase on top of atomic bochs. v4: Review from Laurent for bridge/rcar/omap/shmob/core bits: - (re)move some of the added includes, use the better include files in other places (all suggested from Laurent adopted unchanged). - sort alphabetically v5: Actually try to sort them, and while at it, sort all the ones I touch. v6: Rebase onto i915 changes. v7: Rebase once more. Acked-by: Harry Wentland <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Cc: Sam Ravnborg <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Laurent Pinchart <[email protected]> Acked-by: Rodrigo Vivi <[email protected]> Acked-by: Benjamin Gaignard <[email protected]> Acked-by: Jani Nikula <[email protected]> Acked-by: Neil Armstrong <[email protected]> Acked-by: Oleksandr Andrushchenko <[email protected]> Acked-by: CK Hu <[email protected]> Acked-by: Alex Deucher <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Acked-by: Liviu Dudau <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-07-13drm: drop _mode_ from drm_mode_connector_attach_encoderDaniel Vetter1-1/+1
Again to align with the usual prefix of just drm_connector_. Again done with sed + manual fixup for indent issues. Reviewed-by: Sean Paul <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-02-28drm/tilcdc: tilcdc_panel: Rename device from "panel" to "tilcdc-panel"Jyri Sarha1-1/+1
Rename the bundled tilcdc_panel driver from just "panel" to "tilcdc-panel" to avoid noisy error messages from the driver trying to probe all device nodes named "panel". Signed-off-by: Jyri Sarha <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]>
2018-02-28drm/tilcdc: panel: Use common error handling code in of_get_panel_info()Markus Elfring1-7/+5
Add a jump target so that a bit of exception handling can be better reused at the end of this function. Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Jyri Sarha <[email protected]>
2018-02-28drm/tilcdc: Delete an error message for a failed memory allocation in seven ↵Markus Elfring1-7/+2
functions Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Jyri Sarha <[email protected]>
2017-10-05drm/tilcdc: tilcdc_panel: make of_device_ids const.Arvind Yadav1-1/+1
of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by <linux/of.h> work with const of_device_ids. So mark the non-const structs as const. File size before: text data bss dec hex filename 1531 592 0 2123 84b drivers/gpu/drm/tilcdc/tilcdc_panel.o File size after constify: text data bss dec hex filename 1915 176 0 2091 82b drivers/gpu/drm/tilcdc/tilcdc_panel.o Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Jyri Sarha <[email protected]>
2017-08-08drm: Nuke drm_atomic_helper_connector_dpmsDaniel Vetter1-1/+0
It's dead code, the core handles all this directly now. The only special case is nouveau and tda988x which used one function for both legacy modeset code and -nv50 atomic world instead of 2 vtables. But amounts to exactly the same. v2: Rebase over the panel/brideg refactorings in stm/ltdc. Signed-off-by: Daniel Vetter <[email protected]> Cc: Archit Taneja <[email protected]> Cc: Andrzej Hajda <[email protected]> Cc: Laurent Pinchart <[email protected]> Cc: Peter Senna Tschudin <[email protected]> Cc: Martin Donnelly <[email protected]> Cc: Martyn Welch <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Sean Paul <[email protected]> Cc: David Airlie <[email protected]> Cc: Inki Dae <[email protected]> Cc: Joonyoung Shim <[email protected]> Cc: Seung-Woo Kim <[email protected]> Cc: Kyungmin Park <[email protected]> Cc: Kukjin Kim <[email protected]> Cc: Krzysztof Kozlowski <[email protected]> Cc: Stefan Agner <[email protected]> Cc: Alison Wang <[email protected]> Cc: Russell King <[email protected]> Cc: Philipp Zabel <[email protected]> Cc: CK Hu <[email protected]> Cc: Matthias Brugger <[email protected]> Cc: Neil Armstrong <[email protected]> Cc: Carlo Caione <[email protected]> Cc: Kevin Hilman <[email protected]> Cc: Marek Vasut <[email protected]> Cc: Ben Skeggs <[email protected]> Cc: Tomi Valkeinen <[email protected]> Cc: Eric Anholt <[email protected]> Cc: Mark Yao <[email protected]> Cc: Heiko Stuebner <[email protected]> Cc: Benjamin Gaignard <[email protected]> Cc: Vincent Abriou <[email protected]> Cc: Yannick Fertre <[email protected]> Cc: Philippe Cornu <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Chen-Yu Tsai <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Jonathan Hunter <[email protected]> Cc: Jyri Sarha <[email protected]> Cc: Gerd Hoffmann <[email protected]> Cc: Shawn Guo <[email protected]> Cc: John Stultz <[email protected]> Cc: Lars-Peter Clausen <[email protected]> Cc: Sergei Shtylyov <[email protected]> Cc: Jeffy Chen <[email protected]> Cc: Tomeu Vizoso <[email protected]> Cc: Yakir Yang <[email protected]> Cc: Marek Szyprowski <[email protected]> Cc: Jose Abreu <[email protected]> Cc: Romain Perier <[email protected]> Cc: Kieran Bingham <[email protected]> Cc: Xinliang Liu <[email protected]> Cc: Alexey Brodkin <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Rongrong Zou <[email protected]> Cc: Rob Clark <[email protected]> Cc: Hai Li <[email protected]> Cc: "Noralf Trønnes" <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: zain wang <[email protected]> Cc: Baoyou Xie <[email protected]> Cc: Boris Brezillon <[email protected]> Reviewed-by: Maarten Lankhorst <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Acked-by: Neil Armstrong <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Acked-by: Philipp Zabel <[email protected]> Acked-by: Archit Taneja <[email protected]> Tested-by: Philippe Cornu <[email protected]> (on stm) Reviewed-by: Laurent Pinchart <[email protected]> Acked-by: Shawn Guo <[email protected]> Acked-by: Shawn Guo <[email protected]> Acked-by: Noralf Trønnes <[email protected]> Acked-by: Vincent Abriou <[email protected]>
2016-12-06Merge remote-tracking branch 'airlied/drm-next' into drm-misc-nextDaniel Vetter1-2/+0
Backmerge v4.9-rc8 to get at commit e94bd1736f1f60e916a85a80c0b0ebeaae36cce5 Author: Michel Dänzer <[email protected]> Date: Wed Nov 30 17:30:01 2016 +0900 drm: Don't call drm_for_each_crtc with a non-KMS driver so I can apply Michel's follow-up patch. Signed-off-by: Daniel Vetter <[email protected]>
2016-12-01drm: Make the connector .detect() callback optionalLaurent Pinchart1-8/+0
Many drivers (21 to be exact) create connectors that are always connected (for instance to an LVDS or DSI panel). Instead of forcing them to implement a dummy .detect() handler, make the callback optional and consider the connector as always connected in that case. Reviewed-by: Alex Deucher <[email protected]> Acked-by: Maxime Ripard <[email protected]> Acked-by: Jyri Sarha <[email protected]> Acked-by: Jani Nikula <[email protected]> Acked-by: Philipp Zabel <[email protected]> Acked-by: Vincent Abriou <[email protected]> Acked-by: Alexey Brodkin <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> [seanpaul fixed small conflict in rcar-du/rcar_du_lvdscon.c] Signed-off-by: Sean Paul <[email protected]>
2016-11-29drm/tilcdc: Remove obsolete drm_connector_register() callsJyri Sarha1-2/+0
Remove obsolete drm_connector_register() calls from tilcdc_panel.c and tilcdc_tfp410.c. All connectors are registered when drm_dev_register() is called. Signed-off-by: Jyri Sarha <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2016-09-22drm/tilcdc: add missing header dependenciesBaoyou Xie1-0/+1
We get 4 warnings when building kernel with W=1: drivers/gpu/drm/tilcdc/tilcdc_tfp410.c:393:12: warning: no previous prototype for 'tilcdc_tfp410_init' [-Wmissing-prototypes] drivers/gpu/drm/tilcdc/tilcdc_tfp410.c:398:13: warning: no previous prototype for 'tilcdc_tfp410_fini' [-Wmissing-prototypes] drivers/gpu/drm/tilcdc/tilcdc_panel.c:443:12: warning: no previous prototype for 'tilcdc_panel_init' [-Wmissing-prototypes] drivers/gpu/drm/tilcdc/tilcdc_panel.c:448:13: warning: no previous prototype for 'tilcdc_panel_fini' [-Wmissing-prototypes] In fact, these functions are declared in drivers/gpu/drm/tilcdc/tilcdc_tfp410.h, drivers/gpu/drm/tilcdc/tilcdc_panel.h, so this patch adds missing header dependencies. Signed-off-by: Baoyou Xie <[email protected]> Signed-off-by: Jyri Sarha <[email protected]>
2016-09-01drm/tilcdc: Choose console BPP that supports RGBJyri Sarha1-2/+0
Choose console BPP that supports RGB and remove the old fbdev bpp selection code. LCDC on AM335x has red and blue wires switched between 24 bit and 16 bit colors. If 24 format is wired for RGB colors, the 16 bit format is wired for BGR. drm_fbdev_cma_init() does not currently like anything else but RGB formats, so we must choose such bytes per pixel value that supports RGB. Signed-off-by: Jyri Sarha <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]>
2016-08-08drm/tilcdc: panel: Add atomic modeset helpers to connector funcsJyri Sarha1-1/+5
Add atomic modeset helpers to panel connector funcs. Property handling related helpers, atomic reset helper, and new dpms helper is needed in connector for atomic modeseting to work. The default helper functions are enough. Signed-off-by: Jyri Sarha <[email protected]>
2016-08-08drm/tilcdc: panel: Set crtc panel info at init phaseJyri Sarha1-2/+3
Set crtc panel info at init phase. Setting it at prepare callback does it multiple times for no good reason and it is also too late when atomic modeset is used. Signed-off-by: Jyri Sarha <[email protected]>
2016-02-25drm/tilcdc: Use devm_kzalloc() and devm_kcalloc() for private dataJyri Sarha1-14/+6
Use devm_kzalloc() and devm_kcalloc() for private data allocation at driver load time. Signed-off-by: Jyri Sarha <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]>
2016-02-16drm/tilcdc: removed optional dummy encoder mode_fixup function.Carlos Palminha1-9/+0
mode_fixup function for encoder drivers became optional with patch http://patchwork.freedesktop.org/patch/msgid/[email protected] This patch set nukes all the dummy mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/4d838f580cf81068a4df2500a096d66f06f3ad37.1455540137.git.palminha@synopsys.com
2015-12-11drm: Pass 'name' to drm_encoder_init()Ville Syrjälä1-1/+1
Done with coccinelle for the most part. However, it thinks '...' is part of the semantic patch, so I put an 'int DOTDOTDOT' placeholder in its place and got rid of it with sed afterwards. @@ identifier dev, encoder, funcs; @@ int drm_encoder_init(struct drm_device *dev, struct drm_encoder *encoder, const struct drm_encoder_funcs *funcs, int encoder_type + ,const char *name, int DOTDOTDOT ) { ... } @@ identifier dev, encoder, funcs; @@ int drm_encoder_init(struct drm_device *dev, struct drm_encoder *encoder, const struct drm_encoder_funcs *funcs, int encoder_type + ,const char *name, int DOTDOTDOT ); @@ expression E1, E2, E3, E4; @@ drm_encoder_init(E1, E2, E3, E4 + ,NULL ) v2: Add ', or NULL...' to @name kernel doc (Jani) Annotate the function with __printf() attribute (Jani) Signed-off-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2015-07-06drm/tilcdc: panel: make better use of gpiod APIUwe Kleine-König1-15/+7
Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Furthermore there is devm_gpiod_get_optional which is designed to get optional gpios. Simplify driver accordingly. Acked-by: Alexandre Courbot <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Uwe Kleine-König <[email protected]>
2014-09-17drm/tilcdc: panel: Add support for enable GPIOEzequiel Garcia1-5/+32
In order to support the "enable GPIO" available in many panel devices, this commit adds a proper devicetree binding. By providing an enable GPIO in the devicetree, the driver can now turn off and on the panel device, and/or the backlight device. Both the backlight and the GPIO are optional properties. Tested-by: Darren Etheridge <[email protected]> Tested-by: Johannes Pointner <[email protected]> Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-17drm/tilcdc: panel: Set return value explicitlyEzequiel Garcia1-1/+3
Instead of setting an initial value for the return code, set it explicitly on each error path. This is just a cosmetic cleanup, as preparation for the enable GPIO support. Tested-by: Darren Etheridge <[email protected]> Tested-by: Johannes Pointner <[email protected]> Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-17drm/tilcdc: panel: Fix backlight devicetree supportEzequiel Garcia1-5/+18
The current backlight support is broken; the driver expects a backlight-class in the panel devicetree node. Fix this by implementing it properly, getting an optional backlight from a phandle. This shouldn't cause any backward-compatibility DT issue because the current implementation doesn't work and is not even documented. Tested-by: Darren Etheridge <[email protected]> Tested-by: Johannes Pointner <[email protected]> Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-17drm/tilcdc: panel: Use devm_kzalloc to simplify the error pathEzequiel Garcia1-3/+1
Using the managed variant to allocate the resource makes the code simpler and less error-prone. Tested-by: Darren Etheridge <[email protected]> Tested-by: Johannes Pointner <[email protected]> Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-17drm/tilcdc: panel: Spurious whitespace removalEzequiel Garcia1-1/+0
Just a cosmetic cleanup. Tested-by: Darren Etheridge <[email protected]> Tested-by: Johannes Pointner <[email protected]> Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-17drm/tilcdc: panel: Remove unused variableEzequiel Garcia1-2/+0
Just a trivial cleanup to remove the variable. Tested-by: Darren Etheridge <[email protected]> Tested-by: Johannes Pointner <[email protected]> Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-17drm/tilcdc: panel: Add missing of_node_putEzequiel Garcia1-0/+3
This commit adds the missing calls to of_node_put to release the node that's currently held by the of_get_child_by_name() call in the panel info parsing code. Tested-by: Darren Etheridge <[email protected]> Tested-by: Johannes Pointner <[email protected]> Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-07-10drm/tilcdc: Fix build breakageSachin Kamat1-1/+1
Commit 34ea3d386347 ("drm: add register and unregister functions for connectors") probably missed out converting the drm_sysfs_connector_remove instances in the following files. Without this patch we get the following compilation error: ERROR: "drm_sysfs_connector_remove" [drivers/gpu/drm/tilcdc/tilcdc.ko] undefined! Signed-off-by: Sachin Kamat <[email protected]> CC: Thomas Wood <[email protected]> CC: David Herrmann <[email protected]> CC: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-07-08drm/tilcdc: remove submodule destroy callsGuido Martínez1-18/+18
The TI tilcdc driver is designed with a notion of submodules. Currently, at unload time, these submodules are iterated and destroyed. Now that the tilcdc remove order is fixed, this can be handled perfectly by the kernel using the device infrastructure, since each submodule is a kernel driver itself, and they are only destroy()'ed at unload time. Therefore we move the destroy() functionality to each submodule's remove(). Also, remove some checks in the unloading process since the new code guarantees the resources are allocated and need a release. Signed-off-by: Guido Martínez <[email protected]> Tested-by: Darren Etheridge <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-07-08drm/tilcdc: fix double kfreeGuido Martínez1-3/+1
display_timings_release calls kfree on the display_timings object passed to it. Calling kfree after it is wrong. SLUB debug showed the following warning: ============================================================================= BUG kmalloc-64 (Tainted: G W ): Object already free ----------------------------------------------------------------------------- Disabling lock debugging due to kernel taint INFO: Allocated in of_get_display_timings+0x2c/0x214 age=601 cpu=0 pid=884 __slab_alloc.constprop.79+0x2e0/0x33c kmem_cache_alloc+0xac/0xdc of_get_display_timings+0x2c/0x214 panel_probe+0x7c/0x314 [tilcdc] platform_drv_probe+0x18/0x48 [..snip..] INFO: Freed in panel_destroy+0x18/0x3c [tilcdc] age=0 cpu=0 pid=907 __slab_free+0x34/0x330 panel_destroy+0x18/0x3c [tilcdc] tilcdc_unload+0xd0/0x118 [tilcdc] drm_dev_unregister+0x24/0x98 [..snip..] Signed-off-by: Guido Martínez <[email protected]> Tested-by: Darren Etheridge <[email protected]> Cc: <[email protected]> #v3.9+ Signed-off-by: Dave Airlie <[email protected]>
2014-07-08drm/tilcdc: panel: fix dangling sysfs connector nodeGuido Martínez1-0/+1
Add a drm_sysfs_connector_remove call when we destroy the panel to make sure the connector node in sysfs gets deleted. This is required for proper unload and re-load of this driver as a module. Without this, we would get a warning at re-load time like so: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 824 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x54/0x74() sysfs: cannot create duplicate filename '/class/drm/card0-LVDS-1' Modules linked in: [...] CPU: 0 PID: 824 Comm: modprobe Not tainted 3.15.0-rc4-00027-g6484f96-dirty #81 [<c0013bb8>] (unwind_backtrace) from [<c0011824>] (show_stack+0x10/0x14) [<c0011824>] (show_stack) from [<c0034e8c>] (warn_slowpath_common+0x68/0x88) [<c0034e8c>] (warn_slowpath_common) from [<c0034edc>] (warn_slowpath_fmt+0x30/0x40) [<c0034edc>] (warn_slowpath_fmt) from [<c01243f4>] (sysfs_warn_dup+0x54/0x74) [<c01243f4>] (sysfs_warn_dup) from [<c0124708>] (sysfs_do_create_link_sd.isra.2+0xb0/0xb8) [<c0124708>] (sysfs_do_create_link_sd.isra.2) from [<c02ae37c>] (device_add+0x338/0x520) [<c02ae37c>] (device_add) from [<c02ae6e8>] (device_create_groups_vargs+0xa0/0xc4) [<c02ae6e8>] (device_create_groups_vargs) from [<c02ae758>] (device_create+0x24/0x2c) [<c02ae758>] (device_create) from [<c029b4ec>] (drm_sysfs_connector_add+0x64/0x204) [<c029b4ec>] (drm_sysfs_connector_add) from [<bf0b1fec>] (panel_modeset_init+0xb8/0x134 [tilcdc]) [<bf0b1fec>] (panel_modeset_init [tilcdc]) from [<bf0b2bf0>] (tilcdc_load+0x214/0x4c0 [tilcdc]) [<bf0b2bf0>] (tilcdc_load [tilcdc]) from [<c029955c>] (drm_dev_register+0xa4/0x104) [ .. snip .. ] ---[ end trace b2d09cd9578b0497 ]--- [drm:drm_sysfs_connector_add] *ERROR* failed to register connector device: -17 Signed-off-by: Guido Martínez <[email protected]> Tested-by: Darren Etheridge <[email protected]> Cc: <[email protected]> #v3.9+ Signed-off-by: Dave Airlie <[email protected]>
2014-06-19drm: add register and unregister functions for connectorsThomas Wood1-1/+1
Introduce generic functions to register and unregister connectors. This provides a common place to add and remove associated user space interfaces. Signed-off-by: Thomas Wood <[email protected]> Reviewed-by: David Herrmann <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-06-20gpu:drm:tilcdc: get preferred_bpp value from DTBenoit Parrot1-0/+2
The preferred_bpp value in currently hard-coded to 16. This causes color corruption on the am335x-evm lcd panel which requires 32 bpp instead. This changes attempts to use the configured bpp value from the DT or built-in panel-info struct. Signed-off-by: Benoit Parrot <[email protected]> Acked-by: Rob Clark <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-05-02Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds1-2/+1
Pull drm updates from Dave Airlie: "This is the main drm pull request for 3.10. Wierd bits: - OMAP drm changes required OMAP dss changes, in drivers/video, so I took them in here. - one more fbcon fix for font handover - VT switch avoidance in pm code - scatterlist helpers for gpu drivers - have acks from akpm Highlights: - qxl kms driver - driver for the spice qxl virtual GPU Nouveau: - fermi/kepler VRAM compression - GK110/nvf0 modesetting support. Tegra: - host1x core merged with 2D engine support i915: - vt switchless resume - more valleyview support - vblank fixes - modesetting pipe config rework radeon: - UVD engine support - SI chip tiling support - GPU registers initialisation from golden values. exynos: - device tree changes - fimc block support Otherwise: - bunches of fixes all over the place." * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (513 commits) qxl: update to new idr interfaces. drm/nouveau: fix build with nv50->nvc0 drm/radeon: fix handling of v6 power tables drm/radeon: clarify family checks in pm table parsing drm/radeon: consolidate UVD clock programming drm/radeon: fix UPLL_REF_DIV_MASK definition radeon: add bo tracking debugfs drm/radeon: add new richland pci ids drm/radeon: add some new SI PCI ids drm/radeon: fix scratch reg handling for UVD fence drm/radeon: allocate SA bo in the requested domain drm/radeon: fix possible segfault when parsing pm tables drm/radeon: fix endian bugs in atom_allocate_fb_scratch() OMAPDSS: TFP410: return EPROBE_DEFER if the i2c adapter not found OMAPDSS: VENC: Add error handling for venc_probe_pdata OMAPDSS: HDMI: Add error handling for hdmi_probe_pdata OMAPDSS: RFBI: Add error handling for rfbi_probe_pdata OMAPDSS: DSI: Add error handling for dsi_probe_pdata OMAPDSS: SDI: Add error handling for sdi_probe_pdata OMAPDSS: DPI: Add error handling for dpi_probe_pdata ...
2013-04-26drm/tilcdc: use only a single module device tableArnd Bergmann1-1/+0
The tilcdc driver fails to be built as a module because of extraneous MODULE_DEVICE_TABLE entries: drivers/gpu/drm/tilcdc/tilcdc_slave.o:(.data+0x54): multiple definition of `__mod_of_device_table' drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here drivers/gpu/drm/tilcdc/tilcdc_panel.o:(.data+0x54): multiple definition of `__mod_of_device_table' drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here drivers/gpu/drm/tilcdc/tilcdc_drv.o:(.data+0x184): multiple definition of `__mod_of_device_table' drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here Since the entire point of these entries is to make the module autoload when one of the devices is present, it's enough to keep the one entry for "ti,am33xx-tilcdc", which should always be there if any of the others are. Acked-by: Rob Clark <[email protected]> Cc: [email protected] Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-04-24drm/tilcdc: Fix checkpatch error in tilcdc_panel.cSachin Kamat1-1/+1
Fixes the following checkpatch error: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Sachin Kamat <[email protected]> Acked-by: Rob Clark <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-03-21videomode: videomode_from_timing workTomi Valkeinen1-1/+1
We currently have videomode_from_timing(), which takes one display_timing entry from display_timings. To make it easier to use display_timing without display_timings, this patch renames videomode_from_timing() to videomode_from_timings(), and adds a new videomode_from_timing() which just converts a given display_timing to videomode. Signed-off-by: Tomi Valkeinen <[email protected]> Cc: Steffen Trumtrar <[email protected]>
2013-02-19drm/tilcdc: add support for LCD panels (v5)Rob Clark1-0/+436
Add an output panel driver for LCD panels. Tested with LCD3 cape on beaglebone. v1: original v2: s/of_find_node_by_name()/of_get_child_by_name()/ from Pantelis Antoniou v3: add backlight support v4: rebase to latest of video timing helpers v5: remove some unneeded fields from panel-info struct, add DT bindings docs Signed-off-by: Rob Clark <[email protected]> Tested-by: Koen Kooi <[email protected]>