linux-block.git
12 months agodrm/nouveau: sched: avoid job races between entities
Danilo Krummrich [Fri, 11 Aug 2023 01:06:25 +0000 (03:06 +0200)]
drm/nouveau: sched: avoid job races between entities

If a sched job depends on a dma-fence from a job from the same GPU
scheduler instance, but a different scheduler entity, the GPU scheduler
does only wait for the particular job to be scheduled, rather than for
the job to fully complete. This is due to the GPU scheduler assuming
that there is a scheduler instance per ring. However, the current
implementation, in order to avoid arbitrary amounts of kthreads, has a
single scheduler instance while scheduler entities represent rings.

As a workaround, set the DRM_SCHED_FENCE_DONT_PIPELINE for all
out-fences in order to force the scheduler to wait for full job
completion for dependent jobs from different entities and same scheduler
instance.

There is some work in progress [1] to address the issues of firmware
schedulers; once it is in-tree the scheduler topology in Nouveau should
be re-worked accordingly.

[1] https://lore.kernel.org/dri-devel/20230801205103.627779-1-matthew.brost@intel.com/

Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collaboralcom>
Link: https://patchwork.freedesktop.org/patch/msgid/20230811010632.2473-1-dakr@redhat.com
12 months agodoc: uapi: Add document describing dma-buf semantics
Daniel Stone [Thu, 3 Aug 2023 15:47:29 +0000 (16:47 +0100)]
doc: uapi: Add document describing dma-buf semantics

Since there's a lot of confusion around this, document both the rules
and the best practices around negotiating, allocating, importing, and
using buffers when crossing context/process/device/subsystem boundaries.

This ties up all of dma-buf, formats and modifiers, and their usage.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Sui Jingfeng <suijingfeng@loongson.cn>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803154908.105124-4-daniels@collabora.com
12 months agodoc: dma-buf: Rewrite intro section a little
Daniel Stone [Thu, 3 Aug 2023 15:47:28 +0000 (16:47 +0100)]
doc: dma-buf: Rewrite intro section a little

Make it a little bit more clear what's going on and fix some formatting.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Simon Ser <contact@emersion.fr>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803154908.105124-3-daniels@collabora.com
12 months agodrm/panfrost: Do not check for 0 return after calling platform_get_irq_byname()
Ruan Jinjie [Thu, 3 Aug 2023 04:03:59 +0000 (12:03 +0800)]
drm/panfrost: Do not check for 0 return after calling platform_get_irq_byname()

It is not possible for platform_get_irq_byname() to return 0.
Use the return value from platform_get_irq_byname().

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803040401.3067484-2-ruanjinjie@huawei.com
13 months agodrm/bridge: Fix kernel-doc typo in desc of output_bus_cfg in drm_bridge_state
Douglas Anderson [Thu, 17 Aug 2023 16:48:09 +0000 (09:48 -0700)]
drm/bridge: Fix kernel-doc typo in desc of output_bus_cfg in drm_bridge_state

There's an obvious copy-paste error in the description of
output_bus_cfg. Fix it.

Fixes: f32df58acc68 ("drm/bridge: Add the necessary bits to support bus format negotiation")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230817094808.1.I41b04c3a8305c9f1c17af886c327941c5136ca3b@changeid
13 months agodrm/panel: Add driver for JDI LPM102A188A
Diogo Ivo [Mon, 7 Aug 2023 13:33:02 +0000 (14:33 +0100)]
drm/panel: Add driver for JDI LPM102A188A

The JDI LPM102A188A is a 2560x1800 IPS panel found in the Google Pixel C.
This driver is based on the downstream GPLv2 driver released by Google
written by Sean Paul [1], which was then adapted to the newer kernel APIs.

[1]: https://android.googlesource.com/kernel/tegra/+/refs/heads/android-tegra-dragon-3.18-oreo/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c

Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230807133307.27456-3-diogo.ivo@tecnico.ulisboa.pt
13 months agodt-bindings: display: Add bindings for JDI LPM102A188A
Diogo Ivo [Mon, 7 Aug 2023 13:33:01 +0000 (14:33 +0100)]
dt-bindings: display: Add bindings for JDI LPM102A188A

The LPM102A188A is a 10.2" 2560x1800 IPS panel found in
the Google Pixel C.

Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230807133307.27456-2-diogo.ivo@tecnico.ulisboa.pt
13 months agodrm/panel: JDI LT070ME05000 simplify with dev_err_probe()
David Heidelberg [Sat, 12 Aug 2023 18:52:39 +0000 (20:52 +0200)]
drm/panel: JDI LT070ME05000 simplify with dev_err_probe()

Use the dev_err_probe() helper to simplify error handling during probe.
This also handle scenario, when EDEFER is returned and useless error is printed.

Fixes error:
panel-jdi-lt070me05000 4700000.dsi.0: cannot get enable-gpio -517

Signed-off-by: David Heidelberg <david@ixit.cz>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230812185239.378582-1-david@ixit.cz
13 months agodrm/panel: JDI LT070ME05000 drop broken link
David Heidelberg [Sat, 12 Aug 2023 18:34:03 +0000 (20:34 +0200)]
drm/panel: JDI LT070ME05000 drop broken link

Link is no longer functional and web.archive.org doesn't provide PDF
with detail information.

Some informations can be found from web.archive.org here:
https://web.archive.org/web/20170629205602/http://panelone.net/en/7-0-inch/JDI_LT070ME05000_7.0_inch-datasheet

Signed-off-by: David Heidelberg <david@ixit.cz>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230812183404.374718-1-david@ixit.cz
13 months agodrm/panel: simple: Add support for Mitsubishi AA084XE01
Thomas Weber [Mon, 7 Aug 2023 12:31:38 +0000 (14:31 +0200)]
drm/panel: simple: Add support for Mitsubishi AA084XE01

Add support for the Mitsubishi AA084XE01 panel which is an 8.4 inch XGA
TFT-LCD module for industrial use.

