[PATCH 00/48] omapdrm: Merge omapdrm and omapdss

Tomi Valkeinen tomi.valkeinen at ti.com
Wed Oct 18 09:56:12 UTC 2017



Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

On 18/10/17 12:46, Tomi Valkeinen wrote:
> Hi Laurent,
> 
> On 13/10/17 17:58, Laurent Pinchart wrote:
>> Hello,
>>
>> This patch series merges the omapdrm and omapdss drivers into a single driver
>> called omapdrm. The split in two drivers was historical, in order to support
>> the FBDEV, V4L2 and DRM/KMS APIs. Now that the driver supports DRM/KMS only
>> there's no need to keep two seperate drivers.
>>
>> The series starts with a few cleanups (01/48 to 03/48) and quickly proceeds to
>> merging the omapdss and omapdss-base modules (04/48). It then prepares the
>> omapdss code (05/48 to 08/48), perform a few more cleanups (09/48 to 11/48)
>> and prepares the omapdrm code (12/48).
>>
>> Patches 13/48 to 19/48 prepare the connector, encoder and panel drivers. All
>> those drivers defer probing when their video source can't be found at probe
>> time. This would cause endless probe deferral when merging omapdrm and omapdss
>> as the drivers need omapdss to be fully initialized to probe successfully, but
>> cause omapdrm to defer probing when they're not available.
>>
>> Patch 20/48 merges the omapdrm and omapdss drivers.
>>
>> The next patches are added bonuses that start removal of global variables from
>> the driver. The code relies heavily on global variables for objects that are
>> instance-specific, and should thus be dynamically allocated. Most of the
>> patches change internal APIs to pass objects to driver functions (21/48 to
>> 28/48, 36/48, 39/48 to 41/38, 43/48 to 45/48) with a few miscellaneous
>> cleanups (29/48, 35/48, 37/48, 38/48, 42/48). Patches 30/48 to 34/48 and 46/48
>> then allocate instance objects dynamically to replace global variables, and
>> patches 47/48 and 48/48 move global variables to existing instance objects.
>>
>> The series has been tested on a Pandaboard with the DVI and HDMI output.
> 
> Here's what I get on AM5 EVM:
> 
> # ./s-drm-new 
> [   17.535638] sysrq: SysRq : Changing Loglevel
> [   17.540179] sysrq: Loglevel set to 9
> insmod nfs/work/linux/sound/soc/omap/snd-soc-omap-hdmi-audio.ko
> insmod nfs/work/linux/drivers/media/cec/cec.ko
> insmod nfs/work/linux/drivers/video/fbdev/core/cfbcopyarea.ko
> insmod nfs/work/linux/drivers/video/fbdev/core/cfbimgblt.ko
> insmod nfs/work/linux/drivers/video/fbdev/core/cfbfillrect.ko
> insmod nfs/work/linux/drivers/gpu/drm/drm.ko
> insmod nfs/work/linux/drivers/gpu/drm/drm_kms_helper.ko
> insmod nfs/work/linux/drivers/gpu/drm/omapdrm/omapdrm.ko
> [   17.966444] dmm 4e000000.dmm: initialized all PAT entries
> [   18.004857] DSS: OMAP DSS rev 6.1
> [   18.010743] omapdss_dss 58000000.dss: bound 58001000.dispc (ops dispc_component_ops [omapdrm])
> [   18.025076] omap-hdmi-audio omap-hdmi-audio.2.auto: snd-soc-dummy-dai <-> 58040000.encoder mapping ok
> [   18.050076] omapdss_dss 58000000.dss: bound 58040000.encoder (ops hdmi5_component_ops [omapdrm])
> [   18.074540] omapdss_dss 58000000.dss: master bind failed: -517

If I disable HDMI audio, the spam goes away, and I just get:

[   14.783558] dmm 4e000000.dmm: initialized all PAT entries
[   14.805775] DSS: OMAP DSS rev 6.1
[   14.809989] omapdss_dss 58000000.dss: bound 58001000.dispc (ops dispc_component_ops [omapdrm])
[   14.821844] omapdss_dss 58000000.dss: bound 58040000.encoder (ops hdmi5_component_ops [omapdrm])
[   14.833482] omapdss_dss 58000000.dss: master bind failed: -517

When I remove modules, something is left enabled as I get:

[   99.623954] platform 58000000.dss: enabled after unload, idling

If, after loading omapdrm as above, I also load encoder/panel drivers, I get a picture after a spam of "omapdss_dss 58000000.dss: master bind failed: -517" and "alloc_contig_range: [fd874, fd875) PFNs busy" messages.

But then, I can't unload any modules as they are all in use.

 Tomi



More information about the dri-devel mailing list