platform/kernel/linux-starfive.git
19 months agodrm/panfrost: Increase MAX_PM_DOMAINS to 5
Alyssa Rosenzweig [Thu, 16 Mar 2023 10:20:37 +0000 (11:20 +0100)]
drm/panfrost: Increase MAX_PM_DOMAINS to 5

Increase the MAX_PM_DOMAINS constant from 3 to 5, to support the
extra power domains required by the Mali-G57 on the MT8192.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230316102041.210269-9-angelogioacchino.delregno@collabora.com
19 months agodt-bindings: gpu: mali-bifrost: Add compatible for MT8195 SoC
AngeloGioacchino Del Regno [Thu, 16 Mar 2023 10:20:36 +0000 (11:20 +0100)]
dt-bindings: gpu: mali-bifrost: Add compatible for MT8195 SoC

The MediaTek MT8195 SoC has a Mali G57 MC5 (Valhall-JM) and has the
same number of power domains and requirements as MT8192 in terms of
bindings.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230316102041.210269-8-angelogioacchino.delregno@collabora.com
19 months agodt-bindings: gpu: mali-bifrost: Add support for MediaTek MT8186
AngeloGioacchino Del Regno [Thu, 16 Mar 2023 10:20:35 +0000 (11:20 +0100)]
dt-bindings: gpu: mali-bifrost: Add support for MediaTek MT8186

MT8186 has a Mali-G52 MC2 2EE GPU (two cores): add a binding with
two power domains (one per core) for it.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230316102041.210269-7-angelogioacchino.delregno@collabora.com
19 months agodt-bindings: gpu: mali-bifrost: Add new MT8183 compatible
AngeloGioacchino Del Regno [Thu, 16 Mar 2023 10:20:34 +0000 (11:20 +0100)]
dt-bindings: gpu: mali-bifrost: Add new MT8183 compatible

Since new platform data was required in Panfrost for getting GPU DVFS
finally working on MediaTek SoCs, add a new "mediatek,mt8183b-mali"
compatible.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230316102041.210269-6-angelogioacchino.delregno@collabora.com
19 months agodt-bindings: gpu: mali-bifrost: Add sub-schema for MT8192's power domains
AngeloGioacchino Del Regno [Thu, 16 Mar 2023 10:20:33 +0000 (11:20 +0100)]
dt-bindings: gpu: mali-bifrost: Add sub-schema for MT8192's power domains

MediaTek MT8192 (and similar) needs five power domains for the
Mali GPU and no sram-supply: change the binding to allow so by
also introducing power-domain-names in the generic binding;
while at it, also disallow the newly introduced power-domain-names
for all non-MediaTek bindings.

Fixes: 5d82e74a97c2 ("dt-bindings: Add compatible for Mali Valhall (JM)")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230316102041.210269-5-angelogioacchino.delregno@collabora.com
19 months agodt-bindings: gpu: mali-bifrost: Fix power-domain-names validation
AngeloGioacchino Del Regno [Thu, 16 Mar 2023 10:20:32 +0000 (11:20 +0100)]
dt-bindings: gpu: mali-bifrost: Fix power-domain-names validation

Commit ("dt-bindings: gpu: mali-bifrost: Add Mediatek MT8183")
incorrectly introduced power domain names for MT8183, causing
validation issues.

Add power-domain-names to the base schema, allowing a maximum of
five elements; since platforms having a single power domain don't
need any actual domain name, disallow that for each sub-schema.

Fixes: a7a596cd3115 ("dt-bindings: gpu: mali-bifrost: Add Mediatek MT8183")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230316102041.210269-4-angelogioacchino.delregno@collabora.com
19 months agodt-bindings: gpu: mali-bifrost: Set power-domains maxItems to 5
AngeloGioacchino Del Regno [Thu, 16 Mar 2023 10:20:31 +0000 (11:20 +0100)]
dt-bindings: gpu: mali-bifrost: Set power-domains maxItems to 5

In preparation for adding (and fixing) power-domain-names and MediaTek
MT8192 bindings, allow up to five items for power-domains.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230316102041.210269-3-angelogioacchino.delregno@collabora.com
19 months agodt-bindings: gpu: mali-bifrost: Split out MediaTek power-domains variation
AngeloGioacchino Del Regno [Thu, 16 Mar 2023 10:20:30 +0000 (11:20 +0100)]
dt-bindings: gpu: mali-bifrost: Split out MediaTek power-domains variation

In preparation for adding new bindings for new MediaTek SoCs, split out
the power-domains variation from the `else` in the current
mediatek,mt8183-mali conditional.

The sram-supply part is left in place to be disallowed for anything
that is not compatible with "mediatek,mt8183-mali" as this regulator
is MediaTek-specific and it is, and will ever be, used only for this
specific string due to the addition of the mediatek-regulator-coupler
driver.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230316102041.210269-2-angelogioacchino.delregno@collabora.com
19 months agodrm/rockchip: vop2: Add error check to devm_regmap_init_mmio
Alfredo Cruz [Wed, 22 Mar 2023 22:44:11 +0000 (23:44 +0100)]
drm/rockchip: vop2: Add error check to devm_regmap_init_mmio

devm_regmap_init_mmio() may return an invalid pointer in case of an error.
This patch adds the corresponding IS_ERR check to vop2->map.

Signed-off-by: Alfredo Cruz <alfredo.carlon@gmail.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230322224411.15612-1-alfredo.carlon@gmail.com
19 months agodrm/rockchip: dw_hdmi: cleanup drm encoder during unbind
Toby Chen [Fri, 17 Mar 2023 00:51:26 +0000 (17:51 -0700)]
drm/rockchip: dw_hdmi: cleanup drm encoder during unbind

This fixes a use-after-free crash during rmmod.

The DRM encoder is embedded inside the larger rockchip_hdmi,
which is allocated with the component. The component memory
gets freed before the main drm device is destroyed. Fix it
by running encoder cleanup before tearing down its container.

