summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tiny (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of 'remove_new' relic from platform driver structLinus Torvalds2024-12-023-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | The continual trickle of small conversion patches is grating on me, and is really not helping. Just get rid of the 'remove_new' member function, which is just an alias for the plain 'remove', and had a comment to that effect: /* * .remove_new() is a relic from a prototype conversion of .remove(). * New drivers are supposed to implement .remove(). Once all drivers are * converted to not use .remove_new any more, it will be dropped. */ This was just a tree-wide 'sed' script that replaced '.remove_new' with '.remove', with some care taken to turn a subsequent tab into two tabs to make things line up. I did do some minimal manual whitespace adjustment for places that used spaces to line things up. Then I just removed the old (sic) .remove_new member function, and this is the end result. No more unnecessary conversion noise. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge tag 'drm-next-2024-11-21' of https://gitlab.freedesktop.org/drm/kernelLinus Torvalds2024-11-2119-199/+993
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull drm updates from Dave Airlie: "There's a lot of rework, the panic helper support is being added to more drivers, v3d gets support for HW superpages, scheduler documentation, drm client and video aperture reworks, some new MAINTAINERS added, amdgpu has the usual lots of IP refactors, Intel has some Pantherlake enablement and xe is getting some SRIOV bits, but just lots of stuff everywhere. core: - split DSC helpers from DP helpers - clang build fixes for drm/mm test - drop simple pipeline support for gem vram - document submission error signaling - move drm_rect to drm core module from kms helper - add default client setup to most drivers - move to video aperture helpers instead of drm ones tests: - new framebuffer tests ttm: - remove swapped and pinned BOs from TTM lru panic: - fix uninit spinlock - add ABGR2101010 support bridge: - add TI TDP158 support - use standard PM OPS dma-fence: - use read_trylock instead of read_lock to help lockdep scheduler: - add errno to sched start to report different errors - add locking to drm_sched_entity_modify_sched - improve documentation xe: - add drm_line_printer - lots of refactoring - Enable Xe2 + PES disaggregation - add new ARL PCI ID - SRIOV development work - fix exec unnecessary implicit fence - define and parse OA sync props - forcewake refactoring i915: - Enable BMG/LNL ultra joiner - Enable 10bpx + CCS scanout on ICL+, fp16/CCS on TGL+ - use DSB for plane/color mgmt - Arrow lake PCI IDs - lots of i915/xe display refactoring - enable PXP GuC autoteardown - Pantherlake (PTL) Xe3 LPD display enablement - Allow fastset HDR infoframe changes - write DP source OUI for non-eDP sinks - share PCI IDs between i915 and xe amdgpu: - SDMA queue reset support - SMU 13.0.6, JPEG 4.0.3 updates - Initial runtime repartitioning support - rework IP structs for multiple IP instances - Fetch EDID from _DDC if available - SMU13 zero rpm user control - lots of fixes/cleanups amdkfd: - Increase event FIFO size - add topology cap flag for per queue reset msm: - DPU: - SA8775P support - (disabled by default) MSM8917, MSM8937, MSM8953 and MSM8996 support - Enable large framebuffer support - Drop MSM8998 and SDM845 - DP: - SA8775P support - GPU: - a7xx preemption support - Adreno A663 support ast: - warn about unsupported TX chips ivpu: - add coredump - add pantherlake support rockchip: - 4K@60Hz display enablement - generate pll programming tables panthor: - add timestamp query API - add realtime group priority - add fdinfo support etnaviv: - improve handling of DMA address limits - improve GPU hangcheck exynos: - Decon Exynos7870 support mediatek: - add OF graph support omap: - locking fixes bochs: - convert to gem/shmem from simpledrm v3d: - support big/super pages - add gemfs vc4: - BCM2712 support refactoring - add YUV444 format support udmabuf: - folio related fixes nouveau: - add panic support on nv50+" * tag 'drm-next-2024-11-21' of https://gitlab.freedesktop.org/drm/kernel: (1583 commits) drm/xe/guc: Fix dereference before NULL check drm/amd: Fix initialization mistake for NBIO 7.7.0 Revert "drm/amd/display: parse umc_info or vram_info based on ASIC" drm/amd/display: Fix failure to read vram info due to static BP_RESULT drm/amdgpu: enable GTT fallback handling for dGPUs only drm/amd/amdgpu: limit single process inside MES drm/fourcc: add AMD_FMT_MOD_TILE_GFX9_4K_D_X drm/amdgpu/mes12: correct kiq unmap latency drm/amdgpu: Support vcn and jpeg error info parsing drm/amd : Update MES API header file for v11 & v12 drm/amd/amdkfd: add/remove kfd queues on start/stop KFD scheduling drm/amdkfd: change kfd process kref count at creation drm/amdgpu: Cleanup shift coding style drm/amd/amdgpu: Increase MES log buffer to dump mes scratch data drm/amdgpu: Implement virt req_ras_err_count drm/amdgpu: VF Query RAS Caps from Host if supported drm/amdgpu: Add msg handlers for SRIOV RAS Telemetry drm/amdgpu: Update SRIOV Exchange Headers for RAS Telemetry Support drm/amd/display: 3.2.309 drm/amd/display: Adjust VSDB parser for replay feature ...
| * drm/tiny: Add driver for Sharp Memory LCDAlex Lanzano2024-10-193-0/+693
| | | | | | | | | | | | | | | | | | | | | | | | Add support for the monochrome Sharp Memory LCDs. Co-developed-by: Mehdi Djait <mehdi.djait@bootlin.com> Signed-off-by: Mehdi Djait <mehdi.djait@bootlin.com> Signed-off-by: Alex Lanzano <lanzano.alex@gmail.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241015230617.3020230-3-lanzano.alex@gmail.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
| * drm/cirrus: Use video aperture helpersThomas Zimmermann2024-10-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | DRM's aperture functions have long been implemented as helpers under drivers/video/ for use with fbdev. Avoid the DRM wrappers by calling the video functions directly. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Dave Airlie <airlied@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Javier Martinez Canillas <javierm@redhat.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240930130921.689876-23-tzimmermann@suse.de
| * drm/bochs: Use video aperture helpersThomas Zimmermann2024-10-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | DRM's aperture functions have long been implemented as helpers under drivers/video/ for use with fbdev. Avoid the DRM wrappers by calling the video functions directly. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Javier Martinez Canillas <javierm@redhat.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240930130921.689876-22-tzimmermann@suse.de
| * drm/simpledrm: Use video aperture helpersThomas Zimmermann2024-10-141-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | DRM's aperture functions have long been implemented as helpers under drivers/video/ for use with fbdev. Avoid the DRM wrappers by calling the video functions directly. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Javier Martinez Canillas <javierm@redhat.com> Acked-by: Javier Martinez Canillas <javierm@redhat.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240930130921.689876-18-tzimmermann@suse.de
| * drm/ofdrm: Use video aperture helpersThomas Zimmermann2024-10-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | DRM's aperture functions have long been implemented as helpers under drivers/video/ for use with fbdev. Avoid the DRM wrappers by calling the video functions directly. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Javier Martinez Canillas <javierm@redhat.com> Acked-by: Javier Martinez Canillas <javierm@redhat.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240930130921.689876-14-tzimmermann@suse.de
| * drm/bochs: Return error from correct pointerThomas Zimmermann2024-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In probe, return the error code from the variable bochs, not dev. The variable dev has not been initialized at this point. In the case of an allocation error, the returned value would have been undefined. Reported-by: Kees Bakker <kees@ijzerbout.nl> Closes: https://lore.kernel.org/dri-devel/8c5bfc12-cbcc-4102-9826-494060df4179@ijzerbout.nl/ Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Fixes: 04826f588682 ("drm/bochs: Allocate DRM device in struct bochs_device") Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: virtualization@lists.linux.dev Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241004075404.41743-1-tzimmermann@suse.de
| * drm/simpledrm: Run DRM default client setupThomas Zimmermann2024-09-262-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. v5: - select DRM_CLIENT_SELECTION 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/20240924071734.98201-59-tzimmermann@suse.de
| * drm/ofdrm: Use DRM default client setupThomas Zimmermann2024-09-262-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. v5: - select DRM_CLIENT_SELECTION 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/20240924071734.98201-58-tzimmermann@suse.de
| * drm/gm12u320: Run DRM default client setupThomas Zimmermann2024-09-262-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. v5: - select DRM_CLIENT_SELECTION Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Hans de Goede <hdegoede@redhat.com> Acked-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-54-tzimmermann@suse.de
| * drm/cirrus: Run DRM default client setupThomas Zimmermann2024-09-262-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. The cirrus driver requests the same client pixel format as the value stored in struct drm_mode_config.preferred_depth. The fbdev client also looks at this value for the default pixel format. Thus remove the format selection from cirrus. v5: - select DRM_CLIENT_SELECTION Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Dave Airlie <airlied@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-53-tzimmermann@suse.de
| * drm/bochs: Run DRM default client setupThomas Zimmermann2024-09-262-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. The bochs driver specifies a preferred color mode of 32. As this is the default if no format has been given, leave it out entirely. v5: - select DRM_CLIENT_SELECTION v4: - rebase on top of GEM-SHMEM Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-52-tzimmermann@suse.de
| * drm/st7735r: Run DRM default client setupThomas Zimmermann2024-09-262-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. v5: - select DRM_CLIENT_SELECTION 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/20240924071734.98201-45-tzimmermann@suse.de
| * drm/st7586: Run DRM default client setupThomas Zimmermann2024-09-262-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. v5: - select DRM_CLIENT_SELECTION 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/20240924071734.98201-44-tzimmermann@suse.de
| * drm/repaper: Run DRM default client setupThomas Zimmermann2024-09-262-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. v5: - select DRM_CLIENT_SELECTION 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/20240924071734.98201-37-tzimmermann@suse.de
| * drm/panel-mipi-dbi: Run DRM default client setupThomas Zimmermann2024-09-262-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. v5: - select DRM_CLIENT_SELECTION 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/20240924071734.98201-32-tzimmermann@suse.de
| * drm/mi0283qt: Run DRM default client setupThomas Zimmermann2024-09-262-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. v5: - select DRM_CLIENT_SELECTION 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/20240924071734.98201-29-tzimmermann@suse.de
| * drm/ili9486: Run DRM default client setupThomas Zimmermann2024-09-262-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. v5: - select DRM_CLIENT_SELECTION Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Kamlesh Gurudasani <kamlesh.gurudasani@gmail.com> Acked-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-19-tzimmermann@suse.de
| * drm/ili9341: Run DRM default client setupThomas Zimmermann2024-09-262-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. v5: - select DRM_CLIENT_SELECTION Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-18-tzimmermann@suse.de
| * drm/ili9225: Run DRM default client setupThomas Zimmermann2024-09-262-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. v5: - select DRM_CLIENT_SELECTION 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/20240924071734.98201-17-tzimmermann@suse.de
| * drm/ili9163: Run DRM default client setupThomas Zimmermann2024-09-262-1/+4
| | | | | | | | | | | | | | | | | | | | Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-16-tzimmermann@suse.de
| * drm/hx8357d: Run DRM default client setupThomas Zimmermann2024-09-262-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. v5: - select DRM_CLIENT_SELECTION Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-15-tzimmermann@suse.de
| * drm/arcgpu: Run DRM default client setupThomas Zimmermann2024-09-262-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call drm_client_setup_with_fourcc() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. v5: - select DRM_CLIENT_SELECTION v2: - use drm_client_setup_with_fourcc() Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Alexey Brodkin <abrodkin@synopsys.com> Acked-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-7-tzimmermann@suse.de
| * drm/bochs: use devm_ioremap_wc() to map framebufferYan Zhao2024-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Opt for devm_ioremap_wc() over devm_ioremap() when mapping the framebuffer. Using devm_ioremap() results in the VA being mapped with PAT=UC-, which considerably slows down drm_fb_memcpy(). In contrast, devm_ioremap_wc() maps the VA with PAT set to WC, leading to better performance on platforms where access to UC memory is much slower than WC memory. Here's the performance data measured in a guest on the physical machine "Sapphire Rapids XCC". With host KVM honors guest PAT memory types, the effective memory type for this framebuffer range is - WC when devm_ioremap_wc() is used - UC- when devm_ioremap() is used. The data presented is an average from 10 execution runs. Cycles: Avg cycles of executed bochs_primary_plane_helper_atomic_update() from VM boot to GDM show up Cnt: Avg cnt of executed bochs_primary_plane_helper_atomic_update() from VM boot to GDM show up T: Avg time of each bochs_primary_plane_helper_atomic_update(). ------------------------------------------------- | | devm_ioremap() | devm_ioremap_wc() | |------------|----------------|-------------------| | Cycles | 211.545M | 0.157M | |------------|----------------|-------------------| | Cnt | 142 | 1917 | |------------|----------------|-------------------| | T | 0.1748s | 0.0004s | ------------------------------------------------- Note: Following the rebase to [3], the previously reported GDM failure on the VGA device [1] can no longer be reproduced, thanks to the memory management improvements made in [2]. Despite this, I have proceeded to submit this patch because of the noticeable performance improvements it provides. Reported-by: Vitaly Kuznetsov <vkuznets@redhat.com> Closes: https://lore.kernel.org/all/87jzfutmfc.fsf@redhat.com/#t Cc: Sean Christopherson <seanjc@google.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Kevin Tian <kevin.tian@intel.com> Cc: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Yan Zhao <yan.y.zhao@intel.com> Link: https://lore.kernel.org/all/87jzfutmfc.fsf@redhat.com/#t [1] Link: https://patchwork.freedesktop.org/series/138086 [2] Link: https://gitlab.freedesktop.org/drm/misc/kernel/-/tree/drm-misc-next [3] Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Tested-by: Vitaly Kuznetsov <vkuznets@redhat.com> Tested-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20240909131643.28915-1-yan.y.zhao@intel.com
| * drm/bochs: Validate display modes against available video memoryThomas Zimmermann2024-09-061-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For each mode, test the required memory against the available video memory. Filters out modes that do not fit into display memory. Also remove the old test against the 4 MiB limit. It is now obsolete and did not necessarily produce correct results. v2: - fix __udivdi3 linker error (kernel test robot) - fix vdisplay and hdisplay usage Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240902105546.792625-10-tzimmermann@suse.de
| * drm/bochs: Use GEM SHMEM helpers for memory managementThomas Zimmermann2024-09-062-44/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace GEM VRAM with GEM SHMEM in bochs. The new memory manager stores buffer objects in system memory. Makes the driver's memory management more reliably. Most of the changes are hidden in external helpers that allocate buffers. Replacing DRM_GEM_VRAM_DRIVER with DRM_GEM_SHMEM_DRIVER_OPS swaps these. With GEM VRAM, the video memory was updated directly by the DRM client. The biggest change within bochs is in atomic_update, which now updates video memory via memcpy() from the BO in system memory. Shadow-plane helpers maintaining the pointers to the buffer's data, so bochs doesn't have to. The update is triggered by each page flip's call to the framebuffer's dirty helper. The driver supports damage clipping to minimize memcpy() overhead. The advantage of GEM SHMEM is that it makes memory management more reliable. Given DRM's double buffering during page flips, the minimum amount of video memory is three times the maximum consumption in some pathological cases. For example, if the maximum size of a GEM buffer is 1920x1080-32 (i.e., 32-bit FullHD), the buffer size is 8 MiB. Display hardware has to provide at lease 24 MiB to reliably page flip such configurations. This cannot always be guaranteed and bochs already contains code to rule out <4 MiB configurations. With GEM SHMEM, only 8 MiB of video memory are required for the given example. Unsupported modes can be sorted out easily. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240902105546.792625-9-tzimmermann@suse.de
| * drm/bochs: Use regular atomic helpersThomas Zimmermann2024-09-061-45/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the simple display pipeline in favor of the regular atomic helpers in bochs. The simple-pipe helpers are considered deprecated in DRM. This effectivly inlines the simple-pipe code for plane and CRTC support. Instead of a single update helper, there's now a mode-set helper for the CRTC and an update helper for the plane. The encoder changes type from NONE ot VIRTUAL. Removing simple-pipe helpers from bochs will allow for related cleanups in GEM VRAM helpers. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240902105546.792625-8-tzimmermann@suse.de
| * drm/bochs: Allocate DRM device in struct bochs_deviceThomas Zimmermann2024-09-061-27/+25
| | | | | | | | | | | | | | | | | | | | Allocate an instance of struct drm_device in struct bochs_device. Also remove all uses of dev_private from bochs and upcast from the embedded instance if necessary. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240902105546.792625-7-tzimmermann@suse.de
| * drm/bochs: Upcast with to_bochs_device()Thomas Zimmermann2024-09-061-4/+9
| | | | | | | | | | | | | | | | | | | | The dev_private field in struct drm_device is deprecated. Limit its use by moving it into a helper function. A later change will remove it entirely. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240902105546.792625-6-tzimmermann@suse.de
| * drm/bochs: Pass bochs device to various functionsThomas Zimmermann2024-09-061-6/+6
| | | | | | | | | | | | | | | | | | Avoid upcasting from struct drm_device by passing the bochs device directly to functions. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240902105546.792625-5-tzimmermann@suse.de
| * drm/bochs: Do managed resource cleanupThomas Zimmermann2024-09-061-32/+10
| | | | | | | | | | | | | | | | | | Do managed cleanup of all PCI resources. Remove the now-unused cleanup helper bochs_hw_fini(). Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240902105546.792625-4-tzimmermann@suse.de
| * drm/bochs: Use helpers for struct drm_edidThomas Zimmermann2024-09-061-26/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement a read function for struct drm_edid and read the EDID data with drm_edit_read_custom(). Update the connector data accordingly. The EDID data comes from the emulator itself and the connector stores a copy in its EDID property. The drm_edid field in struct bochs_device is therefore not required. Remove it. If qemu provides no EDID data, install default display modes as before. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240902105546.792625-3-tzimmermann@suse.de
| * drm/bochs: Remove manual format test from fb_createThomas Zimmermann2024-09-061-12/+1
| | | | | | | | | | | | | | | | | | | | | | An updated implementation of drm_gem_fb_create() already tests the driver's planes for supported formats. [1] No need to duplicate this test in bochs. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://elixir.bootlin.com/linux/v6.9/source/drivers/gpu/drm/drm_gem_framebuffer_helper.c#L169 # 1 Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240902105546.792625-2-tzimmermann@suse.de
* | drm: handle HAS_IOPORT dependenciesNiklas Schnelle2024-10-282-5/+16
|/ | | | | | | | | | | | | | | | | | | In a future patch HAS_IOPORT=n will disable inb()/outb() and friends at compile time. We thus need to add HAS_IOPORT as dependency for those drivers using them. In the bochs driver there is optional MMIO support detected at runtime, warn if this isn't taken when HAS_IOPORT is not defined. There is also a direct and hard coded use in cirrus.c which according to the comment is only necessary during resume. Let's just skip this as for example s390 which doesn't have I/O port support also doesen't support suspend/resume. Co-developed-by: Arnd Bergmann <arnd@kernel.org> Signed-off-by: Arnd Bergmann <arnd@kernel.org> Acked-by: Lucas De Marchi <lucas.demarchi@intel.com> # xe Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
* drm/tiny/gm12u320: convert to struct drm_edidJani Nikula2024-08-291-3/+10
| | | | | | | | | Prefer the struct drm_edid based functions for allocating the EDID and updating the connector. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/c31c3afa883a3321345608c480c26161b638a83e.1724348429.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
* drm/tiny: add missing MODULE_DESCRIPTION() macrosJeff Johnson2024-06-103-0/+3
| | | | | | | | | | | | | | make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tiny/bochs.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tiny/cirrus.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tiny/gm12u320.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20240609-md-drivers-gpu-drm-tiny-v1-1-6905fe4ada50@quicinc.com
* drm/tiny: panel-mipi-dbi: Support the pixel format propertyNoralf Trønnes2024-06-071-1/+54
| | | | | | | | | | | | | | | | Add support for these pixel format property values: - r5g6b5, RGB565 - b6x2g6x2r6x2, BGR666 BGR666 is presented to userspace as RGB888. The 2 LSB in each color are discarded by the controller. The pixel is sent on the wire using 8 bits per word (little endian) so the controller sees it as BGR. RGB565 is the default if the property is not present. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20240604-panel-mipi-dbi-rgb666-v4-5-d7c2bcb9b78d@tronnes.org Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
* drm/bochs: switch to struct drm_edidJani Nikula2024-05-131-13/+10
| | | | | | | | | Prefer struct drm_edid based functions over struct edid. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Robert Foss <rfoss@kernel.org> Signed-off-by: Robert Foss <rfoss@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/24536f4a1a12af7b43ba86e9761dfeef179b72df.1715347488.git.jani.nikula@intel.com
* drm/fbdev-generic: Convert to fbdev-ttmThomas Zimmermann2024-05-021-2/+2
| | | | | | | | | | | Only TTM-based drivers use fbdev-generic. Rename it to fbdev-ttm and change the symbol infix from _generic_ to _ttm_. Link the source file into TTM helpers, so that it is only build if TTM-based drivers have been selected. Select DRM_TTM_HELPER for loongson. 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-43-tzimmermann@suse.de
* drm/tiny/st7735r: Use fbdev-dmaThomas Zimmermann2024-05-021-2/+2
| | | | | | | | | | | Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by st7735r. 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-42-tzimmermann@suse.de
* drm/tiny/st7586: Use fbdev-dmaThomas Zimmermann2024-05-021-2/+2
| | | | | | | | | | | Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by st7586. 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-41-tzimmermann@suse.de
* drm/tiny/repaper: Use fbdev-dmaThomas Zimmermann2024-05-021-2/+2
| | | | | | | | | | | Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by repaper. 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-40-tzimmermann@suse.de
* drm/tiny/panel-mipi-dbi: Use fbdev-dmaThomas Zimmermann2024-05-021-2/+2
| | | | | | | | | | | | Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by panel-mipi-dbi. 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-39-tzimmermann@suse.de
* drm/tiny/mi0283qt: Use fbdev-dmaThomas Zimmermann2024-05-021-2/+2
| | | | | | | | | | | 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
* drm/tiny/ili9486: Use fbdev-dmaThomas Zimmermann2024-05-021-2/+2
| | | | | | | | | | 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
* drm/tiny/ili9341: Use fbdev-dmaThomas Zimmermann2024-05-021-2/+2
| | | | | | | | | | | 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
* drm/tiny/ili9225: Use fbdev-dmaThomas Zimmermann2024-05-021-2/+2
| | | | | | | | | | | 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
* drm/tiny/ili9163: Use fbdev-dmaThomas Zimmermann2024-05-021-2/+2
| | | | | | | | | | 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
* drm/tiny/hx8357d: Use fbdev-dmaThomas Zimmermann2024-05-021-2/+2
| | | | | | | | | | 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