[PATCH/RESEND 0/9] drm: tilcdc driver fixes

2014-07-01 Thread Guido Martínez
Hi Dave, did you take a look at this patchset? I foolishly missed adding you on the To: header, so apologies for that in advance. Thanks, On Tue, Jun 17, 2014 at 11:17:02AM -0300, Guido Mart?nez wrote: > The tilcdc driver could be compiled as a module, but was severely broken > and could not be

[PATCH/RESEND 0/9] drm: tilcdc driver fixes

2014-07-01 Thread Guido Martínez
On Fri, Jun 27, 2014 at 05:08:51PM -0500, Darren Etheridge wrote: > [snip] > > Otherwise I think this is a good and useful patch series. It that a Tested-by tag? :) Thanks! Guido > > Darren > > >The first 7 patches are bug fixes which and should probably be applied > >in the stable trees. The

[PATCH/RESEND 1/9] drm/i2c: tda998x: move drm_i2c_encoder_destroy call

2014-06-25 Thread Guido Martínez
Hi Russell, On Tue, Jun 24, 2014 at 05:38:13PM +0100, Russell King - ARM Linux wrote: > On Tue, Jun 17, 2014 at 11:17:03AM -0300, Guido Mart?nez wrote: > > Currently tda998x_encoder_destroy() calls cec_write() and reg_clear(), > > as part of the release procedure. Such calls need to access the

[PATCH/RESEND 8/9] drm/tilcdc: remove submodule destroy calls

2014-06-25 Thread Guido Martínez
On Tue, Jun 24, 2014 at 05:06:24PM -0500, Darren Etheridge wrote: > Guido, > > On 06/17/2014 09:17 AM, Guido Mart?nez wrote: > >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

[PATCH/RESEND 0/9] drm: tilcdc driver fixes

2014-06-23 Thread Guido Martínez
Hi Rob, On Tue, Jun 17, 2014 at 11:17:02AM -0300, Guido Mart?nez wrote: > The tilcdc driver could be compiled as a module, but was severely broken > and could not be used as such. This patchset attempts to fix the issues > preventing a proper load/unload of the module. > > Issues included

[PATCH/RESEND 0/9] drm: tilcdc driver fixes

2014-06-19 Thread Guido Martínez
Hi Darren, On Thu, Jun 19, 2014 at 08:41:43AM -0500, Darren Etheridge wrote: > Guido, > > Thanks and sorry I missed this the first time around. I'll give it a try on > a few of my AM335x based boards when I have access to them again on Monday. Thanks! And no worries :) > > Darren > -- Guido

[PATCH/RESEND 9/9] drm/tilcdc: replace late_initcall with module_init

2014-06-17 Thread Guido Martínez
Use module_init instead of late_initcall, as is the norm for modular drivers. module_init was used until 6e8de0bd6a51fdeebd5d975c4fcc426f730b339b ("drm/tilcdc: add encoder slave (v2)") changed it to a late_initcall, but it does not explain why. Tests show it's working properly with module_init.

[PATCH/RESEND 8/9] drm/tilcdc: remove submodule destroy calls

2014-06-17 Thread Guido Martínez
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

[PATCH/RESEND 7/9] drm/tilcdc: fix double kfree

2014-06-17 Thread Guido Martínez
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: GW): Object already

[PATCH/RESEND 6/9] drm/tilcdc: fix release order on exit

2014-06-17 Thread Guido Martínez
Unregister resources in the correct order on tilcdc_drm_fini, which is the reverse order they were registered during tilcdc_drm_init. This also means unregistering the driver before releasing its resources. Signed-off-by: Guido Mart?nez Cc: #v3.9+ --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 6

[PATCH/RESEND 5/9] drm/tilcdc: panel: fix leak when unloading the module

2014-06-17 Thread Guido Martínez
The driver did not unregister the allocated framebuffer, which caused memory leaks (and memory manager WARNs) when unloading. Also, the framebuffer device under /dev still existed after unloading. Add a call to drm_fbdev_cma_fini when unloading the module to prevent both issues. Signed-off-by:

