Message ID | 20200717144132.2206-1-laurentiu.palcu@oss.nxp.com (mailing list archive) |
---|---|
Headers | show |
Series | Add support for iMX8MQ Display Controller Subsystem | expand |
Hi Laurentiu. On Fri, Jul 17, 2020 at 05:41:27PM +0300, Laurentiu Palcu wrote: > From: Laurentiu Palcu <laurentiu.palcu@nxp.com> > > This adds initial support for iMX8MQ's Display Controller Subsystem (DCSS). > Some of its capabilities include: > * 4K@60fps; > * HDR10; > * one graphics and 2 video pipelines; > * on-the-fly decompression of compressed video and graphics; > > The reference manual can be found here: > https://www.nxp.com/webapp/Download?colCode=IMX8MDQLQRM > > The current patch adds only basic functionality: one primary plane for > graphics, linear, tiled and super-tiled buffers support (no graphics > decompression yet), no HDR10 and no video planes. > > Video planes support and HDR10 will be added in subsequent patches once > per-plane de-gamma/CSC/gamma support is in. > > Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com> > Reviewed-by: Lucas Stach <l.stach@pengutronix.de> > --- .... return drm_bridge_attach(encoder, bridge, NULL, 0); .... The above code-snippet tells that the display-driver rely on the bridge to create the connector. Could this by any chance be updated to the new way where the display driver creates the connector - and thus passing DRM_BRIDGE_ATTACH_NO_CONNECTOR as the flags argument? What bridges would be relevant? To check that the reelvant bridges are already ported. Sam
Hi, On Fri, Jul 17, 2020 at 09:48:49PM +0200, Sam Ravnborg wrote: > Hi Laurentiu. > > On Fri, Jul 17, 2020 at 05:41:27PM +0300, Laurentiu Palcu wrote: > > From: Laurentiu Palcu <laurentiu.palcu@nxp.com> > > > > This adds initial support for iMX8MQ's Display Controller Subsystem (DCSS). > > Some of its capabilities include: > > * 4K@60fps; > > * HDR10; > > * one graphics and 2 video pipelines; > > * on-the-fly decompression of compressed video and graphics; > > > > The reference manual can be found here: > > https://www.nxp.com/webapp/Download?colCode=IMX8MDQLQRM > > > > The current patch adds only basic functionality: one primary plane for > > graphics, linear, tiled and super-tiled buffers support (no graphics > > decompression yet), no HDR10 and no video planes. > > > > Video planes support and HDR10 will be added in subsequent patches once > > per-plane de-gamma/CSC/gamma support is in. > > > > Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com> > > Reviewed-by: Lucas Stach <l.stach@pengutronix.de> > > --- > > .... > return drm_bridge_attach(encoder, bridge, NULL, 0); > .... > > The above code-snippet tells that the display-driver rely on the bridge > to create the connector. > Could this by any chance be updated to the new way where the display > driver creates the connector - and thus passing DRM_BRIDGE_ATTACH_NO_CONNECTOR > as the flags argument? > > What bridges would be relevant? > To check that the reelvant bridges are already ported. I think that's mostly NWL atm since MHDP isn't mainline yet. Can you recommend a bridge driver to look at that does this right? Cheers, -- Guido
On Sat, Jul 18, 2020 at 01:05:25PM +0200, Guido Günther wrote: > Hi, > On Fri, Jul 17, 2020 at 09:48:49PM +0200, Sam Ravnborg wrote: > > Hi Laurentiu. > > > > On Fri, Jul 17, 2020 at 05:41:27PM +0300, Laurentiu Palcu wrote: > > > From: Laurentiu Palcu <laurentiu.palcu@nxp.com> > > > > > > This adds initial support for iMX8MQ's Display Controller Subsystem (DCSS). > > > Some of its capabilities include: > > > * 4K@60fps; > > > * HDR10; > > > * one graphics and 2 video pipelines; > > > * on-the-fly decompression of compressed video and graphics; > > > > > > The reference manual can be found here: > > > https://www.nxp.com/webapp/Download?colCode=IMX8MDQLQRM > > > > > > The current patch adds only basic functionality: one primary plane for > > > graphics, linear, tiled and super-tiled buffers support (no graphics > > > decompression yet), no HDR10 and no video planes. > > > > > > Video planes support and HDR10 will be added in subsequent patches once > > > per-plane de-gamma/CSC/gamma support is in. > > > > > > Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com> > > > Reviewed-by: Lucas Stach <l.stach@pengutronix.de> > > > --- > > > > .... > > return drm_bridge_attach(encoder, bridge, NULL, 0); > > .... > > > > The above code-snippet tells that the display-driver rely on the bridge > > to create the connector. > > Could this by any chance be updated to the new way where the display > > driver creates the connector - and thus passing DRM_BRIDGE_ATTACH_NO_CONNECTOR > > as the flags argument? > > > > What bridges would be relevant? > > To check that the reelvant bridges are already ported. > > I think that's mostly NWL atm since MHDP isn't mainline yet. Can you > recommend a bridge driver to look at that does this right? Hi Guido. The following is from my notes: bridge/adv7511 done bridge/simple-bridge done bridge/synopsys/dw-hdmi done bridge/display-connector.c done bridge/lvds-codec done bridge/cdns-dsi done bridge/panel.c done bridge/parade-ps8640 done bridge/sil-sii8620 done bridge/synopsys/dw-mipi-dsi done bridge/tc358768 done bridge/thc63lvd1024 done bridge/ti-tfp410 done This is a list of bridge drivers which are converted and in drm-misc-next now. I have a patch set that converts some more but they needs a bit more polishing before they are done. Laurent has written about is in a very comprehensive way several times. The short variant is that we needed to support chained bridges where the individual bridges implemented the functions required by the connector - and creating the connector was pushed back to the display driver. So the bridges now announce their support of for example hot-plug detect and reading edid. Then the connector, created by the display driver, can use the operations exported by the bridge drivers. Sam
Hi Sam, On Fri, Jul 17, 2020 at 09:48:49PM +0200, Sam Ravnborg wrote: > Hi Laurentiu. > > On Fri, Jul 17, 2020 at 05:41:27PM +0300, Laurentiu Palcu wrote: > > From: Laurentiu Palcu <laurentiu.palcu@nxp.com> > > > > This adds initial support for iMX8MQ's Display Controller Subsystem (DCSS). > > Some of its capabilities include: > > * 4K@60fps; > > * HDR10; > > * one graphics and 2 video pipelines; > > * on-the-fly decompression of compressed video and graphics; > > > > The reference manual can be found here: > > https://www.nxp.com/webapp/Download?colCode=IMX8MDQLQRM > > > > The current patch adds only basic functionality: one primary plane for > > graphics, linear, tiled and super-tiled buffers support (no graphics > > decompression yet), no HDR10 and no video planes. > > > > Video planes support and HDR10 will be added in subsequent patches once > > per-plane de-gamma/CSC/gamma support is in. > > > > Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com> > > Reviewed-by: Lucas Stach <l.stach@pengutronix.de> > > --- > > .... > return drm_bridge_attach(encoder, bridge, NULL, 0); > .... > > The above code-snippet tells that the display-driver rely on the bridge > to create the connector. > Could this by any chance be updated to the new way where the display > driver creates the connector - and thus passing DRM_BRIDGE_ATTACH_NO_CONNECTOR > as the flags argument? OK, I can give this a shot and the changes will be part of a separate patch within this patchset, if that's ok with you. No need to go through and review the entire driver again for this... Thanks, laurentiu > > What bridges would be relevant? > To check that the reelvant bridges are already ported. > > Sam
From: Laurentiu Palcu <laurentiu.palcu@nxp.com> Hi, This patchset adds initial DCSS support for iMX8MQ chip. Initial support includes only graphics plane support (no video planes), no HDR10 capabilities, no graphics decompression (only linear, tiled and super-tiled buffers allowed). Support for the rest of the features will be added incrementally, in subsequent patches. The patchset was tested with both HDP driver (in the downstream tree) and the upstream MIPI-DSI driver (with a couple of patches on top, to make it work correctly with DCSS). Thanks, Laurentiu Changes in v6: * Addressed Rob's comment and added "additionalProperties: false" at the end of the bindings' properties. However, this change surfaced an issue with the assigned-clock* properties not being documented in the properties section. Added the descriptions and the bindings patch will need another review; * Added an entry for DCSS driver in the MAINTAINERS file; * Removed the component framework patch altogether; Changes in v5: * Rebased to latest; * Took out component framework support and made it a separate patch so that people can still test with HDP driver, which makes use of it. But the idea is to get rid of it once HDP driver's next versions will remove component framework as well; * Slight improvement to modesetting: avoid cutting off the pixel clock if the new mode and the old one are equal. Also, in this case, is not necessary to wait for DTG to shut off. This would allow to switch from 8b RGB to 12b YUV422, for example, with no interruptions (at least from DCSS point of view); * Do not fire off CTXLD when going to suspend, unless it still has entries that need to be committed to DCSS; * Addressed Rob's comments on bindings; Changes in v4: * Addressed Lucas and Philipp's comments: * Added DRM_KMS_CMA_HELPER dependency in Kconfig; * Removed usage of devm_ functions since I'm already doing all the clean-up in the submodules_deinit(); * Moved the drm_crtc_arm_vblank_event() in dcss_crtc_atomic_flush(); * Removed en_completion variable from dcss_crtc since this was introduced mainly to avoid vblank timeout warnings which were fixed by arming the vblank event in flush() instead of begin(); * Removed clks_on and irq_enabled flags since all the calls to enabling/disabling clocks and interrupts were balanced; * Removed the custom atomic_commit callback and used the DRM core helper and, in the process, got rid of a workqueue that wasn't necessary anymore; * Fixed some minor DT binding issues flagged by Philipp; * Some other minor changes suggested by Lucas; * Removed YUV formats from the supported formats as these cannot work without the HDR10 module CSCs and LUTs. Will add them back when I will add support for video planes; Changes in v3: * rebased to latest linux-next and made it compile as drmP.h was removed; * removed the patch adding the VIDEO2_PLL clock. It's already applied; * removed an unnecessary 50ms sleep in the dcss_dtg_sync_set(); * fixed a a spurious hang reported by Lukas Hartmann and encountered by me several times; * mask DPR and DTG interrupts by default, as they may come enabled from U-boot; Changes in v2: * Removed '0x' in node's unit-address both in DT and yaml; * Made the address region size lowercase, to be consistent; * Removed some left-over references to P010; * Added a Kconfig dependency of DRM && ARCH_MXC. This will also silence compilation issues reported by kbuild for other architectures; Laurentiu Palcu (4): drm/imx: compile imx directory by default drm/imx: Add initial support for DCSS on iMX8MQ MAINTAINERS: Add entry for i.MX 8MQ DCSS driver dt-bindings: display: imx: add bindings for DCSS .../bindings/display/imx/nxp,imx8mq-dcss.yaml | 104 +++ MAINTAINERS | 8 + drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/imx/Kconfig | 2 + drivers/gpu/drm/imx/Makefile | 1 + drivers/gpu/drm/imx/dcss/Kconfig | 9 + drivers/gpu/drm/imx/dcss/Makefile | 6 + drivers/gpu/drm/imx/dcss/dcss-blkctl.c | 70 ++ drivers/gpu/drm/imx/dcss/dcss-crtc.c | 219 +++++ drivers/gpu/drm/imx/dcss/dcss-ctxld.c | 424 +++++++++ drivers/gpu/drm/imx/dcss/dcss-dev.c | 314 +++++++ drivers/gpu/drm/imx/dcss/dcss-dev.h | 177 ++++ drivers/gpu/drm/imx/dcss/dcss-dpr.c | 562 ++++++++++++ drivers/gpu/drm/imx/dcss/dcss-drv.c | 138 +++ drivers/gpu/drm/imx/dcss/dcss-dtg.c | 409 +++++++++ drivers/gpu/drm/imx/dcss/dcss-kms.c | 177 ++++ drivers/gpu/drm/imx/dcss/dcss-kms.h | 43 + drivers/gpu/drm/imx/dcss/dcss-plane.c | 405 +++++++++ drivers/gpu/drm/imx/dcss/dcss-scaler.c | 826 ++++++++++++++++++ drivers/gpu/drm/imx/dcss/dcss-ss.c | 180 ++++ 20 files changed, 4075 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/display/imx/nxp,imx8mq-dcss.yaml create mode 100644 drivers/gpu/drm/imx/dcss/Kconfig create mode 100644 drivers/gpu/drm/imx/dcss/Makefile create mode 100644 drivers/gpu/drm/imx/dcss/dcss-blkctl.c create mode 100644 drivers/gpu/drm/imx/dcss/dcss-crtc.c create mode 100644 drivers/gpu/drm/imx/dcss/dcss-ctxld.c create mode 100644 drivers/gpu/drm/imx/dcss/dcss-dev.c create mode 100644 drivers/gpu/drm/imx/dcss/dcss-dev.h create mode 100644 drivers/gpu/drm/imx/dcss/dcss-dpr.c create mode 100644 drivers/gpu/drm/imx/dcss/dcss-drv.c create mode 100644 drivers/gpu/drm/imx/dcss/dcss-dtg.c create mode 100644 drivers/gpu/drm/imx/dcss/dcss-kms.c create mode 100644 drivers/gpu/drm/imx/dcss/dcss-kms.h create mode 100644 drivers/gpu/drm/imx/dcss/dcss-plane.c create mode 100644 drivers/gpu/drm/imx/dcss/dcss-scaler.c create mode 100644 drivers/gpu/drm/imx/dcss/dcss-ss.c