Re: [PATCH v2 00/60] omapdrm: Reverse direction of DSS device (dis)connect operations

2018-06-13 Thread Tomi Valkeinen
Hi Laurent,

On 26/05/18 20:24, Laurent Pinchart wrote:

> The patches are based on top of the "[PATCH v2 0/6] omapdrm: struct_mutex
> removal" patch series I've sent yesterday, itself based on top of Dave's
> drm-next branch. They can be found at
> 
> git://linuxtv.org/pinchartl/media.git omapdrm/bridge

That branch doesn't exists, I guess it's omapdrm/bridge/next?

I picked the patches from omapdrm/bridge/next onto my 4.19 branch, and testing 
with x15, when I remove omapdrm modules I get:

[   34.208080] [ cut here ]
[   34.212767] WARNING: CPU: 1 PID: 370 at 
drivers/gpu/drm/omapdrm/dss/base.c:227 omapdss_device_disconnect+0xa8/0xec 
[omapdss_base]
[   34.225347] Modules linked in: omapdrm(-) drm_kms_helper drm 
drm_panel_orientation_quirks cfbfillrect cfbimgblt cfbcopyarea connector_dvi 
panel_sony_acx565akm pan
el_dpi connector_analog_tv connector_hdmi encoder_tpd12s015 encoder_tfp410 
omapdss omapdss_base cec snd_soc_omap_hdmi_audio
[   34.251500] CPU: 1 PID: 370 Comm: rmmod Not tainted 
4.17.0-00070-g2efec4ad4e77 #2
[   34.259031] Hardware name: Generic DRA74X (Flattened Device Tree)
[   34.265165] Backtrace: 
[   34.267659] [] (dump_backtrace) from [] 
(show_stack+0x18/0x1c)
[   34.275277]  r7: r6:600f0013 r5: r4:c0fc1320
[   34.280981] [] (show_stack) from [] 
(dump_stack+0xac/0xe0)
[   34.288255] [] (dump_stack) from [] (__warn+0xe8/0x114)
[   34.295262]  r7:0009 r6:bf01a19c r5: r4:
[   34.300965] [] (__warn) from [] 
(warn_slowpath_null+0x44/0x50)
[   34.308586]  r9:eb958000 r8:ed215000 r7:ed215000 r6:bf0194cc r5:00e3 
r4:bf01a19c
[   34.316393] [] (warn_slowpath_null) from [] 
(omapdss_device_disconnect+0xa8/0xec [omapdss_base])
[   34.326975]  r6: r5: r4:ed342d50
[   34.331660] [] (omapdss_device_disconnect [omapdss_base]) from 
[] (omap_disconnect_pipelines+0x34/0x7c [omapdrm])
[   34.343724]  r5: r4:ed215000
[   34.347367] [] (omap_disconnect_pipelines [omapdrm]) from 
[] (pdev_remove+0xb0/0xd4 [omapdrm])
[   34.35]  r7:ed215000 r6:ed12a000 r5:ed215014 r4:0001
[   34.363501] [] (pdev_remove [omapdrm]) from [] 
(platform_drv_remove+0x28/0x48)
[   34.372515]  r9:eb958000 r8:c0f987c4 r7:c0f98790 r6:bf194104 r5:ed347810 
r4:ed347810
[   34.380312] [] (platform_drv_remove) from [] 
(device_release_driver_internal+0x170/0x218)
[   34.390283]  r5:ed347844 r4:ed347810
[   34.393895] [] (device_release_driver_internal) from [] 
(driver_detach+0x40/0x74)
[   34.403171]  r9:eb958000 r8:c0fd12f0 r7:c0c55eb8 r6:c0fd12d8 r5:bf194104 
r4:ed347810
[   34.410968] [] (driver_detach) from [] 
(bus_remove_driver+0x64/0xdc)
[   34.419106]  r5:bf1910c4 r4:bf194104
[   34.422716] [] (bus_remove_driver) from [] 
(driver_unregister+0x30/0x50)
[   34.431205]  r5:bf1910c4 r4:bf194104
[   34.434812] [] (driver_unregister) from [] 
(platform_unregister_drivers+0x34/0x68)
[   34.444171]  r5:bf1910c4 r4:bf1910c8
[   34.447800] [] (platform_unregister_drivers) from [] 
(omap_drm_fini+0x24/0xf24 [omapdrm])
[   34.457776]  r9:eb958000 r8:c01011c4 r7:0003deec r6:0800 r5:c0f08948 
r4:bf1944c0
[   34.465591] [] (omap_drm_fini [omapdrm]) from [] 
(sys_delete_module+0x1ac/0x26c)
[   34.474785] [] (sys_delete_module) from [] 
(ret_fast_syscall+0x0/0x28)
[   34.483098] Exception stack(0xeb959fa8 to 0xeb959ff0)
[   34.488187] 9fa0:   0003deb0 bee2dc18 0003deec 0800 
b6f6ed78 
[   34.496418] 9fc0: 0003deb0 bee2dc18  0081 bee2defd 0003deb0 
bee2ddfc 0001
[   34.504644] 9fe0: b6f31f30 bee2dbbc 000205bc b6f31f3c
[   34.509734]  r7:0081 r6: r5:bee2dc18 r4:0003deb0
[   34.519526] irq event stamp: 6357
[   34.522880] hardirqs last  enabled at (6365): [] 
console_unlock+0x458/0x678
[   34.530880] hardirqs last disabled at (6402): [] 
__schedule+0xcc/0xe6c
[   34.538436] softirqs last  enabled at (6434): [] 
__do_softirq+0x37c/0x69c
[   34.546226] softirqs last disabled at (6447): [] 
irq_exit+0x12c/0x15c
[   34.553585] ---[ end trace 5f947c42d0296722 ]---

 Tomi

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. 
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v2 00/60] omapdrm: Reverse direction of DSS device (dis)connect operations

2018-05-26 Thread Laurent Pinchart
Hello,

This patch series is a first step towards moving the omapdrm driver away from
the custom bridge and panel drivers to drm_bridge and drm_panel.

The main blocker to transition to drm_bridge and drm_panel is the direction of
the bridge operations. While the omapdrm driver manages its components from
sink to source (panel to DSS output), the drm_bridge API is manages bridges in
the source to sink direction. This makes the two models incompatible, and
requires reversing the direction of operations inside omapdrm.

Don't rejoice too fast, we're still far from a complete transition, but this
first step paves the way by reworking the driver's internals to make source to
sink order possible. It then transitions the connect and disconnect operations
(the omapdrm equivalent of the drm_bridge attach and detach operations) to the
new direction.

The series contains patches previously posted by Jyri and Peter that I have
found helpful. Please see the individual patches for changes compared to the
original versions (trivial conflict resolutions caused by a rebase are not
mentioned).

The patches are based on top of the "[PATCH v2 0/6] omapdrm: struct_mutex
removal" patch series I've sent yesterday, itself based on top of Dave's
drm-next branch. They can be found at

git://linuxtv.org/pinchartl/media.git omapdrm/bridge

The series has been tested on a Pandaboard with the HDMI and DVI outputs, and
on a TI AM57xx EVM with the LCD and HDMI outputs. All patches have been tested
individually on the Pandaboard.

Compared to v1, patch "drm/omap: dss: Remove omapdss_hdmi_ops set_infoframe
operation" has been dropped, and patch "drm/omap: dss: Handle DPI and SDI port
initialization failures" added. Other small changes are documented in
individual patches.

Jyri Sarha (1):
  drm/omap: dss: Move platform_device_register from core.c to dss.c
probe

Laurent Pinchart (55):
  drm/omap: dss: Gather OMAP DSS components at probe time
  drm/omap: dss: Handle DPI and SDI port initialization failures
  drm/omap: dss: Remove omapdss_atv_ops get_wss and set_wss operations
  drm/omap: dss: Remove DSS encoders get_timings operation
  drm/omap: dss: Remove unused omapdss_default_get_timings()
  drm/omap: dss: Constify omap_dss_driver operations structure
  drm/omap: displays: Remove videomode from omap_dss_device structure
  drm/omap: dss: Remove omap_dss_device panel fields
  drm/omap: dss: Rename omap_dss_device list field to output_list
  drm/omap: dss: Create global list of all omap_dss_device instances
  drm/omap: dss: Create and use omapdss_device_is_registered()
  drm/omap: dss: Rework output lookup by port node
  drm/omap: dss: Allow looking up any device by port
  drm/omap: dss: Move common device operations to common structure
  drm/omap: dss: Add functions to connect and disconnect devices
  drm/omap: dss: Move debug message and checks to connection handlers
  drm/omap: dss: Move src and dst check and set to connection handlers
  drm/omap: displays: Remove input omap_dss_device from panel data
  drm/omap: dsi: Simplify debugfs implementation
  drm/omap: Move DSI debugfs clocks dump to dsi%u_clks files
  drm/omap: dss: Remove output devices list
  drm/omap: dss: Rename for_each_dss_dev macro to for_each_dss_display
  drm/omap: dss: Make omap_dss_get_next_device() more generic
  drm/omap: dss: Split omapdss_register_display()
  drm/omap: dss: Remove panel devices list
  drm/omap: dss: Move and rename omap_dss_(get|put)_device()
  drm/omap: dss: Store dss_device pointer in omap_dss_device
  drm/omap: dss: Move DSS mgr ops and private data to dss_device
  drm/omap: dss: Modify omapdss_find_output_from_display() to return
channel
  drm/omap: dss: Replace omap_dss_device port number with bitmask
  drm/omap: dss: Extend omapdss_of_find_source_for_first_ep() to sinks
  drm/omap: displays: Don't cast dssdev to panel data unnecessarily
  drm/omap: dss: Cleanup error paths in output init functions
  drm/omap: dss: dsi: Move initialization code from bind to probe
  drm/omap: dss: hdmi4: Move initialization code from bind to probe
  drm/omap: dss: hdmi5: Move initialization code from bind to probe
  drm/omap: dss: venc: Move initialization code from bind to probe
  drm/omap: dss: Acquire next dssdev at probe time
  drm/omap: dss: Add for_each_dss_output() macro
  drm/omap: dss: Add function to retrieve display for an output
  drm/omap: dss: Remove duplicated parameter to dss_mgr_(dis)connect()
  drm/omap: dss: Get regulators at probe time
  drm/omap: Remove unneeded variable assignments in omap_modeset_init
  drm/omap: Create all planes before CRTCs
  drm/omap: Group CRTC, encoder, connector and dssdev in a structure
  drm/omap: Reverse direction of DSS device (dis)connect operations
  drm/omap: dss: Move connection checks to omapdss_device_(dis)connect
  drm/omap: dss: Move display type validation to initialization time
  drm/omap: dss: Merge two disconnection helpers
  drm/omap: Pass pipe pointer to omap_crtc_init()