From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5145729BDAB for ; Tue, 10 Feb 2026 05:06:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770699973; cv=none; b=VV/VQf5Bc9elSMkVeZ0VR9UnhbG9UpWVPqHmtBVhvggKePsJkvl3k4kOZPnvRSv1FdO742Dx2Wmx0I+aNcQ8U7hxnxT1CkL+rPA/ZjvsRNRj15MkxnOz6PsnY9zH85KGDxnYj7q9oDwPbHQvhG6AMGSg/skzjNL6D6D91dhUOSc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770699973; c=relaxed/simple; bh=Okgv8cmIYWGTstIJaM/+KSrIirtxVcFNzQeYz1yx0to=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=O5MVdQf488TmADV1lFT8Px+l5LVfFm09710r+w/rPyK3MP5B6ZBnmTJ1TTFhkuFcU5iMoUE/ji4Pdd8EeOgn1ef/sSH1DAuq/kAPdE/MjNqW16gDgpcLjUdn3yVcWK4LMV+qyDGPKgDKlx1bNDA40947FhwrCtn3Zt+lepAOcbo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=P2/2qQTH; arc=none smtp.client-ip=209.85.216.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="P2/2qQTH" Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-354a4ef0c1eso264943a91.2 for ; Mon, 09 Feb 2026 21:06:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1770699971; x=1771304771; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=wMMIDaH2OMrzByxZGI9BwGClJ/ZnKLT/rEz49GNyBFQ=; b=P2/2qQTHt8wm7PfXMMelDmsmkRbofXwb0b/iVcKjYpJN0nrdWZeDp9F8/GnVQASHLi kgf8yO3NQGYilhAIcc7QE9c/da8xziUwG22RcpMLqK5ZfbKYevhMG2NMH178+7luxrEu wXGg0ki1fM4FTkdQhJrdDk40z8LdZiSIgqhkk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770699971; x=1771304771; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wMMIDaH2OMrzByxZGI9BwGClJ/ZnKLT/rEz49GNyBFQ=; b=W4UT6P3+Ncvi4/57j93oZOv8Ih23j01RzRfF6R/GO/Fy/sZPEAAlmCaPZjkIqO8/Sb 80e8PCWY3EjJR9fH3LDOJMCE+VE90Zq9z5jGERJn/NjLhxyUe43yBRFxQHwKUKBn9xwy HpMObguh7OhPTn71HaAXeExIK6eKjC1Wtd0LxlEMPnno7BHy9cNGl5NVfZwTII1YJSy2 1ya0QB+Ba0lK2BQlh26q9psMcGZ/b2eCcrryKJXVBGsfn9hd21Z6+lV6YwvIZd9gMHky elYEKlhh7hlee3m1vKtm0Zj7dG7lYev7t7CMdFGiztf/RBu6pvqqqWKuHHKpSZI9VVSN gobA== X-Forwarded-Encrypted: i=1; AJvYcCUzs9+3/Zjfkunl8300y0u2na9EO8Hwhl7Y/RATA7mA/mKC3lpt91s0YRluu7PoA0yeBJ+JCdRLFtIg+FA=@vger.kernel.org X-Gm-Message-State: AOJu0Yzss768t7hp1np79fneIbsZz7KQADJsG0RUBP6CsyQ0E81o3Q9o r3UpNm/Lua2kD60Am9Pe2rAbBwuZ4sldu1MHo76k/u3RVy8MQlDNQiV3IWvWoXh/iQ== X-Gm-Gg: AZuq6aL2d4NCM1AWEEjhtUM2PzAhUO3lkBwRVYYNBrgefwFEaaWkiWbWKqsATNr/M+r gUgGgEXll2zvIkqBsNHF4H1dFTtGoZcTzrkaUq22SyvYLfKB2413B4sCKo425PPwSPKLPINgBB+ nSwwlYSQGWDZstqDnU4qWSsU40XM8FgixmYlS1bWwvah/YvaZggSt2Oz4zBP74TzUbICyrnopvI A3vi8a03u0EN1761+RkOI15PM915QGXQJrkOnIuTiuHZ7uiEPGMBn9VUTP9Bz0rqnXEsB5lPWSO vLXrAxX/GhHHCrUFgrY7290G8lCN3ZL/oHeMBgd4GwS7/gfqwBjhi3Vyzo4UslTGY29aq9LGHU2 4XhfhxkmYzjfXzkPua4aYoCFGcRNYWSxGz9blFLpSh0w0aRQr573V4eMnDZ5IYnlRhBF0ZI8x3M imrSriSxwPR+lfNsvB+S9L6d37dw6+9KKudRMR6VxaTIHtkgv4LK1V/ls= X-Received: by 2002:a17:90b:314c:b0:34c:9cec:dd83 with SMTP id 98e67ed59e1d1-354b3e4b663mr12562993a91.27.1770699971626; Mon, 09 Feb 2026 21:06:11 -0800 (PST) Received: from google.com ([2a00:79e0:201d:8:822c:995b:f23f:e04e]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3562fc6f342sm3648006a91.0.2026.02.09.21.06.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Feb 2026 21:06:11 -0800 (PST) Date: Tue, 10 Feb 2026 13:06:06 +0800 From: Chen-Yu Tsai To: Ariel D'Alessandro Cc: chunkuang.hu@kernel.org, p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, greenjustin@chromium.org, sjoerd@collabora.com, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com, Macpaul Lin =?utf-8?B?KOael+aZuuaWjCk=?= , Daniel Stone Subject: Re: [PATCH] drm/mediatek: Disable AFBC support on Mediatek DRM driver Message-ID: <20260210050606.GA852606@google.com> References: <20251024202756.811425-1-ariel.dalessandro@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251024202756.811425-1-ariel.dalessandro@collabora.com> Sorry for revisiting this old thread. On Fri, Oct 24, 2025 at 05:27:56PM -0300, Ariel D'Alessandro wrote: > Commit c410fa9b07c32 ("drm/mediatek: Add AFBC support to Mediatek DRM > driver") added AFBC support to Mediatek DRM and enabled the > 32x8/split/sparse modifier. > > However, this is currently broken on Mediatek MT8188 (Genio 700 EVK > platform); tested using upstream Kernel and Mesa (v25.2.1), AFBC is used by > default since Mesa v25.0. > > Kernel trace reports vblank timeouts constantly, and the render is garbled: > > ``` > [CRTC:62:crtc-0] vblank wait timed out > WARNING: CPU: 7 PID: 70 at drivers/gpu/drm/drm_atomic_helper.c:1835 drm_atomic_helper_wait_for_vblanks.part.0+0x24c/0x27c > [...] > Hardware name: MediaTek Genio-700 EVK (DT) > Workqueue: events_unbound commit_work > pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) > pc : drm_atomic_helper_wait_for_vblanks.part.0+0x24c/0x27c > lr : drm_atomic_helper_wait_for_vblanks.part.0+0x24c/0x27c > sp : ffff80008337bca0 > x29: ffff80008337bcd0 x28: 0000000000000061 x27: 0000000000000000 > x26: 0000000000000001 x25: 0000000000000000 x24: ffff0000c9dcc000 > x23: 0000000000000001 x22: 0000000000000000 x21: ffff0000c66f2f80 > x20: ffff0000c0d7d880 x19: 0000000000000000 x18: 000000000000000a > x17: 000000040044ffff x16: 005000f2b5503510 x15: 0000000000000000 > x14: 0000000000000000 x13: 74756f2064656d69 x12: 742074696177206b > x11: 0000000000000058 x10: 0000000000000018 x9 : ffff800082396a70 > x8 : 0000000000057fa8 x7 : 0000000000000cce x6 : ffff8000823eea70 > x5 : ffff0001fef5f408 x4 : ffff80017ccee000 x3 : ffff0000c12cb480 > x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff0000c12cb480 > Call trace: > drm_atomic_helper_wait_for_vblanks.part.0+0x24c/0x27c (P) > drm_atomic_helper_commit_tail_rpm+0x64/0x80 > commit_tail+0xa4/0x1a4 > commit_work+0x14/0x20 > process_one_work+0x150/0x290 > worker_thread+0x2d0/0x3ec > kthread+0x12c/0x210 > ret_from_fork+0x10/0x20 > ---[ end trace 0000000000000000 ]--- > ``` > > Until this gets fixed upstream, disable AFBC support on this platform, as > it's currently broken with upstream Mesa. Do you remember the circumstances you had an issue with? Looking at our notes, it seems that for MT8188 only vdosys0 supports AFBC. And on MT8195 it has issues with color correction on the second pipeline. The driver as currently seen in next-20260209 only signals AFBC support for the first pipeline on these two platforms. So I don't see any issues there. The commit you mentioned that introduces AFBC support failed to take into account this flag when exposing AFBC support to userspace. But this was subsequently fixed by: 8d121a82fa56 drm/mediatek: only announce AFBC if really supported On my MT8188 based Chromebook, only the planes for the internal display, i.e. the first or vdosys0 pipeline, show AFBC support. AFAICT the Genio 700 EVK only has one external HDMI connector, and that is tied to the second pipeline, which should not have AFBC support announced. I'm not sure why mesa would still be using AFBC then. Thanks ChenYu