Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753653AbdDRF7A (ORCPT ); Tue, 18 Apr 2017 01:59:00 -0400 Received: from mail.netline.ch ([148.251.143.178]:49400 "EHLO netline-mail3.netline.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750872AbdDRF66 (ORCPT ); Tue, 18 Apr 2017 01:58:58 -0400 Subject: Re: [RfC PATCH] drm: fourcc byteorder: brings header file comments in line with reality. To: Ilia Mirkin Cc: amd-gfx@lists.freedesktop.org, open list , "dri-devel@lists.freedesktop.org" , Gerd Hoffmann , Daniel Vetter References: <20170410101202.19229-1-kraxel@redhat.com> <20170410161214.305f5daf@eldfell> <1491833847.30990.77.camel@redhat.com> <20170410180941.43922e25@eldfell> <20170411103101.0497fe08@eldfell> From: =?UTF-8?Q?Michel_D=c3=a4nzer?= Message-ID: Date: Tue, 18 Apr 2017 14:58:41 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3873 Lines: 77 On 18/04/17 02:04 PM, Ilia Mirkin wrote: > On Mon, Apr 17, 2017 at 10:53 PM, Michel Dänzer wrote: >> On 17/04/17 03:43 PM, Ilia Mirkin wrote: >>> On Tue, Apr 11, 2017 at 10:18 AM, Ilia Mirkin wrote: >>>>> However, I totally agree with Alex that someone with a BE machine >>>>> should review the whole stack before we could be confident with anything. >>>> >>>> Here's what I'm confident about: xf86-video-nouveau worked just fine >>>> on top of kernel 4.3 on an AGP GeForce FX 5200 (with AGPGART turned >>>> off because ... well ... uninorth). fbcon/fbdev accel worked, >>>> xf86-video-nouveau's 2d accel worked, and simple demos (ala glxgears) >>>> worked after I fixed up mesa and nv30 driver items in version ... 11.1 >>>> it seems. As I recall it had gotten all broken in 10.0 or so by Adam >>>> Jackson in the name of making llvmpipe work on BE, declaring all other >>>> drivers broken, with various fixes by Michel Dänzer to get it back to >>>> working over the years. >>>> >>>> Anyone "fixing" the stack has to maintain that level of functioning >>>> through their various fixing. >>>> >>>> I will double-check that the above still works with the latest >>>> kernel/xorg/xf86-video-nouveau/mesa and report back (hopefully by this >>>> weekend). If there are any patches you'd like me to test, now's the >>>> time to ask -- getting the box up and running is the hard part, >>>> booting up an extra kernel -- easy. >>> >>> OK, so I revived my PowerMac7,3 G5 setup (PPC64 BE, NV34 GPU). Booted >>> it with an upstream 4.11-rc7 kernel, loaded up the nouveau kernel >>> module (which is included in that kernel), updated X to 1.19.2 and >>> mesa to 17.0.3. Everything works fine. Specifically: >>> >>> fbcon on top of fbdev provided by nouveau -- colors are fine >>> glxgears hw-accelerated by mesa on top of xf86-video-nouveau using >>> DRI2 -- colors are fine >>> glxgears softpipe-accelerated by mesa on top of xf86-video-nouveau -- >>> colors are fine >>> glxgears softpipe-accelerated by mesa on top of xf86-video-modesetting >>> -- colors are fine >>> xterm on top of xf86-video-nouveau -- colors are fine >>> xterm on top of xf86-video-modesetting -- colors are fine >>> >>> I couldn't test anything with GLAMOR since GLAMOR requires GL 2.1 or >>> higher, whereas nouveau's NV3x acceleration only provides GL 1.5 (due >>> to lacking NPOT and a handful of other things). >>> >>> The modetest utility did have trouble with AR24 and I'm pretty sure >>> the XR24 pattern was off too. However I wouldn't be surprised if the >>> modetest utility itself had endian issues in the pattern generation >>> logic. (Seems to be the case, based on a quick glance at the >>> tests/util/format.c logic and how it's used in pattern.c.) >>> >>> So in short, I think the current definitions of format are fine. >> >> I agree with Pekka that it's not that simple. What you've established is >> that things look fine after going through several layers of abstraction. >> It's possible that multiple bugs in those layers cancel each other out; >> in particular, it's quite likely that the code dealing with DRM formats >> is treating them as using native endianness (one possible giveaway for >> that is using shifts for (un)packing colour components). > > Quite true that this proves nothing. However one should note that > fbcon -> fbdev works, BTW, this supports Gerd's patch, since the KMS fbdev emulation code uses e.g. DRM_FORMAT_XRGB8888 for depth/bpp 24/32, and the fbdev API uses native endian packed colour values. > and both mesa hw driver and softpipe driver work, in addition to regular > DDX accel. Similarly, the X11 protocol uses native endian packed colour values. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer