platform/kernel/linux-rpi.git
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 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
16 months agoaccel: Build sub-directories based on config options
Stanislaw Gruszka [Wed, 1 Mar 2023 16:25:08 +0000 (17:25 +0100)]
accel: Build sub-directories based on config options

When accel drivers are disabled do not process into
sub-directories and create built-in archives:

  AR      drivers/accel/habanalabs/built-in.a
  AR      drivers/accel/ivpu/built-in.a

Fixes: 35b137630f08 ("accel/ivpu: Introduce a new DRM driver for Intel VPU")
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230301162508.3963484-1-stanislaw.gruszka@linux.intel.com
16 months agodrm/cirrus: Use VGA macro constants to unblank
Thomas Zimmermann [Wed, 15 Feb 2023 16:15:17 +0000 (17:15 +0100)]
drm/cirrus: Use VGA macro constants to unblank

Set the VGA bit for unblanking with macro constants instead of magic
values. No functional changes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-18-tzimmermann@suse.de
16 months agodrm/cirrus: Store HW format/pitch in primary-plane state
Thomas Zimmermann [Wed, 15 Feb 2023 16:15:16 +0000 (17:15 +0100)]
drm/cirrus: Store HW format/pitch in primary-plane state

The hardware settings for color format and pitch are state of the
primary plane. Store the values in the primary plane's state structure
struct cirrus_primary_plane_state. Adapt all callers.

All fields in struct cirrus_device are now considered immutable after
initialization. Plane updates consider the difference between the old
and the new plane state before updating format or pitch.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-17-tzimmermann@suse.de
16 months agodrm/cirrus: Introduce struct cirrus_primary_plane_state
Thomas Zimmermann [Wed, 15 Feb 2023 16:15:15 +0000 (17:15 +0100)]
drm/cirrus: Introduce struct cirrus_primary_plane_state

The cirrus driver maintains plane state, format and pitch, in it's
device structure. Introduce a plane state for the primary plane to
store the values.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-16-tzimmermann@suse.de
16 months agodrm/cirrus: Inline cirrus_check_size() into primary-plane atomic_check
Thomas Zimmermann [Wed, 15 Feb 2023 16:15:14 +0000 (17:15 +0100)]
drm/cirrus: Inline cirrus_check_size() into primary-plane atomic_check

Inline the framebuffer size check into the primary plane's atomic_check
cirrus_primary_plane_atomic_check(). No functional changes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-15-tzimmermann@suse.de
16 months agodrm/cirrus: Test mode against video-memory size in device-wide mode_valid
Thomas Zimmermann [Wed, 15 Feb 2023 16:15:13 +0000 (17:15 +0100)]
drm/cirrus: Test mode against video-memory size in device-wide mode_valid

Test a display mode against the available amount of video memory in
struct drm_mode_config_funcs.mode_valid, which cirrus implements in
cirrus_mode_config_mode_valid(). This helper tests display modes against
device-wide limits. Remove the now-obsolete per-CRTC test.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-14-tzimmermann@suse.de
16 months agodrm/cirrus: Remove size test from cirrus_fb_create()
Thomas Zimmermann [Wed, 15 Feb 2023 16:15:12 +0000 (17:15 +0100)]
drm/cirrus: Remove size test from cirrus_fb_create()

The DRM core implements a size check against the mode config's
limits when creating a framebuffer. [1] Remove the unnecessary
test from cirrus_fb_create() and remove the now-empty function.
Create framebuffers with drm_gem_fb_create_with_dirty().

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://elixir.bootlin.com/linux/v6.1/source/drivers/gpu/drm/drm_framebuffer.c#L287
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-13-tzimmermann@suse.de
16 months agodrm/cirrus: Remove format test from cirrus_fb_create()
Thomas Zimmermann [Wed, 15 Feb 2023 16:15:11 +0000 (17:15 +0100)]
drm/cirrus: Remove format test from cirrus_fb_create()

The DRM core implements a format check when setting a framebuffer
for a plane. [1] Remove the unnecessary test from cirrus_fb_create().

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://elixir.bootlin.com/linux/v6.1/source/drivers/gpu/drm/drm_atomic.c#L629
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-12-tzimmermann@suse.de
16 months agodrm/cirrus: Inline cirrus_fb_blit_rect()
Thomas Zimmermann [Wed, 15 Feb 2023 16:15:10 +0000 (17:15 +0100)]
drm/cirrus: Inline cirrus_fb_blit_rect()

