aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ast
Commit message (Collapse)AuthorAgeFilesLines
* drm/ast: Validate display modes against framebuffer and format limitsThomas Zimmermann2025-04-071-7/+13
| | | | | | | | | | Reimplement ast_mode_config_mode_valid() with DRM format helpers and ast's helpers for framebuffer size calculation. Replaces ast's open- coded assumptions on bpp and page-alignments. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://lore.kernel.org/r/[email protected]
* drm/ast: Remove vaddr field from struct ast_planeThomas Zimmermann2025-04-073-14/+17
| | | | | | | | | | | | | The vaddr field in struct ast_plane serves no purpose. Its value can be calculated easily from the VRAM base plus the plane offset. Do so and remove the field. In ast_primary_plane_helper_get_scanout_buffer(), remove the test for vaddr being NULL. This cannot legally happen. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://lore.kernel.org/r/[email protected]
* drm/ast: Fix comment on modeset lockThomas Zimmermann2025-04-071-3/+3
| | | | | | | | | | | | | | | | | The ast driver protects the commit tail against concurrent reads of the display modes by acquiring a lock. The comment is misleading as the lock is not released in atomic_flush, but at the end of the commit-tail helper. Rewrite the comment. Signed-off-by: Thomas Zimmermann <[email protected]> Fixes: 1fe182154984 ("drm/ast: Acquire I/O-register lock in atomic_commit_tail function") Cc: Thomas Zimmermann <[email protected]> Cc: Jocelyn Falempe <[email protected]> Cc: Dave Airlie <[email protected]> Cc: [email protected] Cc: <[email protected]> # v6.2+ Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://lore.kernel.org/r/[email protected]
* drm/probe-helper: Do not fail from drmm_kms_helper_poll_init()Thomas Zimmermann2025-03-241-4/+1
| | | | | | | | | | | | | Failing to set up connector polling is not significant enough to fail device probing. Print a warning and return nothing from the init helper. This only affects the managed init function. The unmanaged init already never fails with an error. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Patrik Jakobsson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
* drm/ast: cursor: Drop page alignmentThomas Zimmermann2025-03-121-1/+1
| | | | | | | | | | The cursor scanout address requires alignment to a multiple of 8, but does not require page alignment. Change the offset calculation accordingly. Frees up a few more bytes for the primary framebuffer. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
* drm/ast: Remove vram_fb_available from struct ast_deviceThomas Zimmermann2025-03-123-19/+4
| | | | | | | | | | | | | | Helpers compute the offset and size of the available framebuffer memory. Remove the obsolete field vram_fb_available from struct ast_device. Also define the cursor-signature size next to its only user. v2: - initialize plane size Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
* drm/ast: Add helper for computing framebuffer location in video memoryThomas Zimmermann2025-03-121-4/+21
| | | | | | | | | | The ast driver stores the primary plane's image in the framebuffer memory up to where the cursor is located. Add helpers to calculate the offset and size. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
* drm/ast: cursor: Add helpers for computing location in video memoryThomas Zimmermann2025-03-122-2/+20
| | | | | | | | | The ast drivers stores the cursor image at the end of the video memory. Add helpers to calculate the offset and size. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
* drm/ast: Add VGACR99 register constantsThomas Zimmermann2025-03-122-7/+7
| | | | | | | | | | Add register constants for VGACR99 and use them when detecting the size of the VGA memory. Aligns the code with the programming manual. Also replace literal size values with Linux' SZ_ size constants. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
* drm/ast: Add VGACRAA register constantsThomas Zimmermann2025-03-122-2/+4
| | | | | | | | | Add register constants for VGACRAA and use them when detecting the size of the VGA memory. Aligns the code with the programming manual. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
* drm/ast: Replace AST_VIDMEM_SIZE_ with Linux SZ_ constantsThomas Zimmermann2025-03-123-25/+16
| | | | | | | | | | | | | Ast's AST_VIDMEM_SIZE_ constants enumerate supported video-memory sizes from 8 MiB to 128 MiB. Replace them with Linux' SZ_ constants of the same value. When expanded, the literal values remain the same. The size constant for 128 MiB is unused and the default size is not necessary. Remove both of them. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
* drm/ast: cursor: Move implementation to separate source fileThomas Zimmermann2025-02-204-281/+330
| | | | | | | | | | | | Move the cursor code into a separate source file for readability. No functional changes. v2: - include <linux/bits.h> Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
* drm/ast: cursor: Add support for ARGB4444Thomas Zimmermann2025-02-201-10/+22
| | | | | | | | | Add support for cursor image data in ARGB4444 format. This is the hardware's native format and requires no conversion. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
* drm/ast: cursor: Move format conversion to shared helperThomas Zimmermann2025-02-202-55/+20
| | | | | | | | | | | | | | | | | | | User-space cursor-image data is encoded in ARBG8888, while hardware supports ARGB4444. Implement the format conversion as part of the format-helper framework, so that other drivers can benefit. This allows to respect the damage area of the cursor update. In previous code, all cursor image data had to be converted on each update. Now, only the changed areas require an update. The hardware image is always updated completely, as it is required for the checksum update. The format-conversion helper still contains the old implementation's optimization of writing 2 output pixels at the same time. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
* drm/ast: cursor: Calculate checksum in helperThomas Zimmermann2025-02-202-16/+58
| | | | | | | | | | | | | | | | Setting the cursor image requires a 32-bit checksum of the cursor image data. The current cursor code converts the image to ARGB4444 format and computes the checksum in a single step. Moving the checksum calculation into a separate helper will allow to move the format conversion into a shared helper. v2: - don't loop for checksum'ing final pixel (Jocelyn) - fix typo in commit message (Jocelyn) Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
* Merge tag 'drm-misc-next-2025-02-12' of ↵Dave Airlie2025-02-1411-628/+826
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.freedesktop.org/drm/misc/kernel into drm-next drm-misc-next for v6.15: UAPI Changes: fourcc: - Add modifiers for MediaTek tiled formats Cross-subsystem Changes: bus: - mhi: Enable image transfer via BHIe in PBL dma-buf: - Add fast-path for single-fence merging Core Changes: atomic helper: - Allow full modeset on connector changes - Clarify semantics of allow_modeset - Clarify semantics of drm_atomic_helper_check() buddy allocator: - Fix multi-root cleanup ci: - Update IGT display: - dp: Support Extendeds Wake Timeout - dp_mst: Fix RAD-to-string conversion panic: - Encode QR code according to Fido 2.2 probe helper: - Cleanups scheduler: - Cleanups ttm: - Refactor pool-allocation code - Cleanups Driver Changes: amdxdma: - Fix error handling - Cleanups ast: - Refactor detection of transmitter chips - Refactor support of VBIOS display-mode handling - astdp: Fix connection status; Filter unsupported display modes bridge: - adv7511: Report correct capabilities - it6505: Fix HDCP V compare - sn65dsi86: Fix device IDs - Cleanups i915: - Enable Extendeds Wake Timeout imagination: - Check job dependencies with DRM-sched helper ivpu: - Improve command-queue handling - Use workqueue for IRQ handling - Add suport for HW fault injection - Locking fixes - Cleanups mgag200: - Add support for G200eH5 chips msm: - dpu: Add concurrent writeback support for DPU 10.x+ nouveau: - Move drm_slave_encoder interface into driver - nvkm: Refactor GSP RPC omapdrm: - Cleanups panel: - Convert several panels to multi-style functions to improve error handling - edp: Add support for B140UAN04.4, BOE NV140FHM-NZ, CSW MNB601LS1-3, LG LP079QX1-SP0V, MNE007QS3-7, STA 116QHD024002, Starry 116KHD024006, Lenovo T14s Gen6 Snapdragon - himax-hx83102: Add support for CSOT PNA957QT1-1, Kingdisplay kd110n11-51ie, Starry 2082109qfh040022-50e panthor: - Expose sizes of intenral BOs via fdinfo - Fix race between reset and suspend - Cleanups qaic: - Add support for AIC200 - Cleanups renesas: - Fix limits in DT bindings rockchip: - rk3576: Add HDMI support - vop2: Add new display modes on RK3588 HDMI0 up to 4K - Don't change HDMI reference clock rate - Fix DT bindings solomon: - Set SPI device table to silence warnings - Fix pixel and scanline encoding v3d: - Cleanups vc4: - Use drm_exec - Use dma-resv for wait-BO ioctl - Remove seqno infrastructure virtgpu: - Support partial mappings of GEM objects - Reserve VGA resources during initialization - Fix UAF in virtgpu_dma_buf_free_obj() - Add panic support vkms: - Switch to a managed modesetting pipeline - Add support for ARGB8888 xlnx: - Set correct DMA segment size - Fix error handling - Fix docs Signed-off-by: Dave Airlie <[email protected]> From: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: astdp: Validate display modesThomas Zimmermann2025-02-111-0/+14
| | | | | | | | | | | | | | | | | | Validate each display mode against the astdp transmitter chips. Filters out modes that the chip does not support. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: astdp: Store mode index in connector stateThomas Zimmermann2025-02-111-6/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Look up the mode index for the astdp transmitter ship in the encoder's atomic check and report an error if the display mode is not supported. The lookup uses the DRM display mode instead of the driver's internal VBIOS mode. Both are equivalent. The modesetting code later reads the calculated index from the connector state to avoid recalculating it. v2: - fix typo in commit message (Jocelyn) Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: astdp: Inline mode-index calculationThomas Zimmermann2025-02-111-31/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | Programming the astdp transmitter chip requires a magic value for individual modes. Inline the helper for calculating the value into its only caller (i.e., the encoder's atomic_mode_set). With further refactoring, the atomic check will be able to detect invalid modes before attempting to program them. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: astdp: Add connector stateThomas Zimmermann2025-02-111-6/+56
| | | | | | | | | | | | | | | | | | Add dedicated connector state for ASTDP connectors. The state will store values for programming the transmitter chip. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Only look up VBIOS mode on full modesetsThomas Zimmermann2025-02-031-22/+24
| | | | | | | | | | | | | | | | | | | | Only look up the VBIOS mode during atomic_check if the display mode changes. For page flips, the previous settings still apply. Avoids the runtime overhead of looking up the VBIOS mode on each page flip. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Remove struct ast_vbios_mode_infoThomas Zimmermann2025-02-033-44/+32
| | | | | | | | | | | | | | | | | | | | The type struct ast_vbios_mode_info used to store information about the color format and display mode. It has outlived its purpose. Inline its fields into struct ast_crtc_state and replace all instances. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: astdp: Look up mode index from tableThomas Zimmermann2025-02-031-61/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the large switch statement with a look-up table when selecting the mode index. Makes the code easier to read. The table is sorted by resolutions; if run-time overhead from traversal becomes significant, binary search would be a possible optimization. The mode index requires a refresh-rate index to be added or subtracted, which still requires a minimal switch. In the original code, some of the indices did not contain this computation. Those cases would have been equivalent to adding 0, so they are now all subsumed in the switch's default branch. Signed-off-by: Thomas Zimmermann <[email protected]> Suggested-by: Jocelyn Falempe <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> v3: - explain the semantics of the new switch statement (Jocelyn) Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: astdp: Rework display-mode settingThomas Zimmermann2025-02-032-90/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ASTDP requires a mode index, depending on the resolution. Move the look-up code from ast_dp_set_mode() into a separate helper. Inline the rest of the function into its only caller. Rename the variable names and register constants to match the programming manual. As before, the mode-index lookup still happens during the update's atomic commit. Right now, there's no way of doing it during the atomic check. The lookup requires the VBIOS mode, which is not available at the atomic check's invocation. At least warn now if the mode index could not be found. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Inline ast_get_vbios_mode_info()Thomas Zimmermann2025-02-031-58/+54
| | | | | | | | | | | | | | | | | | | | | | | | The helper ast_get_vbios_mode_info() retrieves hardware-specific format and display-mode information. Inline the function into its only caller. While at it, also replace a use of struct drm_format_info.cpp with the correct DRM 4CC codes. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Validate DRM display modes against VBIOS modesThomas Zimmermann2025-02-031-57/+5
| | | | | | | | | | | | | | | | | | | | | | Test DRM display modes against the list of modes supported by the VBIOS. The helper will respect the supported-modes flags in struct ast_device. Hence only DRM display modes supported by the VBIOS will be reported; without the current duplication of this information. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Add helpers for VBIOS mode lookupThomas Zimmermann2025-02-037-263/+360
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mode lines are independent from hardware Gen or TX chip, so hide all VBIOS mode tables in ast_vbios.c. Move the look-up code for VBIOS modes from ast_vbios_get_mode_info() to ast_vbios_find_mode(). The new look-up function respects the supported-mode flags in struct ast_device. For example, if a device does not have struct ast_device.support_fullhd set, the helper does not return a valid mode for 1920x1080. Taking the supported-mode flags into account allows for making the VBIOS tables the single reference for validating and setting display modes against hardware capabilities. v2: - replace mode switch with look-up table (Jocelyn) Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Add empty initializer for VBIOS modesThomas Zimmermann2025-02-032-30/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | VBIOS mode tables are terminated by an entry with a refresh rate of 0xff. The code is hard to read and fragile to use. Therefore create an empty entry with AST_VBIOS_MODE_INVALID to terminate each mode list. Stop at the invalid entry when searching for modes in the tables. Instead of testing for refresh == 0xff, test with a helper function if the mode's size and refresh have meaningful values. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Find VBIOS mode from regular display sizeThomas Zimmermann2025-02-031-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ast driver looks up supplied display modes from an internal list of display modes supported by the VBIOS. Do not use the crtc_-prefixed display values from struct drm_display_mode for looking up the VBIOS mode. The fields contain raw values that the driver programs to hardware. They are affected by display settings like double-scan or interlace. Instead use the regular vdisplay and hdisplay fields for lookup. As the programmed values can now differ from the values used for lookup, set struct drm_display_mode.crtc_vdisplay and .crtc_hdisplay from the VBIOS mode. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Always validate H/V sync flagsThomas Zimmermann2025-02-031-25/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ast driver matches DRM display modes against an internal list of modes supported by the VBIOS. Matching H/V sync flags between modes is preferred, but optional. If sync flags are not matching, the driver would program the VBIOS settings to hardware and let the display handle the difference. DRM modes are generated from attached displays or standard mode lines. Therefore differences to the VBIOS modes are not just cosmetical, but signal possible incompatibility with the display hardware. Hence make matching H/V sync flags mandatory. If the VBIOS does not support a certain mode, we should report it as unsupported. Note that the VBIOS mode tables all appear to refer to standard modes. (If sync flags really make no difference to the VBIOS, the ast driver shouldn't match them in the first place.) Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Add support_wuxga flag to struct ast_deviceThomas Zimmermann2025-02-034-5/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Detect support for 1920x1200 (WUXGA) in ast_detect_widescreen(). The flag is cleared by default. The test logic has been taken from existing code in ast_crtc_helper_mode_valid(). The code in that function is being replaced by the new flag. v2: - move shared detection code into helper (Jocelyn) Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Add support_fullhd flag to struct ast_deviceThomas Zimmermann2025-02-033-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Detect support for 1920x1080 (FullHD) in ast_detect_widescreen(). The flag is cleared by default. The test logic has been taken from existing code in ast_crtc_helper_mode_valid(). The code in that function is being replaced by the new flag. For Gen3, a new branch duplicates the Gen2 logic and adds a test for AST2200. Gen2 adds a test for AST2100. v2: - use fullhd flag for setting max width/height Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Reorganize widescreen test around hardware GensThomas Zimmermann2025-02-031-22/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Testing for support of widescreen modes mixes up various hardware Gens. First branch by hardware Gen, then do specific tests for each Gen. By default, widesscreen support is disabled. Later patches will add more specific tests for each Gen. v2: - move shared detection code into helper (Jocelyn) Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Rename support_wide_screen to support_wsxga_pThomas Zimmermann2025-02-033-10/+10
| | | | | | | | | | | | | | | | | | The flag support_wide_screen in struct ast_device selects devices that support resolutions of at least 1680x1050 (WSXGA+). Name it accordingly. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Align naming in widescreen detection code to manualThomas Zimmermann2025-02-034-11/+12
| | | | | | | | | | | | | | | | | | Rename variables and register constants to align with the programming manual. Add new constants where necessary. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Remove 1152x864 from list of widescreen resolutionsThomas Zimmermann2025-02-031-2/+0
| | | | | | | | | | | | | | | | | | The resolution 1152x864 has a ratio of 4:3 and is already handled as such. Remove it from the list of widescreen resolutions. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Fix ast_dp connection statusJocelyn Falempe2025-01-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ast_dp_is_connected() used to also check for link training success to report the DP connector as connected. Without this check, the physical_status is always connected. So if no monitor is present, it will fail to read the EDID and set the default resolution to 640x480 instead of 1024x768. Signed-off-by: Jocelyn Falempe <[email protected]> Fixes: 2281475168d2 ("drm/ast: astdp: Perform link training during atomic_enable") Reported-by: Jerry Hoemann <[email protected]> Tested-by: Jose Lopez <[email protected]> Cc: Thomas Zimmermann <[email protected]> Cc: Dave Airlie <[email protected]> Cc: [email protected] Cc: <[email protected]> # v6.12+ Reviewed-by: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Only warn about unsupported TX chips on Gen4 and laterThomas Zimmermann2025-01-221-18/+22
| | | | | | | | | | | | | | | | | | Only Gen4 and later read the installed TX chip from the SoC. So only warn on those generations about unsupported chips. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Merge TX-chip detection code for Gen4 and laterThomas Zimmermann2025-01-221-6/+11
| | | | | | | | | | | | | | | | | | Gens 4 to 6 and Gen7 use the same pattern for detecting the installed TX chips. Merge the code into a single branch. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Align Gen1 DVO detection to register manualThomas Zimmermann2025-01-222-3/+4
| | | | | | | | | | | | | | | | | | Align variable names and register constants for TX-chip detection to the names in the register manual. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Hide Gens 1 to 3 TX detection in branchThomas Zimmermann2025-01-221-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Gen7 only supports ASTDP. Gens 4 to 6 support various TX chips, except ASTDP. These boards detect the TX chips by reading the SoC scratch register as VGACRD1. Gens 1 to 3 only support SIL164. These boards read the DVO bit from VGACRA3. Hence move this test behind a branch, so that it does not run on later generations. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Initialize ASTDP in ast_post_gpu()Thomas Zimmermann2025-01-224-11/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the call to ast_dp_launch() from ast_detect_tx_chip() and perform it unconditionally in ast_post_gpu(). Also add error handling: the detection code apparently used ast_dp_launch() to test for a working ASTDP, falling back to VGA on errors. As the VBIOS reports ASTDP, silently ignoring errors is questionable behavior. With the refactoring, failing to initialize the ASTDP will also fail probing the driver. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Refactor ast_post_gpu() by GenThomas Zimmermann2025-01-221-10/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | Reorganize ast_post_gpu() so that it first branches by Gen and then by config mode and TX chip. This will later make it possible to split up the function by Gen. The helper ast_init_3rdtx() only handles Gen4 and Gen5, so leave it out from the other Gens. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Detect DRAM before TX-chipThomas Zimmermann2025-01-221-3/+1
| | | | | | | | | | | | | | | | | | | | Move DRAM detection before TX-chip detection. Both steps are independent from each other. Detection of the TX-chip is now next to posting those chips, which can be done in a single step. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| * drm/ast: Detect wide-screen support before creating modeset pipelineThomas Zimmermann2025-01-221-1/+2
| | | | | | | | | | | | | | | | | | | | Wide-screen support is relevant for mode validation. Do not detect it before setting up the mode-setting pipeline. Gets the function call out of the way of other initialization code. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
* | Merge remote-tracking branch 'drm-misc/drm-misc-next-fixes' into drm-misc-fixesMaxime Ripard2025-02-062-3/+1
|\| | | | | | | | | | | Merge the few remaining patches stuck into drm-misc-next-fixes. Signed-off-by: Maxime Ripard <[email protected]>
| * drm: remove driver date from struct drm_driver and all driversJani Nikula2024-12-052-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]>
| * drm/client: Move public client header to clients/ subdirectoryThomas Zimmermann2024-11-151-1/+1
| | | | | | | | | | | | | | | | | | Move the public header file drm_client_setup.h to the clients/ subdirectory and update all drivers. No functional changes. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
* | drm/ast: astdp: Fix timeout for enabling video signalThomas Zimmermann2025-01-281-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ASTDP transmitter sometimes takes up to 1 second for enabling the video signal, while the timeout is only 200 msec. This results in a kernel error message. Increase the timeout to 1 second. An example of the error message is shown below. [ 697.084433] ------------[ cut here ]------------ [ 697.091115] ast 0000:02:00.0: [drm] drm_WARN_ON(!__ast_dp_wait_enable(ast, enabled)) [ 697.091233] WARNING: CPU: 1 PID: 160 at drivers/gpu/drm/ast/ast_dp.c:232 ast_dp_set_enable+0x123/0x140 [ast] [...] [ 697.272469] RIP: 0010:ast_dp_set_enable+0x123/0x140 [ast] [...] [ 697.415283] Call Trace: [ 697.420727] <TASK> [ 697.425908] ? show_trace_log_lvl+0x196/0x2c0 [ 697.433304] ? show_trace_log_lvl+0x196/0x2c0 [ 697.440693] ? drm_atomic_helper_commit_modeset_enables+0x30a/0x470 [ 697.450115] ? ast_dp_set_enable+0x123/0x140 [ast] [ 697.458059] ? __warn.cold+0xaf/0xca [ 697.464713] ? ast_dp_set_enable+0x123/0x140 [ast] [ 697.472633] ? report_bug+0x134/0x1d0 [ 697.479544] ? handle_bug+0x58/0x90 [ 697.486127] ? exc_invalid_op+0x13/0x40 [ 697.492975] ? asm_exc_invalid_op+0x16/0x20 [ 697.500224] ? preempt_count_sub+0x14/0xc0 [ 697.507473] ? ast_dp_set_enable+0x123/0x140 [ast] [ 697.515377] ? ast_dp_set_enable+0x123/0x140 [ast] [ 697.523227] drm_atomic_helper_commit_modeset_enables+0x30a/0x470 [ 697.532388] drm_atomic_helper_commit_tail+0x58/0x90 [ 697.540400] ast_mode_config_helper_atomic_commit_tail+0x30/0x40 [ast] [ 697.550009] commit_tail+0xfe/0x1d0 [ 697.556547] drm_atomic_helper_commit+0x198/0x1c0 This is a cosmetical problem. Enabling the video signal still works even with the error message. The problem has always been present, but only recent versions of the ast driver warn about missing the timeout. Signed-off-by: Thomas Zimmermann <[email protected]> Fixes: 4e29cc7c5c67 ("drm/ast: astdp: Replace ast_dp_set_on_off()") Cc: Thomas Zimmermann <[email protected]> Cc: Jocelyn Falempe <[email protected]> Cc: Dave Airlie <[email protected]> Cc: [email protected] Cc: <[email protected]> # v6.13+ Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
* Backmerge v6.12-rc6 of ↵Dave Airlie2024-11-042-0/+4
|\ | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next Backmerge Linus tree for some drm-fixes needed for msm and xe merges. Signed-off-by: Dave Airlie <[email protected]>