Link: https://www.mouser.fr/datasheet/2/274/aa084xe01_e-364171.pdf
Signed-off-by: Thomas Weber <thomas.weber@corscience.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230807123138.67443-2-miquel.raynal@bootlin.com
13 months agodt-bindings: display: simple: Add Mitsubishi AA084XE01 panel
Miquel Raynal [Mon, 7 Aug 2023 12:31:37 +0000 (14:31 +0200)]
dt-bindings: display: simple: Add Mitsubishi AA084XE01 panel

Add Mitsubishi AA084XE01 8.4" XGA TFT LCD panel compatible string.

Link: https://www.mouser.fr/datasheet/2/274/aa084xe01_e-364171.pdf
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230807123138.67443-1-miquel.raynal@bootlin.com
13 months agodrm/bridge: panel: Add a device link between drm device and panel device
Liu Ying [Mon, 7 Aug 2023 06:11:15 +0000 (14:11 +0800)]
drm/bridge: panel: Add a device link between drm device and panel device

Add the device link when panel bridge is attached and delete the link
when panel bridge is detached.  The drm device is the consumer while
the panel device is the supplier.  This makes sure that the drm device
suspends eariler and resumes later than the panel device, hence resolves
problems where the order is reversed, like the problematic case mentioned
in the below link.

Link: https://lore.kernel.org/lkml/CAPDyKFr0XjrU_udKoUKQ_q8RWaUkyqL+8fV-7s1CTMqi7u3-Rg@mail.gmail.com/T/
Suggested-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230807061115.3244501-1-victor.liu@nxp.com
13 months agodrm/rockchip: vop2: Add missing call to crtc reset helper
Jonas Karlman [Wed, 21 Jun 2023 22:33:23 +0000 (22:33 +0000)]
drm/rockchip: vop2: Add missing call to crtc reset helper

Add missing call to crtc reset helper to properly vblank reset.

Also move vop2_crtc_reset and call vop2_crtc_destroy_state to simplify
and remove duplicated code.

Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230621223311.2239547-6-jonas@kwiboo.se
13 months agodrm/rockchip: vop2: Don't crash for invalid duplicate_state
Jonas Karlman [Wed, 21 Jun 2023 22:33:21 +0000 (22:33 +0000)]
drm/rockchip: vop2: Don't crash for invalid duplicate_state

It's possible for users to try to duplicate the CRTC state even when the
state doesn't exist. drm_atomic_helper_crtc_duplicate_state() (and other
users of __drm_atomic_helper_crtc_duplicate_state()) already guard this
with a WARN_ON() instead of crashing, so let's do that here too.

Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230621223311.2239547-5-jonas@kwiboo.se
13 months agodrm/rockchip: vop: Fix call to crtc reset helper
Jonas Karlman [Wed, 21 Jun 2023 22:33:20 +0000 (22:33 +0000)]
drm/rockchip: vop: Fix call to crtc reset helper

Allocation of crtc_state may fail in vop_crtc_reset, causing an invalid
pointer to be passed to __drm_atomic_helper_crtc_reset.

Fix this by adding a NULL check of crtc_state, similar to other drivers.

Fixes: 01e2eaf40c9d ("drm/rockchip: Convert to using __drm_atomic_helper_crtc_reset() for reset.")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230621223311.2239547-4-jonas@kwiboo.se
13 months agodrm/rockchip: vop: Use cleanup helper directly as destroy funcs
Jonas Karlman [Wed, 21 Jun 2023 22:33:18 +0000 (22:33 +0000)]
drm/rockchip: vop: Use cleanup helper directly as destroy funcs

vop_plane_destroy and vop_crtc_destroy are plain wrappers around
drm_plane_cleanup and drm_crtc_cleanup. Use them directly as plane and
crtc funcs to closer match VOP2 driver.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230621223311.2239547-3-jonas@kwiboo.se
13 months agodrm/rockchip: vop: Fix reset of state in duplicate state crtc funcs
Jonas Karlman [Wed, 21 Jun 2023 22:33:17 +0000 (22:33 +0000)]
drm/rockchip: vop: Fix reset of state in duplicate state crtc funcs

struct rockchip_crtc_state members such as output_type, output_bpc and
enable_afbc is always reset to zero in the atomic_duplicate_state crtc
funcs.

Fix this by using kmemdup on the subclass rockchip_crtc_state struct.

Fixes: 4e257d9eee23 ("drm/rockchip: get rid of rockchip_drm_crtc_mode_config")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230621223311.2239547-2-jonas@kwiboo.se
13 months agodrm/loongson: Fix error handling in lsdc_pixel_pll_setup()
Harshit Mogalapalli [Thu, 20 Jul 2023 12:39:50 +0000 (05:39 -0700)]
drm/loongson: Fix error handling in lsdc_pixel_pll_setup()

There are two problems in lsdc_pixel_pll_setup()
1. If kzalloc() fails then call iounmap() to release the resources.
2. Both kzalloc and ioremap does not return error pointers on failure, so
   using IS_ERR_OR_NULL() checks is a bit confusing and not very right,
   fix this by changing those to NULL checks instead.

Fixes: f39db26c5428 ("drm: Add kms driver for loongson display controller")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Sui Jingfeng <suijingfeng@loongson.cn>
Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev>
Link: https://patchwork.freedesktop.org/patch/msgid/20230720123950.543082-1-harshit.m.mogalapalli@oracle.com
13 months agodrm/bridge: lvds-codec: Implement atomic_get_input_bus_fmts for LVDS encoder
Alexander Stein [Thu, 10 Aug 2023 06:32:29 +0000 (08:32 +0200)]
drm/bridge: lvds-codec: Implement atomic_get_input_bus_fmts for LVDS encoder

atomic_get_input_bus_fmts is only implemented for LVDS decoders, resulting
that LVDS encoders only support bus format MEDIA_BUS_FMT_FIXED. This
results in warnings like:
mxsfb 21c8000.lcdif: Bridge does not provide bus format, assuming
 MEDIA_BUS_FMT_RGB888_1X24.
Please fix bridge driver by handling atomic_get_input_bus_fmts.

Fix this by reusing lvds_codec_atomic_get_input_bus_fmts currently used
for LVDS decoders. Use RGB888_1X24 for LVDS encoders. This also allows
removing the dedicated struct drm_bridge_funcs for decoders.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Robert Foss <rfoss@kernel.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230810063229.597533-1-alexander.stein@ew.tq-group.com
13 months agodrm: bridge: samsung-dsim: Fix waiting for empty cmd transfer FIFO on older Exynos
Marek Szyprowski [Wed, 9 Aug 2023 14:56:41 +0000 (16:56 +0200)]
drm: bridge: samsung-dsim: Fix waiting for empty cmd transfer FIFO on older Exynos

Samsung DSIM used in older Exynos SoCs (like Exynos 4210, 4x12, 3250)
doesn't report empty level of packer header FIFO. In case of those SoCs,
use the old way of waiting for empty command tranfsfer FIFO, removed
recently by commit 14806c641582 ("drm: bridge: samsung-dsim: Drain command transfer FIFO before transfer").

Fixes: 14806c641582 ("drm: bridge: samsung-dsim: Drain command transfer FIFO before transfer")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230809145641.3213210-1-m.szyprowski@samsung.com
13 months agodrm: bridge: for GENERIC_PHY_MIPI_DPHY also select GENERIC_PHY
Randy Dunlap [Fri, 4 Aug 2023 03:01:37 +0000 (20:01 -0700)]
drm: bridge: for GENERIC_PHY_MIPI_DPHY also select GENERIC_PHY

Three DRM bridge drivers select GENERIC_PHY_MIPI_DPHY when GENERIC_PHY
might not be set.  This causes Kconfig warnings and a build error.

WARNING: unmet direct dependencies detected for GENERIC_PHY_MIPI_DPHY
  Depends on [n]: GENERIC_PHY [=n]
  Selected by [y]:
  - DRM_NWL_MIPI_DSI [=y] && DRM_BRIDGE [=y] && DRM [=y] && COMMON_CLK [=y] && OF [=y] && HAS_IOMEM [=y]
  - DRM_SAMSUNG_DSIM [=y] && DRM [=y] && DRM_BRIDGE [=y] && COMMON_CLK [=y] && OF [=y] && HAS_IOMEM [=y]

(drm/bridge/cadence/Kconfig was found by inspection.)

aarch64-linux-ld: drivers/gpu/drm/bridge/samsung-dsim.o: in function `samsung_dsim_set_phy_ctrl':
drivers/gpu/drm/bridge/samsung-dsim.c:731: undefined reference to `phy_mipi_dphy_get_default_config_for_hsclk'

Prevent these warnings and build error by also selecting GENERIC_PHY
whenever selecting GENERIC_PHY_MIPI_DPHY.

Fixes: fced5a364dee ("drm/bridge: cdns: Convert to phy framework")
Fixes: 44cfc6233447 ("drm/bridge: Add NWL MIPI DSI host controller support")
Fixes: 171b3b1e0f8b ("drm: bridge: samsung-dsim: Select GENERIC_PHY_MIPI_DPHY")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Aleksandr Nogikh <nogikh@google.com>
Link: lore.kernel.org/r/20230803144227.2187749-1-nogikh@google.com
Cc: Adam Ford <aford173@gmail.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Guido Günther <agx@sigxcpu.org>
Cc: Robert Chiras <robert.chiras@nxp.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Neil Armstrong <neil.armstrong@linaro.org>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Robert Foss <rfoss@kernel.org>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Adam Ford <aford173@gmail.com>
Tested-by: Aleksandr Nogikh <nogikh@google.com>
Reviewed-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230804030140.21395-1-rdunlap@infradead.org
13 months agodrm: bridge: samsung-dsim: Initialize ULPS EXIT for i.MX8M DSIM
Marek Vasut [Sun, 9 Jul 2023 13:48:27 +0000 (15:48 +0200)]
drm: bridge: samsung-dsim: Initialize ULPS EXIT for i.MX8M DSIM

The ULPS EXIT is initialized to 0xaf in downstream BSP as well as older
revisions of this patchset, in newer revisions of the DSIM patchset it
was left out and set to 0. Fix it.

Fixes: 4d562c70c4dc ("drm: bridge: samsung-dsim: Add i.MX8M Mini/Nano support")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Robert Foss <rfoss@kernel.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230709134827.449185-1-marex@denx.de
13 months agodrm/ttm/tests: Require MMU when testing
Karolina Stolarek [Fri, 11 Aug 2023 11:36:49 +0000 (13:36 +0200)]
drm/ttm/tests: Require MMU when testing

Satisfy MMU dependency when testing TTM with KUnit. This fixes
compilation errors on platforms that don't select this option
by default.

Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202308110133.f0lhFwMV-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202308111032.enU8IisR-lkp@intel.com/
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230811113649.697886-1-karolina.stolarek@intel.com
Signed-off-by: Christian König <christian.koenig@amd.com>
13 months agoaccel/ivpu: Document DRM_IVPU_PARAM_CAPABILITIES
Stanislaw Gruszka [Thu, 10 Aug 2023 08:07:07 +0000 (10:07 +0200)]
accel/ivpu: Document DRM_IVPU_PARAM_CAPABILITIES

Add comments regarding new DRM_IVPU_PARAM_CAPABILITIES param.

Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230810080707.3545883-1-stanislaw.gruszka@linux.intel.com
13 months agonouveau/u_memcpya: use vmemdup_user
Dave Airlie [Thu, 10 Aug 2023 18:50:20 +0000 (04:50 +1000)]
nouveau/u_memcpya: use vmemdup_user

I think there are limit checks in place for most things but the
new uAPI wants to not have them.

Add a limit check and use the vmemdup_user helper instead.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Danilo Krummrich <dakr@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230810185020.231135-1-airlied@gmail.com
13 months agodrm/rockchip: dsi: Add rv1126 MIPI DSI support
Jagan Teki [Mon, 31 Jul 2023 11:00:06 +0000 (16:30 +0530)]
drm/rockchip: dsi: Add rv1126 MIPI DSI support

RV1126 MIPI DSI supports V1.2 DPHY with 4 lanes and 1Gbps transfer
rate for lane.

Add support for it.

Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731110012.2913742-9-jagan@edgeble.ai
13 months agodt-bindings: display: rockchip-dw-mipi-dsi: Document rv1126 DSI
Jagan Teki [Mon, 31 Jul 2023 11:00:05 +0000 (16:30 +0530)]
dt-bindings: display: rockchip-dw-mipi-dsi: Document rv1126 DSI

