summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/imx
Commit message (Collapse)AuthorAgeFilesLines
* drm/connector: make mode_valid take a const struct drm_display_modeDmitry Baryshkov2025-01-071-1/+1
| | | | | | | | | | | | | | | | | The mode_valid() callbacks of drm_encoder, drm_crtc and drm_bridge take a const struct drm_display_mode argument. Change the mode_valid callback of drm_connector to also take a const argument. Acked-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> Reviewed-by: Raphael Gallais-Pou <rgallaispou@gmail.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Maxime Ripard <mripard@kernel.org> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241214-drm-connector-mode-valid-const-v2-5-4f9498a4c822@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
* Merge remote-tracking branch 'drm/drm-next' into drm-misc-nextMaarten Lankhorst2024-12-098-8/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The v6.13-rc2 release included a bunch of breaking changes, specifically the MODULE_IMPORT_NS commit. Backmerge in order to fix them before the next pull-request. Include the fix from Stephen Roswell. Caused by commit 25c3fd1183c0 ("drm/virtio: Add a helper to map and note the dma addrs and lengths") Interacting with commit cdd30ebb1b9f ("module: Convert symbol namespace to string literal") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Link: https://patchwork.freedesktop.org/patch/msgid/20241209121717.2abe8026@canb.auug.org.au Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
| * Get rid of 'remove_new' relic from platform driver structLinus Torvalds2024-12-018-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The continual trickle of small conversion patches is grating on me, and is really not helping. Just get rid of the 'remove_new' member function, which is just an alias for the plain 'remove', and had a comment to that effect: /* * .remove_new() is a relic from a prototype conversion of .remove(). * New drivers are supposed to implement .remove(). Once all drivers are * converted to not use .remove_new any more, it will be dropped. */ This was just a tree-wide 'sed' script that replaced '.remove_new' with '.remove', with some care taken to turn a subsequent tab into two tabs to make things line up. I did do some minimal manual whitespace adjustment for places that used spaces to line things up. Then I just removed the old (sic) .remove_new member function, and this is the end result. No more unnecessary conversion noise. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * drm/imx/dcss: include drm/drm_bridge.h headerArnd Bergmann2024-11-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compile-testing random configurations leads to failures in dcss-kms.c from a missing declaration: drivers/gpu/drm/imx/dcss/dcss-kms.c:95:8: error: use of undeclared identifier 'drm_bridge_attach' 95 | ret = drm_bridge_attach(encoder, bridge, NULL, | ^ drivers/gpu/drm/imx/dcss/dcss-kms.c:96:5: error: use of undeclared identifier 'DRM_BRIDGE_ATTACH_NO_CONNECTOR' 96 | DRM_BRIDGE_ATTACH_NO_CONNECTOR); | ^ Include the header directly. Fixes: 004555a18d57 ("drm/imx/dcss: Allow build with COMPILE_TEST=y") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241028163527.2425783-1-arnd@kernel.org
* | drm: remove driver date from struct drm_driver and all driversJani Nikula2024-12-053-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We stopped using the driver initialized date in commit 7fb8af6798e8 ("drm: deprecate driver date") and (eventually) started returning "0" for drm_version ioctl instead. Finish the job, and remove the unused date member from struct drm_driver, its initialization from drivers, along with the common DRIVER_DATE macros. v2: Also update drivers/accel (kernel test robot) Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Simon Ser <contact@emersion.fr> Acked-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Acked-by: Lucas De Marchi <lucas.demarchi@intel.com> Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # msm Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/1f2bf2543aed270a06f6c707fd6ed1b78bf16712.1733322525.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
* | drm/client: Move public client header to clients/ subdirectoryThomas Zimmermann2024-11-153-3/+3
| | | | | | | | | | | | | | | | | | Move the public header file drm_client_setup.h to the clients/ subdirectory and update all drivers. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241108154600.126162-3-tzimmermann@suse.de
* | drm/imx/dcss: include drm/drm_bridge.h headerArnd Bergmann2024-11-041-0/+1
|/ | | | | | | | | | | | | | | | | | | Compile-testing random configurations leads to failures in dcss-kms.c from a missing declaration: drivers/gpu/drm/imx/dcss/dcss-kms.c:95:8: error: use of undeclared identifier 'drm_bridge_attach' 95 | ret = drm_bridge_attach(encoder, bridge, NULL, | ^ drivers/gpu/drm/imx/dcss/dcss-kms.c:96:5: error: use of undeclared identifier 'DRM_BRIDGE_ATTACH_NO_CONNECTOR' 96 | DRM_BRIDGE_ATTACH_NO_CONNECTOR); | ^ Include the header directly. Fixes: 004555a18d57 ("drm/imx/dcss: Allow build with COMPILE_TEST=y") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://patchwork.freedesktop.org/patch/msgid/20241028163527.2425783-1-arnd@kernel.org Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
* drm/imx/dcss: Allow build with COMPILE_TEST=yVille Syrjälä2024-10-251-1/+1
| | | | | | | | | | | Allow imx/dcss to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least. Cc: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> Cc: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241003111851.10453-8-ville.syrjala@linux.intel.com Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
* drm/imx/dcss: Fix 64bit divisionsVille Syrjälä2024-10-251-2/+2
| | | | | | | | | | | Use the appropriate 64bit division helpers to make the code build on 32bit architectures. Cc: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> Cc: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241003111851.10453-7-ville.syrjala@linux.intel.com Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
* drm/imx: parallel-display: add legacy bridge Kconfig dependencyArnd Bergmann2024-10-221-0/+1
| | | | | | | | | | | | | | | The driver now uses the legacy bridge helper code but can be configured to get built without it: ERROR: modpost: "devm_imx_drm_legacy_bridge" [drivers/gpu/drm/imx/ipuv3/parallel-display.ko] undefined! Add the required dependency, same as in the ldb driver. Fixes: f94b9707a1c9 ("drm/imx: parallel-display: switch to imx_legacy_bridge / drm_bridge_connector") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Robert Foss <rfoss@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241015073004.4066457-1-arnd@kernel.org
* drm/imx/lcdc: Run DRM default client setupThomas Zimmermann2024-09-262-1/+4
| | | | | | | | | | | | | | | | | Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. v5: - select DRM_CLIENT_SELECTION Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Shawn Guo <shawnguo@kernel.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Pengutronix Kernel Team <kernel@pengutronix.de> Cc: Fabio Estevam <festevam@gmail.com> Acked-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-22-tzimmermann@suse.de
* drm/imx/ipuv3: Run DRM default client setupThomas Zimmermann2024-09-262-1/+4
| | | | | | | | | | | | | | | | | | | Call drm_client_setup_with_color_mode() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. v5: - select DRM_CLIENT_SELECTION Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Shawn Guo <shawnguo@kernel.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Pengutronix Kernel Team <kernel@pengutronix.de> Cc: Fabio Estevam <festevam@gmail.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-21-tzimmermann@suse.de
* drm/imx/dcss: Run DRM default client setupThomas Zimmermann2024-09-262-1/+4
| | | | | | | | | | | | | | | | | | | | | | Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. The dcss driver specifies a preferred color mode of 32. As this is the default if no format has been given, leave it out entirely. v5: - select DRM_CLIENT_SELECTION Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> Cc: Lucas Stach <l.stach@pengutronix.de> Cc: Shawn Guo <shawnguo@kernel.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Pengutronix Kernel Team <kernel@pengutronix.de> Cc: Fabio Estevam <festevam@gmail.com> Acked-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-20-tzimmermann@suse.de
* drm/imx: Add missing DRM_BRIDGE_CONNECTOR dependencyAlexander Stein2024-09-221-0/+2
| | | | | | | | | | | | When drm/bridge-connector was moved to DRM_DISPLAY_HELPER not all users were updated. Add missing Kconfig selections. Fixes: 9da7ec9b19d8 ("drm/bridge-connector: move to DRM_DISPLAY_HELPER module") Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Link: https://patchwork.freedesktop.org/patch/msgid/20240906063857.2223442-1-alexander.stein@ew.tq-group.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
* drm/imx/ipuv3: Use IRQF_NO_AUTOEN flag in request_irq()Jinjie Ruan2024-09-211-4/+2
| | | | | | | | | | | | | disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable when request IRQ. Fixes: 47b1be5c0f4e ("staging: imx/drm: request irq only after adding the crtc") Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Link: https://patchwork.freedesktop.org/patch/msgid/20240912083020.3720233-4-ruanjinjie@huawei.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
* drm/imx/dcss: Use IRQF_NO_AUTOEN flag in request_irq()Jinjie Ruan2024-09-211-3/+1
| | | | | | | | | | | | | disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable when request IRQ. Fixes: 9021c317b770 ("drm/imx: Add initial support for DCSS on iMX8MQ") Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240912083020.3720233-3-ruanjinjie@huawei.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
* drm/imx/dcss: Use IRQF_NO_AUTOEN flag in request_irq()Jinjie Ruan2024-09-211-4/+2
| | | | | | | | | | | | | disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable when request IRQ. Fixes: 9021c317b770 ("drm/imx: Add initial support for DCSS on iMX8MQ") Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240912083020.3720233-2-ruanjinjie@huawei.com [DB: fixed the subject] Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
* Merge drm/drm-next into drm-misc-nextThomas Zimmermann2024-09-112-0/+4
|\ | | | | | | | | | | Backmerging to get fixes from v6.12-rc7. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
| * Merge v6.11-rc7 into drm-nextSimona Vetter2024-09-112-0/+4
| |\ | | | | | | | | | | | | | | | | | | Thomas needs 5a498d4d06d6 ("drm/fbdev-dma: Only install deferred I/O if necessary") in drm-misc, so start the backmerge cascade. Signed-off-by: Simona Vetter <simona.vetter@ffwll.ch>
| | * drm/bridge-connector: move to DRM_DISPLAY_HELPER moduleDmitry Baryshkov2024-09-032-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drm_bridge_connector is a "leaf" driver, belonging to the display helper, rather than the "CRTC" drm_kms_helper module. Move the driver to the drm/display and add necessary Kconfig selection clauses. Suggested-by: Maxime Ripard <mripard@kernel.org> Acked-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20240903-drm-bridge-connector-fix-hdmi-reset-v5-2-daebde6d9857@linaro.org Signed-off-by: Maxime Ripard <mripard@kernel.org>
* | | drm/imx: move imx_drm_connector_destroy to imx-tveDmitry Baryshkov2024-09-033-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The imx-tve driver is the only remaining user of imx_drm_connector_destroy(). Move the function to imx-tve.c Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Rob Herring <robh@kernel.org> Tested-by: Chris Healy <cphealy@gmail.com> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> # on imx6q-nitrogen6x Link: https://patchwork.freedesktop.org/patch/msgid/20240602-drm-imx-cleanup-v3-12-e549e2a43100@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
* | | drm/imx: parallel-display: switch to imx_legacy_bridge / drm_bridge_connectorDmitry Baryshkov2024-09-031-80/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the imx_legacy bridge driver instead of handlign display modes via the connector node. All existing usecases already support attaching using the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag, while the imx_legacy bridge doesn't support creating connector at all. Switch to drm_bridge_connector at the same time. Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Tested-by: Chris Healy <cphealy@gmail.com> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> # on imx6q-nitrogen6x Link: https://patchwork.freedesktop.org/patch/msgid/20240602-drm-imx-cleanup-v3-11-e549e2a43100@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
* | | drm/imx: ldb: switch to imx_legacy_bridge / drm_bridge_connectorDmitry Baryshkov2024-09-032-74/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the imx_legacy bridge driver instead of handlign display modes via the connector node. All existing usecases already support attaching using the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag, while the imx_legacy bridge doesn't support creating connector at all. Switch to drm_bridge_connector at the same time. Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Tested-by: Chris Healy <cphealy@gmail.com> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> # on imx6q-nitrogen6x Link: https://patchwork.freedesktop.org/patch/msgid/20240602-drm-imx-cleanup-v3-10-e549e2a43100@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
* | | drm/imx: parallel-display: switch to drm_panel_bridgeDmitry Baryshkov2024-09-032-29/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Defer panel handling to drm_panel_bridge, unifying codepaths for the panel and bridge cases. Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Tested-by: Chris Healy <cphealy@gmail.com> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> # on imx6q-nitrogen6x Link: https://patchwork.freedesktop.org/patch/msgid/20240602-drm-imx-cleanup-v3-8-e549e2a43100@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
* | | drm/imx: ldb: switch to drm_panel_bridgeDmitry Baryshkov2024-09-032-32/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Defer panel handling to drm_panel_bridge, unifying codepaths for the panel and bridge cases. The MFD_SYSCON symbol is moved to select to prevent Kconfig symbol loops. Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Tested-by: Chris Healy <cphealy@gmail.com> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> # on imx6q-nitrogen6x Link: https://patchwork.freedesktop.org/patch/msgid/20240602-drm-imx-cleanup-v3-7-e549e2a43100@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
* | | drm/imx: ldb: drop custom DDC bus supportDmitry Baryshkov2024-09-031-63/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | None of the boards ever supported by the upstream kernel used the custom DDC bus support with the LDB connector. If a need arises to do so, one should use panel-simple and its DDC bus code. Drop ddc-i2c-bus support from the imx-ldb driver. Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Tested-by: Chris Healy <cphealy@gmail.com> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> # on imx6q-nitrogen6x Link: https://patchwork.freedesktop.org/patch/msgid/20240602-drm-imx-cleanup-v3-6-e549e2a43100@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
* | | drm/imx: ldb: drop custom EDID supportDmitry Baryshkov2024-09-031-18/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bindings for the imx-ldb never allowed specifying the EDID in DT. None of the existing DT files use it. Drop it now in favour of using debugfs overrides or the drm.edid_firmware support. Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Tested-by: Chris Healy <cphealy@gmail.com> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> # on imx6q-nitrogen6x Link: https://patchwork.freedesktop.org/patch/msgid/20240602-drm-imx-cleanup-v3-5-e549e2a43100@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
* | | drm/imx: parallel-display: drop edid override supportDmitry Baryshkov2024-09-031-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | None of the in-kernel DT files ever used edid override with the fsl-imx-drm driver. In case the EDID needs to be specified manually, DRM core allows one to either override it via the debugfs or to load it via request_firmware by using DRM_LOAD_EDID_FIRMWARE. In all other cases EDID and/or modes are to be provided as a part of the panel driver. Drop support for the edid property. Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Rob Herring <robh@kernel.org> Tested-by: Chris Healy <cphealy@gmail.com> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> # on imx6q-nitrogen6x Link: https://patchwork.freedesktop.org/patch/msgid/20240602-drm-imx-cleanup-v3-4-e549e2a43100@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
* | | drm/imx: cleanup the imx-drm headerDmitry Baryshkov2024-09-031-12/+0
|/ / | | | | | | | | | | | | | | | | | | | | Drop unused defines and obsolete prototypes from the imx-drm.h header. Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Rob Herring <robh@kernel.org> Tested-by: Chris Healy <cphealy@gmail.com> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> # on imx6q-nitrogen6x Link: https://patchwork.freedesktop.org/patch/msgid/20240602-drm-imx-cleanup-v3-3-e549e2a43100@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
* / drm/ipuv3/parallel: convert to struct drm_edidJani Nikula2024-08-291-5/+9
|/ | | | | | | | | Prefer the struct drm_edid based functions for storing the EDID and updating the connector. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/a1698044d556072e79041d69b8702099fd17bd90.1724348429.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
* drm/imx/ldb: convert to struct drm_edidJani Nikula2024-05-271-12/+12
| | | | | | | | | Prefer the struct drm_edid based functions for reading the EDID and updating the connector. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/c1f1143b5aea14aea968cda6508b275b2f7246ea.1715691257.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
* drm/imx/tve: convert to struct drm_edidJani Nikula2024-05-271-8/+6
| | | | | | | | | Prefer the struct drm_edid based functions for reading the EDID and updating the connector. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/2f59a7ad10c29c21f08223ef19221cef48623cc8.1715691257.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
* Merge drm/drm-next into drm-misc-nextMaxime Ripard2024-05-271-3/+2
|\ | | | | | | | | | | Let's start the new release cycle. Signed-off-by: Maxime Ripard <mripard@kernel.org>
| * Revert "drm: Make drivers depends on DRM_DW_HDMI"Geert Uytterhoeven2024-05-021-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c0e0f139354c01e0213204e4a96e7076e5a3e396, as helper code should always be selected by the driver that needs it, for the convenience of the final user configuring a kernel. The user who configures a kernel should not need to know which helpers are needed for the driver he is interested in. Making a driver depend on helper code means that the user needs to know which helpers to enable first, which is very user-unfriendly. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://patchwork.freedesktop.org/patch/msgid/bd93d43b07f8ed6368119f4a5ddac2ee80debe53.1713780345.git.geert+renesas@glider.be Signed-off-by: Maxime Ripard <mripard@kernel.org>
* | drm/imx/lcdc: Use fbdev-dmaThomas Zimmermann2024-05-021-2/+2
|/ | | | | | | | | | | | | | | Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by lcdc. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Shawn Guo <shawnguo@kernel.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Pengutronix Kernel Team <kernel@pengutronix.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: NXP Linux Team <linux-imx@nxp.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-25-tzimmermann@suse.de
* drm/imx: Add drm_panic supportJocelyn Falempe2024-04-151-1/+11
| | | | | | | | | | | | | | | | | | | | | | | Add support for the drm_panic module, which displays a user-friendly message to the screen when a kernel panic occurs. v7: * use drm_panic_gem_get_scanout_buffer() helper v8: * Replace get_scanout_buffer() logic with drm_panic_set_buffer() v9: * Revert to using get_scanout_buffer() (Sima) * move get_scanout_buffer() to plane helper functions v12: * Rename drm_panic_gem_get_scanout_buffer to drm_fb_dma_get_scanout_buffer (Thomas Zimmermann) Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240409163432.352518-9-jfalempe@redhat.com Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* Merge drm/drm-next into drm-misc-nextThomas Zimmermann2024-04-021-2/+2
|\ | | | | | | | | | | Backmerging to get v6.9-rc2 changes into drm-misc-next. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
| * drm/imx/ipuv3: do not return negative values from .get_modes()Jani Nikula2024-03-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The .get_modes() hooks aren't supposed to return negative error codes. Return 0 for no modes, whatever the reason. Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: stable@vger.kernel.org Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/311f6eec96d47949b16a670529f4d89fcd97aefa.1709913674.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
* | drm: Make drivers depends on DRM_DW_HDMIMaxime Ripard2024-03-281-2/+3
|/ | | | | | | | | | | | | | | | | | | | | DRM_DW_HDMI has a number of dependencies that might not be enabled. However, drivers were used to selecting it while not enforcing the DRM_DW_HDMI dependencies. This could result in Kconfig warnings (and further build breakages) such as: Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for DRM_DW_HDMI Depends on [n]: HAS_IOMEM [=y] && DRM [=m] && DRM_BRIDGE [=y] && DRM_DISPLAY_HELPER [=n] Selected by [m]: - DRM_SUN8I_DW_HDMI [=m] && HAS_IOMEM [=y] && DRM_SUN4I [=m] Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202403262127.kZkttfNz-lkp@intel.com/ Acked-by: Jani Nikula <jani.nikula@intel.com> Link: https://lore.kernel.org/r/20240327-kms-kconfig-helpers-v3-7-eafee11b84b3@kernel.org Signed-off-by: Maxime Ripard <mripard@kernel.org>
* drm/imx/dcss: fix resource size calculationDan Carpenter2024-02-281-3/+1
| | | | | | | | | | | | The resource is inclusive of the ->start and ->end addresses so this calculation is not correct. It should be "res->end - res->start + 1". Use the resource_size() to do the calculation. Fixes: 90393c9b5408 ("drm/imx/dcss: request memory region") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> Link: https://patchwork.freedesktop.org/patch/msgid/4914592b-4256-4c9c-bc1d-6dec1e473831@moroto.mountain
* drm/imx/dcss: have all init functions use devresPhilipp Stanner2024-02-029-108/+24
| | | | | | | | | | | | | | dcss currently allocates and ioremaps quite a few resources in its probe function's call graph. Devres now provides convenient functions which perform the same task but do the cleanup automatically. Port all memory allocations and ioremap() calls to the devres counterparts. Signed-off-by: Philipp Stanner <pstanner@redhat.com> Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240124111904.18261-4-pstanner@redhat.com
* drm/imx/dcss: request memory regionPhilipp Stanner2024-02-021-0/+7
| | | | | | | | | | | | | | The driver's memory regions are currently just ioremap()ed, but not reserved through a request. That's not a bug, but having the request is a little more robust. Implement the region-request through the corresponding managed devres-function. Signed-off-by: Philipp Stanner <pstanner@redhat.com> Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240124111904.18261-3-pstanner@redhat.com
* drm/imx: prefer snprintf over sprintfJani Nikula2024-01-311-1/+1
| | | | | | | | | | | This will trade the W=1 warning -Wformat-overflow to -Wformat-truncation. This lets us enable -Wformat-overflow subsystem wide. Cc: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/14c0108a54007a8360d84162a1d63cba9613b945.1704908087.git.jani.nikula@intel.com
* drm/imx/lcdc: Fix double-free of driver dataUwe Kleine-König2023-12-011-9/+0
| | | | | | | | | | | | | | | The struct imx_lcdc driver data is allocated using devm_drm_dev_alloc() so it must not be explicitly kfree()d. Also drm_kms_helper_poll_fini() should not be called as there is no matching drm_kms_helper_poll_init(). So drop the release function completely. Fixes: c87e859cdeb5 ("drm/imx/lcdc: Implement DRM driver for imx25") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230706092731.2630232-1-u.kleine-koenig@pengutronix.de
* drm: Use device_get_match_data()Rob Herring2023-11-271-5/+4
| | | | | | | | | | | | | Use preferred device_get_match_data() instead of of_match_device() to get the driver match data in a single step. With this, adjust the includes to explicitly include the correct headers. That also serves as preparation to remove implicit includes within the DT headers (of_device.h in particular). Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au> Link: https://lore.kernel.org/r/20231020125214.2930329-1-robh@kernel.org Signed-off-by: Rob Herring <robh@kernel.org>
* drm/imx: lcdc: Convert to platform remove callback returning voidUwe Kleine-König2023-11-211-4/+2
| | | | | | | | | | | | | | | | | | | The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20231102165640.3307820-28-u.kleine-koenig@pengutronix.de
* drm/imx/dcss: Convert to platform remove callback returning voidUwe Kleine-König2023-11-211-4/+2
| | | | | | | | | | | | | | | | | | | The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jyri Sarha <jyri.sarha@iki.fi> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20231102165640.3307820-27-u.kleine-koenig@pengutronix.de
* Merge tag 'drm-misc-next-2023-09-27' of ↵Dave Airlie2023-09-294-0/+24
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v6.7-rc1: UAPI Changes: - drm_file owner is now updated during use, in the case of a drm fd opened by the display server for a client, the correct owner is displayed. - Qaic gains support for the QAIC_DETACH_SLICE_BO ioctl to allow bo recycling. Cross-subsystem Changes: - Disable boot logo for au1200fb, mmpfb and unexport logo helpers. Only fbcon should manage display of logo. - Update freescale in MAINTAINERS. - Add some bridge files to bridge in MAINTAINERS. - Update gma500 driver repo in MAINTAINERS to point to drm-misc. Core Changes: - Move size computations to drm buddy allocator. - Make drm_atomic_helper_shutdown(NULL) a nop. - Assorted small fixes in drm_debugfs, DP-MST payload addition error handling. - Fix DRM_BRIDGE_ATTACH_NO_CONNECTOR handling. - Handle bad (h/v)sync_end in EDID by clipping to htotal. - Build GPUVM as a module. Driver Changes: - Simple drivers don't need to cache prepared result. - Call drm_atomic_helper_shutdown() in shutdown/unbind for a whole lot more drm drivers. - Assorted small fixes in amdgpu, ssd130x, bridge/it6621, accel/qaic, nouveau, tc358768. - Add NV12 for komeda writeback. - Add arbitration lost event to synopsis/dw-hdmi-cec. - Speed up s/r in nouveau by not restoring some big bo's. - Assorted nouveau display rework in preparation for GSP-RM, especially related to how the modeset sequence works and the DP sequence in relation to link training. - Update anx7816 panel. - Support NVSYNC and NHSYNC in tegra. - Allow multiple power domains in simple driver. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/f1fae5eb-25b8-192a-9a53-215e1184ce81@linux.intel.com
| * drm/imx/dcss: Call drm_atomic_helper_shutdown() at shutdown timeDouglas Anderson2023-09-253-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on grepping through the source code this driver appears to be missing a call to drm_atomic_helper_shutdown() at system shutdown time. Among other things, this means that if a panel is in use that it won't be cleanly powered off at system shutdown time. The fact that we should call drm_atomic_helper_shutdown() in the case of OS shutdown/restart comes straight out of the kernel doc "driver instance overview" in drm_drv.c. Suggested-by: Maxime Ripard <mripard@kernel.org> Reviewed-by: Maxime Ripard <mripard@kernel.org> Tested-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230921122641.RFT.v2.1.I134336fce7eac5a63bdac46d57b0888858fc8081@changeid
| * drm/imx/ipuv3: Call drm_atomic_helper_shutdown() at shutdown/unbind timeDouglas Anderson2023-09-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on grepping through the source code this driver appears to be missing a call to drm_atomic_helper_shutdown() at system shutdown time and at driver unbind time. Among other things, this means that if a panel is in use that it won't be cleanly powered off at system shutdown time. The fact that we should call drm_atomic_helper_shutdown() in the case of OS shutdown/restart and at driver remove (or unbind) time comes straight out of the kernel doc "driver instance overview" in drm_drv.c. A few notes about this fix: - When adding drm_atomic_helper_shutdown() to the unbind path, I added it after drm_kms_helper_poll_fini() since that's when other drivers seemed to have it. - Technically with a previous patch, ("drm/atomic-helper: drm_atomic_helper_shutdown(NULL) should be a noop"), we don't actually need to check to see if our "drm" pointer is NULL before calling drm_atomic_helper_shutdown(). We'll leave the "if" test in, though, so that this patch can land without any dependencies. It could potentially be removed later. - This patch also makes sure to set the drvdata to NULL in the case of bind errors to make sure that shutdown can't access freed data. Suggested-by: Maxime Ripard <mripard@kernel.org> Reviewed-by: Maxime Ripard <mripard@kernel.org> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230901164111.RFT.13.I0a9940ff6f387d6acf4e71d8c7dbaff8c42e3aaa@changeid