From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from raptorengineering.com (mail.raptorengineering.com [23.155.224.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF76F346E7F for ; Fri, 5 Dec 2025 18:31:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=23.155.224.40 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764959523; cv=none; b=aI5c8e9Ctu4q2GrXukQKkNJmFdwgxr4YyUFTKekIQmMvMq3mi7tNm4rPnv/pH0R1rcm6WoLgVpxPL5FZv33NxvWGMFfe7g4gswLQgBYyoZbiqeLAWDPtX5r6Kk4tnSNORGw8eMM8ozbsB+Ec2osFI0jd5289WIR8DDMied9iyJ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764959523; c=relaxed/simple; bh=XYGVaXEcezzRHhedehNMDTHGl1+o0+ommLtY9q5SP6k=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type; b=nq+CeRgM0Rs7AQp/ahAxkld5ECVNH4VhWJOo7RukXvB2qLv6jX0XopaNhMVKsmR4z1M5TAMUdsiMaxCrqS6YZFIgBLp7VP9XNk6oTCdvzz+GLAfafYqDy6Z3VStM2r/GhCUsrYDzcMD0CEBh0midIIwdbIGOJ/7Q5bKNTn0eox8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=raptorengineering.com; spf=pass smtp.mailfrom=raptorengineering.com; dkim=pass (1024-bit key) header.d=raptorengineering.com header.i=@raptorengineering.com header.b=JwvogYK6; arc=none smtp.client-ip=23.155.224.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=raptorengineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=raptorengineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=raptorengineering.com header.i=@raptorengineering.com header.b="JwvogYK6" Received: from localhost (localhost [127.0.0.1]) by mail.rptsys.com (Postfix) with ESMTP id 569307791B42; Fri, 5 Dec 2025 12:31:58 -0600 (CST) Received: from mail.rptsys.com ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id FuLlrNfkxzxm; Fri, 5 Dec 2025 12:31:57 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.rptsys.com (Postfix) with ESMTP id 78C497791B6C; Fri, 5 Dec 2025 12:31:57 -0600 (CST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.rptsys.com 78C497791B6C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raptorengineering.com; s=B8E824E6-0BE2-11E6-931D-288C65937AAD; t=1764959517; bh=+yG2pBdsmftlBRZtouxZNKWge8vm09+Hvq7tKPaHiMw=; h=Date:From:To:Message-ID:MIME-Version; b=JwvogYK6H+r0GovXmRGxLeNDTSXEQAYDPj1ddxEGZeyq5KaicKiYfMPr5SdIHn0Hm 7XGaMIDkBfSG2Jy2AA04+/nBqPeEUi2clr5kdkKD9u3IAjkXzDdnPxEEmZZOfT18It 5rUdZQkgSkIJjvDqDk5h4df+5k0zxbBK3FgCVgvY= X-Virus-Scanned: amavisd-new at rptsys.com Received: from mail.rptsys.com ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id KgiLdOP7jgLA; Fri, 5 Dec 2025 12:31:57 -0600 (CST) Received: from vali.starlink.edu (localhost [127.0.0.1]) by mail.rptsys.com (Postfix) with ESMTP id 461177791B42; Fri, 5 Dec 2025 12:31:57 -0600 (CST) Date: Fri, 5 Dec 2025 12:31:57 -0600 (CST) From: Timothy Pearson To: =?utf-8?B?UmVuw6k=?= Rebe Cc: tzimmermann@suse.de, dri-devel , linux-kernel , Dave Airlie , Timothy Pearson Message-ID: <758090394.145092.1764959517083.JavaMail.zimbra@raptorengineeringinc.com> In-Reply-To: <20251205.161459.1654100040521559754.rene@exactco.de> References: <20251202.170626.2134482663677806825.rene@exactco.de> <20251205.161459.1654100040521559754.rene@exactco.de> Subject: Re: [PATCH] drm/ast: Fix big-endian support 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=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailer: Zimbra 8.5.0_GA_3042 (ZimbraWebClient - GC142 (Linux)/8.5.0_GA_3042) Thread-Topic: drm/ast: Fix big-endian support Thread-Index: yoRyX80Wmuj8hALML3doGI7B0v1lNQ== ----- Original Message ----- > From: "Ren=C3=A9 Rebe" > To: tzimmermann@suse.de > Cc: "dri-devel" , "linux-kernel" , "Dave Airlie" > , "Timothy Pearson" > Sent: Friday, December 5, 2025 9:14:59 AM > Subject: Re: [PATCH] drm/ast: Fix big-endian support > Hello Thomas, >=20 > On Wed, 3 Dec 2025 10:40:17 +0100, Thomas Zimmermann > wrote: >=20 >> [2] >> https://gitlab.freedesktop.org/drm/misc/kernel/-/blob/drm-misc-next-2025= -12-01-1/drivers/gpu/drm/ast/ast_mode.c?ref_type=3Dtags#L559 >> [3] >> https://gitlab.freedesktop.org/drm/misc/kernel/-/blob/drm-misc-next-2025= -12-01-1/drivers/gpu/drm/ast/ast_cursor.c?ref_type=3Dtags#L209 >>=20 >> > +=09case DRM_FORMAT_RGB565: >> > + ast_set_index_reg_mask(ast, AST_IO_VGACRI, AST_IO_VGACRA2, 0x3f, >> > 0x40); >> > +=09=09break; >> > +=09case DRM_FORMAT_XRGB8888 >=20 > While working on it I discovered that the Big-Endian byte-swapping > bits do apparently not just-work on a newer AST2400 in our Power 8 > while my initial patch did work as tested with an AST2200 in the Sun > T4-1 :-/ >=20 > Maybe that is what Timothy meant with "This is due to a ppc64 hardware > quirk, which when combined with a hardware design fault in the AST2500 > VGA controller results in a need to use software-based red-blue > channel swapping." [1] >=20 > Is there a way to simply specify the frame-buffer as BGRX8888? In a > quick test the drm layer complaint about "not supported" and "no > compatible format found"? I've been all around that loop. You can't do that -- the fb code has no id= ea how to drive such a framebuffer, and elsewhere in the kernel it's made c= lear that the GPU driver *must* provide a RGBX8888 linear framebuffer if th= e Linux fb code is going to be able to display a console. Does the Sun T4 CPU perform automatic byte swapping on PCI[e] data transact= ions? That might be the difference; POWER performs the byte swapping, and = since the ASpeed device is broken in BE mode we can't swap back by setting = the BE register bit in the AST GPU hardware. Fun fact -- it'll sorta work on the framebuffer side, but we lose the entir= e control BAR in the process. ASpeed seems OK with this, they just say som= ething along the lines of "oh, BE is not supported despite our documentatio= n" :facepalm: