Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1560054pxa; Thu, 6 Aug 2020 10:16:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQ0s0TJKHYbk1M/8TWQVeOIW/mOuxw0j+7Pizqsl+X87BMNnKHn1lFCaE37uPkvVJYwVJN X-Received: by 2002:a17:906:260c:: with SMTP id h12mr5565027ejc.457.1596734182866; Thu, 06 Aug 2020 10:16:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596734182; cv=none; d=google.com; s=arc-20160816; b=FLOPjSebCdSNW5ALYmtRzRkehhBiGxhZjnwdQJrw1DAcBek3Vr3q5zYWc//L0JjFSX OPcJ9zDDcwK6yjukeqaf2t6FSMlTc4ZDMaZQ6wj6SfVXQlDXFvDOHCs/kZBPABndCjwV xg6vK6QhL/snmTtw+b5QSNnZFnkKw2oC4K0yWT0kXm6tNojoNQgWH3+6waWX/1aTkXul wgyqXV5bsiSuk5zZZV18Z1fEdNKoVOgb6jZZh6qACpOjLDWekNNdUE4ZQteijdvFyHmD oEgJCUG8q1OEVqUF+WtIMXhqFepq6Bd1JSopjA83xKJrR46lIiBUvO1XLn7gaQr5cgXc K9wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=PzAJxMhy8AwoAhe9Oc05JuJqzagCf1jvUERyc1ZJxs4=; b=q1K/zSI91jhmDxXoKhaUxfdiMAr4Dmc5XwD9+eTUv9zIwbCz8vSSpLM9eQGLPvT3ff r31dML+KeWQqq1nztfvRqOlxAi7aJ0jwESPdZmXGYXFrl6X4BM4sY6SrkPJ6KkZzXKYO vyFuMRJ7H0g+YVQzdVjzlS71VEhYbeVeUqhFyM1s8jVQPnZ6IxNMIDxxgW28iz1KUtSx LHJbROGZySgzR+ICHdBU8GJLvNKM1ClWKTccKD3i62GpUzOn9jmcerbDb4Xi6+PrPkz5 /WOb9mT2uYPIYrqId1/PhwrV6w2SIeyVEAgklzArNyqoqQtil/5Fwc16vWEqgIv2TzqV u//w== 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 y5si3422259eje.702.2020.08.06.10.16.00; Thu, 06 Aug 2020 10:16:22 -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 S1729800AbgHFRNs (ORCPT + 99 others); Thu, 6 Aug 2020 13:13:48 -0400 Received: from elvis.franken.de ([193.175.24.41]:36776 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728618AbgHFRNK (ORCPT ); Thu, 6 Aug 2020 13:13:10 -0400 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1k3cy8-0001w1-00; Thu, 06 Aug 2020 12:17:52 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id 0C114C0C5C; Thu, 6 Aug 2020 12:17:34 +0200 (CEST) Date: Thu, 6 Aug 2020 12:17:34 +0200 From: Thomas Bogendoerfer To: Tiezhu Yang Cc: Jiaxun Yang , Huacai Chen , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] MIPS: Introduce cmdline argument writecombine= Message-ID: <20200806101733.GA8136@alpha.franken.de> References: <1596697741-3561-1-git-send-email-yangtiezhu@loongson.cn> <10e04885-b775-e7db-b927-6400382fd32d@flygoat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 06, 2020 at 04:32:13PM +0800, Tiezhu Yang wrote: > On 08/06/2020 03:39 PM, Jiaxun Yang wrote: > > > > > >在 2020/8/6 下午3:09, Tiezhu Yang 写道: > >>Loongson processors have a writecombine issue that maybe failed to > >>write back framebuffer used with ATI Radeon or AMD GPU at times, > >>after commit 8a08e50cee66 ("drm: Permit video-buffers writecombine > >>mapping for MIPS"), there exists some errors such as blurred screen > >>and lockup, and so on. > >> > >>With this patch, disable writecombine by default for Loongson64 to > >>work well with ATI Radeon or AMD GPU, and it has no influence on the > >>other platforms due to writecombine is enabled by default. > >> > >>Additionally, if it is necessary, writecombine=on can be set manually > >>in the cmdline to enhance the performance for Loongson LS7A integrated > >>graphics in the future. > >> > >>[ 60.958721] radeon 0000:03:00.0: ring 0 stalled for more than > >>10079msec > >>[ 60.965315] radeon 0000:03:00.0: GPU lockup (current fence id > >>0x0000000000000112 last fence id 0x000000000000011d on ring 0) > >>[ 60.976525] radeon 0000:03:00.0: ring 3 stalled for more than > >>10086msec > >>[ 60.983156] radeon 0000:03:00.0: GPU lockup (current fence id > >>0x0000000000000374 last fence id 0x00000000000003a8 on ring 3) > >Hi Tiezhu, > > > >Thanks for your patch. > >Personally I didn't have any issue with writecombine on my test systems, > >but there > >are some complains about unstable graphic card from users. So generally a > >cmdline > >writecombine switch is necessary. no, if there is hardware which can't work with writecombining enabled the driver should disable it by it's own and not by some user switch. It might even be better to revert the patch enabling writecombining blindly and add code to enable it for hardware where it works. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]