Document the MIPI DSI for Rockchip RV1126, which is
different from other SoCs variants.

Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731110012.2913742-8-jagan@edgeble.ai
13 months agodrm/rockchip: vop: Add rv1126 vop_lite support
Jagan Teki [Mon, 31 Jul 2023 11:00:04 +0000 (16:30 +0530)]
drm/rockchip: vop: Add rv1126 vop_lite support

RV1126 VOP_LITE supports the video output processing ofMIPI DSI,
RGB display interfaces with max output resolution of 1920x1080.

Add support for rv1126 vop.

Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731110012.2913742-7-jagan@edgeble.ai
13 months agodt-bindings: display: rockchip-vop: Document rv1126 vop
Jagan Teki [Mon, 31 Jul 2023 11:00:03 +0000 (16:30 +0530)]
dt-bindings: display: rockchip-vop: Document rv1126 vop

The VOP on Rockchip's RV1126 SoC is different from other SoC's
VOP implementations, so add a separate compatible for it.

Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731110012.2913742-6-jagan@edgeble.ai
13 months agodrm/ttm: Remove two unused function declarations
Yue Haibing [Wed, 9 Aug 2023 13:58:39 +0000 (21:58 +0800)]
drm/ttm: Remove two unused function declarations

Commit cd3a8a596214 ("drm/ttm: remove ttm_bo_(un)lock_delayed_workqueue")
removed the implementations but not the declarations.

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230809135839.13216-1-yuehaibing@huawei.com
Signed-off-by: Christian König <christian.koenig@amd.com>
13 months agodrm/test: drm_exec: fix memory leak on object prepare
Danilo Krummrich [Wed, 9 Aug 2023 22:50:14 +0000 (00:50 +0200)]
drm/test: drm_exec: fix memory leak on object prepare

drm_exec_prepare_obj() and drm_exec_prepare_array() both reserve
dma-fence slots and hence a dma_resv_list without ever freeing it.

Make sure to call drm_gem_private_object_fini() for each GEM object
passed to drm_exec_prepare_obj()/drm_exec_prepare_array() throughout the
test to fix this up.

While at it, remove some trailing empty lines.

Fixes: 9710631cc8f3 ("drm: add drm_exec selftests v4")
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230809225034.8803-1-dakr@redhat.com
Signed-off-by: Christian König <christian.koenig@amd.com>
13 months agodrm: atmel-hlcdc: Support inverting the pixel clock polarity
Miquel Raynal [Fri, 9 Jun 2023 14:48:43 +0000 (16:48 +0200)]
drm: atmel-hlcdc: Support inverting the pixel clock polarity

On the SoC host controller, the pixel clock can be:
* standard: data is launched on the rising edge
* inverted: data is launched on the falling edge

Some panels may need the inverted option to be used so let's support
this DRM flag.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230609144843.851327-1-miquel.raynal@bootlin.com
13 months agodrm/panfrost: Sync IRQ by job's timeout handler
Dmitry Osipenko [Mon, 7 Aug 2023 00:04:44 +0000 (03:04 +0300)]
drm/panfrost: Sync IRQ by job's timeout handler

Panfrost IRQ handler may stuck for a long time, for example this happens
when there is a bad HDMI connection and HDMI handler takes a long time to
finish processing, holding Panfrost. Make Panfrost's job timeout handler
to sync IRQ before checking fence signal status in order to prevent
spurious job timeouts due to a slow IRQ processing.

Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> # MediaTek MT8192 and MT8195 Chromebooks
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230807000444.14926-1-dmitry.osipenko@collabora.com
13 months agodrm/exec: add test case for using a drm_exec multiple times
Christian König [Mon, 31 Jul 2023 12:36:25 +0000 (14:36 +0200)]
drm/exec: add test case for using a drm_exec multiple times

Not really a common use case, but let's make sure that we don't
accidentially break that somehow.

CC: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731123625.3766-2-christian.koenig@amd.com
13 months agodrm/exec: use unique instead of local label
Christian König [Mon, 31 Jul 2023 12:36:24 +0000 (14:36 +0200)]
drm/exec: use unique instead of local label

GCC forbids to jump to labels in loop conditions and a new clang
check stumbled over this.

So instead using a local label inside the loop condition use an
unique label outside of it.

Fixes: 09593216bff1 ("drm: execution context for GEM buffers v7")
Link: https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html
Link: https://github.com/ClangBuiltLinux/linux/issues/1890
Link: https://github.com/llvm/llvm-project/commit/20219106060208f0c2f5d096eb3aed7b712f5067
Reported-by: Nathan Chancellor <nathan@kernel.org>
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
CC: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731123625.3766-1-christian.koenig@amd.com
13 months agodrm/ttm/tests: Add tests for ttm_pool
Karolina Stolarek [Tue, 8 Aug 2023 09:51:14 +0000 (11:51 +0200)]
drm/ttm/tests: Add tests for ttm_pool

Add KUnit tests that exercise page allocation using page pools
and freeing pages, either by returning them to the pool or
freeing them. Add a basic test for ttm_pool cleanup. Introduce
helpers to create a dummy ttm_buffer_object.

Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/427ea373357d0b6cb376c9d7ebc33c930bf1d28a.1691487006.git.karolina.stolarek@intel.com
Signed-off-by: Christian König <christian.koenig@amd.com>
13 months agodrm/ttm/tests: Add tests for ttm_device
Karolina Stolarek [Tue, 8 Aug 2023 09:51:13 +0000 (11:51 +0200)]
drm/ttm/tests: Add tests for ttm_device

Test initialization and cleanup of the ttm_device struct, including
some error paths. Verify the creation of page pools if use_dma_alloc
param is true.

Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/2abb0e53e7d56b0a24d0255f9075e2123b991278.1691487006.git.karolina.stolarek@intel.com
Signed-off-by: Christian König <christian.koenig@amd.com>
13 months agodrm/ttm: Introduce KUnit test
Karolina Stolarek [Tue, 8 Aug 2023 09:51:12 +0000 (11:51 +0200)]
drm/ttm: Introduce KUnit test

Add the initial version of unit tests for ttm_device struct, together
with helper functions.

Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/3d1cc45c8a0cf536b92a850e0025f6c555de0169.1691487006.git.karolina.stolarek@intel.com
Signed-off-by: Christian König <christian.koenig@amd.com>
13 months agoaccel/ivpu: Add initial support for VPU 4
Stanislaw Gruszka [Mon, 31 Jul 2023 16:12:58 +0000 (18:12 +0200)]
accel/ivpu: Add initial support for VPU 4

Add support VPU 4 - new generation of VPU IP with various
hardware design improvements. From driver point of view, it differs
in register set, initialization process and MMU memory ranges.

Co-developed-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com>
Signed-off-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com>
Co-developed-by: Krystian Pradzynski <krystian.pradzynski@linux.intel.com>
Signed-off-by: Krystian Pradzynski <krystian.pradzynski@linux.intel.com>
Co-developed-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731161258.2987564-7-stanislaw.gruszka@linux.intel.com
13 months agoaccel/ivpu: Refactor memory ranges logic
Karol Wachowski [Mon, 31 Jul 2023 16:12:57 +0000 (18:12 +0200)]
accel/ivpu: Refactor memory ranges logic

Add new dma range and change naming convention for virtual address
memory ranges managed by KMD.

New available ranges are named as follows:
 * global range - global context accessible by FW
 * aliased range - user context accessible by FW
 * dma range - user context accessible by DMA
 * shave range - user context accessible by shaves
 * global shave range - global context accessible by shave nn

Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731161258.2987564-6-stanislaw.gruszka@linux.intel.com
13 months agoaccel/ivpu: Extend get_param ioctl to identify capabilities
Stanislaw Gruszka [Mon, 31 Jul 2023 16:12:56 +0000 (18:12 +0200)]
accel/ivpu: Extend get_param ioctl to identify capabilities

Add DRM_IVPU_PARAM_CAPABILITIES parameters to get_param ioctl to query
driver capabilities. For now use it for identify metric streamer and
new dma memory range features. Currently upstream version of intel_vpu
does not have those, they will be added it the future.

Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731161258.2987564-5-stanislaw.gruszka@linux.intel.com
13 months agoaccel/ivpu: Switch to generation based FW names
Jacek Lawrynowicz [Mon, 31 Jul 2023 16:12:55 +0000 (18:12 +0200)]
accel/ivpu: Switch to generation based FW names

Use VPU IP generation for naming FW instead of the platform name.

Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731161258.2987564-4-stanislaw.gruszka@linux.intel.com
13 months agoaccel/ivpu: Use generation based function and registers names
Jacek Lawrynowicz [Mon, 31 Jul 2023 16:12:54 +0000 (18:12 +0200)]
accel/ivpu: Use generation based function and registers names

Given that VPU generation can be used by multiple platforms, driver should
use VPU IP generation names instead of a platform.

Change naming for functions and registries.

Use 37XX format, where:
  3 - major VPU IP generation version
  7 - minor VPU IP generation version
  XX - postfix indicating this is an architecture and not marketing name

Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731161258.2987564-3-stanislaw.gruszka@linux.intel.com
13 months agoaccel/ivpu: Rename sources to use generation based names
Jacek Lawrynowicz [Mon, 31 Jul 2023 16:12:53 +0000 (18:12 +0200)]
accel/ivpu: Rename sources to use generation based names

Given that VPU generation can be used by multiple platforms, driver should
use VPU IP generation in names instead of a platform.

Change naming for sources files.

Use 37XX format, where:
  3 - major VPU IP generation version
  7 - minor VPU IP generation version
  XX - postfix indicating this is an architecture and not marketing name

Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731161258.2987564-2-stanislaw.gruszka@linux.intel.com
13 months agodrm/nouveau/sched: Don't pass user flags to drm_syncobj_find_fence()
Faith Ekstrand [Mon, 7 Aug 2023 23:41:44 +0000 (18:41 -0500)]
drm/nouveau/sched: Don't pass user flags to drm_syncobj_find_fence()

The flags field in drm_syncobj_find_fence() takes SYNCOBJ_WAIT flags
from the syncobj UAPI whereas sync->flags is from the nouveau UAPI. What
we actually want is 0 flags which tells it to just try to find the
fence and then return without waiting.

Fixes: b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI")
Cc: Danilo Krummrich <dakr@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Reviewed-by: Danilo Krummrich <dakr@redhat.com>
Signed-off-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230807234210.175968-1-faith.ekstrand@collabora.com
13 months agodrm/nouveau: uvmm: remove dedicated VM pointer from VMAs
Danilo Krummrich [Mon, 7 Aug 2023 16:32:26 +0000 (18:32 +0200)]
drm/nouveau: uvmm: remove dedicated VM pointer from VMAs

VMAs can find their corresponding VM through their embedded struct
drm_gpuva which already carries a pointer to a struct drm_gpuva_manager
which the VM is based on. Hence, remove the struct nouveau_uvmm pointer
from struct nouveau_uvma to save a couple of bytes per mapping.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230807163238.2091-6-dakr@redhat.com
13 months agodrm/nouveau: uvmm: remove incorrect calls to mas_unlock()
Danilo Krummrich [Mon, 7 Aug 2023 16:32:25 +0000 (18:32 +0200)]
drm/nouveau: uvmm: remove incorrect calls to mas_unlock()

Remove incorrect calls to mas_unlock() in the unwind path of
__nouveau_uvma_region_insert(). The region maple tree uses an external
lock instead, namely the global uvmm lock.

Fixes: b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI")
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230807163238.2091-5-dakr@redhat.com
13 months agodrm/nouveau: remove incorrect __user annotations
Danilo Krummrich [Mon, 7 Aug 2023 16:32:24 +0000 (18:32 +0200)]
drm/nouveau: remove incorrect __user annotations

Fix copy-paste error causing EXEC and VM_BIND syscalls data pointers
to carry incorrect __user annotations.

Fixes: b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI")
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230807163238.2091-4-dakr@redhat.com
13 months agodrm/nouveau: nvkm: vmm: silence warning from cast
Danilo Krummrich [Mon, 7 Aug 2023 16:32:23 +0000 (18:32 +0200)]
drm/nouveau: nvkm: vmm: silence warning from cast