[PATCH/RESEND 4/9] drm/tilcdc: tfp410: fix dangling sysfs connector node

2014-06-17 Thread Guido Martínez
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, otherwise we will get a warning about a duplicate filename in sysfs. Signed-off-by: Guido Mart?nez Cc: #v3.9+

[PATCH/RESEND 3/9] drm/tilcdc: slave: fix dangling sysfs connector node

2014-06-17 Thread Guido Martínez
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: tda998x 0-0070: found TDA19988

[PATCH/RESEND 1/9] drm/i2c: tda998x: move drm_i2c_encoder_destroy call

2014-06-17 Thread Guido Martínez
Currently tda998x_encoder_destroy() calls cec_write() and reg_clear(), as part of the release procedure. Such calls need to access the I2C bus and therefore, we need to call them before drm_i2c_encoder_destroy() which unregisters the I2C device. This commit moves the latter so it's done

[PATCH/RESEND 0/9] drm: tilcdc driver fixes

2014-06-17 Thread Guido Martínez
The tilcdc driver could be compiled as a module, but was severely broken and could not be used as such. This patchset attempts to fix the issues preventing a proper load/unload of the module. Issues included dangling sysfs nodes, dangling devices, memory leaks and a double kfree. It now seems to

[PATCH 9/9] drm/tilcdc: replace late_initcall with module_init

2014-06-07 Thread Guido Martínez
Use module_init instead of late_initcall, as is the norm for modular drivers. module_init was used until 6e8de0bd6a51fdeebd5d975c4fcc426f730b339b ("drm/tilcdc: add encoder slave (v2)") changed it to a late_initcall, but it does not explain why. Tests show it's working properly with module_init.

[PATCH 8/9] drm/tilcdc: remove submodule destroy calls

2014-06-07 Thread Guido Martínez
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

[PATCH 7/9] drm/tilcdc: fix double kfree

2014-06-07 Thread Guido Martínez
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: GW): Object already

[PATCH 6/9] drm/tilcdc: fix release order on exit

2014-06-07 Thread Guido Martínez
Unregister resources in the correct order on tilcdc_drm_fini, which is the reverse order they were registered during tilcdc_drm_init. This also means unregistering the driver before releasing its resources. Signed-off-by: Guido Mart?nez Cc: stable at vger.kernel.org ---

[PATCH 5/9] drm/tilcdc: panel: fix leak when unloading the module

2014-06-07 Thread Guido Martínez
The driver did not unregister the allocated framebuffer, which caused memory leaks (and memory manager WARNs) when unloading. Also, the framebuffer device under /dev still existed after unloading. Add a call to drm_fbdev_cma_fini when unloading the module to prevent both issues. Signed-off-by:

[PATCH 4/9] drm/tilcdc: tfp410: fix dangling sysfs connector node

2014-06-07 Thread Guido Martínez
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, otherwise we will get a warning about a duplicate filename in sysfs. Signed-off-by: Guido Mart?nez Cc: stable at

[PATCH 3/9] drm/tilcdc: slave: fix dangling sysfs connector node

2014-06-07 Thread Guido Martínez
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: tda998x 0-0070: found TDA19988

[PATCH 2/9] drm/tilcdc: panel: fix dangling sysfs connector node

2014-06-07 Thread Guido Martínez
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 ]

[PATCH 1/9] drm/i2c: tda998x: move drm_i2c_encoder_destroy call

2014-06-07 Thread Guido Martínez
Currently tda998x_encoder_destroy() calls cec_write() and reg_clear(), as part of the release procedure. Such calls need to access the I2C bus and therefore, we need to call them before drm_i2c_encoder_destroy() which unregisters the I2C device. This commit moves the latter so it's done

[PATCH 0/9] tilcdc driver fixes

2014-06-07 Thread Guido Martínez
The tilcdc driver could be compiled as a module, but was severely broken and could not be used as such. This patchset attempts to fix the issues preventing a proper load/unload of the module. Issues included dangling sysfs nodes, dangling devices, memory leaks and a double kfree. It now seems to