Signed-off-by: Toby Chen <tobyc@nvidia.com>
[moved encoder cleanup above clk_disable, similar to bind-error-path]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230317005126.496-1-tobyc@nvidia.com
19 months agodrm/rockchip: vop2: fix uninitialized variable possible_crtcs
Tom Rix [Thu, 16 Mar 2023 13:23:02 +0000 (09:23 -0400)]
drm/rockchip: vop2: fix uninitialized variable possible_crtcs

clang reportes this error
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c:2322:8: error:
  variable 'possible_crtcs' is used uninitialized whenever 'if'
  condition is false [-Werror,-Wsometimes-uninitialized]
                        if (vp) {
                            ^~
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c:2336:36: note:
  uninitialized use occurs here
                ret = vop2_plane_init(vop2, win, possible_crtcs);
                                                 ^~~~~~~~~~~~~~
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c:2322:4:
  note: remove the 'if' if its condition is always true
                        if (vp) {
                        ^~~~~~~~

The else-statement changes the win->type to OVERLAY without setting the
possible_crtcs variable.  Rework the block, initialize possible_crtcs to
0 to remove the else-statement.  Split the else-if-statement out to its
own if-statement so the OVERLAY check will catch when the win-type has
been changed.

Fixes: 368419a2d429 ("drm/rockchip: vop2: initialize possible_crtcs properly")
Signed-off-by: Tom Rix <trix@redhat.com>
Acked-by: Michael Riesch <michael.riesch@wolfvision.net>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230316132302.531724-1-trix@redhat.com
19 months agodrm/fbdev-generic: Rename symbols
Thomas Zimmermann [Mon, 20 Mar 2023 15:07:51 +0000 (16:07 +0100)]
drm/fbdev-generic: Rename symbols

Rename symbols to match the style of other fbdev-emulation source
code. No functional changes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Zack Rusin <zackr@vmware.com>
Tested-by: Sui Jingfeng <suijingfeng@loongson.cn>
Link: https://patchwork.freedesktop.org/patch/msgid/20230320150751.20399-9-tzimmermann@suse.de
19 months agodrm/fb-helper: Consolidate CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM
Thomas Zimmermann [Mon, 20 Mar 2023 15:07:50 +0000 (16:07 +0100)]
drm/fb-helper: Consolidate CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM

Consolidate all handling of CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM by
making the module parameter optional in drm_fb_helper.c.

Without the config option, modules can set smem_start in struct
fb_info for internal usage, but not export if to userspace. The
address can only be exported by enabling the option and setting
the module parameter. Also update the comment.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Zack Rusin <zackr@vmware.com>
Tested-by: Sui Jingfeng<suijingfeng@loongson.cn>
Link: https://patchwork.freedesktop.org/patch/msgid/20230320150751.20399-8-tzimmermann@suse.de
19 months agodrm/fbdev-generic: Clean up after failed probing
Thomas Zimmermann [Mon, 20 Mar 2023 15:07:49 +0000 (16:07 +0100)]
drm/fbdev-generic: Clean up after failed probing

Clean up fbdev and client state if the probe function fails. It
used to leak allocated resources. Also reorder the individual steps
to simplify cleanup.

v2:
* move screen_size update into separate patches

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Zack Rusin <zackr@vmware.com>
Tested-by: Sui Jingfeng <suijingfeng@loongson.cn>
Link: https://patchwork.freedesktop.org/patch/msgid/20230320150751.20399-7-tzimmermann@suse.de
19 months agodrm/fbdev-generic: Set screen size to size of GEM buffer
Thomas Zimmermann [Mon, 20 Mar 2023 15:07:48 +0000 (16:07 +0100)]
drm/fbdev-generic: Set screen size to size of GEM buffer

The size of the screen memory should be equivalent to the size of
the screen's GEM buffer. Don't recalculate the value.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Tested-by: Sui Jingfeng <suijingfeng@loongson.cn>
Link: https://patchwork.freedesktop.org/patch/msgid/20230320150751.20399-6-tzimmermann@suse.de
19 months agodrm/fb-helper: Support smem_len in deferred I/O
Thomas Zimmermann [Mon, 20 Mar 2023 15:07:47 +0000 (16:07 +0100)]
drm/fb-helper: Support smem_len in deferred I/O

The size of the framebuffer can either be stored in screen_info or
smem_len. Take both into account in the deferred I/O code.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Tested-by: Sui Jingfeng <suijingfeng@loongson.cn>
Link: https://patchwork.freedesktop.org/patch/msgid/20230320150751.20399-5-tzimmermann@suse.de
19 months agodrm/fb-helper: Export drm_fb_helper_release_info()
Thomas Zimmermann [Mon, 20 Mar 2023 15:07:46 +0000 (16:07 +0100)]
drm/fb-helper: Export drm_fb_helper_release_info()

Export the fb_info release code as drm_fb_helper_release_info(). Will
help with cleaning up failed fbdev probing.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Zack Rusin <zackr@vmware.com>
Tested-by: Sui Jingfeng<suijingfeng@loongson.cn>
Link: https://patchwork.freedesktop.org/patch/msgid/20230320150751.20399-4-tzimmermann@suse.de
19 months agodrm/fbdev-generic: Remove unused prefer_shadow_fbdev flag
Thomas Zimmermann [Mon, 20 Mar 2023 15:07:45 +0000 (16:07 +0100)]
drm/fbdev-generic: Remove unused prefer_shadow_fbdev flag

Remove the flag prefer_shadow_fbdev from struct drm_mode_config.
Drivers set this flag to enable shadow buffering in the generic
fbdev emulation. Such shadow buffering is now mandatory, so the
flag is unused.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Zack Rusin <zackr@vmware.com>
Tested-by: Sui Jingfeng <suijingfeng@loongson.cn>
Link: https://patchwork.freedesktop.org/patch/msgid/20230320150751.20399-3-tzimmermann@suse.de
19 months agodrm/fbdev-generic: Always use shadow buffering
Thomas Zimmermann [Mon, 20 Mar 2023 15:07:44 +0000 (16:07 +0100)]
drm/fbdev-generic: Always use shadow buffering

Remove all codepaths that implement fbdev output directly on GEM
buffers. Always allocate a shadow buffer in system memory and set
up deferred I/O for mmap.

The fbdev code that operated directly on GEM buffers was used by
drivers based on GEM DMA helpers. Those drivers have been migrated
to use fbdev-dma, a dedicated fbdev emulation for DMA memory. All
remaining users of fbdev-generic require shadow buffering.

Memory management of the remaining callers uses TTM, GEM SHMEM
helpers or a variant of GEM DMA helpers that is incompatible with
fbdev-dma. Therefore remove the unused codepaths from fbdev-generic
and simplify the code.

Using a shadow buffer with deferred I/O is probably the best case
for most remaining callers. Some of the TTM-based drivers might
benefit from a dedicated fbdev emulation that operates directly on
the driver's video memory.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Zack Rusin <zackr@vmware.com>
Tested-by: Sui Jingfeng <suijingfeng@loongson.cn>
Link: https://patchwork.freedesktop.org/patch/msgid/20230320150751.20399-2-tzimmermann@suse.de
19 months agodrm: bridge: simple-bridge: Use dev_err_probe()
Ye Xingchen [Wed, 22 Mar 2023 08:22:51 +0000 (16:22 +0800)]
drm: bridge: simple-bridge: Use dev_err_probe()

Replace the open-code with dev_err_probe() to simplify the code.

Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/202303221622511915615@zte.com.cn
19 months agodrm/bridge: display-connector: Use dev_err_probe()
Ye Xingchen [Wed, 22 Mar 2023 08:21:33 +0000 (16:21 +0800)]
drm/bridge: display-connector: Use dev_err_probe()

Replace the open-code with dev_err_probe() to simplify the code.

Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/202303221621336645576@zte.com.cn
19 months agodrm: remove drm_dev_set_unique
Christian König [Fri, 17 Feb 2023 12:54:27 +0000 (13:54 +0100)]
drm: remove drm_dev_set_unique

Not used by any drivers any more, the only use case in drm_dev_init()
can be inlined now.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230316082035.567520-2-christian.koenig@amd.com
19 months agodrm/lima: Use drm_sched_job_add_syncobj_dependency()
Maíra Canal [Fri, 24 Feb 2023 21:41:32 +0000 (18:41 -0300)]
drm/lima: Use drm_sched_job_add_syncobj_dependency()

As lima_gem_add_deps() performs the same steps as
drm_sched_job_add_syncobj_dependency(), replace the open-coded
implementation in Lima in order to simply use the DRM function.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Signed-off-by: Maíra Canal <mairacanal@riseup.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20230224214133.411966-1-mcanal@igalia.com
19 months agodrm/gma500: remove unused gma_pipe_event function
Tom Rix [Sun, 19 Mar 2023 14:23:20 +0000 (10:23 -0400)]
drm/gma500: remove unused gma_pipe_event function

clang with W=1 reports
drivers/gpu/drm/gma500/psb_irq.c:35:19: error: unused function
  'gma_pipe_event' [-Werror,-Wunused-function]
static inline u32 gma_pipe_event(int pipe)
                  ^
This function is not used, so remove it.

Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230319142320.1704336-1-trix@redhat.com
19 months agodrm/vgem: Drop struct drm_vgem_gem_object
Maíra Canal [Wed, 22 Feb 2023 16:06:17 +0000 (13:06 -0300)]
drm/vgem: Drop struct drm_vgem_gem_object

Commit 45d9c8dde4cd ("drm/vgem: use shmem helpers") introduced shmem
helpers to vgem and with that, removed all uses of the struct
drm_vgem_gem_object. So, as the struct is no longer used, delete it.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Maíra Canal <mairacanal@riseup.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20230222160617.171429-1-mcanal@igalia.com
19 months agodrm/prime: Fix documentation of drm_gem_prime_fd_to_handle()
Petr Tesarik [Fri, 24 Feb 2023 12:09:31 +0000 (13:09 +0100)]
drm/prime: Fix documentation of drm_gem_prime_fd_to_handle()

The DRM device passed to drm_gem_prime_fd_to_handle() is where the
dma-buf is being imported, not the device where it was exported.

Also fix a trivial typo in drm_gem_prime_import_dev().

Signed-off-by: Petr Tesarik <petr.tesarik.ext@huawei.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Simon Ser <contact@emersion.fr>
Link: https://patchwork.freedesktop.org/patch/msgid/20230224120931.1024-1-petrtesarik@huaweicloud.com
19 months agodrm/bridge: ti-tfp410: Convert to platform remove callback returning void
Uwe Kleine-König [Sat, 18 Mar 2023 19:08:04 +0000 (20:08 +0100)]
drm/bridge: ti-tfp410: Convert to platform remove callback returning void

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-20-u.kleine-koenig@pengutronix.de
19 months agodrm/bridge: thc63lvd1024: Convert to platform remove callback returning void
Uwe Kleine-König [Sat, 18 Mar 2023 19:08:03 +0000 (20:08 +0100)]
drm/bridge: thc63lvd1024: Convert to platform remove callback returning void

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-19-u.kleine-koenig@pengutronix.de
19 months agodrm/bridge: dw-hdmi-i2s-audio: Convert to platform remove callback returning void
Uwe Kleine-König [Sat, 18 Mar 2023 19:08:02 +0000 (20:08 +0100)]
drm/bridge: dw-hdmi-i2s-audio: Convert to platform remove callback returning void

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-18-u.kleine-koenig@pengutronix.de
19 months agodrm/bridge: dw-hdmi-gp-audio: Convert to platform remove callback returning void
Uwe Kleine-König [Sat, 18 Mar 2023 19:08:01 +0000 (20:08 +0100)]
drm/bridge: dw-hdmi-gp-audio: Convert to platform remove callback returning void

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-17-u.kleine-koenig@pengutronix.de
19 months agodrm/bridge: dw-hdmi-cec: Convert to platform remove callback returning void
Uwe Kleine-König [Sat, 18 Mar 2023 19:08:00 +0000 (20:08 +0100)]
drm/bridge: dw-hdmi-cec: Convert to platform remove callback returning void

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-16-u.kleine-koenig@pengutronix.de
19 months agodrm/bridge: dw-hdmi-ahb-audio: Convert to platform remove callback returning void
Uwe Kleine-König [Sat, 18 Mar 2023 19:07:59 +0000 (20:07 +0100)]
drm/bridge: dw-hdmi-ahb-audio: Convert to platform remove callback returning void

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-15-u.kleine-koenig@pengutronix.de
19 months agodrm/bridge: simple-bridg: Convert to platform remove callback returning void
Uwe Kleine-König [Sat, 18 Mar 2023 19:07:58 +0000 (20:07 +0100)]
drm/bridge: simple-bridg: Convert to platform remove callback returning void

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-14-u.kleine-koenig@pengutronix.de
19 months agodrm/bridge: nwl-dsi: Convert to platform remove callback returning void
Uwe Kleine-König [Sat, 18 Mar 2023 19:07:57 +0000 (20:07 +0100)]
drm/bridge: nwl-dsi: Convert to platform remove callback returning void

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-13-u.kleine-koenig@pengutronix.de
19 months agodrm/bridge: lvds-codec: Convert to platform remove callback returning void
Uwe Kleine-König [Sat, 18 Mar 2023 19:07:56 +0000 (20:07 +0100)]
drm/bridge: lvds-codec: Convert to platform remove callback returning void

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-12-u.kleine-koenig@pengutronix.de
19 months agodrm/bridge: imx8qxp-pxl2dpi: Convert to platform remove callback returning void
Uwe Kleine-König [Sat, 18 Mar 2023 19:07:55 +0000 (20:07 +0100)]
drm/bridge: imx8qxp-pxl2dpi: Convert to platform remove callback returning void

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-11-u.kleine-koenig@pengutronix.de
19 months agodrm/bridge: imx8qxp-pixel-link: Convert to platform remove callback returning void
Uwe Kleine-König [Sat, 18 Mar 2023 19:07:54 +0000 (20:07 +0100)]
drm/bridge: imx8qxp-pixel-link: Convert to platform remove callback returning void

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-10-u.kleine-koenig@pengutronix.de
19 months agodrm/bridge: imx8qxp-pixel-combiner: Convert to platform remove callback returning...
Uwe Kleine-König [Sat, 18 Mar 2023 19:07:53 +0000 (20:07 +0100)]
drm/bridge: imx8qxp-pixel-combiner: Convert to platform remove callback returning void

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-9-u.kleine-koenig@pengutronix.de
19 months agodrm/bridge: imx8qxp-ldb: Convert to platform remove callback returning void
Uwe Kleine-König [Sat, 18 Mar 2023 19:07:52 +0000 (20:07 +0100)]
drm/bridge: imx8qxp-ldb: Convert to platform remove callback returning void

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-8-u.kleine-koenig@pengutronix.de
19 months agodrm/bridge: imx8qm-ldb: Convert to platform remove callback returning void
Uwe Kleine-König [Sat, 18 Mar 2023 19:07:51 +0000 (20:07 +0100)]
drm/bridge: imx8qm-ldb: Convert to platform remove callback returning void

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-7-u.kleine-koenig@pengutronix.de
19 months agodrm/bridge: fsl-ldb: Convert to platform remove callback returning void
Uwe Kleine-König [Sat, 18 Mar 2023 19:07:50 +0000 (20:07 +0100)]
drm/bridge: fsl-ldb: Convert to platform remove callback returning void

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-6-u.kleine-koenig@pengutronix.de
19 months agodrm/bridge: display-connector: Convert to platform remove callback returning void
Uwe Kleine-König [Sat, 18 Mar 2023 19:07:49 +0000 (20:07 +0100)]
drm/bridge: display-connector: Convert to platform remove callback returning void

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-5-u.kleine-koenig@pengutronix.de
19 months agodrm/bridge: cdns-dsi: Convert to platform remove callback returning void
Uwe Kleine-König [Sat, 18 Mar 2023 19:07:47 +0000 (20:07 +0100)]
drm/bridge: cdns-dsi: Convert to platform remove callback returning void

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-3-u.kleine-koenig@pengutronix.de
19 months agodrm/gma500: Pass fb_info to psb_fbdev_vm_fault()
Thomas Zimmermann [Mon, 13 Mar 2023 15:16:10 +0000 (16:16 +0100)]
drm/gma500: Pass fb_info to psb_fbdev_vm_fault()

Instead of the DRM framebuffer, pass the FB info strcuture to the
fbdev page-fault handler psb_fbdev_vm_fault(). The framebuffer is a
high-level data structure and does not belong into fault handling.
The fb_info has all necessary information. Also set fix.smem_start
to the correct value (the beginning of the framebuffer in physical
address space) and streamline the page-fault handler.

v2:
* remove unused struct drm_psb_private.fb_base (Patrik)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313151610.14367-8-tzimmermann@suse.de
19 months agodrm/gma500: Implement client-based fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:16:09 +0000 (16:16 +0100)]
drm/gma500: Implement client-based fbdev emulation

Implement fbdevemulation on top of struct drm_client and its helpers.
This ad-hoc interfaces for restoring and closing fbdev emulation with
per-client callback for hotplugging, restoring and unregistering.

A single function, psb_fbdev_setup(), starts fbdev emulation after
the DRM device has been registered. Hence, fbdev acts like a regular
DRM client.

The setup call only prepares the fbdev emulation. It then implements
connector hotplugging. The first successful hotplug event initializes
fbdev emulation.

Unregistering depends on the hotplugging. Fully initialized emulation
is cleaned up through drm_fb_helper_unregister_info() and fb_destroy.
For prepared-only setups, unregistering unprepares the emulation and
releases all resources. In both cases, fbdev emulation will be cleaned
up.

v2:
* declare empty setup function as 'static inline' (kernel
  test robot)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313151610.14367-7-tzimmermann@suse.de
19 months agodrm/gma500: Inline psbfb_create() into psbfb_probe()
Thomas Zimmermann [Mon, 13 Mar 2023 15:16:08 +0000 (16:16 +0100)]
drm/gma500: Inline psbfb_create() into psbfb_probe()

Inline psbfb_create() into its only caller psbfb_probe(). Streamline
the color-depth selection. Also clean up the naming around struct
drm_fb_helper_funcs.

v2:
* rename psbfb_probe() (Patrik)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313151610.14367-6-tzimmermann@suse.de
19 months agodrm/gma500: Fix naming in fb_ops
Thomas Zimmermann [Mon, 13 Mar 2023 15:16:07 +0000 (16:16 +0100)]
drm/gma500: Fix naming in fb_ops

Fix some names around struct fb_ops to better fit the overall naming
conventions. No functional changes.

v2:
* fix typo in commit message

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313151610.14367-5-tzimmermann@suse.de
19 months agodrm/gma500: Remove fbdev vma open and close callbacks
Thomas Zimmermann [Mon, 13 Mar 2023 15:16:06 +0000 (16:16 +0100)]
drm/gma500: Remove fbdev vma open and close callbacks

Remove fbdev emulations' open and close implementaitons for the VM. The
functions are empty. Also update the naming of the VMA code.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313151610.14367-4-tzimmermann@suse.de
19 months agodrm/gma500: Move fbdev code into separate source file
Thomas Zimmermann [Mon, 13 Mar 2023 15:16:05 +0000 (16:16 +0100)]
drm/gma500: Move fbdev code into separate source file

Move the fbdev emulation from framebuffer.c to fbdev.c. Only build
the source code if the Kconfig symbol has been selected. Remaining in
framebuffer.c is gma500's code for DRM framebuffers. No functional
changes.

v2:
* remove 'extern' from function declaration (Patrik)
* declare empty init/fini functions as 'static inline' (kernel
  test robot)
* rebase onto vm_flags_set()
* typo fixes in commit message

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313151610.14367-3-tzimmermann@suse.de
19 months agodrm/gma500: Remove unnecessary include statements
Thomas Zimmermann [Mon, 13 Mar 2023 15:16:04 +0000 (16:16 +0100)]
drm/gma500: Remove unnecessary include statements

Remove unnecessary include statements from framebuffer.c. No
functional changes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313151610.14367-2-tzimmermann@suse.de
19 months agodrm/bridge: adv7533: Fix adv7533_mode_valid for adv7533 and adv7535
Adam Ford [Sun, 19 Mar 2023 12:55:24 +0000 (07:55 -0500)]
drm/bridge: adv7533: Fix adv7533_mode_valid for adv7533 and adv7535

When dynamically switching lanes was removed, the intent of the code
was to check to make sure that higher speed items used 4 lanes, but
it had the unintended consequence of removing the slower speeds for
4-lane users.

This attempts to remedy this by doing a check to see that the
max frequency doesn't exceed the chip limit, and a second
check to make sure that the max bit-rate doesn't exceed the
number of lanes * max bit rate / lane.

Fixes: 9a0cdcd6649b ("drm/bridge: adv7533: remove dynamic lane switching from adv7533 bridge")
Reviewed-by: Robert Foss <rfoss@kernel.org>
Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230319125524.58803-1-aford173@gmail.com
19 months agogpu: drm: bridge: sii9234: remove unused bridge_to_sii9234 function
Tom Rix [Sat, 18 Mar 2023 00:23:21 +0000 (20:23 -0400)]
gpu: drm: bridge: sii9234: remove unused bridge_to_sii9234 function

clang with W=1 reports
drivers/gpu/drm/bridge/sii9234.c:870:31: error:
  unused function 'bridge_to_sii9234' [-Werror,-Wunused-function]
static inline struct sii9234 *bridge_to_sii9234(struct drm_bridge *bridge)
                              ^
This static function is not used, so remove it.

Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230318002321.1675181-1-trix@redhat.com
19 months agodrm: fix typo in margin connector properties docs
Simon Ser [Sun, 5 Mar 2023 10:35:10 +0000 (10:35 +0000)]
drm: fix typo in margin connector properties docs

This was pointed out by Ville and Pekka in their replies, but
forgot to apply the change properly before pushing. Sorry for
the noise!

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: 409f07d353b3 ("drm: document connector margin properties")
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Pekka Paalanen <pekka.paalanen@collabora.com>
Cc: Maxime Ripard <maxime@cerno.tech>
Cc: Dave Stevenson <dave.stevenson@raspberrypi.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230305103503.42619-1-contact@emersion.fr
19 months agodrm/format-helper: Use drm_format_info_min_pitch() in tests helper
Javier Martinez Canillas [Thu, 16 Mar 2023 22:34:04 +0000 (23:34 +0100)]
drm/format-helper: Use drm_format_info_min_pitch() in tests helper

There's a nice macro to calculate the destination pitch that already takes
into account sub-byte pixel formats. Use that instead of open coding it.

Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230316223404.102806-1-javierm@redhat.com
19 months agodrm/arm/hdlcd: Use devm_platform_ioremap_resource()
Yang Li [Tue, 14 Mar 2023 08:02:30 +0000 (16:02 +0800)]
drm/arm/hdlcd: Use devm_platform_ioremap_resource()

According to commit 7945f929f1a7 ("drivers: provide
devm_platform_ioremap_resource()"), convert platform_get_resource(),
devm_ioremap_resource() to a single call to Use
devm_platform_ioremap_resource(), as this is exactly what this function
does.

Since 'struct platform_device *pdev = to_platform_device(drm->dev)',
'drm->dev' is equivalent to 'pdev->deva'.

Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230314080231.20212-1-yang.lee@linux.alibaba.com
19 months agodrm/arm/malidp: Use devm_platform_get_and_ioremap_resource()
Yang Li [Tue, 14 Mar 2023 08:02:31 +0000 (16:02 +0800)]
drm/arm/malidp: Use devm_platform_get_and_ioremap_resource()

According to commit 890cc39a8799 ("drivers: provide
devm_platform_get_and_ioremap_resource()"), convert
platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Since 'struct platform_device *pdev = to_platform_device(dev)',
'pdev->dev' is equivalent to 'dev'.

Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230314080231.20212-2-yang.lee@linux.alibaba.com
19 months agodrm/ttm/ttm_bo: Provide a missing 'bulk' description and correct misnaming of 'placement'
Lee Jones [Fri, 17 Mar 2023 08:16:46 +0000 (08:16 +0000)]
drm/ttm/ttm_bo: Provide a missing 'bulk' description and correct misnaming of 'placement'

'bulk' description taken from another in the same file.

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/ttm/ttm_bo.c:98: warning: Function parameter or member 'bulk' not described in 'ttm_bo_set_bulk_move'
 drivers/gpu/drm/ttm/ttm_bo.c:768: warning: Function parameter or member 'placement' not described in 'ttm_bo_mem_space'
 drivers/gpu/drm/ttm/ttm_bo.c:768: warning: Excess function parameter 'proposed_placement' description in 'ttm_bo_mem_space'

Signed-off-by: Lee Jones <lee@kernel.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230317081718.2650744-6-lee@kernel.org
19 months agodrm/format-helper: Make "destination_pitch" test usable for mono
Arthur Grillo [Sat, 11 Mar 2023 12:51:41 +0000 (09:51 -0300)]
drm/format-helper: Make "destination_pitch" test usable for mono

This test case uses an arbitrary pitch size, different of the default
one, to test if the conversions methods obey.

Change the "destination_pitch" colors to change the monochrome expected
result from being just zeros, as this makes the arbitrary pitch use
unusable.

Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230311125141.564801-3-arthurgrillo@riseup.net
19 months agodrm/format-helper: Add Kunit tests for drm_fb_xrgb8888_to_mono()
Arthur Grillo [Sat, 11 Mar 2023 12:51:40 +0000 (09:51 -0300)]
drm/format-helper: Add Kunit tests for drm_fb_xrgb8888_to_mono()

Extend the existing test cases to test the conversion from XRGB8888 to
monochromatic.

Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230311125141.564801-2-arthurgrillo@riseup.net
19 months agodrm/nouveau/nvfw/acr: set wpr_generic_header_dump storage-class-specifier to static
Tom Rix [Thu, 2 Mar 2023 12:48:19 +0000 (07:48 -0500)]
drm/nouveau/nvfw/acr: set wpr_generic_header_dump storage-class-specifier to static

gcc with W=1 reports
drivers/gpu/drm/nouveau/nvkm/nvfw/acr.c:49:1: error: no previous
  prototype for ‘wpr_generic_header_dump’ [-Werror=missing-prototypes]
   49 | wpr_generic_header_dump(struct nvkm_subdev *subdev,
      | ^~~~~~~~~~~~~~~~~~~~~~~

wpr_generic_header_dump is only used in acr.c, so it should be static

Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230302124819.686469-1-trix@redhat.com
19 months agodrm/nouveau/fifo: set nvkm_engn_cgrp_get storage-class-specifier to static
Tom Rix [Tue, 28 Feb 2023 22:15:33 +0000 (17:15 -0500)]
drm/nouveau/fifo: set nvkm_engn_cgrp_get storage-class-specifier to static

smatch reports
drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c:33:18:
  warning: symbol 'nvkm_engn_cgrp_get' was not declared. Should it be static?

nvkm_engn_cgrp_get is only used in runl.c, so it should be static

Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230228221533.3240520-1-trix@redhat.com
19 months agodrm/nouveau/fifo: set gf100_fifo_nonstall_block_dump storage-class-specifier to static
Tom Rix [Fri, 3 Mar 2023 13:27:31 +0000 (08:27 -0500)]
drm/nouveau/fifo: set gf100_fifo_nonstall_block_dump storage-class-specifier to static

gcc with W=1 reports
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c:451:1: error:
  no previous prototype for ‘gf100_fifo_nonstall_block’ [-Werror=missing-prototypes]
  451 | gf100_fifo_nonstall_block(struct nvkm_event *event, int type, int index)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~

gf100_fifo_nonstall_block is only used in gf100.c, so it should be static

Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230303132731.1919329-1-trix@redhat.com
19 months agodrm/vmwgfx: Fix src/dst_pitch confusion
Zack Rusin [Tue, 14 Mar 2023 21:14:45 +0000 (17:14 -0400)]
drm/vmwgfx: Fix src/dst_pitch confusion

The src/dst_pitch got mixed up during the rework of the function, make
sure the offset's refer to the correct one.

Spotted by clang:
Clang warns (or errors with CONFIG_WERROR):

  drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c:509:29: error: variable 'dst_pitch' is uninitialized when used here [-Werror,-Wuninitialized]
          src_offset = ddirty->top * dst_pitch + ddirty->left * stdu->cpp;
                                     ^~~~~~~~~
  drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c:492:26: note: initialize the variable 'dst_pitch' to silence this warning
          s32 src_pitch, dst_pitch;
                                  ^
                                   = 0
  1 error generated.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reported-by: Nathan Chancellor <nathan@kernel.org>
Reported-by: Dave Airlie <airlied@gmail.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/1811
Fixes: 39985eea5a6d ("drm/vmwgfx: Abstract placement selection")
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Martin Krastev <krastevm@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230314211445.1363828-1-zack@kde.org
19 months agodrm: Track clients by tgid and not tid
Tvrtko Ursulin [Tue, 14 Mar 2023 14:18:55 +0000 (14:18 +0000)]
drm: Track clients by tgid and not tid

Thread group id (aka pid from userspace point of view) is a more
interesting thing to show as an owner of a DRM fd, so track and show that
instead of the thread id.

In the next patch we will make the owner updated post file descriptor
handover, which will also be tgid based to avoid ping-pong when multiple
threads access the fd.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230314141904.1210824-2-tvrtko.ursulin@linux.intel.com
19 months agodrm/panel: seiko-43wvf1g: Add the 'enable-gpios' property
Fabio Estevam [Tue, 14 Mar 2023 11:17:24 +0000 (08:17 -0300)]
drm/panel: seiko-43wvf1g: Add the 'enable-gpios' property

Sometimes a GPIO is needed to turn on/off the display.

Add support for this usecase by introducing the optional 'enable-gpios'
property.

Tested on a imx53qsb board.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230314111724.1520178-2-festevam@denx.de
19 months agodt-bindings: display: seiko,43wvf1g: Add the 'enable-gpios' property
Fabio Estevam [Tue, 14 Mar 2023 11:17:23 +0000 (08:17 -0300)]
dt-bindings: display: seiko,43wvf1g: Add the 'enable-gpios' property

Add an optional 'enable-gpios' property that can be used to turn on/off
the display.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230314111724.1520178-1-festevam@denx.de
19 months agodrm/panel: support for STARRY 2081101QFH032011-53G MIPI-DSI panel
Ruihai Zhou [Tue, 14 Mar 2023 09:05:49 +0000 (17:05 +0800)]
drm/panel: support for STARRY 2081101QFH032011-53G MIPI-DSI panel

The STARRY 2081101QFH032011-53G is a 10.1" WUXGA TFT LCD panel,
which fits in nicely with the existing panel-boe-tv101wum-nl6
driver. Hence, we add a new compatible with panel specific config.

Signed-off-by: Ruihai Zhou <zhouruihai@huaqin.corp-partner.google.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/20230314090549.11418-1-zhouruihai@huaqin.corp-partner.google.com
19 months agodt-bindings: display: panel: Add compatible for Starry 2081101QFH032011-53G
Ruihai Zhou [Tue, 14 Mar 2023 08:50:34 +0000 (16:50 +0800)]
dt-bindings: display: panel: Add compatible for Starry 2081101QFH032011-53G

The STARRY 2081101QFH032011-53G is a 10.1" WUXGA TFT LCD panel,
which fits in nicely with the existing panel-boe-tv101wum-nl6
driver. Hence, we add a new compatible with panel specific config.

Signed-off-by: Ruihai Zhou <zhouruihai@huaqin.corp-partner.google.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/20230314085034.6380-1-zhouruihai@huaqin.corp-partner.google.com
19 months agoMAINTAINERS: Add include/drm/drm_bridge.h to DRM DRIVERS FOR BRIDGE CHIPS
Liu Ying [Mon, 13 Mar 2023 05:59:51 +0000 (13:59 +0800)]
MAINTAINERS: Add include/drm/drm_bridge.h to DRM DRIVERS FOR BRIDGE CHIPS

Appropriate maintainers should be suggested for changes to the
include/drm/drm_bridge.h header file, so add the header file to the
'DRM DRIVERS FOR BRIDGE CHIPS' section.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Acked-by: Robert Foss <robert.foss@linaro.org>
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313055951.2997299-1-victor.liu@nxp.com
19 months agodrm/pl111: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:38 +0000 (16:51 +0100)]
drm/pl111: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Reported-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/dri-devel/CACRpkdawSQsNqKJkSSoSw3HmMHyNXFUywxkdszpTC-a_uZA+tQ@mail.gmail.com/
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-26-tzimmermann@suse.de
19 months agodrm/mcde: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:37 +0000 (16:51 +0100)]
drm/mcde: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Reported-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/dri-devel/CACRpkdawSQsNqKJkSSoSw3HmMHyNXFUywxkdszpTC-a_uZA+tQ@mail.gmail.com/
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-25-tzimmermann@suse.de
19 months agodrm/mcde: Do not use dirty GEM FB handling
Linus Walleij [Mon, 13 Mar 2023 15:51:36 +0000 (16:51 +0100)]
drm/mcde: Do not use dirty GEM FB handling

This driver has no way to handle damage, the reason the
drm_gem_fb_create_with_dirty() was used was because I had the
ambition that the driver would only send out updates to DSI
command displays whenever something changed, so as to
minimize traffic.

It turns out this ambition with command mode isn't working
in practice because all the MCDE does is to create a
continuous stream of DSI commands and while it is possible to
send single frame updates with it, it's not been worthwhile.
So we are just setting up continuous updates.

Reported-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/dri-devel/0e789778-03ca-e3cb-9c94-e8b55573894c@suse.de/
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-24-tzimmermann@suse.de
19 months agodrm/xlnx: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:35 +0000 (16:51 +0100)]
drm/xlnx: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-23-tzimmermann@suse.de
19 months agodrm/vc4: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:34 +0000 (16:51 +0100)]
drm/vc4: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-22-tzimmermann@suse.de
19 months agodrm/tve200: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:33 +0000 (16:51 +0100)]
drm/tve200: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-21-tzimmermann@suse.de
19 months agodrm/arcpgu: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:32 +0000 (16:51 +0100)]
drm/arcpgu: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-20-tzimmermann@suse.de
19 months agodrm/tilcdc: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:31 +0000 (16:51 +0100)]
drm/tilcdc: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-19-tzimmermann@suse.de
19 months agodrm/tidss: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:30 +0000 (16:51 +0100)]
drm/tidss: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-18-tzimmermann@suse.de
19 months agodrm/sun4i: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:29 +0000 (16:51 +0100)]
drm/sun4i: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-17-tzimmermann@suse.de
19 months agodrm/stm: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:28 +0000 (16:51 +0100)]
drm/stm: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-16-tzimmermann@suse.de
19 months agodrm/sti: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:27 +0000 (16:51 +0100)]
drm/sti: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-15-tzimmermann@suse.de
19 months agodrm/mxsfb: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:26 +0000 (16:51 +0100)]
drm/mxsfb: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-14-tzimmermann@suse.de
19 months agodrm/mxsfb/lcdif: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:25 +0000 (16:51 +0100)]
drm/mxsfb/lcdif: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-13-tzimmermann@suse.de
19 months agodrm/meson: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:24 +0000 (16:51 +0100)]
drm/meson: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-12-tzimmermann@suse.de
19 months agodrm/logicvc: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:23 +0000 (16:51 +0100)]
drm/logicvc: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-11-tzimmermann@suse.de
19 months agodrm/kmb: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:22 +0000 (16:51 +0100)]
drm/kmb: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-10-tzimmermann@suse.de
19 months agodrm/imx: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:21 +0000 (16:51 +0100)]
drm/imx: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-9-tzimmermann@suse.de
19 months agodrm/imx/dcss: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:20 +0000 (16:51 +0100)]
drm/imx/dcss: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-8-tzimmermann@suse.de
19 months agodrm/fsl-dcu: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:19 +0000 (16:51 +0100)]
drm/fsl-dcu: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-7-tzimmermann@suse.de
19 months agodrm/atmel-hlcdc: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:18 +0000 (16:51 +0100)]
drm/atmel-hlcdc: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-6-tzimmermann@suse.de
19 months agodrm/aspeed: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:17 +0000 (16:51 +0100)]
drm/aspeed: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-5-tzimmermann@suse.de
19 months agoarm/malidp: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:16 +0000 (16:51 +0100)]
arm/malidp: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-4-tzimmermann@suse.de
19 months agoarm/hdlcd: Use GEM DMA fbdev emulation
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:15 +0000 (16:51 +0100)]
arm/hdlcd: Use GEM DMA fbdev emulation

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-3-tzimmermann@suse.de
19 months agodrm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers
Thomas Zimmermann [Mon, 13 Mar 2023 15:51:14 +0000 (16:51 +0100)]
drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers

Implement fbdev emulation that is optimized for drivers that use
DMA helpers. The buffers may no tbe moveable, may not require damage
handling and have to be located in system memory. This allows fbdev
emulation to operate directly on the buffer and mmap it to userspace.

Besides those constraints, the emulation works like in the generic
code. As an internal DRM client provides, it receives hotplug, restore
and unregister events. The DRM client is independent from the fbdev
probing, which runs on the first successful hotplug event.

The emulation is part of the DMA helper module and not build unless
DMA helpers and fbdev emulation has been configured.

Tested with vc4.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-2-tzimmermann@suse.de
19 months agodrm: Drop ARCH_MULTIPLATFORM from dependencies
Uwe Kleine-König [Fri, 9 Dec 2022 22:05:54 +0000 (23:05 +0100)]
drm: Drop ARCH_MULTIPLATFORM from dependencies

Some of these dependencies used to be sensible when only a small part of
the platforms supported by ARCH=arm could be compiled together in a
single kernel image. Nowadays ARCH_MULTIPLATFORM is only used as a guard
for kernel options incompatible with a multiplatform image. See commit
84fc86360623 ("ARM: make ARCH_MULTIPLATFORM user-visible") for some more
details.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221209220555.3631364-1-u.kleine-koenig@pengutronix.de
19 months agodrm/imx/lcdc: Implement DRM driver for imx25
Marian Cichy [Mon, 6 Mar 2023 11:52:49 +0000 (12:52 +0100)]
drm/imx/lcdc: Implement DRM driver for imx25

Add support for the LCD Controller found on i.MX21 and i.MX25.

It targets to be a drop in replacement for the imx-fb driver.

[ukl: Rebase to a newer kernel version, various smaller fixes and
improvements]

Signed-off-by: Marian Cichy <m.cichy@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230306115249.2223042-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230306115249.2223042-3-u.kleine-koenig@pengutronix.de
19 months agodt-bindings: display: imx: Describe drm binding for fsl,imx-lcdc
Uwe Kleine-König [Mon, 6 Mar 2023 11:52:48 +0000 (12:52 +0100)]
dt-bindings: display: imx: Describe drm binding for fsl,imx-lcdc

Modify the existing (fb-like) binding to support the drm-like binding in
parallel.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230306115249.2223042-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230306115249.2223042-2-u.kleine-koenig@pengutronix.de
19 months agodrm/virtio: Enable fb damage clips property for the primary plane
Javier Martinez Canillas [Fri, 10 Mar 2023 12:59:42 +0000 (13:59 +0100)]
drm/virtio: Enable fb damage clips property for the primary plane

Christian Hergert reports that the driver doesn't enable the property and
that leads to always doing a full plane update, even when the driver does
support damage clipping for the primary plane.

Don't enable it for the cursor plane, because its .atomic_update callback
doesn't handle damage clips.

Reported-by: Christian Hergert <chergert@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230310125943.912514-1-javierm@redhat.com
19 months agodrm/panel: Add driver for Novatek NT36523
Jianhua Lu [Mon, 13 Mar 2023 10:18:58 +0000 (18:18 +0800)]
drm/panel: Add driver for Novatek NT36523

Add a driver for panels using the Novatek NT36523 display driver IC.

Signed-off-by: Jianhua Lu <lujianhua000@gmail.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/20230313101858.14611-2-lujianhua000@gmail.com
19 months agodt-bindings: display: panel: Add Novatek NT36523 bindings
Jianhua Lu [Mon, 13 Mar 2023 10:18:57 +0000 (18:18 +0800)]
dt-bindings: display: panel: Add Novatek NT36523 bindings

Novatek NT36523 is a display driver IC used to drive DSI panels.

Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230313101858.14611-1-lujianhua000@gmail.com