Thomas Zimmermann
6a09ecfe28
drm/tiny/mi0283qt: Use fbdev-dma
...
Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports
damage handling, which is required by mi0283qt. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: "Noralf Trønnes" <noralf@tronnes.org >
Acked-by: Noralf Trønnes <noralf@tronnes.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-38-tzimmermann@suse.de
2024-05-02 11:33:30 +02:00
Thomas Zimmermann
4f229b50b2
drm/tiny/ili9486: Use fbdev-dma
...
Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports
damage handling, which is required by ili9486. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-37-tzimmermann@suse.de
2024-05-02 11:33:29 +02:00
Thomas Zimmermann
18c6e51f16
drm/tiny/ili9341: Use fbdev-dma
...
Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports
damage handling, which is required by ili9341. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Kamlesh Gurudasani <kamlesh.gurudasani@gmail.com >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-36-tzimmermann@suse.de
2024-05-02 11:33:29 +02:00
Thomas Zimmermann
5ab91447aa
drm/tiny/ili9225: Use fbdev-dma
...
Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports
damage handling, which is required by ili9225. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: David Lechner <david@lechnology.com >
Acked-by: David Lechner <david@lechnology.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-35-tzimmermann@suse.de
2024-05-02 11:33:28 +02:00
Thomas Zimmermann
6447acb8b3
drm/tiny/ili9163: Use fbdev-dma
...
Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports
damage handling, which is required by ili9163. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-34-tzimmermann@suse.de
2024-05-02 11:33:28 +02:00
Thomas Zimmermann
a9a0f08df5
drm/tiny/hx8357d: Use fbdev-dma
...
Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports
damage handling, which is required by hx8357d. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-33-tzimmermann@suse.de
2024-05-02 11:33:27 +02:00
Thomas Zimmermann
b4c3fe533c
drm/rockchip: Use fbdev-dma
...
Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports
damage handling, which is required by rockchip. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Sandy Huang <hjc@rock-chips.com >
Cc: "Heiko Stübner" <heiko@sntech.de >
Cc: Andy Yan <andy.yan@rock-chips.com >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Acked-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-32-tzimmermann@suse.de
2024-05-02 11:33:27 +02:00
Thomas Zimmermann
90d0799af3
drm/renesas/shmobile: Use fbdev-dma
...
Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports
damage handling, which is required by shmobile. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: Geert Uytterhoeven <geert+renesas@glider.be >
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-31-tzimmermann@suse.de
2024-05-02 11:33:26 +02:00
Thomas Zimmermann
ff5cea0f03
drm/renesas/rz-du: Use fbdev-dma
...
Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports
damage handling, which is required by rz-du. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Biju Das <biju.das.jz@bp.renesas.com >
Tested-by: Biju Das <biju.das.jz@bp.renesas.com >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-30-tzimmermann@suse.de
2024-05-02 11:33:26 +02:00
Thomas Zimmermann
b3fdbd60d3
drm/renesas/rcar-du: Use fbdev-dma
...
Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports
damage handling, which is required by rcar-du. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-29-tzimmermann@suse.de
2024-05-02 11:33:25 +02:00
Thomas Zimmermann
70c82ee1ac
drm/panel/panel-ilitek-9341: Use fbdev-dma
...
Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports
damage handling, which is required by panel-ilitek-9341. Avoids
the overhead of fbdev-generic's additional shadow buffering. No
functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Neil Armstrong <neil.armstrong@linaro.org >
Cc: Jessica Zhang <quic_jesszhan@quicinc.com >
Cc: Sam Ravnborg <sam@ravnborg.org >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-28-tzimmermann@suse.de
2024-05-02 11:33:25 +02:00
Thomas Zimmermann
0992284b4f
drm/mediatek: Use fbdev-dma
...
Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports
damage handling, which is required by ingenic. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Chun-Kuang Hu <chunkuang.hu@kernel.org >
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-27-tzimmermann@suse.de
2024-05-02 11:33:24 +02:00
Thomas Zimmermann
c1eef5ae06
drm/ingenic: Use fbdev-dma
...
Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports
damage handling, which is required by ingenic. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Paul Cercueil <paul@crapouillou.net >
Acked-by: Paul Cercueil <paul@crapouillou.net >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-26-tzimmermann@suse.de
2024-05-02 11:33:24 +02:00
Thomas Zimmermann
931af44404
drm/imx/lcdc: Use fbdev-dma
...
Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports
damage handling, which is required by lcdc. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Shawn Guo <shawnguo@kernel.org >
Cc: Sascha Hauer <s.hauer@pengutronix.de >
Cc: Pengutronix Kernel Team <kernel@pengutronix.de >
Cc: Fabio Estevam <festevam@gmail.com >
Cc: NXP Linux Team <linux-imx@nxp.com >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-25-tzimmermann@suse.de
2024-05-02 11:33:23 +02:00
Thomas Zimmermann
f379625079
drm/hisilicon/kirin: Use fbdev-dma
...
Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports
damage handling, which is required by kirin. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Xinliang Liu <xinliang.liu@linaro.org >
Cc: Tian Tao <tiantao6@hisilicon.com >
Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com >
Cc: Sumit Semwal <sumit.semwal@linaro.org >
Cc: Yongqin Liu <yongqin.liu@linaro.org >
Cc: John Stultz <jstultz@google.com >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-24-tzimmermann@suse.de
2024-05-02 11:33:23 +02:00
Thomas Zimmermann
386030e519
drm/arm/komeda: Use fbdev-dma
...
Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports
damage handling, which is required by komeda. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Liviu Dudau <liviu.dudau@arm.com >
Acked-by: Liviu Dudau <liviu.dudau@arm.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-23-tzimmermann@suse.de
2024-05-02 11:33:23 +02:00
Thomas Zimmermann
808a40b694
drm/fbdev-dma: Implement damage handling and deferred I/O
...
Add support for damage handling and deferred I/O to fbdev-dma. This
enables fbdev-dma to support all DMA-memory-based DRM drivers, even
such with a dirty callback in their framebuffers.
The patch adds the code for deferred I/O and also sets a dedicated
helper for struct fb_ops.fb_mmap that support coherent mappings.
v3:
- init fb_ops with FB_GEN_DEFAULT_DEFERRED_DMAMEM_OPS() (Javier)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-22-tzimmermann@suse.de
2024-05-02 11:33:22 +02:00
Thomas Zimmermann
d2b42634fd
drm/vkms: Use fbdev-shmem
...
Implement fbdev emulation with fbdev-shmem. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Cc: Melissa Wen <melissa.srw@gmail.com >
Cc: "Maíra Canal" <mairacanal@riseup.net >
Cc: Haneen Mohammed <hamohammed.sa@gmail.com >
Cc: Daniel Vetter <daniel@ffwll.ch >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Acked-by: Maíra Canal <mcanal@igalia.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-21-tzimmermann@suse.de
2024-05-02 11:33:22 +02:00
Thomas Zimmermann
8b1bb818b2
drm/virtio: Use fbdev-shmem
...
Implement fbdev emulation with fbdev-shmem. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: David Airlie <airlied@redhat.com >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Cc: Gurchetan Singh <gurchetansingh@chromium.org >
Cc: Chia-I Wu <olvaffe@gmail.com >
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-20-tzimmermann@suse.de
2024-05-02 11:33:21 +02:00
Thomas Zimmermann
0f8c731477
drm/udl: Use fbdev-shmem
...
Implement fbdev emulation with fbdev-shmem. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Dave Airlie <airlied@redhat.com >
Cc: Sean Paul <sean@poorly.run >
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-19-tzimmermann@suse.de
2024-05-02 11:33:21 +02:00
Thomas Zimmermann
5134fa750e
drm/tiny/simpledrm: Use fbdev-shmem
...
Implement fbdev emulation with fbdev-shmem. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Javier Martinez Canillas <javierm@redhat.com >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-18-tzimmermann@suse.de
2024-05-02 11:33:20 +02:00
Thomas Zimmermann
049f75bd0b
drm/tiny/ofdrm: Use fbdev-shmem
...
Implement fbdev emulation with fbdev-shmem. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Javier Martinez Canillas <javierm@redhat.com >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-17-tzimmermann@suse.de
2024-05-02 11:33:20 +02:00
Thomas Zimmermann
5bd79b70a2
drm/tiny/gm12u320: Use fbdev-shmem
...
Implement fbdev emulation with fbdev-shmem. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-16-tzimmermann@suse.de
2024-05-02 11:33:19 +02:00
Thomas Zimmermann
eb9479a98c
drm/tiny/cirrus: Use fbdev-shmem
...
Implement fbdev emulation with fbdev-shmem. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-15-tzimmermann@suse.de
2024-05-02 11:33:19 +02:00
Thomas Zimmermann
92e7a36891
drm/solomon: Use fbdev-shmem
...
Implement fbdev emulation with fbdev-shmem. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Javier Martinez Canillas <javierm@redhat.com >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-14-tzimmermann@suse.de
2024-05-02 11:33:18 +02:00
Thomas Zimmermann
b1fd6da243
drm/mgag200: Use fbdev-shmem
...
Implement fbdev emulation with fbdev-shmem. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Dave Airlie <airlied@redhat.com >
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-13-tzimmermann@suse.de
2024-05-02 11:33:18 +02:00
Thomas Zimmermann
b3e328dced
drm/hyperv: Use fbdev-shmem
...
Implement fbdev emulation with fbdev-shmem. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Deepak Rawat <drawat.floss@gmail.com >
Reviewed-by: Deepak Rawat <drawat.floss@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-12-tzimmermann@suse.de
2024-05-02 11:33:17 +02:00
Thomas Zimmermann
994c6277e6
drm/gud: Use fbdev-shmem
...
Implement fbdev emulation with fbdev-shmem. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: "Noralf Trønnes" <noralf@tronnes.org >
Acked-by: Noralf Trønnes <noralf@tronnes.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-11-tzimmermann@suse.de
2024-05-02 11:33:17 +02:00
Thomas Zimmermann
fcb3694af5
drm/ast: Use fbdev-shmem
...
Implement fbdev emulation with fbdev-shmem. Avoids the overhead of
fbdev-generic's additional shadow buffering. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Dave Airlie <airlied@redhat.com >
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-10-tzimmermann@suse.de
2024-05-02 11:33:16 +02:00
Thomas Zimmermann
150f431a08
drm/fbdev: Add fbdev-shmem
...
Add an fbdev emulation for SHMEM-based memory managers. The code is
similar to fbdev-generic, but does not require an additional shadow
buffer for mmap(). Fbdev-shmem operates directly on the buffer object's
SHMEM pages. Fbdev's deferred-I/O mechanism updates the hardware state
on write operations.
The memory pages of GEM SHMEM cannot be detected by fbdefio. Therefore
fbdev-shmem implements the .get_page() hook in struct fb_deferred_io.
The fbdefio helpers call this hook to retrieve the page directly from
fbdev-shmem instead of trying to detect it internally.
v3:
- clarify on get_page mechanism in commit description (Javier)
v2:
- use drm_driver_legacy_fb_format() (Geert)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-9-tzimmermann@suse.de
2024-05-02 11:33:15 +02:00
Thomas Zimmermann
747bda7bb5
fbdev/deferred-io: Provide get_page hook in struct fb_deferred_io
...
Add a callback for drivers to provide framebuffer pages to fbdev's
deferred-I/O helpers. Implementations need to acquire a reference on
the page before returning it. Returning NULL generates a SIGBUS
signal.
This will be useful for DRM's fbdev emulation with GEM-shmem buffer
objects.
v2:
- fix typo in commit message (Javier)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-8-tzimmermann@suse.de
2024-05-02 11:33:14 +02:00
Thomas Zimmermann
1ecbc7dd29
fbdev/deferred-io: Always call get_page() for framebuffer pages
...
Unconditionally call get_page() after looking up a page from the
framebuffer memory. Guarantees that we always hold a reference.
This change also refactors the code such that it can support a
driver-supplied get_page helper. This will be useful for DRM's
fbdev emulation.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-7-tzimmermann@suse.de
2024-05-02 11:33:14 +02:00
Thomas Zimmermann
dcaefc8239
fbdev/deferred-io: Test smem_start for I/O memory
...
Test smem_start before looking up pages from its value. Return
NULL if it is unset. This will result in a SIGBUS signal.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-6-tzimmermann@suse.de
2024-05-02 11:33:14 +02:00
Thomas Zimmermann
abc79a0e0a
fbdev/deferred-io: Test screen_buffer for vmalloc'ed memory
...
Framebuffers in virtual memory are available via screen_buffer. Use
it instead of screen_base and avoid the type casting.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-5-tzimmermann@suse.de
2024-05-02 11:33:13 +02:00
Thomas Zimmermann
28aea43c70
fbdev/deferred-io: Clean up pageref on lastclose
...
Clean up the pageref state as part of the lastclose helper. This
only requires to clear the page's mapping field. The pageref and
page can stay in place for the next opened instance of the frame-
buffer file.
With the change in the clean-up logic, there's no further need
to look up pages during the lastclose cleanup. The code instead
uses the existing pagerefs in its look-up table. It also avoids
using smem_len, which some driver might not set correctly.
v2:
- fix typos in commit message (Javier)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-4-tzimmermann@suse.de
2024-05-02 11:33:13 +02:00
Thomas Zimmermann
757a271376
fbdev/deferred-io: Move pageref setup into separate helper
...
Set up struct fb_deferred_io_pageref in the new helper function
fb_deferred_io_pageref_lookup(), which runs when the pageref is first
taken. Remove the setup code from the rest of the code.
At first, the code allocates the memory of all pageref structs. The
setup of the various fields happens when the pageref is required.
v2:
- fix typo in commit message (Javier)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-3-tzimmermann@suse.de
2024-05-02 11:33:12 +02:00
Thomas Zimmermann
73ef0aecba
drm/fbdev-generic: Do not set physical framebuffer address
...
Framebuffer memory is allocated via vzalloc() from non-contiguous
physical pages. The physical framebuffer start address is therefore
meaningless. Do not set it.
The value is not used within the kernel and only exported to userspace
on dedicated ARM configs. No functional change is expected.
v2:
- refer to vzalloc() in commit message (Javier)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Fixes: a5b44c4adb ("drm/fbdev-generic: Always use shadow buffering")
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Javier Martinez Canillas <javierm@redhat.com >
Cc: Zack Rusin <zackr@vmware.com >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Maxime Ripard <mripard@kernel.org >
Cc: <stable@vger.kernel.org > # v6.4+
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Reviewed-by: Zack Rusin <zack.rusin@broadcom.com >
Reviewed-by: Sui Jingfeng <sui.jingfeng@linux.dev >
Tested-by: Sui Jingfeng <sui.jingfeng@linux.dev >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-2-tzimmermann@suse.de
2024-05-02 11:33:11 +02:00
Thomas Zimmermann
b0a835db17
Merge drm/drm-next into drm-misc-next
...
Backmerging to get DRM fixes from v6.9-rc6.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
2024-05-02 11:25:27 +02:00
Sui Jingfeng
e91a36b472
drm/panel: ili9341: Remove a superfluous else after return
...
Because the else clause after the return clause is not useful, remove it
to get a better look.
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev >
Link: https://lore.kernel.org/r/20240501052402.806006-1-sui.jingfeng@linux.dev
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240501052402.806006-1-sui.jingfeng@linux.dev
2024-05-02 09:45:31 +02:00
Jocelyn Falempe
b94605a388
lib/fonts: Allow to select fonts for drm_panic
...
drm_panic has been introduced recently, and uses the same fonts as
FRAMEBUFFER_CONSOLE.
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20240419132243.154466-1-jfalempe@redhat.com
2024-05-02 09:40:17 +02:00
Sui Jingfeng
235e60653f
drm/debugfs: Drop conditionals around of_node pointers
...
Having conditional around the of_node pointer of the drm_bridge structure
is not necessary anymore, since drm_bridge structure always has the of_node
member since the commit d8dfccde27 ("drm/bridge: Drop conditionals around
of_node pointers").
So drop the conditional, please also note that this patch is following the
convention used by driver core, see commit c9e358dfc4 ("driver-core:
remove conditionals around devicetree pointers").
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240501051323.805076-1-sui.jingfeng@linux.dev
2024-05-01 09:06:46 -07:00
Jiapeng Chong
13d56abef1
drm/vmwgfx: Remove duplicate vmwgfx_vkms.h header
...
./drivers/gpu/drm/vmwgfx/vmwgfx_vkms.c: vmwgfx_vkms.h is included more than once.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8772
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Zack Rusin <zack.rusin@broadcom.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240417012917.66046-1-jiapeng.chong@linux.alibaba.com
2024-04-30 12:56:36 -04:00
Jocelyn Falempe
986c12d8c9
drm/fb_dma: Add checks in drm_fb_dma_get_scanout_buffer()
...
plane->state and plane->state->fb can be NULL, so add a check before
dereferencing them.
Found by testing with the imx driver.
Fixes: 879b3b6511 ("drm/fb_dma: Add generic get_scanout_buffer() for drm_panic")
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20240426121121.241366-1-jfalempe@redhat.com
2024-04-30 16:25:46 +02:00
Chaitanya Kumar Borah
4a9a567ab1
nouveau: Add missing break statement
...
Add the missing break statement that causes the following build error
CC [M] drivers/gpu/drm/i915/display/intel_display_device.o
../drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c: In function ‘build_registry’:
../drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1266:3: error: label at end of compound statement
1266 | default:
| ^~~~~~~
CC [M] drivers/gpu/drm/amd/amdgpu/gfx_v10_0.o
HDRTEST drivers/gpu/drm/xe/compat-i915-headers/i915_reg.h
CC [M] drivers/gpu/drm/amd/amdgpu/imu_v11_0.o
make[7]: *** [../scripts/Makefile.build:244: drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.o] Error 1
make[7]: *** Waiting for unfinished jobs....
Fixes: b58a0bc904 ("nouveau: add command-line GSP-RM registry support")
Closes: https://lore.kernel.org/all/913052ca6c0988db1bab293cfae38529251b4594.camel@nvidia.com/T/#m3c9acebac754f2e74a85b76c858c093bb1aacaf0
Closes: https://lore.kernel.org/all/CA+G9fYu7Ug0K8h9QJT0WbtWh_LL9Juc+VC0WMU_Z_vSSPDNymg@mail.gmail.com/
Tested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com >
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com >
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com >
Signed-off-by: Danilo Krummrich <dakr@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240430131840.742924-1-chaitanya.kumar.borah@intel.com
2024-04-30 16:06:18 +02:00
Dave Airlie
4a56c0ed5a
Merge tag 'amd-drm-next-6.10-2024-04-26' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
...
amd-drm-next-6.10-2024-04-26:
amdgpu:
- Misc code cleanups and refactors
- Support setting reset method at runtime
- Report OD status
- SMU 14.0.1 fixes
- SDMA 4.4.2 fixes
- VPE fixes
- MES fixes
- Update BO eviction priorities
- UMSCH fixes
- Reset fixes
- Freesync fixes
- GFXIP 9.4.3 fixes
- SDMA 5.2 fixes
- MES UAF fix
- RAS updates
- Devcoredump updates for dumping IP state
- DSC fixes
- JPEG fix
- Fix VRAM memory accounting
- VCN 5.0 fixes
- MES fixes
- UMC 12.0 updates
- Modify contiguous flags handling
- Initial support for mapping kernel queues via MES
amdkfd:
- Fix rescheduling of restore worker
- VRAM accounting for SVM migrations
- mGPU fix
- Enable SQ watchpoint for gfx10
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240426221245.1613332-1-alexander.deucher@amd.com
2024-04-30 14:43:00 +10:00
Dave Airlie
68b89e23c2
Merge tag 'drm-intel-gt-next-2024-04-26' of https://anongit.freedesktop.org/git/drm/drm-intel into drm-next
...
UAPI Changes:
- drm/i915/guc: Use context hints for GT frequency
Allow user to provide a low latency context hint. When set, KMD
sends a hint to GuC which results in special handling for this
context. SLPC will ramp the GT frequency aggressively every time
it switches to this context. The down freq threshold will also be
lower so GuC will ramp down the GT freq for this context more slowly.
We also disable waitboost for this context as that will interfere with
the strategy.
We need to enable the use of SLPC Compute strategy during init, but
it will apply only to contexts that set this bit during context
creation.
Userland can check whether this feature is supported using a new param-
I915_PARAM_HAS_CONTEXT_FREQ_HINT. This flag is true for all guc submission
enabled platforms as they use SLPC for frequency management.
The Mesa usage model for this flag is here -
https://gitlab.freedesktop.org/sushmave/mesa/-/commits/compute_hint
- drm/i915/gt: Enable only one CCS for compute workload
Enable only one CCS engine by default with all the compute sices
allocated to it.
While generating the list of UABI engines to be exposed to the
user, exclude any additional CCS engines beyond the first
instance
***
NOTE: This W/A will make all DG2 SKUs appear like single CCS SKUs by
default to mitigate a hardware bug. All the EUs will still remain
usable, and all the userspace drivers have been confirmed to be able
to dynamically detect the change in number of CCS engines and adjust.
For the smaller percent of applications that get perf benefit from
letting the userspace driver dispatch across all 4 CCS engines we will
be introducing a sysfs control as a later patch to choose 4 CCS each
with 25% EUs (or 50% if 2 CCS).
NOTE: A regression has been reported at
https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10895
However Andi has been triaging the issue and we're closing in a fix
to the gap in the W/A implementation:
https://lists.freedesktop.org/archives/intel-gfx/2024-April/348747.html
Driver Changes:
- Add new and fix to existing workarounds: Wa_14018575942 (MTL),
Wa_16019325821 (Gen12.70), Wa_14019159160 (MTL), Wa_16015675438,
Wa_14020495402 (Gen12.70) (Tejas, John, Lucas)
- Fix UAF on destroy against retire race and remove two earlier
partial fixes (Janusz)
- Limit the reserved VM space to only the platforms that need it (Andi)
- Reset queue_priority_hint on parking for execlist platforms (Chris)
- Fix gt reset with GuC submission is disabled (Nirmoy)
- Correct capture of EIR register on hang (John)
- Remove usage of the deprecated ida_simple_xx() API
- Refactor confusing __intel_gt_reset() (Nirmoy)
- Fix the fix for GuC reset lock confusion (John)
- Simplify/extend platform check for Wa_14018913170 (John)
- Replace dev_priv with i915 (Andi)
- Add and use gt_to_guc() wrapper (Andi)
- Remove bogus null check (Rodrigo, Dan)
. Selftest improvements (Janusz, Nirmoy, Daniele)
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/ZitVBTvZmityDi7D@jlahtine-mobl.ger.corp.intel.com
2024-04-30 14:40:43 +10:00
Daniel Vetter
b84bc94852
Merge v6.9-rc6 into drm-next
...
Thomas needs the defio fixes, Maíra needs the vkms fixes and Joonas
has some fun with i915-gem conflicts.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2024-04-29 20:22:39 +02:00
Abhinav Kumar
75b68f22e3
drm: ci: fix the xfails for apq8016
...
After IGT migrating to dynamic sub-tests, the pipe prefixes
in the expected fails list are incorrect. Lets drop those
to accurately match the expected fails.
In addition, update the xfails list to match the current passing
list. This should have ideally failed in the CI run because some
tests were marked as fail even though they passed but due to the
mismatch in test names, the matching didn't correctly work and was
resulting in those failures not being seen.
Here is the passing pipeline for apq8016 with this change:
https://gitlab.freedesktop.org/drm/msm/-/jobs/57050562
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Acked-by: Helen Koike <helen.koike@collabora.com >
Signed-off-by: Helen Koike <helen.koike@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240401204859.24223-1-quic_abhinavk@quicinc.com
2024-04-29 10:26:30 -03:00
Luca Ceresoli
2940ee03b2
Revert "drm/bridge: ti-sn65dsi83: Fix enable error path"
...
This reverts commit 8a91b29f1f .
The regulator_disable() added by the original commit solves one kind of
regulator imbalance but adds another one as it allows the regulator to be
disabled one more time than it is enabled in the following scenario:
1. Start video pipeline -> sn65dsi83_atomic_pre_enable -> regulator_enable
2. PLL lock fails -> regulator_disable
3. Stop video pipeline -> sn65dsi83_atomic_disable -> regulator_disable
The reason is clear from the code flow, which looks like this (after
removing unrelated code):
static void sn65dsi83_atomic_pre_enable()
{
regulator_enable(ctx->vcc);
if (PLL failed locking) {
regulator_disable(ctx->vcc); <---- added by patch being reverted
return;
}
}
static void sn65dsi83_atomic_disable()
{
regulator_disable(ctx->vcc);
}
The use case for introducing the additional regulator_disable() was
removing the module for debugging (see link below for the discussion). If
the module is removed after a .atomic_pre_enable, i.e. with an active
pipeline from the DRM point of view, .atomic_disable is not called and thus
the regulator would not be disabled.
According to the discussion however there is no actual use case for
removing the module with an active pipeline, except for
debugging/development.
On the other hand, the occurrence of a PLL lock failure is possible due to
any physical reason (e.g. a temporary hardware failure for electrical
reasons) so handling it gracefully should be supported. As there is no way
for .atomic[_pre]_enable to report an error to the core, the only clean way
to support it is calling regulator_disabled() only in .atomic_disable,
unconditionally, as it was before.
Link: https://lore.kernel.org/all/15244220.uLZWGnKmhe@steina-w/
Fixes: 8a91b29f1f ("drm/bridge: ti-sn65dsi83: Fix enable error path")
Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com >
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com >
Signed-off-by: Robert Foss <rfoss@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240426122259.46808-1-luca.ceresoli@bootlin.com
2024-04-29 12:24:58 +02:00
Linus Torvalds
e67572cd22
Linux 6.9-rc6
v6.9-rc6
2024-04-28 13:47:24 -07:00