From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.225.138 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796000924; b=vAu3nAIfPrBJIALD/Dc5ex3MMm+NdwUx57+RvKinRY/c7gfecaYCm1gGiCkTGPtWJzG2 ezzDqd7MVIS7QXjBnTjtlbfaeYFIaF1v9Sd7uzEfweFaIMGjAI6NdVpff1Rnkf9zFPTcD LoiNOLEIaj306+WUwFCRJQzIU3kvS5e3WkUsjtr8viaIYRDJOsi5kPxbMhdZFWb/7jGh1 hyw0TpsTw4qgheRBrD1hLgoLZEMLEjfuC4D+7u+Pbd7zgaAbQkWJChmT5ubVl7XmKzy8T TwNZf2BC6/GsMMxexOvA3JaRclw+f1CZ6Qx8ouppOrTu8s5omX5qxTyIbSgUBBanlkw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796000924; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Message-ID:Date:MIME-Version:User-Agent:From:Subject:To:Cc: Content-Language:Content-Type:Content-Transfer-Encoding; bh=TmI4NFeXrG8LdlCjE4Ra528YOMJrCAD/tbGj2Hn+rHs=; b=PkXSJ1lonUE6Tec8s4ES4PiZ3z8FnVh/FUkxnI/DPAs50HuNmg9+dac2wOXHi4Rhgqb4 0Uo8hAbIY4OUAS6NCCFJLW8SaLbOS8vio+BoR1zpQi54yoIl+SCD4RWjhWvd/OgFHEk/6 UPv8aQaPdeEYz20Uc+a/rV6MqkSZA5wSh0y4TZy1Pnu/jvorE2X9Yl8V1ApQZE9NkSAOq yHmDX+sm78OZbw5rMXXnkG83LFIBMPdazgV3xnAlHCF1zY8imTQJ0MRe2B+TqGzuoDOMb 3MT0gCfBfEKUUNciIh10SLNsnx6QNkRPz2TK+60dgkwJOG6qombzsSHXaafAaiQKfdQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=ZarHlZpI; arc=none smtp.remote-ip=74.125.225.138 Received: from mail-wm2-f10.google.com (mail-wm2-f10.google.com [74.125.225.138]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB1EB606A31C for ; Mon, 30 Nov 2026 01:08:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CB1EB606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=ZarHlZpI Received: by mail-wm2-f10.google.com with SMTP id 5b1f17b1804b1-4b80834ce1aso16488455e9.1 for ; Sun, 29 Nov 2026 17:08:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796000922; x=1796605722; darn=vger.kernel.org; h=content-transfer-encoding:content-type:content-language:cc:to :subject:from:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to:content-type; bh=TmI4NFeXrG8LdlCjE4Ra528YOMJrCAD/tbGj2Hn+rHs=; b=ZarHlZpIgcY0X0asoafBeKg3xKBW2z350n1frlunNkdsRydECBXvccxETpTuDK3Id+ sYmkLXsZPn7OZxP+yWzP0kiMkC/Qg3/LunjqqkciQGxX1Z2HXoxuggsXqLkhNz5yfOTL rD2LJY08W8mYxtNOYDO2gImBuTLd4dZO9hl5TK+YNjXM6CiJgz6edWgLjGdPwfgDkzvd gs5Y+gnnN7BBlM/caa7+dwoLxRsQ2MzYEpOTR4llXENWP1wrWhct0GxZfk2D2rDna2pO S0X3uFVb6UQTnHKHtmbAkU3vjGE6cA7VQ6DBxX7yfO4x6Wcv7skMEKfp/fzLcrBuuSsg F2iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796000922; x=1796605722; h=content-transfer-encoding:content-type:content-language:cc:to :subject:from:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=TmI4NFeXrG8LdlCjE4Ra528YOMJrCAD/tbGj2Hn+rHs=; b=lVRDcAHUDd8kHyJ4AYnSnxwM7nvhQOOI6vaVMyWgU3Kbq5XX9BQgPiGzD7OmnWIz3U +TviCcgTSpLbKccf8JLZw3/F/clBIJYVVDqzwqR0LpyzqenRHdFUtaDmbUAGCapYkddZ hUh8ikv++0X+lfUIYkHN/xm9Nj8Zu8xsoXDz0c2ithik9nopBz2huHSJAzHtBi/FWRcW BsaoKozQUGRHwuVS9+Bm3/vML3RsTQOd1SPjkAzPqhH3E7dOayBGj6DkJUmr9IwVkcYS ORobSD/4mw1OzYbUbqCmp9AEj2agFueykwRBBCAns3XQI1r38arLp9QAbotWhtXDahW8 WLwA== X-Forwarded-Encrypted: i=1; AL+hErHiGxshuMkpzwIRc1HhGK6O33GV+Q3pbJm0VqaM2JOnlMMuplnfdmzG1kM4J4Sjf6mjsKi8sm5lFUrM8UY=@vger.kernel.org X-Gm-Message-State: APuU4Z+GRwF7hoLsmnSQqESa594C6evYGvV/U0En4jIt2SigNP1RlW9B DFiVUqa9MIjO0bm2VJd+9y9SrkU9mO3JOR8kXZZNZugSBYhkwZeawiN1 X-Gm-Gg: AZFdTZe615Qg1ZbkMsM92q9am+xnBfmxn6ugiZliizs0KzHsvqLmP+6mDIiXYF/Lbd8 Cvp97N6HTOmhmjRFCUfbx8tMWiJpdyodPr9DMrdjaaL2zXg5X7piM+RolDn3MMhV75sAdM1IDID jEkQahuYzyR0Rikau/0kUNK1LB/6VxcJ3O0OJ3UtndvRDUH/AscT4F7WmqTHkUgRmOAaXdzC5/p qNKlgrZDlmM7B7hWB6teG/km5efPRG52oVco+C2jKkNl81gTUDMfoEV4VJP/o++2hPA1gj2wZKZ ha6xE+LyE18a2+yelvGwVdPTeufaQUcpsv1/7We8Pf+/AWGTybyndi0FJWBdlgqT1ZsEgf1/0vf h5pdJ/pZ9egO0Y2O6Vv0JWkQcb4r5Q/YQzCZtTJW8TdwmM5MdAhFVlCOV2oz+z6EjX59ijR1yUC DFZiddIGKGkQ93ttdFz0DE6QJjsVj6Hoj2N5G1HRYY1uBSPkKKSAiWb+d/ezl+pF7Gm0WRBvWJ3 OSUiqRcg+U+Wqo7W0kUjUgE+LKE0naYO2juUfhisaE7EwUXOkjxXDCRQ2GsRTlhIxzzlT38nGCC eoNzOYSZD7ooDA7+o7nePCV/7/eb5iiNMVWm X-Received: by 2002:a05:600c:1384:b0:4a2:1612:6367 with SMTP id 5b1f17b1804b1-4bb88816c44mr638698355e9.15.1796000921637; Sun, 29 Nov 2026 17:08:41 -0800 (PST) Received: from [192.168.1.11] ([31.94.68.154]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb853a9687sm991740915e9.10.2026.11.29.17.08.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 29 Nov 2026 17:08:39 -0800 (PST) Message-ID: Date: Mon, 30 Nov 2026 01:08:38 +0000 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Richard Lane Subject: [PATCH v5 0/3] drm/amd: Enable 2x1 tiled display support on Apple Intel Retina iMacs To: "amd-gfx@lists.freedesktop.org" Cc: Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , David Airlie , Simona Vetter , Harry Wentland , Leo Li , Rodrigo Siqueira , Mario Limonciello , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Richard Lane Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi folks, Apple 21.5" 4K (iMac18,2, iMac19,2) and 27" 5K (iMac15,1, iMac17,1, iMac18,3, Polaris-based iMac19,1) Retina iMacs drive their internal 4096x2304 or 5120x2880 panel as a 2x1 tiled display using two streams over an internal eDP root link and a secondary DP link. At boot, the Apple EFI firmware initializes only a single pipe and leaves the secondary DP tile unlatched with HPD deasserted. Because the secondary tile reports HPD low and requires a vendor-specific DPCD handshake before it responds as a DisplayPort sink, amdgpu currently fails to detect the second tile, leaving Linux limited to single-tile resolutions. This series enables full dual-tile operation on DCE < 12 Apple 4K/5K Retina iMacs so that the internal panel behaves like a standard DisplayID tiled monitor: 1. Calculate the pre-OS framebuffer reservation in GMC v7 and v8 using mmGRPH_PITCH and the mmGRPH_PRIMARY_SURFACE_ADDRESS offset from vram_start so the full relocated Apple EFI scanout surface is preserved during boot handover without vendor-specific quirks. 2. Latch the root eDP link via DPCD 0x4F1 prior to EDID read on Apple hardware (DCE < 12), point the secondary DP link to the root eDP link (apple_imac_peer) via an EDID quirk covering 4K and 5K Retina iMacs, latch the secondary tile via DPCD 0x4F1 on the root eDP link, write the 3-byte Boot Camp source table (0x310) on the secondary link, and unlatch the TCON back to single-pipe mode on suspend/shutdown. Once unlocked, DRM's DisplayID parser populates has_tile, tile_group, and tile_is_single_monitor on both connectors natively. (DCE >= 12 support for Vega-equipped iMac19,1, iMacPro1,1, and 2020 iMac20,x is noted as TODO.) 3. Compute context->bw_ctx.bw.dce.all_displays_in_sync in dce100_validate_bandwidth() using resource_are_streams_timing_synchronizable() and copy it to pp_display_cfg->all_displays_in_sync in dce_pplib_apply_display_requirements(), matching the existing DCE 11 bw_calcs() flow so SMU7 can downclock MCLK at idle on DCE <= 10 without modeset underflows. Changes in v5: - Patch 2: Dropped the link_detect_sink_signal_type() guard in link_detection.c, as testing confirmed dm_helpers_is_dp_sink_present() detects the native secondary DP sink without falling back to DVI. - Patch 3: Adjusted line-break formatting in dce100_resource.c to satisfy checkpatch --strict. Changes in v4: - Patch 2: Drop the link_dp_phy.c hunk that skipped DP_SET_POWER D3 on the secondary DP link, as testing confirmed both DPMS blanking/wake and S3 suspend/resume work properly without it. Changes in v3: - Patch 2: Added pre-EDID DPCD 0x4F1 latch on the root eDP link in dm_helpers_read_local_edid() so dual-tile detection works even when third party bootloaders are not present on the EFI partition. Added 21.5" 4K Retina iMac panel IDs (AE19/1A for iMac18,2 and iMac19,2) and renamed apple_5k_peer / amdgpu_dm_apple5k_unlatch() to apple_imac_peer / amdgpu_dm_apple_imac_unlatch(). - Patch 3: Dropped the dm_pp_apply_display_requirements() call in amdgpu_dm.c and instead computed all_displays_in_sync in dce100_validate_bandwidth() and copied it in dce_pplib_apply_display_requirements() (dce_clk_mgr.c) to match the existing DCE 11 bw_calcs() path. Changes in v2: - Patch 1: Replaced the hardcoded 64 MiB Apple quirk in amdgpu_gmc.c with a generic calculation in gmc_v7_0_get_vbios_fb_size() and gmc_v8_0_get_vbios_fb_size() using mmGRPH_PITCH and mmGRPH_PRIMARY_SURFACE_ADDRESS. - Patch 2: Dropped the DRM_MODE_CONNECTOR_eDP override in amdgpu_dm_connector.c in favor of DRM's native DisplayID tile properties (has_tile, tile_group, tile_is_single_monitor). Renamed tiled_peer to apple_5k_peer and set it only on the secondary DP link, removing dm_helpers_wire_tiled_peer(), dc_link_is_apple_5k_secondary(), and inline explanatory comments. - Patch 3: Made the PowerPlay sync check generic for any combination of synchronized displays by checking timing_sync_info.group_size == params.stream_count instead of tiled_peer. Regards, Richard Richard Lane (3): drm/amdgpu: use pitch and surface offset for GMC v7/v8 fb size drm/amd/display: unlock secondary tile on Apple 4K/5K iMac panels drm/amd/display: report synced displays to PowerPlay on DCE <= 10 drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 8 +++-- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 8 +++-- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 19 ++++++++++ .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 35 +++++++++++++++++++ .../display/dc/clk_mgr/dce100/dce_clk_mgr.c | 3 ++ drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../drm/amd/display/dc/link/link_detection.c | 5 +++ .../dc/link/protocols/link_dp_capability.c | 4 +++ .../dc/resource/dce100/dce100_resource.c | 9 +++++ 9 files changed, 86 insertions(+), 6 deletions(-) -- 2.55.0