Cast the integer to a pointer-sized type first to keep the compiler
happy.

Fixes: 6b252cf42281 ("drm/nouveau: nvkm/vmm: implement raw ops to manage uvmm")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230807163238.2091-3-dakr@redhat.com
13 months agonouveau/dmem: fix copy-paste error in nouveau_dmem_migrate_chunk()
Danilo Krummrich [Mon, 7 Aug 2023 16:32:22 +0000 (18:32 +0200)]
nouveau/dmem: fix copy-paste error in nouveau_dmem_migrate_chunk()

Fix call to nouveau_fence_emit() with wrong channel parameter.

Fixes: 7f2a0b50b2b2 ("drm/nouveau: fence: separate fence alloc and emit")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230807163238.2091-2-dakr@redhat.com
13 months agodrm/mcde: remove redundant of_match_ptr
Zhu Wang [Mon, 31 Jul 2023 13:18:10 +0000 (21:18 +0800)]
drm/mcde: remove redundant of_match_ptr

The driver depends on CONFIG_OF, so it is not necessary to use
of_match_ptr here.

Even for drivers that do not depend on CONFIG_OF, it's almost always
better to leave out the of_match_ptr(), since the only thing it can
possibly do is to save a few bytes of .text if a driver can be used both
with and without it. Hence we remove of_match_ptr.

Signed-off-by: Zhu Wang <wangzhu9@huawei.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731131810.103379-1-wangzhu9@huawei.com
13 months agodrm/tve200: remove redundant of_match_ptr
Zhu Wang [Mon, 31 Jul 2023 12:42:22 +0000 (20:42 +0800)]
drm/tve200: remove redundant of_match_ptr

The driver depends on CONFIG_OF, so it is not necessary to use
of_match_ptr here.

Even for drivers that do not depend on CONFIG_OF, it's almost always
better to leave out the of_match_ptr(), since the only thing it can
possibly do is to save a few bytes of .text if a driver can be used both
with and without it. Hence we remove of_match_ptr.

Signed-off-by: Zhu Wang <wangzhu9@huawei.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731124222.78643-1-wangzhu9@huawei.com
13 months agodrm/nouveau: debugfs: implement DRM GPU VA debugfs
Danilo Krummrich [Fri, 4 Aug 2023 18:23:52 +0000 (20:23 +0200)]
drm/nouveau: debugfs: implement DRM GPU VA debugfs

Provide the driver indirection iterating over all DRM GPU VA spaces to
enable the common 'gpuvas' debugfs file for dumping DRM GPU VA spaces.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230804182406.5222-13-dakr@redhat.com
13 months agodrm/nouveau: implement new VM_BIND uAPI
Danilo Krummrich [Fri, 4 Aug 2023 18:23:51 +0000 (20:23 +0200)]
drm/nouveau: implement new VM_BIND uAPI

This commit provides the implementation for the new uapi motivated by the
Vulkan API. It allows user mode drivers (UMDs) to:

1) Initialize a GPU virtual address (VA) space via the new
   DRM_IOCTL_NOUVEAU_VM_INIT ioctl for UMDs to specify the portion of VA
   space managed by the kernel and userspace, respectively.

2) Allocate and free a VA space region as well as bind and unbind memory
   to the GPUs VA space via the new DRM_IOCTL_NOUVEAU_VM_BIND ioctl.
   UMDs can request the named operations to be processed either
   synchronously or asynchronously. It supports DRM syncobjs
   (incl. timelines) as synchronization mechanism. The management of the
   GPU VA mappings is implemented with the DRM GPU VA manager.

3) Execute push buffers with the new DRM_IOCTL_NOUVEAU_EXEC ioctl. The
   execution happens asynchronously. It supports DRM syncobj (incl.
   timelines) as synchronization mechanism. DRM GEM object locking is
   handled with drm_exec.

Both, DRM_IOCTL_NOUVEAU_VM_BIND and DRM_IOCTL_NOUVEAU_EXEC, use the DRM
GPU scheduler for the asynchronous paths.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230804182406.5222-12-dakr@redhat.com
13 months agodrm/nouveau: nvkm/vmm: implement raw ops to manage uvmm
Danilo Krummrich [Fri, 4 Aug 2023 18:23:50 +0000 (20:23 +0200)]
drm/nouveau: nvkm/vmm: implement raw ops to manage uvmm

The new VM_BIND UAPI uses the DRM GPU VA manager to manage the VA space.
Hence, we a need a way to manipulate the MMUs page tables without going
through the internal range allocator implemented by nvkm/vmm.

This patch adds a raw interface for nvkm/vmm to pass the resposibility
for managing the address space and the corresponding map/unmap/sparse
operations to the upper layers.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230804182406.5222-11-dakr@redhat.com
13 months agodrm/nouveau: chan: provide nouveau_channel_kill()
Danilo Krummrich [Fri, 4 Aug 2023 18:23:49 +0000 (20:23 +0200)]
drm/nouveau: chan: provide nouveau_channel_kill()

The new VM_BIND UAPI implementation introduced in subsequent commits
will allow asynchronous jobs processing push buffers and emitting fences.

If a job times out, we need a way to recover from this situation. For
now, simply kill the channel to unblock all hung up jobs and signal
userspace that the device is dead on the next EXEC or VM_BIND ioctl.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230804182406.5222-10-dakr@redhat.com
13 months agodrm/nouveau: fence: fail to emit when fence context is killed
Danilo Krummrich [Fri, 4 Aug 2023 18:23:48 +0000 (20:23 +0200)]
drm/nouveau: fence: fail to emit when fence context is killed

The new VM_BIND UAPI implementation introduced in subsequent commits
will allow asynchronous jobs processing push buffers and emitting
fences.

If a fence context is killed, e.g. due to a channel fault, jobs which
are already queued for execution might still emit new fences. In such a
case a job would hang forever.

To fix that, fail to emit a new fence on a killed fence context with
-ENODEV to unblock the job.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230804182406.5222-9-dakr@redhat.com
13 months agodrm/nouveau: fence: separate fence alloc and emit
Danilo Krummrich [Fri, 4 Aug 2023 18:23:47 +0000 (20:23 +0200)]
drm/nouveau: fence: separate fence alloc and emit