Inline cirrus_fb_blit_rect into its only caller. While at it, update
the code to use IOSYS_MAP_INIT_OFFSET(), which is the ideomatic way
of initializing struct iosys_map with an offset.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-11-tzimmermann@suse.de
16 months agodrm/cirrus: Enable damage clipping on primary plane
Thomas Zimmermann [Wed, 15 Feb 2023 16:15:09 +0000 (17:15 +0100)]
drm/cirrus: Enable damage clipping on primary plane

Enable damage clipping on the primary plane and iterate over small
areas of reported framebuffer damage. Avoid the overhead of permanent
full-screen updates that cirrus currently implements.

This problem is indicated by the warning

  drm_plane_enable_fb_damage_clips() not called

in the kernel's log. Without damage clipping, drivers do full updates
of the screen area. This is costly as many screen updates, such as
cursor movement or command-line input, only change a small portion
of the output. Damage clipping allows renderers to inform drivers about
the changed areas.

With the damage information known, cirrus now iterates over a list of
change areas and only flushes those to the hardware's scanout buffer.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-10-tzimmermann@suse.de
16 months agodrm/cirrus: Convert to regular atomic helpers
Thomas Zimmermann [Wed, 15 Feb 2023 16:15:08 +0000 (17:15 +0100)]
drm/cirrus: Convert to regular atomic helpers

Replace simple-KMS helpers with DRM's regular helpers for atomic
modesetting. Avoids the mid-layer and the additional wrappers around
GEM's shadow-plane helpers.

Most of the simple-KMS code is just wrappers around regular atomic
helpers. The conversion is therefore equivalent to pulling the
simple-KMS helpers into cirrus and removing all the intermediate
code and data structures between the driver and the atomic helpers.
As the simple-KMS helpers lump primary plan, CRTC and encoder into a
single data structure, the conversion to regular helpers allows to
split modesetting from plane updates and handle each individually.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-9-tzimmermann@suse.de
16 months agodrm/cirrus: Move primary-plane format arrays
Thomas Zimmermann [Wed, 15 Feb 2023 16:15:07 +0000 (17:15 +0100)]
drm/cirrus: Move primary-plane format arrays

Move the primary plane's format and modifier arrays within the
source file and adapt naming slightly. No functional changes.

Done in preparation of converting cirrus to regular atomic helpers.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-8-tzimmermann@suse.de
16 months agodrm/cirrus: Integrate connector into pipeline code
Thomas Zimmermann [Wed, 15 Feb 2023 16:15:06 +0000 (17:15 +0100)]
drm/cirrus: Integrate connector into pipeline code

Integrate the connector with the rest of the pipeline setup code.
Move some helpers within the file and adapt naming slightly. No
functional changes.

Done in preparation of converting cirrus to regular atomic helpers.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-7-tzimmermann@suse.de
16 months agodrm/cirrus: Split cirrus_mode_set() into smaller functions
Thomas Zimmermann [Wed, 15 Feb 2023 16:15:05 +0000 (17:15 +0100)]
drm/cirrus: Split cirrus_mode_set() into smaller functions

Split cirrus_mode_set() into smaller functions that set the display
mode, color format and scnaline pitch individually. Better reflects
the design of the DRM modesetting pipeline.

Done in preparation of converting cirrus to regular atomic helpers.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-6-tzimmermann@suse.de
16 months agodrm/cirrus: Move drm_dev_{enter, exit}() into DRM helpers
Thomas Zimmermann [Wed, 15 Feb 2023 16:15:04 +0000 (17:15 +0100)]
drm/cirrus: Move drm_dev_{enter, exit}() into DRM helpers

Call drm_dev_enter() and drm_dev_exit() immediately after entering
cirrus' DRM helper functions. Remove these calls from other functions.
Each enter/exit block in the DRM helpers covers the full hardware
update. No functional changes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-5-tzimmermann@suse.de
16 months agodrm/cirrus: Use drm_fb_blit() to update scanout buffer
Thomas Zimmermann [Wed, 15 Feb 2023 16:15:03 +0000 (17:15 +0100)]
drm/cirrus: Use drm_fb_blit() to update scanout buffer

Cirrus' blit helper reimplements code from the shared blit helper
drm_fb_blit(). Use the helper instead.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-4-tzimmermann@suse.de
16 months agodrm/cirrus: Replace cpp value with format
Thomas Zimmermann [Wed, 15 Feb 2023 16:15:02 +0000 (17:15 +0100)]
drm/cirrus: Replace cpp value with format

