aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tiny/cirrus-qemu.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/cirrus: Use non-hybrid PCI devres APIPhilipp Stanner2025-05-091-1/+1
| | | | | | | | | | | | | | | | | cirrus enables its PCI device with pcim_enable_device(). This, implicitly, switches the function pci_request_regions() into managed mode, where it becomes a devres function. The PCI subsystem wants to remove this hybrid nature from its interfaces. To do so, users of the aforementioned combination of functions must be ported to non-hybrid functions. Replace the call to sometimes-managed pci_request_regions() with one to the always-managed pcim_request_all_regions(). Reviewed-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Philipp Stanner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
* drm/cirrus-qemu: Remove custom plane stateThomas Zimmermann2025-04-011-58/+1
| | | | | | | | | Remove struct cirrus_primary_plane_state and its helpers, which are all unused. Use struct drm_shadow_plane_state instead. Signed-off-by: Thomas Zimmermann <[email protected]> Acked-by: Gerd Hoffmann <[email protected]> Link: https://lore.kernel.org/r/[email protected]
* drm/cirrus-qemu: Use framebuffer format as-is, drop adjustmentsThomas Zimmermann2025-04-011-62/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove internal adjustments to framebuffer format from cirrus-qemu driver. The driver did this to support higher resolutions by reducing the per-pixel memory consumption. DRM has a policy of exporting formats as they are implemented in hardware. So avoid internal adjustments if possible. Also remove the call to drm_fb_blit() from cirrus-qemu. The helper is useful if source and destination format are not known beforehand. This is not the case for cirrus-qemu. This change effectively reduces the maximum available resolution to 800x600 at 32 bpp. A maximum scanline pitch of 4095 byte prevents 1024 pixels per scanline at 32 bpp. Higher resolutions are possible at lower bit depths, but are currently not supported by userspace. When cirrus-qemu currently reduced the internal bit depth to support higher resolutions, it trades resolution for bit depth and CPU time. Converting from 32-bit colors has a significant runtime overhead, as outlined at [1]. Avoiding color-format adjustments also avoids this tradeoff. v2: - expand commit message (Gerd) Signed-off-by: Thomas Zimmermann <[email protected]> Acked-by: Gerd Hoffmann <[email protected]> Link: https://lore.kernel.org/dri-devel/[email protected]/ # 1 Link: https://lore.kernel.org/r/[email protected]
* drm/cirrus-qemu: Stricter mode validationThomas Zimmermann2025-04-011-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | Implement strict checking of a display mode's minimum scanline pitch in cirrus_mode_config_mode_valid(). Sort out all modes that possibly overflow the maximum pitch. The current validation only tests against a display mode's minimum requirements for video memory. Only atomic_check later tests against the pitch limit before programming the framebuffer. The problem is that user-space compositors do not handle this gracefully. If atomic_check fails to validate the scanline pitch and returns an error, the compositor, namely Weston, does nothing and the display remains stale. Ruling out display modes that possibly overflow the pitch avoids this problem. With only 4 MiB of video memory available, this effectively limits horizontal resolution to 800 pixels. But with cirrus-qemu being low-end and obsolete, this is probably not an issue in practice. Better alternatives are available in qemu. Signed-off-by: Thomas Zimmermann <[email protected]> Acked-by: Gerd Hoffmann <[email protected]> Link: https://lore.kernel.org/r/[email protected]
* drm/cirrus-qemu: Fix pitch programmingThomas Zimmermann2025-04-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | Do not set CR1B[6] when programming the pitch. The bit effects VGA text mode and is not interpreted by qemu. [1] It has no affect on the scanline pitch. The scanline bit that is set into CR1B[6] belongs into CR13[7], which the driver sets up correctly. This bug goes back to the driver's initial commit. Signed-off-by: Thomas Zimmermann <[email protected]> Acked-by: Gerd Hoffmann <[email protected]> Link: https://gitlab.com/qemu-project/qemu/-/blob/stable-9.2/hw/display/cirrus_vga.c?ref_type=heads#L1112 # 1 Fixes: f9aa76a85248 ("drm/kms: driver for virtual cirrus under qemu") Cc: Adam Jackson <[email protected]> Cc: Dave Airlie <[email protected]> Cc: Maarten Lankhorst <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Thomas Zimmermann <[email protected]> Cc: <[email protected]> # v3.5+ Link: https://lore.kernel.org/r/[email protected]
* drm: remove driver date from struct drm_driver and all driversJani Nikula2024-12-051-2/+0
| | | | | | | | | | | | | | | | | | | | | | We stopped using the driver initialized date in commit 7fb8af6798e8 ("drm: deprecate driver date") and (eventually) started returning "0" for drm_version ioctl instead. Finish the job, and remove the unused date member from struct drm_driver, its initialization from drivers, along with the common DRIVER_DATE macros. v2: Also update drivers/accel (kernel test robot) Reviewed-by: Javier Martinez Canillas <[email protected]> Acked-by: Alex Deucher <[email protected]> Acked-by: Simon Ser <[email protected]> Acked-by: Jeffrey Hugo <[email protected]> Acked-by: Lucas De Marchi <[email protected]> Acked-by: Dmitry Baryshkov <[email protected]> # msm Reviewed-by: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/1f2bf2543aed270a06f6c707fd6ed1b78bf16712.1733322525.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <[email protected]>
* Merge drm/drm-next into drm-misc-nextMaxime Ripard2024-12-021-0/+2
| | | | | | Kickstart 6.14 cycle. Signed-off-by: Maxime Ripard <[email protected]>
* drm/cirrus: Rename to cirrus-qemuThomas Zimmermann2024-11-261-0/+766
This driver is only for Qemu's emulated Cirrus hardware. Name it accordingly. Signed-off-by: Thomas Zimmermann <[email protected]> Acked-by: Gerd Hoffmann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]