The new (VM_BIND) UAPI exports DMA fences through DRM syncobjs. Hence,
in order to emit fences within DMA fence signalling critical sections
(e.g. as typically done in the DRM GPU schedulers run_job() callback) we
need to separate fence allocation and fence emitting.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230804182406.5222-8-dakr@redhat.com
13 months agodrm/nouveau: move usercopy helpers to nouveau_drv.h
Danilo Krummrich [Fri, 4 Aug 2023 18:23:46 +0000 (20:23 +0200)]
drm/nouveau: move usercopy helpers to nouveau_drv.h

Move the usercopy helpers to a common driver header file to make it
usable for the new API added in subsequent commits.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230804182406.5222-7-dakr@redhat.com
13 months agodrm/nouveau: bo: initialize GEM GPU VA interface
Danilo Krummrich [Fri, 4 Aug 2023 18:23:45 +0000 (20:23 +0200)]
drm/nouveau: bo: initialize GEM GPU VA interface

Initialize the GEM's DRM GPU VA manager interface in preparation for the
(u)vmm implementation, provided by subsequent commits, to make use of it.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230804182406.5222-6-dakr@redhat.com
13 months agodrm/nouveau: get vmm via nouveau_cli_vmm()
Danilo Krummrich [Fri, 4 Aug 2023 18:23:44 +0000 (20:23 +0200)]
drm/nouveau: get vmm via nouveau_cli_vmm()

Provide a getter function for the client's current vmm context. Since
we'll add a new (u)vmm context for UMD bindings in subsequent commits,
this will keep the code clean.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230804182406.5222-5-dakr@redhat.com
13 months agodrm/nouveau: new VM_BIND uAPI interfaces
Danilo Krummrich [Fri, 4 Aug 2023 18:23:43 +0000 (20:23 +0200)]
drm/nouveau: new VM_BIND uAPI interfaces

This commit provides the interfaces for the new UAPI motivated by the
Vulkan API. It allows user mode drivers (UMDs) to:

1) Initialize a GPU virtual address (VA) space via the new
   DRM_IOCTL_NOUVEAU_VM_INIT ioctl. UMDs can provide a kernel reserved
   VA area.

2) Bind and unbind GPU VA space mappings via the new
   DRM_IOCTL_NOUVEAU_VM_BIND ioctl.

3) Execute push buffers with the new DRM_IOCTL_NOUVEAU_EXEC ioctl.

Both, DRM_IOCTL_NOUVEAU_VM_BIND and DRM_IOCTL_NOUVEAU_EXEC support
asynchronous processing with DRM syncobjs as synchronization mechanism.

The default DRM_IOCTL_NOUVEAU_VM_BIND is synchronous processing,
DRM_IOCTL_NOUVEAU_EXEC supports asynchronous processing only.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Co-developed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230804182406.5222-4-dakr@redhat.com
13 months agodrm/nouveau: fixup the uapi header file.
Dave Airlie [Fri, 4 Aug 2023 18:23:42 +0000 (20:23 +0200)]
drm/nouveau: fixup the uapi header file.

nouveau > 10 years ago had a plan for new multiplexer inside a multiplexer
API using nvif. It never fully reached fruition, fast forward 10 years,
and the new vulkan driver is avoiding libdrm and calling ioctls, and
these 3 ioctls, getparam, channel alloc + free don't seem to be things
we'd want to use nvif for.

Undeprecate and put them into the uapi header so we can just copy it
into mesa later.

v2: use uapi types.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230804182406.5222-3-dakr@redhat.com
13 months agodrm/gem: fix lockdep check for dma-resv lock
Danilo Krummrich [Fri, 4 Aug 2023 18:23:41 +0000 (20:23 +0200)]
drm/gem: fix lockdep check for dma-resv lock

When no custom lock is set to protect a GEMs GPUVA list, lockdep checks
should fall back to the GEM objects dma-resv lock. With the current
implementation we're setting the lock_dep_map of the GEM objects 'resv'
pointer (in case no custom lock_dep_map is set yet) on
drm_gem_private_object_init().

However, the GEM objects 'resv' pointer might still change after
drm_gem_private_object_init() is called, e.g. through
ttm_bo_init_reserved(). This can result in the wrong lock being tracked.

To fix this, call dma_resv_held() directly from
drm_gem_gpuva_assert_lock_held() and fall back to the GEMs lock_dep_map
pointer only if an actual custom lock is set.

Fixes: e6303f323b1a ("drm: manager to keep track of GPUs VA mappings")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230804182406.5222-2-dakr@redhat.com
13 months agodrm: Drop select FRAMEBUFFER_CONSOLE for DRM_FBDEV_EMULATION
Javier Martinez Canillas [Fri, 4 Aug 2023 12:51:43 +0000 (14:51 +0200)]
drm: Drop select FRAMEBUFFER_CONSOLE for DRM_FBDEV_EMULATION