Using components per pixel to describe a color format is obsolete.
Use the format info and 4CC value instead.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-3-tzimmermann@suse.de
16 months agodrm/cirrus: Compute blit destination offset in single location
Thomas Zimmermann [Wed, 15 Feb 2023 16:15:01 +0000 (17:15 +0100)]
drm/cirrus: Compute blit destination offset in single location

The calculation for the scanout-buffer blit offset is independent
from the color format. In the one case where the current code uses
fb->pitches[0] instead of cirrus->pitch, their values are identical.
Hence merge all into a single line.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-2-tzimmermann@suse.de
16 months agoMerge drm/drm-next into drm-misc-next
Thomas Zimmermann [Mon, 13 Mar 2023 08:27:50 +0000 (09:27 +0100)]
Merge drm/drm-next into drm-misc-next

Backmerging to get v6.3-rc1 and sync with the other DRM trees.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
17 months agodrm/format-helper: Make conversion_buf_size() support sub-byte pixel fmts
Javier Martinez Canillas [Tue, 7 Mar 2023 21:50:39 +0000 (22:50 +0100)]
drm/format-helper: Make conversion_buf_size() support sub-byte pixel fmts

There are DRM fourcc formats that have pixels smaller than a byte, but the
conversion_buf_size() function assumes that pixels are a multiple of bytes
and use the struct drm_format_info .cpp field to calculate the dst_pitch.

Instead, calculate it by using the bits per pixel (bpp) and divide it by 8
to account for formats that have sub-byte pixels.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Arthur Grillo <arthurgrillo@riseup.net>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230307215039.346863-1-javierm@redhat.com
17 months agodrm/tests: helpers: Drop empty platform remove function
Uwe Kleine-König [Fri, 24 Feb 2023 22:14:17 +0000 (23:14 +0100)]
drm/tests: helpers: Drop empty platform remove function

A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Signed-off-by: Maíra Canal <mairacanal@riseup.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20230224221417.1712368-1-u.kleine-koenig@pengutronix.de
17 months agodrm/ttm: Don't print error message if eviction was interrupted
Thomas Hellström [Tue, 7 Mar 2023 14:46:19 +0000 (15:46 +0100)]
drm/ttm: Don't print error message if eviction was interrupted

Avoid printing an error message if eviction was interrupted by,
for example, the user pressing CTRL-C. That may happen if eviction
is waiting for something, like for example a free batch-buffer.

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230307144621.10748-6-thomas.hellstrom@linux.intel.com
17 months agodrm/ttm: Unexport ttm_global_swapout()
Thomas Hellström [Tue, 7 Mar 2023 14:46:18 +0000 (15:46 +0100)]
drm/ttm: Unexport ttm_global_swapout()

Unexport ttm_global_swapout() since it is not used outside of TTM.

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230307144621.10748-5-thomas.hellstrom@linux.intel.com
17 months agodrm/ttm: Use the BIT macro for the TTM_TT_FLAGs
Thomas Hellström [Tue, 7 Mar 2023 14:46:17 +0000 (15:46 +0100)]
drm/ttm: Use the BIT macro for the TTM_TT_FLAGs

New code is recommended to use the BIT macro instead of the explicit
shifts. Change the older defines so that we can keep the style consistent
with upcoming changes.

v2:
- Also change the value of the _PRIV_POPULATED bit (Christian König)

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230307144621.10748-4-thomas.hellstrom@linux.intel.com
17 months agodrm/rockchip: vop2: add polarity flags to RGB output
Gerald Loacker [Thu, 2 Mar 2023 12:39:49 +0000 (13:39 +0100)]
drm/rockchip: vop2: add polarity flags to RGB output

Use h/v-sync and pixel clock polarity flags for RGB output. For all other
outputs this is already implemented.

Signed-off-by: Gerald Loacker <gerald.loacker@wolfvision.net>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230302123949.957998-1-gerald.loacker@wolfvision.net
17 months agodrm/rockchip: vop2: use struct_size() in vop2_bind
Jacob Keller [Thu, 23 Feb 2023 01:35:33 +0000 (17:35 -0800)]
drm/rockchip: vop2: use struct_size() in vop2_bind

