Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3286224pxu; Sun, 11 Oct 2020 04:19:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkXNiyxpOiMldJ2HbVQ6IMO269lMPeelOGD9zy3VBMi/WPQkrM9jBq0F4wzVfddGPIBfNS X-Received: by 2002:a17:906:34ce:: with SMTP id h14mr22610048ejb.325.1602415170469; Sun, 11 Oct 2020 04:19:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602415170; cv=none; d=google.com; s=arc-20160816; b=R+OzgFCVUju7hSipur8J5b7X50GhYHxJqvQljSVRFXYCGMheyC87GgFR9ZZNWCUKPP L+ULnvpa2WbGoTFic4PVd8SShSMgh/3UhX7Z2L4XmdGFAcppuua3IDKSJLGktI5hWB3Q mdBpKX66va0ivUl/6uJP0sxTEISAzMgqViff+JV/5OI21aOk4pFAYFmbf5bgFUVAcNHI BISMKQSZriqavnblGEiPznvSfIQJX3C4GyErRLwAAMODwJgZ/qUD5jlFcCqpUs1bBgdk T2KiucJItENlEZLo8IYyj6wb3Q29TrCuefRXW4kAGf/zuzavHkGlJ37IQ6a6qKr5g/ke gdDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:content-disposition :content-transfer-encoding:mime-version:in-reply-to:references:cc :user-agent:date:subject:to:from; bh=ZIlw+H5iBhUKsRU6KvwevFsww9E8YuGvQJqcU87Ce70=; b=xrC/dreX1mdg6TKADNe/o7z/JOeMrwej1Ga50JyeJynQ0Ymw7UQJcCoWseKDy5AIHG VJtPQlVl0qzXNVQgyN+wBUuTzzLEykdAGuqD1ayPzjdUei9u/zDJtG5X0+rLZsSfhjv5 UBsjIJcF8GIYTAFlAKcDKc2ocmT/jMYb2TatwKQPS91xtoSziTWKolEcwfJ0e3SleoeV c9qw/cNeOaP8HM0WqGvzxxuVNzbd/At/RCc807M0/aqPAPJbLc6mK4krtyoo3QksUu+t PQ+3bben96nuUoAx5zlicFPsfTBssuoG5IjUR96GpGXdLaM9+U0OtTqYaOHE4Ey58Dcc x4ZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 23si10050927ejx.661.2020.10.11.04.19.04; Sun, 11 Oct 2020 04:19:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388165AbgJJWxa (ORCPT + 99 others); Sat, 10 Oct 2020 18:53:30 -0400 Received: from hosting.gsystem.sk ([212.5.213.30]:49252 "EHLO hosting.gsystem.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731302AbgJJTIA (ORCPT ); Sat, 10 Oct 2020 15:08:00 -0400 Received: from [192.168.0.2] (188-167-68-178.dynamic.chello.sk [188.167.68.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hosting.gsystem.sk (Postfix) with ESMTPSA id DB18A7A02C5; Sat, 10 Oct 2020 10:49:39 +0200 (CEST) From: Ondrej Zary To: Ilia Mirkin Subject: Re: [Nouveau] nouveau broken on Riva TNT2 in 5.9.0-rc8: GPU not supported on big-endian Date: Sat, 10 Oct 2020 10:49:37 +0200 User-Agent: KMail/1.9.10 Cc: Karol Herbst , nouveau , Ben Skeggs , "dri-devel" , LKML References: <202010092326.20482.linux@zary.sk> In-Reply-To: X-KMail-QuotePrefix: > MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <202010101049.37663.linux@zary.sk> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday 10 October 2020 00:23:38 Ilia Mirkin wrote: > On Fri, Oct 9, 2020 at 5:54 PM Karol Herbst wrote: > > > > On Fri, Oct 9, 2020 at 11:35 PM Ondrej Zary wrote: > > > > > > Hello, > > > I'm testing 5.9.0-rc8 and found that Riva TNT2 stopped working: > > > [ 0.000000] Linux version 5.9.0-rc8+ (zary@gsql) (gcc (Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #326 SMP Fri Oct 9 22:31:40 CEST 2020 > > > ... > > > [ 14.771464] nouveau 0000:01:00.0: GPU not supported on big-endian > > > [ 14.771782] nouveau: probe of 0000:01:00.0 failed with error -38 > > > > > > big-endian? WTF? The machine is x86. > > > > > > > mhh, we reworked the endianess checks a bit and apparently that broke > > something... I will give it some thoughts, but could you be so kind > > and create an mmiotrace under 5.9 with nouveau? You won't need to > > start X or anything while doing it. Just enable the trace and modprobe > > nouveau and collect the trace. > > Looks like nvkm_device_endianness unconditionally reads out 0x4. I > don't think that reg is there pre-NV11. At least NV4, NV5, NV10 and > maybe NV15 (which is logically pre-NV11) don't support big-endian > mode. Not sure about NV1A, which was the IGP of the series and IIRC > logically pre-NV11 as well (but clearly could only be used with x86 > chips, since it was part of the motherboard). Yes, you're right. Forcing nvkm_device_endianness to return true allows 5.9.0-rc8 to work: [ 0.000000] Linux version 5.9.0-rc8+ (zary@gsql) (gcc (Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #326 SMP Fri Oct 9 22:31:40 CEST 2020 ... [ 12.311258] nouveau 0000:01:00.0: bios: DCB table not found [ 12.311583] nouveau 0000:01:00.0: bios: DCB table not found [ 12.311834] nouveau 0000:01:00.0: bios: DCB table not found [ 12.311847] nouveau 0000:01:00.0: bios: DCB table not found [ 12.311989] agpgart-intel 0000:00:00.0: AGP 3.0 bridge [ 12.312017] agpgart-intel 0000:00:00.0: bridge is in legacy mode, falling back to 2.x [ 12.312031] agpgart-intel 0000:00:00.0: putting AGP V2 device into 4x mode [ 12.312066] nouveau 0000:01:00.0: putting AGP V2 device into 4x mode [ 12.312162] agpgart-intel 0000:00:00.0: AGP 3.0 bridge [ 12.312182] agpgart-intel 0000:00:00.0: bridge is in legacy mode, falling back to 2.x [ 12.312195] agpgart-intel 0000:00:00.0: putting AGP V2 device into 4x mode [ 12.312230] nouveau 0000:01:00.0: putting AGP V2 device into 4x mode [ 12.312247] nouveau 0000:01:00.0: tmr: unknown input clock freq [ 12.318341] nouveau 0000:01:00.0: fb: 32 MiB SDRAM [ 12.333376] [TTM] Zone kernel: Available graphics memory: 385048 KiB [ 12.333392] [TTM] Initializing pool allocator [ 12.333434] nouveau 0000:01:00.0: DRM: VRAM: 31 MiB [ 12.333443] nouveau 0000:01:00.0: DRM: GART: 128 MiB [ 12.333453] nouveau 0000:01:00.0: DRM: BMP version 5.6 [ 12.333460] nouveau 0000:01:00.0: DRM: No DCB data found in VBIOS [ 12.335355] nouveau 0000:01:00.0: DRM: MM: using M2MF for buffer copies [ 12.335443] nouveau 0000:01:00.0: bios: DCB table not found [ 12.336033] nouveau 0000:01:00.0: DRM: Saving VGA fonts [ 12.376420] nouveau 0000:01:00.0: DRM: No DCB data found in VBIOS [ 12.410397] nouveau 0000:01:00.0: DRM: allocated 1280x1024 fb: 0x4000, bo b68d2ac4 [ 12.441217] fbcon: nouveaudrmfb (fb0) is primary device [ 12.591964] Console: switching to colour frame buffer device 160x64 [ 12.593876] nouveau 0000:01:00.0: [drm] fb0: nouveaudrmfb frame buffer device [ 12.594944] [drm] Initialized nouveau 1.3.1 20120801 for 0000:01:00.0 on minor 0 BTW. 5.8 kernel (that appeared today in Debian packports) is broken the same way. > Aha, it's documented in rnndb: > > https://github.com/envytools/envytools/blob/master/rnndb/bus/pmc.xml > > > -ilia > -- Ondrej Zary