From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 06C6434CFCF for ; Mon, 3 Aug 2026 16:11:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785773473; cv=none; b=DQ3N9xABJvh06ZmQi6jQdolOTJLj4KgYY953KUT/Zh6LiW66lNDTK/hHFB6Y4fq8an3JASQYpU3FY+7BDe4vvyF4eznLefOx2Loz8zIQJArSH8cxvGljL4R0ScAkOcx0Ecl/T3Q8iXhGVuCMSI6kOKd4eQ1NwFXpk7+/2kG0Dx0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785773473; c=relaxed/simple; bh=aQxO8CqYWIJBy/ebvnHErzyN0uZRNICXhzvqqUiRwII=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=VH8zZAGnSiEqpeZNaJ5oZRd7pklxOwEEk7n+/ZAhoQupL5JQEoatM+PesQdBKcXBGP0lPm33qCemJFhaGuLXuzQ3BD0DKKUfsyjFn5XgIcQEc9AK46Q43DIOOmij3eRMUucejkrlIdymbI0nDGBKPlEnnwCGIXu0wrs6rSOYHas= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Au+PzMkU; arc=none smtp.client-ip=209.85.128.52 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.b="Au+PzMkU" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4954aff6088so19959195e9.3 for ; Mon, 03 Aug 2026 09:11:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785773470; x=1786378270; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=TkgRTuLVuCLYpIvdltmqBCjRKT4GYVnjKziTrqAUoEE=; b=Au+PzMkUHsvacSBXUDQFoopSbORXk4mQZMqwwTfC6/ThuGT5WtDsJkPKxY/4o5a0U/ hy8j3xTHFPmjtmIgUdWr+2LodDxWgi+bQxjF7C51mfwd5BTEqg4eBJnTQ0Rd31BRgWDZ VbfW2W87nC1WMmr0ct7NJlzYNDQk3feTexsx7hjRs3cQJPOLqbl4tm1hk8fl59nJ3VJU PTXc9IeBCosE/QgaocJ/qytERR1rFEypYYuBKREm5PnDqRv6l3SDTO9up61t48AuYObq zwPiBb6ka5+xsy6kMocX4r6IEIzUGbz1JK7S4dCakhEuxBvCur6MHHYSp8bDmYFG1GTe oE9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785773470; x=1786378270; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=TkgRTuLVuCLYpIvdltmqBCjRKT4GYVnjKziTrqAUoEE=; b=s0CC9+oQhG6MKDKkdAGnPng68oDOZit9KQIQrzAmZIYFjV1z2rWrorn5xmwy/bem5n PVQ51Favk7UUie5x6Kizs8y+PZtJKULBbtas8mQBcYJ1ouL+b6hFkBVkO22xvNxdQTPy UkoTMkpEn63eQkDuKcjwwlKxSmtsUO+QHYzYp4AI+mXRaR22w46W9QV736LUE9v2mCxp Sw/ePS5C24l1yF/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OwxLKJEHBu80rCOSkKF3HYwR6OVDXBY/vI/Nh5p0rxD1rRzNyoI6gJ Db3g== X-Received: by 2002:a05:600c:468e:b0:495:4b42:8677 with SMTP id 5b1f17b1804b1-4980c6a2268mr222728085e9.18.1785773469919; Mon, 03 Aug 2026 09:11:09 -0700 (PDT) Received: from jernej-laptop (APN-122-100-117-gprs.simobil.net. [46.122.100.117]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49949fc2da2sm3363735e9.3.2026.08.03.09.11.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 09:11:08 -0700 (PDT) From: Jernej Skrabec To: wens@kernel.org Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, samuel@sholland.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Jernej Skrabec Subject: [PATCH 00/13] drm/sun4i: Assorted display fixes Date: Mon, 3 Aug 2026 18:10:38 +0200 Message-ID: X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series contains fixes for issues found while working on the DE3 and DE33 functionalities, used on H6 and H616 SoCs. VI scaler and VI layer: - V3s advertises a 2048 pixel YUV line buffer, while it only has half of that, so wide YUV layers end up corrupted. - Vertical scaler coefficients were picked based on the horizontal scaling factor and chroma coefficients ignored subsampling. - DE3 mixer initialization clears the whole register space, which also clears the scaler global alpha. Since video mode takes alpha from that register, subsampled YUV layers are fully transparent. - Since the conversion to drm_fb_dma_get_gem_addr(), luma and chroma plane addresses no longer describe the same pixel for odd source offsets, which the scaler can't handle. TCON TOP and TCON: - Both mixer selectors reset to TCON 0. If both mixers end up selecting the same TCON, output is black or corrupted, so park the other mixer elsewhere. - DSI and LVDS never called the output mux setup, so on D1 the mixer is not routed to the TCON driving the panel. HDMI: - sun4i_hdmi_enable() ORs stale video timing polarity bits into the packet control register, so the AVI infoframe is not sent for modes with positive HSYNC polarity. - The 594 MHz 8-bit MPLL entry doesn't lock on H6, so 4K@60 8-bit doesn't come up. The rest are an error propagation fix in sun4i_crtc_init(), which otherwise oopses later on, and four patches fixing OF node and device reference leaks, two of which accumulate on every mode set. Tested on Tanix TX6 (H6, HDMI up to 4K@60) and Orange Pi 3 (H6, TCON_LCD0 and TCON_TV0). Some of the issues were found and/or fixed with Claude and GPT. It would be nice if anyone could test V3s fix before and after. Testing other fixes would be nice as well. Best regards, Jernej Jernej Skrabec (13): drm/sun4i: Fix V3s YUV scanline size drm/sun4i: vi scaler: Fix coefficient selection drm/sun4i: vi scaler: Restore opaque alpha in video modes drm/sun4i: tcon-top: Keep mixer routes distinct drm/sun4i: tcon: Set output mux for DSI and LVDS drm/sun4i: tcon: Drop TCON TOP device reference drm/sun4i: hdmi: Don't leak sync polarity bits into packet control drm/sun4i: crtc: Propagate layer initialization error drm/sun4i: tcon: Drop remote endpoint reference drm/sun4i: dw-hdmi: Drop TCON TOP port reference drm/sun4i: Drop node references while building component list drm/sun4i: hdmi-phy: Fix H6 8-bit MPLL config at 594 MHz drm/sun4i: Align VI buffer addresses for subsampled formats drivers/gpu/drm/sun4i/sun4i_crtc.c | 2 +- drivers/gpu/drm/sun4i/sun4i_drv.c | 3 ++ drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 2 +- drivers/gpu/drm/sun4i/sun4i_tcon.c | 22 ++++---- drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c | 2 + drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 2 +- drivers/gpu/drm/sun4i/sun8i_mixer.c | 2 +- drivers/gpu/drm/sun4i/sun8i_tcon_top.c | 71 ++++++++++++++++++++----- drivers/gpu/drm/sun4i/sun8i_tcon_top.h | 6 +++ drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 20 ++++++- drivers/gpu/drm/sun4i/sun8i_vi_scaler.c | 20 ++++--- drivers/gpu/drm/sun4i/sun8i_vi_scaler.h | 1 + 12 files changed, 119 insertions(+), 34 deletions(-) -- 2.43.0