Use the overflow-protected struct_size() helper macro to compute the
allocation size of the vop2 data structure.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Cc: Sandy Huang <hjc@rock-chips.com>
Cc: Heiko Stübner <heiko@sntech.de>
Cc: David Airlie <airlied@gmail.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230223013533.1707706-1-jacob.e.keller@intel.com
17 months agodrm/rockchip: dw_hdmi: discard modes with unachievable pixelclocks
Sascha Hauer [Thu, 16 Feb 2023 10:24:47 +0000 (11:24 +0100)]
drm/rockchip: dw_hdmi: discard modes with unachievable pixelclocks

The Rockchip PLL drivers are currently table based and support only
the most common pixelclocks. Discard all modes we cannot achieve
at all. Normally the desired pixelclocks have an exact match in the
PLL driver, nevertheless allow for a 0.1% error just in case.

Tested-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Tested-by: Michael Riesch <michael.riesch@wolfvision.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20230118132213.2911418-4-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230216102447.582905-5-s.hauer@pengutronix.de
17 months agodrm/rockchip: dw_hdmi: Add support for 4k@30 resolution
Sascha Hauer [Thu, 16 Feb 2023 10:24:46 +0000 (11:24 +0100)]
drm/rockchip: dw_hdmi: Add support for 4k@30 resolution

This adds the PLL/phy settings to support higher resolutions like 4k@30.
The values were taken from the Rockchip downstream Kernel.

Tested-by: Michael Riesch <michael.riesch@wolfvision.net>
Link: https://lore.kernel.org/r/20220926080435.259617-3-s.hauer@pengutronix.de
Tested-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20230118132213.2911418-3-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230216102447.582905-4-s.hauer@pengutronix.de
17 months agodrm/rockchip: dw_hdmi: relax mode_valid hook
Sascha Hauer [Thu, 16 Feb 2023 10:24:45 +0000 (11:24 +0100)]
drm/rockchip: dw_hdmi: relax mode_valid hook

The driver checks if the pixel clock of the given mode matches an entry
in the mpll config table. At least for the Synopsys phy the frequencies
in the mpll table are meant as a frequency range up to which the entry
works, not as a frequency that must match the pixel clock. Return
MODE_OK when the pixelclock is smaller than one of the mpll frequencies
to allow for more display resolutions.
Limit this behaviour to the Synopsys phy at the moment and keep the
current behaviour of forcing exact pixelclock rates for the other phys
until it has been sorted out how and if the vendor specific phys work
with non standard clock rates.

Tested-by: Michael Riesch <michael.riesch@wolfvision.net>
Link: https://lore.kernel.org/r/20220926080435.259617-2-s.hauer@pengutronix.de
Tested-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20230118132213.2911418-2-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230216102447.582905-3-s.hauer@pengutronix.de
17 months agodrm/rockchip: vop: limit maximum resolution to hardware capabilities
Sascha Hauer [Thu, 16 Feb 2023 10:24:44 +0000 (11:24 +0100)]
drm/rockchip: vop: limit maximum resolution to hardware capabilities

The different VOP variants support different maximum resolutions. Reject
resolutions that are not supported by a specific variant.

This hasn't been a problem in the upstream driver so far as 1920x1080
has been the maximum resolution supported by the HDMI driver and that
resolution is supported by all VOP variants. Now with higher resolutions
supported in the HDMI driver we have to limit the resolutions to the
ones supported by the VOP.

The actual maximum resolutions are taken from the Rockchip downstream
Kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
[dropped the vdisplay > height check after talking to Sascha, as according to
 the vendor code "Actually vop hardware has no output height limit"
 (from vendor commit "drm/rockchip: vop: get rid of max_output.height check")
 and the height-check broke the px30-minievb display]

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230216102447.582905-2-s.hauer@pengutronix.de
17 months agogpu/drm/panel: Add Sony TD4353 JDI panel driver
Konrad Dybcio [Thu, 19 Jan 2023 16:32:00 +0000 (17:32 +0100)]
gpu/drm/panel: Add Sony TD4353 JDI panel driver

Add support for the Sony TD4353 JDI 2160x1080 display panel used in
some Sony Xperia XZ2 and XZ2 Compact smartphones. Due to the specifics
of smartphone manufacturing, it is impossible to retrieve a better name
for this panel.

This revision adds support for the default 60 Hz configuration, however
there could possibly be some room for expansion, as the display panels
used on Sony devices have historically been capable of >2x refresh rate
overclocking.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230119163201.580858-2-konrad.dybcio@linaro.org
17 months agodt-bindings: display/panel: Add Sony Tama TD4353 JDI display panel
Konrad Dybcio [Thu, 19 Jan 2023 16:31:59 +0000 (17:31 +0100)]
dt-bindings: display/panel: Add Sony Tama TD4353 JDI display panel