The commit c242f48433e7 ("drm: Make FB_CORE to be selected if DRM fbdev
emulation is enabled") changed DRM_FBDEV_EMULATION from 'depends on FB'
to an effective 'select FB_CORE', so any config that previously had DRM=y
and FB=n now has FB_CORE=y and FRAMEBUFFER_CONSOLE=y.

This leads to unmet direct dependencies detected for FRAMEBUFFER_CONSOLE
as reported by Arthur Grillo, e.g:

WARNING: unmet direct dependencies detected for FRAMEBUFFER_CONSOLE
  Depends on [n]: VT [=n] && FB_CORE [=y] && !UML [=y]
  Selected by [y]:
  - DRM_FBDEV_EMULATION [=y] && HAS_IOMEM [=y] && DRM [=y] && !EXPERT [=n]

Arnd Bergmann suggests to drop the select FRAMEBUFFER_CONSOLE for the
DRM_FBDEV_EMULATION Kconfig symbol, since a possible use case could
be to enable DRM fbdev emulation but without a framebuffer console.

Fixes: c242f48433e7 ("drm: Make FB_CORE to be selected if DRM fbdev emulation is enabled")
Reported-by: Arthur Grillo <arthurgrillo@riseup.net>
Closes: https://lore.kernel.org/dri-devel/20230726220325.278976-1-arthurgrillo@riseup.net
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Arthur Grillo <arthurgrillo@riseup.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20230804125156.1387542-1-javierm@redhat.com
13 months agovfio-dev/mdpy-fb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:36:12 +0000 (20:36 +0200)]
vfio-dev/mdpy-fb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Cc: Kirti Wankhede <kwankhede@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-48-tzimmermann@suse.de
13 months agofbdev/xilinxfb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:36:11 +0000 (20:36 +0200)]
fbdev/xilinxfb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Cc: Michal Simek <michal.simek@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-47-tzimmermann@suse.de
13 months agofbdev/vesafb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:36:10 +0000 (20:36 +0200)]
fbdev/vesafb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-46-tzimmermann@suse.de
13 months agofbdev/valkyriefb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:36:09 +0000 (20:36 +0200)]
fbdev/valkyriefb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-45-tzimmermann@suse.de
13 months agofbdev/uvesafb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:36:08 +0000 (20:36 +0200)]
fbdev/uvesafb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Cc: Michal Januszewski <spock@gentoo.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-44-tzimmermann@suse.de
13 months agofbdev/sunxvr2500: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:36:07 +0000 (20:36 +0200)]
fbdev/sunxvr2500: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-43-tzimmermann@suse.de
13 months agofbdev/sunxvr1000: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:36:06 +0000 (20:36 +0200)]
fbdev/sunxvr1000: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-42-tzimmermann@suse.de
13 months agofbdev/sstfb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:36:05 +0000 (20:36 +0200)]
fbdev/sstfb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-41-tzimmermann@suse.de
13 months agofbdev/simplefb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:36:04 +0000 (20:36 +0200)]
fbdev/simplefb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Cc: Hans de Goede <hdegoede@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-40-tzimmermann@suse.de
13 months agofbdev/sh7760fb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:36:03 +0000 (20:36 +0200)]
fbdev/sh7760fb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-39-tzimmermann@suse.de
13 months agofbdev/s3cfb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:36:02 +0000 (20:36 +0200)]
fbdev/s3cfb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Cc: Jingoo Han <jingoohan1@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-38-tzimmermann@suse.de
13 months agofbdev/q40fb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:36:01 +0000 (20:36 +0200)]
fbdev/q40fb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-37-tzimmermann@suse.de
13 months agofbdev/pxafb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:36:00 +0000 (20:36 +0200)]
fbdev/pxafb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-36-tzimmermann@suse.de
13 months agofbdev/pxa168fb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:59 +0000 (20:35 +0200)]
fbdev/pxa168fb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-35-tzimmermann@suse.de
13 months agofbdev/pmagb-b-fb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:58 +0000 (20:35 +0200)]
fbdev/pmagb-b-fb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens
* fix driver name in commit message

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-34-tzimmermann@suse.de
13 months agofbdev/pmag-ba-fb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:57 +0000 (20:35 +0200)]
fbdev/pmag-ba-fb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-33-tzimmermann@suse.de
13 months agofbdev/pmag-aa-fb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:56 +0000 (20:35 +0200)]
fbdev/pmag-aa-fb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-32-tzimmermann@suse.de
13 months agofbdev/platinumfb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:55 +0000 (20:35 +0200)]
fbdev/platinumfb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-31-tzimmermann@suse.de
13 months agofbdev/omapfb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:54 +0000 (20:35 +0200)]
fbdev/omapfb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-30-tzimmermann@suse.de
13 months agofbdev/offb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:53 +0000 (20:35 +0200)]
fbdev/offb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-29-tzimmermann@suse.de
13 months agofbdev/ocfb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:52 +0000 (20:35 +0200)]
fbdev/ocfb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-28-tzimmermann@suse.de
13 months agofbdev/mx3fb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:51 +0000 (20:35 +0200)]
fbdev/mx3fb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-27-tzimmermann@suse.de
13 months agofbdev/mmpfb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:50 +0000 (20:35 +0200)]
fbdev/mmpfb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-26-tzimmermann@suse.de
13 months agofbdev/mb862xxfb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:49 +0000 (20:35 +0200)]
fbdev/mb862xxfb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-25-tzimmermann@suse.de
13 months agofbdev/maxinefb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:48 +0000 (20:35 +0200)]
fbdev/maxinefb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-24-tzimmermann@suse.de
13 months agofbdev/macfb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:47 +0000 (20:35 +0200)]
fbdev/macfb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-23-tzimmermann@suse.de
13 months agofbdev/kyro: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:46 +0000 (20:35 +0200)]
fbdev/kyro: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-22-tzimmermann@suse.de
13 months agofbdev/imxfb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:45 +0000 (20:35 +0200)]
fbdev/imxfb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-21-tzimmermann@suse.de
13 months agofbdev/i740fb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:44 +0000 (20:35 +0200)]
fbdev/i740fb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-20-tzimmermann@suse.de
13 months agofbdev/gxt4500: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:43 +0000 (20:35 +0200)]
fbdev/gxt4500: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-19-tzimmermann@suse.de
13 months agofbdev/grvga: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:42 +0000 (20:35 +0200)]
fbdev/grvga: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-18-tzimmermann@suse.de
13 months agofbdev/goldfishfb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:41 +0000 (20:35 +0200)]
fbdev/goldfishfb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-17-tzimmermann@suse.de
13 months agofbdev/geode/lxfb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:40 +0000 (20:35 +0200)]
fbdev/geode/lxfb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Cc: Andres Salomon <dilinger@queued.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-16-tzimmermann@suse.de
13 months agofbdev/geode/gxfb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:39 +0000 (20:35 +0200)]
fbdev/geode/gxfb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Cc: Andres Salomon <dilinger@queued.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-15-tzimmermann@suse.de
13 months agofbdev/geode/gx1fb: Use fbdev I/O helpers
Thomas Zimmermann [Thu, 3 Aug 2023 18:35:38 +0000 (20:35 +0200)]
fbdev/geode/gx1fb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Cc: Andres Salomon <dilinger@queued.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-14-tzimmermann@suse.de