Hello, This patch series reworks all the HPD-related operations (detection, EDID read, HPD callback (un)registration and HPD enable/disable) as a step toward moving from omap_dss_device to drm_bridge. All HPD-related operations are called by the omapdrm driver on the omap_dss_device at the end of display pipeline, and the operations are then handled directly or forwarded to the previous omap_dss_device in the pipeline. This causes an issue in our quest to move to drm_bridge: there are currently no HPD-related operations in the drm_bridge API, as they are implemented internally by bridge drivers for the drm_connector created by the bridges. To solve this, we will need to extend the drm_bridge API with HPD-related operations. This patch series is a prototype of such an API, still local to omap_dss_device for now. HPD operations can be implemented by multiple components in a display pipeline. For instance, the DDC bus of an HDMI connector can be wired to an I2C bus of the SoC, or to the DDC pins of an HDMI encoder. In the first case the HDMI connector component will provide EDID access, while in the second case EDID will be read through the HDMI encoder component. Both components will thus implement the EDID read operation, but on a particular system only one of them will be able to provide the feature. Determining which component provides a feature at runtime is thus required, and is currently performed through recursive calls. This requires all components to cooperate in a way that can be implemented locally in the omapdrm driver but would be too complex for the more generic drm_bridge API. Our solution is to use flags in the omap_dss_device structure to tell, at runtime, which features are available. The top-level code can then locate the component providing a particular feature and then use that component directly. The series starts with removal of dead or unneeded code in patches 01/21 to 03/21. Patch 04/21 prepares for the merge of the omap_dss_driver and omap_dss_device_ops structures. Patches then 05/21 to 10/21 convert the driver from the GPIO API to the GPIO descriptors API (drive-by cleanup). Patch 11/21 is where the real refactoring starts. It moves most operations from the omap_dss_driver structure to the omap_dss_device_ops structure in order to simplify code iterating over pipelines. Patch 12/21 defines the operation flags, and patches 13/21 and 14/21 make use of them to rework the .detect(), .register_hpd_cb() and .unregister_hpd_cb() operations. Patches 15/21 and 16/21 remove the unneeded .enable_hpd() and .disable_hpd() operations. Patch 17/21 moves DSS-specific HPD-related code from omap_dss_device instances to the omapdrm driver, and patch 18/21 reworks the .read_edid() operation. Patch 19/21 simplifies the component handling in the CRTC mode set code, and patches 20/21 and 21/21 finally rework the .set_hdmi_mode() and .set_infoframe() operations. Laurent Pinchart (21): drm/omap: dss: Remove unused omap_dss_driver operations drm/omap: dss: Remove omap_dss_driver .[gs]et_mirror operations drm/omap: Remove unnecessary display output sanity checks drm/omap: Check omap_dss_device type based on the output_type field drm/omap: connector-hdmi: Convert to the GPIO descriptors API drm/omap: encoder-tfp410: Convert to the GPIO descriptors API drm/omap: panel-nec-nl8048hl11: Convert to the GPIO descriptors API drm/omap: panel-sony-acx565akm: Convert to the GPIO descriptors API drm/omap: panel-tpo-td028ttec1: Drop unneeded linux/gpio.h header drm/omap: panel-tpo-td043mtea1: Convert to the GPIO descriptors API drm/omap: Move most omap_dss_driver operations to omap_dss_device_ops drm/omap: dss: Add device operations flags drm/omap: Don't call .detect() operation recursively drm/omap: Don't call HPD registration operations recursively drm/omap: Remove unneeded safety checks in the HPD operations drm/omap: Merge HPD enable operation with HPD callback registration drm/omap: Move HPD disconnection handling to omap_connector drm/omap: Don't call EDID read operation recursively drm/omap: Get from CRTC to display device directly drm/omap: Pass both output and display omap_dss_device to encoder init drm/omap: Don't call HDMI mode and infoframe operations recursively .../gpu/drm/omapdrm/displays/connector-analog-tv.c | 4 +- drivers/gpu/drm/omapdrm/displays/connector-dvi.c | 52 +--- drivers/gpu/drm/omapdrm/displays/connector-hdmi.c | 160 +++---------- drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c | 51 +--- .../gpu/drm/omapdrm/displays/encoder-tpd12s015.c | 79 +----- drivers/gpu/drm/omapdrm/displays/panel-dpi.c | 4 +- drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 12 +- .../omapdrm/displays/panel-lgphilips-lb035q02.c | 4 +- .../drm/omapdrm/displays/panel-nec-nl8048hl11.c | 58 +---- .../drm/omapdrm/displays/panel-sharp-ls037v7dw01.c | 4 +- .../drm/omapdrm/displays/panel-sony-acx565akm.c | 60 ++--- .../drm/omapdrm/displays/panel-tpo-td028ttec1.c | 5 +- .../drm/omapdrm/displays/panel-tpo-td043mtea1.c | 81 ++----- drivers/gpu/drm/omapdrm/dss/base.c | 16 +- drivers/gpu/drm/omapdrm/dss/dss.c | 5 +- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 4 +- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 4 +- drivers/gpu/drm/omapdrm/dss/omapdss.h | 81 +++---- drivers/gpu/drm/omapdrm/omap_connector.c | 265 +++++++++++++-------- drivers/gpu/drm/omapdrm/omap_connector.h | 2 + drivers/gpu/drm/omapdrm/omap_crtc.c | 25 +- drivers/gpu/drm/omapdrm/omap_drv.c | 28 +-- drivers/gpu/drm/omapdrm/omap_encoder.c | 49 ++-- drivers/gpu/drm/omapdrm/omap_encoder.h | 6 +- 24 files changed, 386 insertions(+), 673 deletions(-) -- Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel