Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2553411ybi; Mon, 17 Jun 2019 06:48:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqzeChqbCunNhZTCOD88j1VjpxqCNBUK7WYeXEjO8Z8EBgmwtT25F+RqpfEXIEwl4mZsRqdw X-Received: by 2002:a65:638a:: with SMTP id h10mr19022293pgv.64.1560779286574; Mon, 17 Jun 2019 06:48:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560779286; cv=none; d=google.com; s=arc-20160816; b=0UFa0RkW3HnhLRE8rR9H9DobKjVGENUE2RkFv2KegbETgNlx8Fd5uz0tH+PkFVfL// folfbqfT+dHkVa0BeYX1+rrcjihqNcHvGWcf7yA9qOZ8g8Dn/QmmYG3OXfZ/vI0NBbEG 1W6NkodpnKe9cqkJ8BQLAWCtHxWjZjc+MCe0TTmFZPCsSy3GW5t3VrBfp0PLtZpwgqIV dfKUD3BSEyxKsc9BddOlSwH4wWAqMak1TE6uJxzk0TcxYxswXYbihVz3AbNhj036cEOr fxg5HQhUIBXOjbvDHrj0eRh5T+O7DfvmFuLNy6mf5oa3DfTwXE7AQmSKS+k2iDTlYmSE xEVg== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=O9iaokS7chRIdty8YXJ6Ys/2JY44g91hT9zsHpjPuBg=; b=TTyZVbQ0NyBQyQk6oGzoMmUMjcZVvyTd9E08wdFv6nuR06e3fPkG4Kb5yHUEWZZF88 P+A06sEypoJWgjNw64V9ob2c7zjBMWEx9A+jKmxQuyPA6Me1Rqo3XanBIWYzLJz/Pbla AnCD5YruZ+Ln9s774ilZdMtyBu5GFCPhkV7fkC6j4mqtx9BsbwPvmoKn4YtMeT+Enj7z fhOCryYOQercCU3l6p0lZg3BilEtyfhAAwwafVKfj4C0vCRiFpnCtyAj9OL/dt9U/h2e tZvl3iVqErxdU7VrWj9UeimZgjW7fxqjEE6fNOBAXrxk5eWZg+Fgas0oNBdy1fDhF26n rTxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ESL7h+x6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q25si11580284pfn.280.2019.06.17.06.47.50; Mon, 17 Jun 2019 06:48:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ESL7h+x6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726599AbfFQNrg (ORCPT + 99 others); Mon, 17 Jun 2019 09:47:36 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:38479 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725983AbfFQNrf (ORCPT ); Mon, 17 Jun 2019 09:47:35 -0400 Received: by mail-lf1-f67.google.com with SMTP id b11so6559654lfa.5; Mon, 17 Jun 2019 06:47:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=O9iaokS7chRIdty8YXJ6Ys/2JY44g91hT9zsHpjPuBg=; b=ESL7h+x6npOVGuO1kDUltOllyumhp7aW8zxRpnbwR0R2IlDD38Dae7N2KYdDOJImep K/sS0rRKbpjTMcUW79gCdah0eMKQWlb8Mis1BA/PaWyeE+bOwvh2JWeUvq+5JwtC3wPA Kq7fTe2eZuukZ4CDSgVrVbuIjAk9Yx6Eh57AmxYWdY8MQkMRaJURdDS5VWQHuQ4x8vvK HSVyzSWOrko7q/YJarrvddjHG/6eVXDCF4whEpkr9xXo1bmQ/YBvO01t1JiWAsOVrabS Nzoz/QthCrZF56BH3bSZ9jNfdfFEF+6F63VnFr3rDxSi0EJx4VJ3o8nZ6Lt+4s91jq4B kWcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=O9iaokS7chRIdty8YXJ6Ys/2JY44g91hT9zsHpjPuBg=; b=kYuCvUWjRGR8kEgUAu8b6U1YPw803Tn16mdyuq3l3Si/1l/b9G9kjvKizCShQjs9hF 9YBZzEBMET5vjgNmGdLYDH/Q57U9TuYGrFwVFCrGx5q4rYb4UybsI5/EylxLrdlYCC2A sCDRciSmrC87PFxBiCLdaNBD3ejdfghztXgStTe6Tk+iuaV4wsvjz2USyj13AeVkZHzP cuKwAGc/05oCG5RiujlfmImZbrbua3dXJj98Al1BN15qFx8KPs8qgAOzdQ2QMy1IFHnD uG75vPfHEi1FZ6igpJvnCG53ZqXW7h2n9WtE3r86YlJskuLr4Lha9MolbXHq73LcWFLl Ur3A== X-Gm-Message-State: APjAAAWJc3LsmaS11jaNuoXXNTyfSqesJy82XG6Q3NjBrN5fN55WeXwA WKC050SHH+qufThn7Jlxs4wpHAPYwVM= X-Received: by 2002:ac2:4d17:: with SMTP id r23mr6757lfi.130.1560779253032; Mon, 17 Jun 2019 06:47:33 -0700 (PDT) Received: from mobilestation ([5.164.217.122]) by smtp.gmail.com with ESMTPSA id 16sm1770779lfy.21.2019.06.17.06.47.31 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 17 Jun 2019 06:47:32 -0700 (PDT) Date: Mon, 17 Jun 2019 16:47:30 +0300 From: Serge Semin To: Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Daniel Vetter , Christian Koenig , Huang Rui , Junwei Zhang , Greg Kroah-Hartman Cc: dri-devel@lists.freedesktop.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Ralf Baechle , Paul Burton , James Hogan , "Vadim V . Vlasov" Subject: Re: [PATCH] drm: Permit video-buffers writecombine mapping for MIPS Message-ID: <20190617134729.pd24boyqe2viyihm@mobilestation> References: <20190423123122.32573-1-fancer.lancer@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190423123122.32573-1-fancer.lancer@gmail.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello folks, Any updates of this patch status? It has been here for about two months. Regards, -Sergey On Tue, Apr 23, 2019 at 03:31:22PM +0300, Serge Semin wrote: > Since commit 4b050ba7a66c ("MIPS: pgtable.h: Implement the > pgprot_writecombine function for MIPS") and commit c4687b15a848 ("MIPS: Fix > definition of pgprot_writecombine()") write-combine vma mapping is > available to be used by kernel subsystems for MIPS. In particular the > uncached accelerated attribute is requested to be set by ioremap_wc() > method and by generic PCI memory pages/ranges mapping methods. The same > is done by the drm_io_prot()/ttm_io_prot() functions in case if > write-combine flag is set for vma's passed for mapping. But for some > reason the pgprot_writecombine() method calling is ifdefed to be a > platform-specific with MIPS system being marked as lacking of one. At the > very least it doesn't reflect the current MIPS platform implementation. > So in order to improve the DRM subsystem performance on MIPS with UCA > mapping enabled, we need to have pgprot_writecombine() called for buffers, > which need store operations being combined. In case if particular MIPS > chip doesn't support the UCA attribute, the mapping will fall back to > noncached. > > Cc: Ralf Baechle > Cc: Paul Burton > Cc: James Hogan > Signed-off-by: Vadim V. Vlasov > Signed-off-by: Serge Semin > --- > drivers/gpu/drm/drm_vm.c | 5 +++-- > drivers/gpu/drm/ttm/ttm_bo_util.c | 4 ++-- > 2 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c > index c3301046dfaa..50178dc64060 100644 > --- a/drivers/gpu/drm/drm_vm.c > +++ b/drivers/gpu/drm/drm_vm.c > @@ -62,7 +62,8 @@ static pgprot_t drm_io_prot(struct drm_local_map *map, > /* We don't want graphics memory to be mapped encrypted */ > tmp = pgprot_decrypted(tmp); > > -#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) > +#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || \ > + defined(__mips__) > if (map->type == _DRM_REGISTERS && !(map->flags & _DRM_WRITE_COMBINING)) > tmp = pgprot_noncached(tmp); > else > @@ -73,7 +74,7 @@ static pgprot_t drm_io_prot(struct drm_local_map *map, > tmp = pgprot_writecombine(tmp); > else > tmp = pgprot_noncached(tmp); > -#elif defined(__sparc__) || defined(__arm__) || defined(__mips__) > +#elif defined(__sparc__) || defined(__arm__) > tmp = pgprot_noncached(tmp); > #endif > return tmp; > diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c > index 895d77d799e4..9f918b992f7e 100644 > --- a/drivers/gpu/drm/ttm/ttm_bo_util.c > +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c > @@ -539,13 +539,13 @@ pgprot_t ttm_io_prot(uint32_t caching_flags, pgprot_t tmp) > tmp = pgprot_noncached(tmp); > #endif > #if defined(__ia64__) || defined(__arm__) || defined(__aarch64__) || \ > - defined(__powerpc__) > + defined(__powerpc__) || defined(__mips__) > if (caching_flags & TTM_PL_FLAG_WC) > tmp = pgprot_writecombine(tmp); > else > tmp = pgprot_noncached(tmp); > #endif > -#if defined(__sparc__) || defined(__mips__) > +#if defined(__sparc__) > tmp = pgprot_noncached(tmp); > #endif > return tmp; > -- > 2.21.0 >