Add bindings for the display panel used on some Sony Xperia XZ2 and XZ2
Compact smartphones.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230119163201.580858-1-konrad.dybcio@linaro.org
17 months agodrm: panel: Add orientation support for st7701
Maya Matuszczyk [Mon, 13 Feb 2023 15:38:15 +0000 (16:38 +0100)]
drm: panel: Add orientation support for st7701

Note that this patch is 'heavily inspired' by orientation support in driver
for Elida KD35T133 panel

Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230213153816.213526-4-maccraft123mc@gmail.com
17 months agodrm: panel: Add Elida KD50T048A to Sitronix ST7701 driver
Maya Matuszczyk [Mon, 13 Feb 2023 15:38:14 +0000 (16:38 +0100)]
drm: panel: Add Elida KD50T048A to Sitronix ST7701 driver

Add KD50T048A MIPI-DSI panel, which is based on ST7701 chip.
Not sure what else to add to this commit message.

Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230213153816.213526-3-maccraft123mc@gmail.com
17 months agodt-bindings: display: panel: sitronix,st7701: Add Elida KD50T048A Panel
Maya Matuszczyk [Mon, 13 Feb 2023 15:38:13 +0000 (16:38 +0100)]
dt-bindings: display: panel: sitronix,st7701: Add Elida KD50T048A Panel

Add compatible for 854x480 Elida KD50T048A panel, found in Odroid Go Super
and Odroid Go Ultra

Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230213153816.213526-2-maccraft123mc@gmail.com
17 months agodrm/rockchip: dsi: Remove the unused function dsi_read()
Jiapeng Chong [Wed, 8 Feb 2023 02:34:29 +0000 (10:34 +0800)]
drm/rockchip: dsi: Remove the unused function dsi_read()

The function dsi_read is defined in the dw-mipi-dsi-rockchip.c file, but
not called elsewhere, so remove this unused function.

drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c:362:19: warning: unused function 'dsi_read'.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3984
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230208023429.73696-1-jiapeng.chong@linux.alibaba.com
17 months agodrm/nouveau/hwmon: Use sysfs_emit in show function callsbacks
Deepak R Varma [Wed, 1 Mar 2023 19:35:41 +0000 (01:05 +0530)]
drm/nouveau/hwmon: Use sysfs_emit in show function callsbacks

According to Documentation/filesystems/sysfs.rst, the show() callback
function of kobject attributes should strictly use sysfs_emit() instead
of sprintf() family functions. So, make this change.
Issue identified using the coccinelle device_attr_show.cocci script.

Signed-off-by: Deepak R Varma <drv@mailo.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/Y/+pDaHOgG1x8Py2@ubun2204.myguest.virtualbox.org
17 months agodrm/virtio: Fix handling CONFIG_DRM_VIRTIO_GPU_KMS option
Dmitry Osipenko [Mon, 6 Mar 2023 16:39:16 +0000 (19:39 +0300)]
drm/virtio: Fix handling CONFIG_DRM_VIRTIO_GPU_KMS option

VirtIO-GPU got a new config option for disabling KMS. There were two
problems left unnoticed during review when the new option was added:

1. The IS_ENABLED(CONFIG_DRM_VIRTIO_GPU_KMS) check in the code was
inverted, hence KMS was disabled when it should be enabled and vice versa.

2. The disabled KMS crashed kernel with a NULL dereference in
drm_kms_helper_hotplug_event(), which shall not be invoked with a
disabled KMS.

Fix the inverted config option check in the code and skip handling the
VIRTIO_GPU_EVENT_DISPLAY sent by host when KMS is disabled in guest to fix
the crash.

Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Fixes: 72122c69d717 ("drm/virtio: Add option to disable KMS support")
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230306163916.1595961-1-dmitry.osipenko@collabora.com
17 months agodrm/meson/meson_venc: Relax the supported mode checks
Carlo Caione [Mon, 13 Feb 2023 09:32:09 +0000 (10:32 +0100)]
drm/meson/meson_venc: Relax the supported mode checks

Relax a bit the supported modes list by including also 480x1920 and
400x1280. This was actually tested on real hardware and it works
correctly.

Signed-off-by: Carlo Caione <ccaione@baylibre.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/20230210-relax_dmt_limits-v2-1-318913f08121@baylibre.com